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 raw requests.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
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 raw requests.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
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)

Parameters
  • 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

  • fieldAggregation (list) – The fields by which to group statistics

  • rangeMetric (list) – The timestamp fields for which to generate statistics.

  • statisticsMetric (list) – The numerical fields for which to generate metrics.

  • includeGroupInfo (bool) – Whether to include Assets’ parent group info in the search response (default true)

  • 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 raw requests.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
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 raw requests.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
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 raw requests.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
Returns

dictionary translated from JSON

argus_api.lib.assets.v2.asset.get_asset(idOrShortName: 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 (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

  • json – return the response’s body as a dict parsed from json. True by default. If set to false, the raw requests.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
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 raw requests.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
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 raw requests.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
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

(DEV)

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 raw requests.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 raw requests.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
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 raw requests.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
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, 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 belong to the 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

  • json – return the response’s body as a dict parsed from json. True by default. If set to false, the raw requests.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
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, 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 belong to the Asset and have same identifier of vulnerability. (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

  • json – return the response’s body as a dict parsed from json. True by default. If set to false, the raw requests.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
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)

Parameters
  • customer (list) – Customer ids or short names

  • asset (list) – Asset ids or short names

  • parent (list) – Asset parent group ids or short names

  • dataSource (list) – Data source, identified by id or shortname, that detected the Asset

  • keywords (list) – Limit search by asset field (short name, name, and description) keywords

  • timeFieldStrategy (list) – Which time field(s) to filter by timestamp start/end

  • sortBy (list) – Field(s) to sort by - refer to the search POST endpoint to see which fields are permitted

  • limit (int) – Limit results

  • startTimestamp (str) – Lower bound timestamp filter value

  • endTimestamp (str) – Upper bound timestamp filter value

  • offset (int) – Offset results

  • includeDeleted (bool) – Include deleted

  • json – return the response’s body as a dict parsed from json. True by default. If set to false, the raw requests.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
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 raw requests.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
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 raw requests.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
Returns

dictionary translated from JSON

argus_api.lib.assets.v2.asset.search_asset_definitions(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
  • 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 raw requests.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
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 raw requests.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
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, 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

  • 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 raw requests.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
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, 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.

  • json – return the response’s body as a dict parsed from json. True by default. If set to false, the raw requests.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
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 raw requests.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
Returns

dictionary translated from JSON