group#

Autogenerated API

argus_api.lib.assets.v2.group.add_asset_group(customer: str = None, shortName: str = None, name: str = None, description: str = None, owner: str = None, criticality: dict = None, forceIndex: bool = None, canContainAssets: 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 AssetGroup (PUBLIC)

Parameters
  • customer (str) – ID or short name of customer, if not specified then current user’s customer will be assigned

  • shortName (str) – Customer unique short name of asset group. If not specified will be set to the new group’s generated/assigned UUID. => [a-zA-Z0-9_:\-.]*

  • name (str) – Name of asset group => [sw\{\}\$\-\(\).\[\]”'_/\,\*\+\#:@!?;=]*

  • description (str) – Description of asset group. May use HTML, which will be sanitized

  • owner (str) – ID or username of user who owns the asset group. When username is specified, it should exist within current user’s domain

  • criticality (dict) – Request to set a Group or Asset’s criticality triad

  • forceIndex (bool) – Whether to force an Elasticsearch index refresh making the new Asset group immediately searchable.

  • canContainAssets (bool) – Restricts whether this group can contain only Assets or Groups (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.group.attach_assets(idOrShortName: str, customer: str = None, assets: 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#

Attach asset to the asset group. Asset group will recalculate de-normalized fields and flags base on children groups and assets, such as totalCVSS, vulnerabilitiesCount and flags to indicate whether there is high or critical severity vulnerability. (PUBLIC)

Parameters
  • idOrShortName (str) – AssetGroup ID or short name

  • customer (str) – Customer ID or short name (default is user’s customer), only used when group/asset short name was provided

  • assets (list) – Specify set of assets to be attached to the asset group, it accepts asset’s ID or 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.group.attach_children_groups(idOrShortName: str, customer: str = None, childrenGroups: 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#

Attach asset groups to parent asset group as children. Associating groups should not cause circular relationships. Parent group will recalculate de-normalized fields and flags base on children groups and assets, such as totalCVSS, vulnerabilitiesCount and flags to indicate whether there is high or critical severity vulnerability. (PUBLIC)

Parameters
  • idOrShortName (str) – AssetGroup ID or short name

  • customer (str) – Customer ID or short name (default is user’s customer), only used when group short name was provided

  • childrenGroups (list) – Specify set of asset groups to be attached as children groups, it accepts asset group ID or short name. Child group should not cause circular relationship among asset groups.

  • 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.group.delete_asset_group(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 group (PUBLIC)

Parameters
  • idOrShortName (str) – AssetGroup ID or short name

  • customer (str) – Customer ID or short name (default is user’s customer), only used when group short name was provided

  • forceIndex (bool) – Whether to force an Elasticsearch index refresh such that updates to the AssetGroup 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.group.detach_assets(idOrShortName: str, asset: 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#

Detach multiple assets from parent asset group. Parent group will recalculate de-normalized fields and flags base on remaining children groups and assets, such as totalCVSS, vulnerabilitiesCount and flags to indicate whether there is high or critical severity vulnerability. Response with parent group after change. (PUBLIC)

Parameters
  • idOrShortName (str) – Parent group’s ID or short name

  • asset (list) – Assets’ IDs or short names to be detached

  • customer (str) – Customer ID or short name (default is user’s customer), only used when group short name was provided

  • 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.group.detach_children_groups(idOrShortName: str, group: 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#

Detach multiple asset groups from parent asset group. Parent group will recalculate de-normalized fields and flags base on remaining children groups and assets, such as totalCVSS, vulnerabilitiesCount and flags to indicate whether there is high or critical severity vulnerability. Response with parent group after change. (PUBLIC)

Parameters
  • idOrShortName (str) – Parent group’s ID or short name

  • group (list) – Children groups’ IDs or short names to be detached

  • customer (str) – Customer ID or short name (default is user’s customer), only used when group short name was provided

  • 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.group.detach_single_child_asset(idOrShortName: str, assetIDOrShortName: 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#

Detach single asset from parent asset group. Parent group will recalculate de-normalized fields and flags base on remaining children groups and assets, such as totalCVSS, vulnerabilitiesCount and flags to indicate whether there is high or critical severity vulnerability. Response with parent group after change. (PUBLIC)

Parameters
  • idOrShortName (str) – Parent group’s ID or short name

  • assetIDOrShortName (str) – Asset’s ID or short name to be detached

  • customer (str) – Customer ID or short name (default is user’s customer), only used when group short name was provided

  • 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.group.detach_single_child_group(idOrShortName: str, childGroupIDOrShortName: 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#

Detach single child asset group from parent asset group. Parent group will recalculate de-normalized fields and flags base on remaining children groups and assets, such as totalCVSS, vulnerabilitiesCount and flags to indicate whether there is high or critical severity vulnerability. Response with parent group after change. (PUBLIC)

Parameters
  • idOrShortName (str) – Parent group’s ID or short name

  • childGroupIDOrShortName (str) – Child group’s ID or short name to be detached

  • customer (str) – Customer ID or short name (default is user’s customer), only used when group short name was provided

  • 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.group.get_asset_group(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 Group (PUBLIC)

Parameters
  • idOrShortName (str) – AssetGroup ID or short name

  • customer (str) – Customer ID or short name (default is user’s customer), only used when group short name was provided

  • 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.group.get_children_asset_groups(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 non-deleted children asset groups associated with specified asset group you have permission to view (PUBLIC)

Parameters
  • idOrShortName (str) – AssetGroup ID or short name

  • customer (str) – Customer ID or short name (default is user’s customer), only used when group short name was provided

  • offset (int) – How many Assets Groups to skip, defaults to 0

  • limit (int) – How many Assets Groups 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.group.get_children_assets(idOrShortName: str, customer: str = None, limit: int = 25, sortBy: str = 'name', includeDeleted: bool = None, 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#

Get assets that are immediate members of the specified asset group (PUBLIC)

Parameters
  • idOrShortName (str) – AssetGroup ID or short name

  • customer (str) – Customer ID or short name (default is user’s customer), only used when group short name was provided

  • limit (int) – How many Assets to return

  • sortBy (str) – Field to sort by

  • includeDeleted (bool) – Whether to include deleted Assets in the response

  • offset (int) – How many Assets to skip, defaults to 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.group.list_asset_groups(customer: str = None, group: str = None, keywords: 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 Group 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 time stamp fields.Check the documentation for the TimestampFieldStrategy field for more details. (PUBLIC)

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

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

  • keywords (list) – Limit search by asset group keywords

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

  • limit (int) – Limit results. The sum of limit and offset must be <= 10’000 when not streaming

  • startTimestamp (str) – Lower bound timestamp filter value

  • endTimestamp (str) – Upper bound timestamp filter value

  • offset (int) – Offset results. The sum of limit and offset must be <= 10’000 when not streaming

  • 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.group.recalculate_group(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#

Force a recalculation of an Asset Group’s vulnerabilityCount, assetCount, memberCount, and totalCVSS fields.Generally this should not be necessary as these fields are automatically recalculated when necessary.NB: any changes are propagated up the Asset Group hierarchy if the Asset Group belongs to any other group(s). (INTERNAL)

Parameters
  • idOrShortName (str) – Asset Group ID or short name

  • customer (str) – Customer ID or short name (default is user’s customer), only used when asset group short name was provided

  • forceIndex (bool) – Whether to force an Elasticsearch index refresh making the recalculated asset group 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.group.reindex_asset_group(groupID: 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 Asset Groups (INTERNAL)

Parameters
  • groupID (list) – A set of asset group IDs to be re-indexed

  • recursive (str) – Enumerated type of chosen recursion strategy (none - reindex just asset groups, asset - reindex asset groups and associated assets, all - reindex asset groups, associated assets and vulnerabilities, asset groups also include their children groups) (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.group.search_asset_groups(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, group: str = None, asset: str = None, hasAsset: bool = None, parent: str = None, ancestor: str = None, child: str = None, hasChild: bool = None, minimumTotalCvss: float = None, maximumTotalCvss: float = None, criticality: dict = None, includeFlags: str = None, excludeFlags: str = None, subCriteria: dict = None, 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 Asset Groups (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 any)

  • keywordMatchStrategy (str) – Defines how strict different keywords should be matched (default match all 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 AssetGroups by associated user IDs or short names defined by the UserFieldStrategy

  • customer (list) – Search for AssetGroups with these Customer IDs or short names

  • group (list) – Search for AssetGroups with these IDs or short names

  • asset (list) – Search for AssetGroups containing Assets with these IDs or short names

  • hasAsset (bool) – Set to filter on/out groups containing Assets

  • parent (list) – Search for AssetGroups with these parent IDs or short names

  • ancestor (list) – Search for AssetGroups in the hierarchy below these ancestor AssetGroups identified by their ID or short name.<br />This will resolve all descendant Asset Groups and expand the search to return AssetsGroups below these ‘ancestor’ groups

  • child (list) – Search for AssetGroups with these children IDs or short namesi.e. return the groups who contain at least one of these AssetGroups

  • hasChild (bool) – Set to filter on/out groups containing Asset Groups

  • minimumTotalCvss (float) – Search for AssetGroups with at least this CVSS score

  • maximumTotalCvss (float) – Search for AssetGroups with at most this CVSS score

  • criticality (list) – Search for Asset Groups by Confidentiality, Availability and Integrity.<br />All criteria values must match for an Asset Group to match. Use sub-criteria for OR query behaviour.

  • includeFlags (list) – Explicitly search for AssetGroups that contain these flags

  • excludeFlags (list) – Explicitly filter out AssetGroups that contain these flags

  • subCriteria (list) – Set additional criteria that are applied with logical OR by default

  • 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 Asset groups (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.group.update_asset_group(idOrShortName: str, customer: str = None, shortName: str = None, name: str = None, description: str = None, owner: str = None, criticality: dict = 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 AssetGroup (PUBLIC)

Parameters
  • idOrShortName (str) – AssetGroup ID or short name

  • customer (str) – Customer ID or short name (default is user’s customer), only used when group short name was provided

  • shortName (str) – Update short name of asset group => [a-zA-Z0-9_:\-.]*

  • name (str) – Update name of asset group => [sw\{\}\$\-\(\).\[\]”'_/\,\*\+\#:@!?;=]*

  • description (str) – Update description of asset group. Support HTML, which will be sanitized

  • owner (str) – Update owner of asset group, 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

  • forceIndex (bool) – Whether to force an Elasticsearch index refresh such that changes to the AssetGroup 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