Skip to content

Commit 2bb64f8

Browse files
add docs for new applications field, minor refactoring to fix Python warnings
1 parent 2851b44 commit 2bb64f8

File tree

5 files changed

+11
-9
lines changed

5 files changed

+11
-9
lines changed

docs/api.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,9 @@ As an alternative to importing individual objects into your library, you can acc
8484
- `get_apps(policy_check_after(opt))` : get a list of Veracode applications (JSON format). If provided, returns only applications that have a policy check date on or after `policy_check_after` (format is `yyyy-mm-dd`).
8585
- `get_app(guid(opt),legacy_id(opt))`: get information for a single Veracode application using either the `guid` or the `legacy_id` (integer).
8686
- `get_app_by_name(name)`: get list of applications whose names contain the search string `name`.
87-
- `create_app(app_name, business_criticality, business_unit(opt), teams(opt), policy_guid(opt), custom_fields(opt array), bus_owner_name(opt), bus_owner_email(opt),git_repo_url(opt),custom_kms_alias(opt))`: create an application profile.
87+
- `create_app(app_name, business_criticality, description(opt), business_unit(opt), teams(opt), policy_guid(opt), custom_fields(opt array), bus_owner_name(opt), bus_owner_email(opt),git_repo_url(opt),custom_kms_alias(opt))`: create an application profile.
8888
- `business_criticality`: one of "VERY HIGH", "HIGH", "MEDIUM", "LOW", "VERY LOW"
89+
- `description`: extended description of the application
8990
- `business_unit`: the GUID of the business unit to which the application should be assigned
9091
- `teams`: a list of the GUIDs of the teams to which the application should be assigned
9192
- `policy_guid`: the GUID of the policy to set for this application.

docs/applications.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ The following methods call Veracode REST APIs and return JSON.
77
- `Applications().get_all(policy_check_after(opt))` : get a list of Veracode applications (JSON format). If provided, returns only applications that have a policy check date on or after `policy_check_after` (format is `yyyy-mm-dd`).
88
- `Applications().get(guid(opt),legacy_id(opt))`: get information for a single Veracode application using either the `guid` or the `legacy_id` (integer).
99
- `Applications().get_by_name(name)`: get list of applications whose names contain the search string `name`.
10-
- `Applications().create(app_name, business_criticality, business_unit(opt), teams(opt), policy_guid(opt), custom_fields(opt array), bus_owner_name(opt), bus_owner_email(opt),git_repo_url(opt),custom_kms_alias(opt))`: create an application profile.
10+
- `Applications().create(app_name, business_criticality, description(opt), business_unit(opt), teams(opt), policy_guid(opt), custom_fields(opt array), bus_owner_name(opt), bus_owner_email(opt),git_repo_url(opt),custom_kms_alias(opt))`: create an application profile.
1111
- `business_criticality`: one of "VERY HIGH", "HIGH", "MEDIUM", "LOW", "VERY LOW"
12+
- `description`: extended description of the application.
1213
- `business_unit`: the GUID of the business unit to which the application should be assigned
1314
- `teams`: a list of the GUIDs of the teams to which the application should be assigned
1415
- `policy_guid`: the GUID of the policy to set for this application.
@@ -17,7 +18,7 @@ The following methods call Veracode REST APIs and return JSON.
1718
- `bus_owner_email`: the email address of the business owner of the application
1819
- `git_repo_url`: the URL to the git repository containing the code for the application
1920
- `custom_kms_alias`: the alias for the Customer Managed Encryption Key (CMK), which will be used to encrypt/decrypt customer provided data. Note: The Customer Managed Encrytion Key feature must be activated and configured for your organization before attempting to set this value.
20-
- `Applications().update(guid, app_name, business_criticality, business_unit(opt), teams(opt), policy_guid(opt), custom_fields(opt array), bus_owner_name(opt), bus_owner_email(opt),git_repo_url(opt))`: update an application profile. Note that partial updates are NOT supported, so you need to provide all values including those that aren't changing.
21+
- `Applications().update(guid, app_name, business_criticality, description(opt),business_unit(opt), teams(opt), policy_guid(opt), custom_fields(opt array), bus_owner_name(opt), bus_owner_email(opt),git_repo_url(opt))`: update an application profile. Note that partial updates are NOT supported, so you need to provide all values including those that aren't changing.
2122
- `Applications().delete(guid)`: delete the application identified by `guid`. This is not a reversible action.
2223

2324
## Custom Fields

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = 'veracode_api_py'
3-
version = '0.9.57'
3+
version = '0.9.58'
44
authors = [ {name = "Tim Jarrett", email="[email protected]"} ]
55
description = 'Python helper library for working with the Veracode APIs. Handles retries, pagination, and other features of the modern Veracode REST APIs.'
66
readme = 'README.md'
@@ -22,4 +22,4 @@ dependencies = {file = ["requirements.txt"]}
2222
[project.urls]
2323
"Homepage" = "https://github.com/veracode/veracode-api-py"
2424
"Bug Tracker" = "https://github.com/veracode/veracode-api-py/issues"
25-
"Download" = "https://github.com/veracode/veracode-api-py/archive/v_0957.tar.gz"
25+
"Download" = "https://github.com/veracode/veracode-api-py/archive/v_0958.tar.gz"

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
setup(
88
name = 'veracode_api_py',
99
packages = ['veracode_api_py'],
10-
version = '0.9.57',
10+
version = '0.9.58',
1111
license='MIT',
1212
description = 'Python helper library for working with the Veracode APIs. Handles retries, pagination, and other features of the modern Veracode REST APIs.',
1313
long_description = long_description,
1414
long_description_content_type="text/markdown",
1515
author = 'Tim Jarrett',
1616
author_email = '[email protected]',
1717
url = 'https://github.com/tjarrettveracode',
18-
download_url = 'https://github.com/veracode/veracode-api-py/archive/v_0957.tar.gz',
18+
download_url = 'https://github.com/veracode/veracode-api-py/archive/v_09578tar.gz',
1919
keywords = ['veracode', 'veracode-api'],
2020
install_requires=[
2121
'veracode-api-signing'

veracode_api_py/applications.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def create(self,app_name:str ,business_criticality, description: str=None, busin
4040
custom_fields=custom_fields, bus_owner_name=bus_owner_name,
4141
bus_owner_email=bus_owner_email, git_repo_url=git_repo_url, custom_kms_alias=custom_kms_alias)
4242

43-
def update(self,guid: UUID,app_name:str, description: str=None, business_criticality, business_unit: UUID=None,
43+
def update(self,guid: UUID,app_name:str, business_criticality, description: str=None, business_unit: UUID=None,
4444
teams=[], policy_guid:UUID=None, custom_fields=[],
4545
bus_owner_name=None,bus_owner_email=None, git_repo_url=None):
4646
return self._create_or_update("UPDATE",app_name=app_name,business_criticality=business_criticality,
@@ -53,7 +53,7 @@ def delete(self,guid: UUID):
5353
uri = 'appsec/v1/applications/{}'.format(guid)
5454
return APIHelper()._rest_request(uri,'DELETE')
5555

56-
def _create_or_update(self,method,app_name: str,description: str=None,business_criticality, business_unit: UUID=None,
56+
def _create_or_update(self,method,app_name: str, business_criticality, description: str=None, business_unit: UUID=None,
5757
teams=[],guid=None,policy_guid:UUID=None, custom_fields=[],
5858
bus_owner_name=None,bus_owner_email=None,git_repo_url=None,custom_kms_alias:str=None):
5959
if method == 'CREATE':

0 commit comments

Comments
 (0)