asset#
Autogenerated API
- argus_api.lib.assets.v2.asset.add_asset(customer: str = None, dataSource: str = None, shortName: str = None, name: str = None, description: str = None, owner: str = None, criticality: dict = None, assetDefinition: str = None, components: dict = None, ttl: int = None, forceIndex: bool = None, json: bool = True, verify: Optional[bool] = None, proxies: Optional[dict] = None, apiKey: Optional[str] = None, authentication: Optional[dict] = None, server_url: Optional[str] = None, body: Optional[dict] = None, api_session: Optional[ArgusAPISession] = None) dict #
Creates a new Asset (PUBLIC)
- Parameters
customer (str) – ID or short name of customer, if not specified then current user’s customer will be assigned
dataSource (str) – ID or short name of the Data Source
shortName (str) – Customer unique short name of asset. If not specified will be set to the new asset’s generated/assigned UUID. => [a-zA-Z0-9_:\-.]*
name (str) – Name of asset => [sw\{\}\$\-\(\).\[\]”'_/\,\*\+\#:@!?;=]*
description (str) – Description of asset. May use HTML, which will be sanitized
owner (str) – ID or username of user who owns the asset. When username is specified, it should exist within current user’s domain
criticality (dict) – Request to set a Group or Asset’s criticality triad
assetDefinition (str) – ID or short name of asset definition, it should exist within current user’s domain
components (list) – Specify components to be added with the asset
ttl (int) – Time to live duration of this asset since last seen, 0 means won’t expire.
forceIndex (bool) – Whether to force an Elasticsearch index refresh making the new Asset immediately searchable.
json – return the response’s body as a
dict
parsed from json.True
by default. If set to false, the rawrequests.Response
object will be returned.verify – path to a certificate bundle or boolean indicating whether SSL verification should be performed.
apiKey – Argus API key.
authentication – authentication override
server_url – API base URL override
body – body of the request. other parameters will override keys defined in the body.
api_session – session to use for this request. If not set, the global session will be used.
- Raises
AuthenticationFailedException – on 401
AccessDeniedException – on 403
ValidationErrorException – on 412
ArgusException – on other status codes
- Returns
dictionary translated from JSON
- argus_api.lib.assets.v2.asset.add_asset_definition(domain: str = None, shortName: str = None, name: str = None, description: str = None, component: str = None, json: bool = True, verify: Optional[bool] = None, proxies: Optional[dict] = None, apiKey: Optional[str] = None, authentication: Optional[dict] = None, server_url: Optional[str] = None, body: Optional[dict] = None, api_session: Optional[ArgusAPISession] = None) dict #
Creates a new AssetDefinition (INTERNAL)
- Parameters
domain (str) – ID or name of domain, if not specified current user domain will be assigned
shortName (str) – Asset definition short name, required and unique per domain => [a-zA-Z0-9_:\-.]*
name (str) – Asset definition name => [sw\{\}\$\-\(\).\[\]”'_/\,\*\+\#:@!?;=]*
description (str) – Optional Asset definition description. Will be HTML sanitized
component (list) – Component definitions (ID or short name) to be included for the asset definition
json – return the response’s body as a
dict
parsed from json.True
by default. If set to false, the rawrequests.Response
object will be returned.verify – path to a certificate bundle or boolean indicating whether SSL verification should be performed.
apiKey – Argus API key.
authentication – authentication override
server_url – API base URL override
body – body of the request. other parameters will override keys defined in the body.
api_session – session to use for this request. If not set, the global session will be used.
- Raises
AuthenticationFailedException – on 401
AccessDeniedException – on 403
ValidationErrorException – on 412
ArgusException – on other status codes
- Returns
dictionary translated from JSON
- argus_api.lib.assets.v2.asset.calculate_asset_statistics(keywords: str = None, keywordFieldStrategy: str = None, keywordMatchStrategy: str = None, startTimestamp: str = None, endTimestamp: str = None, timeFieldStrategy: str = None, timeMatchStrategy: str = None, userFieldStrategy: str = None, user: str = None, customer: str = None, asset: str = None, assetDefinition: str = None, parent: str = None, ancestor: str = None, dataSource: str = None, component: dict = None, criticality: dict = None, minimumTotalCvss: float = None, maximumTotalCvss: float = None, includeFlags: str = None, excludeFlags: str = None, hasGroups: bool = None, assetByVulnerability: dict = None, subCriteria: dict = None, fieldAggregation: dict = None, rangeMetric: dict = None, statisticsMetric: dict = None, includeGroupInfo: bool = True, includeDeleted: bool = None, json: bool = True, verify: Optional[bool] = None, proxies: Optional[dict] = None, apiKey: Optional[str] = None, authentication: Optional[dict] = None, server_url: Optional[str] = None, body: Optional[dict] = None, api_session: Optional[ArgusAPISession] = None) dict #
Generate the requested statistics for Assets matching the provided search criteria. (DEV)
- param list keywords
Search for keywords against fields defined by a KeywordFieldStrategy
- param list keywordFieldStrategy
Defines which fields will be searched by keywords (default all supported fields) (default assetAll)
- param str keywordMatchStrategy
Defines how strict different keywords should be matched (default match any keywords) (default any)
- param str startTimestamp
Restrict to a time frame based on the set timeFieldStrategy (start timestamp). (default 0)
- param str endTimestamp
Restrict to a time frame based on the set timeFieldStrategy (end timestamp). (default 0)
- param list timeFieldStrategy
Defines which timestamps fields will be filtered with start/endTimestamp (default lastUpdatedTimestamp)
- param str timeMatchStrategy
Defines how strict to match against different timestamps (all/any) using start and end timestamp (default any) (default any)
- param list userFieldStrategy
Defines which user fields to filter with the submitted user value(s) (default all)
- param list user
Search for Assets by associated user IDs or short names defined by the UserFieldStrategy
- param list customer
Search for Assets with these Customer IDs or short names
- param list asset
Search for Assets with these Asset IDs or short names
- param list assetDefinition
Search for Assets with these AssetDefinition IDs or short names
- param list parent
Search for Assets with these parent AssetGroup IDs or short names
- param list ancestor
Search for Assets in the hierarchy below this ancestor AssetGroup identified by its ID or short name.<br />This will resolve all descendant Asset Groups and expand the search to return Assets belonging to them in the hierarchy below these ‘ancestor’ groups
- param list dataSource
Search for Assets detected and reported by these data sources, identified by id or shortName
- param list component
Search for Assets by their components using AND search mode i.e. all criteria must match.<br />If you want different behaviour try using subcriteria
- param list criticality
Search for Assets by Confidentiality, Availability and Integrity.<br />All criteria values must match for an Asset to match. Use sub-criteria for OR query behaviour.
- param float minimumTotalCvss
Search for Assets with at least this CVSS score
- param float maximumTotalCvss
Search for Assets with at most this CVSS score
- param list includeFlags
Explicitly search for Assets that contain these flags
- param list excludeFlags
Explicitly filter out Assets that contain these flags
- param bool hasGroups
Set to filter on/out Assets belonging to a group
- param dict assetByVulnerability
Search criteria for searching for Assets by Vulnerability properties
- param list subCriteria
Set additional criteria that are applied with logical OR by default
- param list fieldAggregation
The fields by which to group statistics.
The order of fieldAggregations in the request will determine the hierarchy of the aggregations and their buckets.
- param list rangeMetric
The timestamp fields for which to generate statistics.
- param list statisticsMetric
The numerical fields for which to generate metrics.
- param bool includeGroupInfo
Whether to include Assets’ parent group info in the search response (default true)
- param bool includeDeleted
Whether to include deleted assets (default false)
- param json
return the response’s body as a
dict
parsed from json.True
by default. If set to false, the rawrequests.Response
object will be returned.- param verify
path to a certificate bundle or boolean indicating whether SSL verification should be performed.
- param apiKey
Argus API key.
- param authentication
authentication override
- param server_url
API base URL override
- param body
body of the request. other parameters will override keys defined in the body.
- param api_session
session to use for this request. If not set, the global session will be used.
- raises AuthenticationFailedException
on 401
- raises AccessDeniedException
on 403
- raises ValidationErrorException
on 412
- raises ArgusException
on other status codes
- returns
dictionary translated from JSON
- argus_api.lib.assets.v2.asset.delete_asset(idOrShortName: str, customer: str = None, forceIndex: bool = None, json: bool = True, verify: Optional[bool] = None, proxies: Optional[dict] = None, apiKey: Optional[str] = None, authentication: Optional[dict] = None, server_url: Optional[str] = None, body: Optional[dict] = None, api_session: Optional[ArgusAPISession] = None) dict #
Delete asset (PUBLIC)
- Parameters
idOrShortName (str) – Asset ID or short name
customer (str) – Customer ID or short name (default is user’s customer), only used when short name was provided
forceIndex (bool) – Whether to force an Elasticsearch index refresh such that updates to the Asset are immediately searchable.
json – return the response’s body as a
dict
parsed from json.True
by default. If set to false, the rawrequests.Response
object will be returned.verify – path to a certificate bundle or boolean indicating whether SSL verification should be performed.
apiKey – Argus API key.
authentication – authentication override
server_url – API base URL override
body – body of the request. other parameters will override keys defined in the body.
api_session – session to use for this request. If not set, the global session will be used.
- Raises
AuthenticationFailedException – on 401
AccessDeniedException – on 403
ObjectNotFoundException – on 404
ValidationErrorException – on 412
ArgusException – on other status codes
- Returns
dictionary translated from JSON
- argus_api.lib.assets.v2.asset.delete_asset_definition(definition: str, domain: str = None, json: bool = True, verify: Optional[bool] = None, proxies: Optional[dict] = None, apiKey: Optional[str] = None, authentication: Optional[dict] = None, server_url: Optional[str] = None, body: Optional[dict] = None, api_session: Optional[ArgusAPISession] = None) dict #
Marks a AssetDefinition as deleted (INTERNAL)
- Parameters
definition (str) – AssetDefinition ID or short name
domain (str) – Domain ID or name (default is user’s domain), only used when definition is short name
json – return the response’s body as a
dict
parsed from json.True
by default. If set to false, the rawrequests.Response
object will be returned.verify – path to a certificate bundle or boolean indicating whether SSL verification should be performed.
apiKey – Argus API key.
authentication – authentication override
server_url – API base URL override
body – body of the request. other parameters will override keys defined in the body.
api_session – session to use for this request. If not set, the global session will be used.
- Raises
AuthenticationFailedException – on 401
AccessDeniedException – on 403
ObjectNotFoundException – on 404
ValidationErrorException – on 412
ArgusException – on other status codes
- Returns
dictionary translated from JSON
- argus_api.lib.assets.v2.asset.get_asset(idOrShortName: str, customer: str = None, includeDeletedComponents: bool = None, json: bool = True, verify: Optional[bool] = None, proxies: Optional[dict] = None, apiKey: Optional[str] = None, authentication: Optional[dict] = None, server_url: Optional[str] = None, body: Optional[dict] = None, api_session: Optional[ArgusAPISession] = None) dict #
Get Asset (PUBLIC)
- Parameters
idOrShortName (str) – Asset ID or short name
customer (str) – Customer ID or short name (default is user’s customer), only used when the asset’s short name was provided to retrieve the asset
includeDeletedComponents (bool) – Include deleted components in the response
json – return the response’s body as a
dict
parsed from json.True
by default. If set to false, the rawrequests.Response
object will be returned.verify – path to a certificate bundle or boolean indicating whether SSL verification should be performed.
apiKey – Argus API key.
authentication – authentication override
server_url – API base URL override
body – body of the request. other parameters will override keys defined in the body.
api_session – session to use for this request. If not set, the global session will be used.
- Raises
AuthenticationFailedException – on 401
AccessDeniedException – on 403
ObjectNotFoundException – on 404
ValidationErrorException – on 412
ArgusException – on other status codes
- Returns
dictionary translated from JSON
- argus_api.lib.assets.v2.asset.get_asset_ancestors(idOrShortName: str, customer: str = None, offset: int = None, limit: int = None, json: bool = True, verify: Optional[bool] = None, proxies: Optional[dict] = None, apiKey: Optional[str] = None, authentication: Optional[dict] = None, server_url: Optional[str] = None, body: Optional[dict] = None, api_session: Optional[ArgusAPISession] = None) dict #
Get Asset Ancestors (PUBLIC)
- Parameters
idOrShortName (str) – Asset ID or short name
customer (str) – Customer ID or short name (default is user’s customer), only used when the asset’s short name was provided to retrieve the asset
offset (int) – How many Asset Ancestors to skip, defaults to 0
limit (int) – How many Asset Ancestors to return, defaults to all
json – return the response’s body as a
dict
parsed from json.True
by default. If set to false, the rawrequests.Response
object will be returned.verify – path to a certificate bundle or boolean indicating whether SSL verification should be performed.
apiKey – Argus API key.
authentication – authentication override
server_url – API base URL override
body – body of the request. other parameters will override keys defined in the body.
api_session – session to use for this request. If not set, the global session will be used.
- Raises
AuthenticationFailedException – on 401
AccessDeniedException – on 403
ObjectNotFoundException – on 404
ValidationErrorException – on 412
ArgusException – on other status codes
- Returns
dictionary translated from JSON
- argus_api.lib.assets.v2.asset.get_asset_component(idOrShortName: str, id: str, customer: str = None, json: bool = True, verify: Optional[bool] = None, proxies: Optional[dict] = None, apiKey: Optional[str] = None, authentication: Optional[dict] = None, server_url: Optional[str] = None, body: Optional[dict] = None, api_session: Optional[ArgusAPISession] = None) dict #
Get Asset Component (INTERNAL)
- Parameters
idOrShortName (str) – Asset ID or short name
id (str) – Asset Component ID
customer (str) – Customer ID or short name (default is user’s customer), only used when the asset’s short name was provided to retrieve the asset
json – return the response’s body as a
dict
parsed from json.True
by default. If set to false, the rawrequests.Response
object will be returned.verify – path to a certificate bundle or boolean indicating whether SSL verification should be performed.
apiKey – Argus API key.
authentication – authentication override
server_url – API base URL override
body – body of the request. other parameters will override keys defined in the body.
api_session – session to use for this request. If not set, the global session will be used.
- Raises
AuthenticationFailedException – on 401
AccessDeniedException – on 403
ObjectNotFoundException – on 404
ValidationErrorException – on 412
ArgusException – on other status codes
- Returns
dictionary translated from JSON
- argus_api.lib.assets.v2.asset.get_asset_components(idOrShortName: str, customer: str = None, includeDeleted: bool = None, offset: int = None, limit: int = None, json: bool = True, verify: Optional[bool] = None, proxies: Optional[dict] = None, apiKey: Optional[str] = None, authentication: Optional[dict] = None, server_url: Optional[str] = None, body: Optional[dict] = None, api_session: Optional[ArgusAPISession] = None) dict #
- Returns Asset Components in the order in which they were created.
Supports pagination i.e. offset and limit and filtering deleted components
(INTERNAL)
- param str idOrShortName
Asset ID or short name
- param str customer
Customer ID or short name (default is user’s customer), only used when the asset’s short name was provided to retrieve the asset
- param bool includeDeleted
Whether to include deleted components
- param int offset
How many components to skip
- param int limit
How many components to return
- param json
return the response’s body as a
dict
parsed from json.True
by default. If set to false, the rawrequests.Response
object will be returned.- param verify
path to a certificate bundle or boolean indicating whether SSL verification should be performed.
- param apiKey
Argus API key.
- param authentication
authentication override
- param server_url
API base URL override
- param body
body of the request. other parameters will override keys defined in the body.
- param api_session
session to use for this request. If not set, the global session will be used.
- raises AuthenticationFailedException
on 401
- raises AccessDeniedException
on 403
- raises ObjectNotFoundException
on 404
- raises ValidationErrorException
on 412
- raises ArgusException
on other status codes
- returns
dictionary translated from JSON
- argus_api.lib.assets.v2.asset.get_asset_definition(definition: str, domain: str = None, json: bool = True, verify: Optional[bool] = None, proxies: Optional[dict] = None, apiKey: Optional[str] = None, authentication: Optional[dict] = None, server_url: Optional[str] = None, body: Optional[dict] = None, api_session: Optional[ArgusAPISession] = None) dict #
Get AssetDefinition (INTERNAL)
- Parameters
definition (str) – AssetDefinition ID or short name
domain (str) – Domain ID or name (default is user’s domain), only used when definition is short name
json – return the response’s body as a
dict
parsed from json.True
by default. If set to false, the rawrequests.Response
object will be returned.verify – path to a certificate bundle or boolean indicating whether SSL verification should be performed.
apiKey – Argus API key.
authentication – authentication override
server_url – API base URL override
body – body of the request. other parameters will override keys defined in the body.
api_session – session to use for this request. If not set, the global session will be used.
- Raises
AuthenticationFailedException – on 401
AccessDeniedException – on 403
ObjectNotFoundException – on 404
ValidationErrorException – on 412
ArgusException – on other status codes
- Returns
dictionary translated from JSON
- argus_api.lib.assets.v2.asset.get_asset_parents(idOrShortName: str, customer: str = None, offset: int = None, limit: int = None, json: bool = True, verify: Optional[bool] = None, proxies: Optional[dict] = None, apiKey: Optional[str] = None, authentication: Optional[dict] = None, server_url: Optional[str] = None, body: Optional[dict] = None, api_session: Optional[ArgusAPISession] = None) dict #
Get Asset Parents (PUBLIC)
- Parameters
idOrShortName (str) – Asset ID or short name
customer (str) – Customer ID or short name (default is user’s customer), only used when the asset’s short name was provided to retrieve the asset
offset (int) – How many Assets Parents to skip, defaults to 0
limit (int) – How many Assets Parents to return, defaults to all
json – return the response’s body as a
dict
parsed from json.True
by default. If set to false, the rawrequests.Response
object will be returned.verify – path to a certificate bundle or boolean indicating whether SSL verification should be performed.
apiKey – Argus API key.
authentication – authentication override
server_url – API base URL override
body – body of the request. other parameters will override keys defined in the body.
api_session – session to use for this request. If not set, the global session will be used.
- Raises
AuthenticationFailedException – on 401
AccessDeniedException – on 403
ObjectNotFoundException – on 404
ValidationErrorException – on 412
ArgusException – on other status codes
- Returns
dictionary translated from JSON
- argus_api.lib.assets.v2.asset.get_vulnerability_by_asset(asset: str, customer: str = None, includeRawOutput: bool = None, includeDeleted: bool = None, offset: int = None, limit: int = None, skipCount: bool = None, json: bool = True, verify: Optional[bool] = None, proxies: Optional[dict] = None, apiKey: Optional[str] = None, authentication: Optional[dict] = None, server_url: Optional[str] = None, body: Optional[dict] = None, api_session: Optional[ArgusAPISession] = None) dict #
Get Vulnerabilities observed on the requested Asset. (PUBLIC)
- Parameters
asset (str) – Asset ID or short name.
customer (str) – Customer ID or short name (default is user’s customer) to help resolve asset, only used when asset’s short name was provided.
includeRawOutput (bool) – Whether to include raw output, not included by default
includeDeleted (bool) – Whether to include deleted vulnerabilities, not included by default
offset (int) – How many vulnerabilities to skip, defaults to 0
limit (int) – How many vulnerabilities to return, defaults to all of them
skipCount (bool) – Whether to skip counting vulnerabilities and simply return them
json – return the response’s body as a
dict
parsed from json.True
by default. If set to false, the rawrequests.Response
object will be returned.verify – path to a certificate bundle or boolean indicating whether SSL verification should be performed.
apiKey – Argus API key.
authentication – authentication override
server_url – API base URL override
body – body of the request. other parameters will override keys defined in the body.
api_session – session to use for this request. If not set, the global session will be used.
- Raises
AuthenticationFailedException – on 401
AccessDeniedException – on 403
ValidationErrorException – on 412
ArgusException – on other status codes
- Returns
dictionary translated from JSON
- argus_api.lib.assets.v2.asset.get_vulnerability_by_asset_and_vulnerability_id(asset: str, vulnerabilityID: str, customer: str = None, includeRawOutput: bool = None, includeDeleted: bool = None, offset: int = None, limit: int = None, skipCount: bool = None, json: bool = True, verify: Optional[bool] = None, proxies: Optional[dict] = None, apiKey: Optional[str] = None, authentication: Optional[dict] = None, server_url: Optional[str] = None, body: Optional[dict] = None, api_session: Optional[ArgusAPISession] = None) dict #
Get Vulnerabilities observed on the requested Asset with the same Vulnerability Definition (PUBLIC)
- Parameters
asset (str) – Asset ID or short name.
vulnerabilityID (str) – Identifier of vulnerability (e.g. CVE-2015-3429)
customer (str) – Customer ID or short name (default is user’s customer) to help resolve asset, only used when asset’s short name was provided.
includeRawOutput (bool) – Whether to include raw output, not included by default
includeDeleted (bool) – Whether to include deleted vulnerabilities, not included by default
offset (int) – How many Vulnerabilities to skip, defaults to 0
limit (int) – How many Vulnerabilities to return, defaults to all
skipCount (bool) – Whether to skip counting vulnerabilities and simply return them
json – return the response’s body as a
dict
parsed from json.True
by default. If set to false, the rawrequests.Response
object will be returned.verify – path to a certificate bundle or boolean indicating whether SSL verification should be performed.
apiKey – Argus API key.
authentication – authentication override
server_url – API base URL override
body – body of the request. other parameters will override keys defined in the body.
api_session – session to use for this request. If not set, the global session will be used.
- Raises
AuthenticationFailedException – on 401
AccessDeniedException – on 403
ValidationErrorException – on 412
ArgusException – on other status codes
- Returns
dictionary translated from JSON
- argus_api.lib.assets.v2.asset.list_asset_vulnerabilities(idOrShortName: str, customer: str = None, includeRawOutput: bool = None, includeDeleted: bool = None, offset: int = None, limit: int = None, skipCount: bool = None, json: bool = True, verify: Optional[bool] = None, proxies: Optional[dict] = None, apiKey: Optional[str] = None, authentication: Optional[dict] = None, server_url: Optional[str] = None, body: Optional[dict] = None, api_session: Optional[ArgusAPISession] = None) dict #
Get Vulnerabilities observed on the requested Asset. (PUBLIC)
- Parameters
idOrShortName (str) – Asset ID or short name.
customer (str) – Customer ID or short name (default is user’s customer) to help resolve asset, only used when asset’s short name was provided.
includeRawOutput (bool) – Whether to include raw output, not included by default
includeDeleted (bool) – Whether to include deleted vulnerabilities, not included by default
offset (int) – How many vulnerabilities to skip, defaults to 0
limit (int) – How many vulnerabilities to return, defaults to all of them
skipCount (bool) – Whether to skip counting vulnerabilities and simply return them
json – return the response’s body as a
dict
parsed from json.True
by default. If set to false, the rawrequests.Response
object will be returned.verify – path to a certificate bundle or boolean indicating whether SSL verification should be performed.
apiKey – Argus API key.
authentication – authentication override
server_url – API base URL override
body – body of the request. other parameters will override keys defined in the body.
api_session – session to use for this request. If not set, the global session will be used.
- Raises
AuthenticationFailedException – on 401
AccessDeniedException – on 403
ValidationErrorException – on 412
ArgusException – on other status codes
- Returns
dictionary translated from JSON
- argus_api.lib.assets.v2.asset.list_asset_vulnerabilities_by_id(idOrShortName: str, vulnerabilityID: str, customer: str = None, includeRawOutput: bool = None, includeDeleted: bool = None, offset: int = None, limit: int = None, skipCount: bool = None, json: bool = True, verify: Optional[bool] = None, proxies: Optional[dict] = None, apiKey: Optional[str] = None, authentication: Optional[dict] = None, server_url: Optional[str] = None, body: Optional[dict] = None, api_session: Optional[ArgusAPISession] = None) dict #
Get Vulnerabilities observed on the requested Asset with the same Vulnerability Definition (PUBLIC)
- Parameters
idOrShortName (str) – Asset ID or short name.
vulnerabilityID (str) – Identifier of vulnerability (e.g. CVE-2015-3429)
customer (str) – Customer ID or short name (default is user’s customer) to help resolve asset, only used when asset’s short name was provided.
includeRawOutput (bool) – Whether to include raw output, not included by default
includeDeleted (bool) – Whether to include deleted vulnerabilities, not included by default
offset (int) – How many Vulnerabilities to skip, defaults to 0
limit (int) – How many Vulnerabilities to return, defaults to all
skipCount (bool) – Whether to skip counting vulnerabilities and simply return them
json – return the response’s body as a
dict
parsed from json.True
by default. If set to false, the rawrequests.Response
object will be returned.verify – path to a certificate bundle or boolean indicating whether SSL verification should be performed.
apiKey – Argus API key.
authentication – authentication override
server_url – API base URL override
body – body of the request. other parameters will override keys defined in the body.
api_session – session to use for this request. If not set, the global session will be used.
- Raises
AuthenticationFailedException – on 401
AccessDeniedException – on 403
ValidationErrorException – on 412
ArgusException – on other status codes
- Returns
dictionary translated from JSON
- argus_api.lib.assets.v2.asset.list_assets(customer: str = None, asset: str = None, parent: str = None, dataSource: str = None, keywords: str = None, timeFieldStrategy: str = None, sortBy: str = None, limit: int = 25, startTimestamp: str = '0', endTimestamp: str = '0', offset: int = None, includeDeleted: bool = None, json: bool = True, verify: Optional[bool] = None, proxies: Optional[dict] = None, apiKey: Optional[str] = None, authentication: Optional[dict] = None, server_url: Optional[str] = None, body: Optional[dict] = None, api_session: Optional[ArgusAPISession] = None) dict #
Basic Asset search. If keywords are present, they must all must be present in at least one of the keyword fields. Check the documentation for the KeywordFieldStrategy field for more details. If start/end timestamps are present, the range must be valid for at least one of the requested time stamp fields. Check the documentation for the TimestampFieldStrategy field for more details. Limit and offset added together cannot exceed 10’000
(PUBLIC)
- param list customer
Customer ids or short names
- param list asset
Asset ids or short names
- param list parent
Asset parent group ids or short names
- param list dataSource
Data source, identified by id or shortname, that detected the Asset
- param list keywords
Limit search by asset field (short name, name, and description) keywords
- param list timeFieldStrategy
Which time field(s) to filter by timestamp start/end
- param list sortBy
Field(s) to sort by - refer to the search POST endpoint to see which fields are permitted
- param int limit
Limit results. The sum of limit and offset must be <= 10’000 when not streaming
- param str startTimestamp
Lower bound timestamp filter value
- param str endTimestamp
Upper bound timestamp filter value
- param int offset
Offset results. The sum of limit and offset must be <= 10’000 when not streaming
- param bool includeDeleted
Include deleted
- param json
return the response’s body as a
dict
parsed from json.True
by default. If set to false, the rawrequests.Response
object will be returned.- param verify
path to a certificate bundle or boolean indicating whether SSL verification should be performed.
- param apiKey
Argus API key.
- param authentication
authentication override
- param server_url
API base URL override
- param body
body of the request. other parameters will override keys defined in the body.
- param api_session
session to use for this request. If not set, the global session will be used.
- raises AuthenticationFailedException
on 401
- raises AccessDeniedException
on 403
- raises ValidationErrorException
on 412
- raises ArgusException
on other status codes
- returns
dictionary translated from JSON
- argus_api.lib.assets.v2.asset.recalculate_asset(idOrShortName: str, customer: str = None, recalculateGroups: bool = None, forceIndex: bool = None, json: bool = True, verify: Optional[bool] = None, proxies: Optional[dict] = None, apiKey: Optional[str] = None, authentication: Optional[dict] = None, server_url: Optional[str] = None, body: Optional[dict] = None, api_session: Optional[ArgusAPISession] = None) dict #
Force a recalculation of an Asset’s vulnerabilityCount and totalCVSS fields.NB: any changes are propagated up the Asset Group hierarchy if recalculateGroups is set and the Asset belongs to any group(s). (INTERNAL)
- Parameters
idOrShortName (str) – Asset ID or short name
customer (str) – Customer ID or short name (default is user’s customer), only used when asset short name was provided
recalculateGroups (bool) – Whether to recalculate counts for groups in the hierarchy above the affected asset
forceIndex (bool) – Whether to force an Elasticsearch index refresh making the recalculated asset immediately searchable.
json – return the response’s body as a
dict
parsed from json.True
by default. If set to false, the rawrequests.Response
object will be returned.verify – path to a certificate bundle or boolean indicating whether SSL verification should be performed.
apiKey – Argus API key.
authentication – authentication override
server_url – API base URL override
body – body of the request. other parameters will override keys defined in the body.
api_session – session to use for this request. If not set, the global session will be used.
- Raises
AuthenticationFailedException – on 401
AccessDeniedException – on 403
ObjectNotFoundException – on 404
ValidationErrorException – on 412
ArgusException – on other status codes
- Returns
dictionary translated from JSON
- argus_api.lib.assets.v2.asset.reindex_asset(assetID: str = None, recursive: str = None, json: bool = True, verify: Optional[bool] = None, proxies: Optional[dict] = None, apiKey: Optional[str] = None, authentication: Optional[dict] = None, server_url: Optional[str] = None, body: Optional[dict] = None, api_session: Optional[ArgusAPISession] = None) dict #
Re-indexes specified Assets (INTERNAL)
- Parameters
assetID (list) – A set of asset IDs to be re-indexed
recursive (str) – Enumerated type of recursion strategy(none - reindex just assets, all - reindex assets and associated vulnerabilities (default none)
json – return the response’s body as a
dict
parsed from json.True
by default. If set to false, the rawrequests.Response
object will be returned.verify – path to a certificate bundle or boolean indicating whether SSL verification should be performed.
apiKey – Argus API key.
authentication – authentication override
server_url – API base URL override
body – body of the request. other parameters will override keys defined in the body.
api_session – session to use for this request. If not set, the global session will be used.
- Raises
AuthenticationFailedException – on 401
AccessDeniedException – on 403
ValidationErrorException – on 412
ArgusException – on other status codes
- Returns
dictionary translated from JSON
- argus_api.lib.assets.v2.asset.search_asset_definitions(order: str = None, sortBy: str = None, definition: str = None, domain: str = None, keywords: str = None, keywordFieldStrategy: str = None, keywordMatchStrategy: str = None, startTimestamp: str = None, endTimestamp: str = None, timeFieldStrategy: str = None, timeMatchStrategy: str = None, subCriteria: dict = None, includeDeleted: bool = None, limit: int = 25, offset: int = None, json: bool = True, verify: Optional[bool] = None, proxies: Optional[dict] = None, apiKey: Optional[str] = None, authentication: Optional[dict] = None, server_url: Optional[str] = None, body: Optional[dict] = None, api_session: Optional[ArgusAPISession] = None) dict #
Search AssetDefinitions with specified criteria (INTERNAL)
- Parameters
order (list) –
sortBy (list) –
definition (list) – Restrict to specified Asset definitions (ID or short name)
domain (list) – Restrict to specified domains (domain ID or name)
keywords (list) – Search for keywords against fields defined by keywordFieldStrategy
keywordFieldStrategy (list) – Defines which fields will be searched by keywords (default all supported fields) (default all)
keywordMatchStrategy (str) – Defines how strict different keywords should be matched (default match all keywords) (default all)
startTimestamp (str) – Restrict to a time frame based on the set timeFieldStrategy (start timestamp) (default 0)
endTimestamp (str) – Restrict to a time frame based on the set timeFieldStrategy (end timestamp) (default 0)
timeFieldStrategy (list) – Defines which timestamps will be included in the search (default lastUpdatedTimestamp) (default lastUpdatedTimestamp)
timeMatchStrategy (str) – Defines how strict to match against different timestamps (all/any) using start and end timestamp (default any) (default any)
subCriteria (list) – Set additional criteria which are applied with logical OR by default
includeDeleted (bool) – Whether include deleted results (default false)
limit (int) – Limit maximum amount of results (default 25)
offset (int) – Skip specified amount of results (default 0)
json – return the response’s body as a
dict
parsed from json.True
by default. If set to false, the rawrequests.Response
object will be returned.verify – path to a certificate bundle or boolean indicating whether SSL verification should be performed.
apiKey – Argus API key.
authentication – authentication override
server_url – API base URL override
body – body of the request. other parameters will override keys defined in the body.
api_session – session to use for this request. If not set, the global session will be used.
- Raises
AuthenticationFailedException – on 401
AccessDeniedException – on 403
ValidationErrorException – on 412
ArgusException – on other status codes
- Returns
dictionary translated from JSON
- argus_api.lib.assets.v2.asset.search_asset_definitions_simplified(keywords: str = None, keywordField: str = None, timeField: str = None, definition: str = None, domain: str = None, sortBy: str = None, limit: int = 25, keywordMatch: str = 'all', startTimestamp: str = '0', endTimestamp: str = '0', timeMatch: str = 'any', offset: int = None, json: bool = True, verify: Optional[bool] = None, proxies: Optional[dict] = None, apiKey: Optional[str] = None, authentication: Optional[dict] = None, server_url: Optional[str] = None, body: Optional[dict] = None, api_session: Optional[ArgusAPISession] = None) dict #
Search AssetDefinitions with specified query parameters (INTERNAL)
- Parameters
keywords (list) – Search by keywords
keywordField (list) – Set field strategy for keyword search
timeField (list) – Set field strategy for time range search
definition (list) – Search by definitions (ID or short name)
domain (list) – Search by domains (domain ID or name)
sortBy (list) – Sort search result
limit (int) – Maximum number of returned results
keywordMatch (str) – Set match strategy for keyword search
startTimestamp (str) – Start timestamp for time range search
endTimestamp (str) – End timestamp for time range search
timeMatch (str) – Set match strategy for time range search
offset (int) – Skip a number of results
json – return the response’s body as a
dict
parsed from json.True
by default. If set to false, the rawrequests.Response
object will be returned.verify – path to a certificate bundle or boolean indicating whether SSL verification should be performed.
apiKey – Argus API key.
authentication – authentication override
server_url – API base URL override
body – body of the request. other parameters will override keys defined in the body.
api_session – session to use for this request. If not set, the global session will be used.
- Raises
AuthenticationFailedException – on 401
AccessDeniedException – on 403
ValidationErrorException – on 412
ArgusException – on other status codes
- Returns
dictionary translated from JSON
- argus_api.lib.assets.v2.asset.search_assets(sortBy: str = None, keywords: str = None, keywordFieldStrategy: str = None, keywordMatchStrategy: str = None, startTimestamp: str = None, endTimestamp: str = None, timeFieldStrategy: str = None, timeMatchStrategy: str = None, userFieldStrategy: str = None, user: str = None, customer: str = None, asset: str = None, assetDefinition: str = None, parent: str = None, ancestor: str = None, dataSource: str = None, component: dict = None, criticality: dict = None, minimumTotalCvss: float = None, maximumTotalCvss: float = None, includeFlags: str = None, excludeFlags: str = None, hasGroups: bool = None, assetByVulnerability: dict = None, subCriteria: dict = None, order: str = None, includeGroupInfo: bool = True, limit: int = 25, offset: int = None, includeDeleted: bool = None, json: bool = True, verify: Optional[bool] = None, proxies: Optional[dict] = None, apiKey: Optional[str] = None, authentication: Optional[dict] = None, server_url: Optional[str] = None, body: Optional[dict] = None, api_session: Optional[ArgusAPISession] = None) dict #
Search Assets (PUBLIC)
- Parameters
sortBy (list) –
keywords (list) – Search for keywords against fields defined by a KeywordFieldStrategy
keywordFieldStrategy (list) – Defines which fields will be searched by keywords (default all supported fields) (default assetAll)
keywordMatchStrategy (str) – Defines how strict different keywords should be matched (default match any keywords) (default any)
startTimestamp (str) – Restrict to a time frame based on the set timeFieldStrategy (start timestamp). (default 0)
endTimestamp (str) – Restrict to a time frame based on the set timeFieldStrategy (end timestamp). (default 0)
timeFieldStrategy (list) – Defines which timestamps fields will be filtered with start/endTimestamp (default lastUpdatedTimestamp)
timeMatchStrategy (str) – Defines how strict to match against different timestamps (all/any) using start and end timestamp (default any) (default any)
userFieldStrategy (list) – Defines which user fields to filter with the submitted user value(s) (default all)
user (list) – Search for Assets by associated user IDs or short names defined by the UserFieldStrategy
customer (list) – Search for Assets with these Customer IDs or short names
asset (list) – Search for Assets with these Asset IDs or short names
assetDefinition (list) – Search for Assets with these AssetDefinition IDs or short names
parent (list) – Search for Assets with these parent AssetGroup IDs or short names
ancestor (list) – Search for Assets in the hierarchy below this ancestor AssetGroup identified by its ID or short name.<br />This will resolve all descendant Asset Groups and expand the search to return Assets belonging to them in the hierarchy below these ‘ancestor’ groups
dataSource (list) – Search for Assets detected and reported by these data sources, identified by id or shortName
component (list) – Search for Assets by their components using AND search mode i.e. all criteria must match.<br />If you want different behaviour try using subcriteria
criticality (list) – Search for Assets by Confidentiality, Availability and Integrity.<br />All criteria values must match for an Asset to match. Use sub-criteria for OR query behaviour.
minimumTotalCvss (float) – Search for Assets with at least this CVSS score
maximumTotalCvss (float) – Search for Assets with at most this CVSS score
includeFlags (list) – Explicitly search for Assets that contain these flags
excludeFlags (list) – Explicitly filter out Assets that contain these flags
hasGroups (bool) – Set to filter on/out Assets belonging to a group
assetByVulnerability (dict) – Search criteria for searching for Assets by Vulnerability properties
subCriteria (list) – Set additional criteria that are applied with logical OR by default
order (list) – Which field(s) by which to sort the results
includeGroupInfo (bool) – Whether to include Assets’ parent group info in the search response (default true)
limit (int) – Limit the results to the specified amount (default 25)
offset (int) – Skip specified amount of results (default 0)
includeDeleted (bool) – Whether to include deleted Assets (default false)
json – return the response’s body as a
dict
parsed from json.True
by default. If set to false, the rawrequests.Response
object will be returned.verify – path to a certificate bundle or boolean indicating whether SSL verification should be performed.
apiKey – Argus API key.
authentication – authentication override
server_url – API base URL override
body – body of the request. other parameters will override keys defined in the body.
api_session – session to use for this request. If not set, the global session will be used.
- Raises
AuthenticationFailedException – on 401
AccessDeniedException – on 403
ValidationErrorException – on 412
ArgusException – on other status codes
- Returns
requests.Response
object or dictionary translated from JSON
- argus_api.lib.assets.v2.asset.update_asset(idOrShortName: str, customer: str = None, shortName: str = None, name: str = None, description: str = None, owner: str = None, criticality: dict = None, addComponents: dict = None, deleteComponents: str = None, ttl: int = None, forceIndex: bool = None, updateLastSeen: bool = None, json: bool = True, verify: Optional[bool] = None, proxies: Optional[dict] = None, apiKey: Optional[str] = None, authentication: Optional[dict] = None, server_url: Optional[str] = None, body: Optional[dict] = None, api_session: Optional[ArgusAPISession] = None) dict #
Updates an existing Asset (PUBLIC)
- Parameters
idOrShortName (str) – Asset ID or short name
customer (str) – Customer ID or short name (default is user’s customer), only used when asset short name was provided
shortName (str) – Update short name of asset => [a-zA-Z0-9_:\-.]*
name (str) – Update name of asset => [sw\{\}\$\-\(\).\[\]”'_/\,\*\+\#:@!?;=]*
description (str) – Update description of asset. Support HTML, which will be sanitized
owner (str) – Update owner of asset, specified by user ID or username. When username is specified, it should exist within current user’s domain
criticality (dict) – Request to update a Group or Asset’s criticality triad
addComponents (list) – Specify components to be added with the asset
deleteComponents (list) – Specify IDs of the components to be deleted from the asset
ttl (int) – Time to live duration of this asset since last seen, 0 means won’t expire.
forceIndex (bool) – Whether to force an Elasticsearch index refresh such that changes to the Asset are immediately searchable.
updateLastSeen (bool) – Temporary field added to make updating lastSeenTimestamp/UserId easier.
json – return the response’s body as a
dict
parsed from json.True
by default. If set to false, the rawrequests.Response
object will be returned.verify – path to a certificate bundle or boolean indicating whether SSL verification should be performed.
apiKey – Argus API key.
authentication – authentication override
server_url – API base URL override
body – body of the request. other parameters will override keys defined in the body.
api_session – session to use for this request. If not set, the global session will be used.
- Raises
AuthenticationFailedException – on 401
AccessDeniedException – on 403
ObjectNotFoundException – on 404
ValidationErrorException – on 412
ArgusException – on other status codes
- Returns
dictionary translated from JSON
- argus_api.lib.assets.v2.asset.update_asset_definition(definition: str, domain: str = None, shortName: str = None, name: str = None, description: str = None, addComponent: str = None, deleteComponent: str = None, json: bool = True, verify: Optional[bool] = None, proxies: Optional[dict] = None, apiKey: Optional[str] = None, authentication: Optional[dict] = None, server_url: Optional[str] = None, body: Optional[dict] = None, api_session: Optional[ArgusAPISession] = None) dict #
Updates an existing AssetDefinition (INTERNAL)
- Parameters
definition (str) – AssetDefinition ID or short name
domain (str) – Domain ID or name (default is user’s domain), required when definition is identified by short name
shortName (str) – Update asset definition short name => [a-zA-Z0-9_:\-.]*
name (str) – Update asset definition name => [sw\{\}\$\-\(\).\[\]”'_/\,\*\+\#:@!?;=]*
description (str) – Optional Asset definition description. Will be HTML sanitized
addComponent (list) – Component definitions (ID or short name) to be added to the asset definition, they have to belong to same domain as asset definition.
deleteComponent (list) – Component definitions ((ID or short name)) to be deleted from the asset definition
json – return the response’s body as a
dict
parsed from json.True
by default. If set to false, the rawrequests.Response
object will be returned.verify – path to a certificate bundle or boolean indicating whether SSL verification should be performed.
apiKey – Argus API key.
authentication – authentication override
server_url – API base URL override
body – body of the request. other parameters will override keys defined in the body.
api_session – session to use for this request. If not set, the global session will be used.
- Raises
AuthenticationFailedException – on 401
AccessDeniedException – on 403
ObjectNotFoundException – on 404
ValidationErrorException – on 412
ArgusException – on other status codes
- Returns
dictionary translated from JSON