Aecontent¶
Client¶
-
class
Aecontent.
Client
¶ A client object representing ‘Aecontent’ Service:
import almdrlib client = almdrlib.client('aecontent')
Available methods:
-
create_global_observation
(**kwargs)¶ Create or update (overwrite) a new observation definition with the given path. This endpoint has system and customer specific variant. System wide should only be used by internal systems/tools and is documented here for testing and troubleshooting purposes. Customer specific endpoints allow create custom content and should be used for creation correlation content.
Request Syntax
response = client.create_global_observation( data={} path='string' )
- Parameters
data (dict) –
path (string) –
[REQUIRED]
the urlencoded content path for this observation definition
- Return type
dict
- Returns
Response Syntax
{ 'stored': 'string' }
Response Definitions
stored (string) –
-
create_observation
(**kwargs)¶ Create or update (overwrite) a new observation definition with the given path. This endpoint has system and customer specific variant. System wide should only be used by internal systems/tools and is documented here for testing and troubleshooting purposes. Customer specific endpoints allow create custom content and should be used for creation correlation content.
Request Syntax
response = client.create_observation( account_id='string' data={} path='string' )
- Parameters
account_id (string) –
[REQUIRED]
AIMS Account ID
data (dict) –
path (string) –
[REQUIRED]
the urlencoded content path for this observation definition
- Return type
dict
- Returns
Response Syntax
{ 'stored': 'string' }
Response Definitions
stored (string) –
-
delete_global_observation
(**kwargs)¶ Deletes a global observation
Request Syntax
response = client.delete_global_observation( path='string' )
- Parameters
path (string) –
[REQUIRED]
the urlencoded content path of an observation definition
- Return type
dict
- Returns
Response Syntax
{ 'deleted': 'string' }
Response Definitions
deleted (string) –
-
delete_observation
(**kwargs)¶ Deletes a global observation
Request Syntax
response = client.delete_observation( account_id='string' path='string' )
- Parameters
account_id (string) –
[REQUIRED]
AIMS Account ID
path (string) –
[REQUIRED]
the urlencoded content path of an observation definition
- Return type
dict
- Returns
Response Syntax
{ 'deleted': 'string' }
Response Definitions
deleted (string) –
-
get_aecontent_audit
(**kwargs)¶ Return the set of active content items at the give timestamp (or at current time if no timestamp given). For each item, metadata is provided (about upload user & upload channel; creation, deletion, expiration times; content id, path & type) as well as the content itself. Providing a data_type parameter narrows the audit to the given data type.
Request Syntax
response = client.get_aecontent_audit( data_type='string' ts='string' )
- Parameters
data_type (string) –
Which data type to return in the audit. Choices: ‘observation-template’
Default:
all
ts (string) –
A unix epoch timestamp
Default:
now
- Return type
dict
- Returns
Response Syntax
{}
Response Definitions
-
get_content_metadata
(**kwargs)¶ “Returns the metadata for content type”
Request Syntax
response = client.get_content_metadata( path='string' type='triggers'|'rta' )
- Parameters
path (string) –
[REQUIRED]
Path of the content
type (string) –
[REQUIRED]
Type of the content
Valid values:
triggers
,rta
- Return type
dict
- Returns
Response Syntax
{}
Response Definitions
-
get_global_observation_by_id
(**kwargs)¶ Returns the observation definition indentified by id.
Request Syntax
response = client.get_global_observation_by_id( format='normal'|'extended' id='string' )
- Parameters
format (string) –
Specifies what data should be returned. “extended” includes start_ts (unix epoch time at which this specific revision became effective), path_start_ts (unix epoch time at which this observation became effective for the first time), and expiration_ts.
Valid values:
normal
,extended
id (string) –
[REQUIRED]
the UUID identified assigned to a definition
- Return type
dict
- Returns
Response Syntax
{}
Response Definitions
-
get_global_observation_by_path
(**kwargs)¶ Returns the observation definition.
Request Syntax
response = client.get_global_observation_by_path( epoch='integer' format='normal'|'extended' include_internal='False|True' include_metadata='False|True' path='string' ts='integer' )
- Parameters
epoch (integer) – The epoch id to use for this request
format (string) –
Specifies what data should be returned. “extended” includes start_ts (unix epoch time at which this specific revision became effective), path_start_ts (unix epoch time at which this observation became effective for the first time), and expiration_ts.
Valid values:
normal
,extended
include_internal (boolean) – Include internal metadata in the observation definition
include_metadata (boolean) – Include metadata in the observation definition
path (string) –
[REQUIRED]
the urlencoded content path of an observation definition
ts (integer) – The Unix epoch time to use for this request
- Return type
dict
- Returns
Response Syntax
{}
Response Definitions
-
get_global_observations
(**kwargs)¶ Return all current global observation definitions either system wide OR system plus customer specific ones. The UUIDs are content identifiers.
Request Syntax
response = client.get_global_observations( epoch='integer' format='normal'|'extended' include_internal='False|True' include_metadata='False|True' return_parents='False|True' ts='integer' )
- Parameters
epoch (integer) – The epoch id to use for this request
format (string) –
Specifies what data should be returned. “extended” includes start_ts (unix epoch time at which this specific revision became effective), path_start_ts (unix epoch time at which this observation became effective for the first time), and expiration_ts.
Valid values:
normal
,extended
include_internal (boolean) – Include internal metadata in the observation definition
include_metadata (boolean) – Include metadata in the observation definition
return_parents (boolean) –
ts (integer) – The Unix epoch time to use for this request
- Return type
dict
- Returns
Response Syntax
{}
Response Definitions
-
get_observation_by_id
(**kwargs)¶ Returns the observation definition indentified by id.
Request Syntax
response = client.get_observation_by_id( account_id='string' id='string' )
- Parameters
account_id (string) –
[REQUIRED]
AIMS Account ID
id (string) –
[REQUIRED]
the UUID identified assigned to a definition
- Return type
dict
- Returns
Response Syntax
{}
Response Definitions
-
get_observation_by_path
(**kwargs)¶ Returns the observation definition.
Request Syntax
response = client.get_observation_by_path( account_id='string' epoch='integer' include_internal='False|True' include_metadata='False|True' path='string' ts='integer' )
- Parameters
account_id (string) –
[REQUIRED]
AIMS Account ID
epoch (integer) – The epoch id to use for this request
include_internal (boolean) – Include internal metadata in the observation definition
include_metadata (boolean) – Include metadata in the observation definition
path (string) –
[REQUIRED]
the urlencoded content path of an observation definition
ts (integer) – The Unix epoch time to use for this request
- Return type
dict
- Returns
Response Syntax
{}
Response Definitions
-
get_observations
(**kwargs)¶ Return all current observation definitions either system wide OR system plus customer specific ones. The UUIDs are content identifiers.
Request Syntax
response = client.get_observations( account_id='string' epoch='integer' return_parents='False|True' ts='integer' )
- Parameters
account_id (string) –
[REQUIRED]
AIMS Account ID
epoch (integer) – The epoch id to use for this request
return_parents (boolean) –
ts (integer) – The Unix epoch time to use for this request
- Return type
dict
- Returns
Response Syntax
{}
Response Definitions
-
validate_global_observation
(**kwargs)¶ Alidates the given observation template JSON against its internal rules. This endpoint is intended for use to validate content either by automated systems or by humans during their content definition work. system-wide or customer specific endpoint behave identically
Request Syntax
response = client.validate_global_observation( data={} )
- Parameters
data (dict) –
- Returns
None
-
validate_observation
(**kwargs)¶ Validates the given observation template JSON against its internal rules. This endpoint is intended for use to validate content either by automated systems or by humans during their content definition work. system-wide or customer specific endpoint behave identically
Request Syntax
response = client.validate_observation( account_id='string' data={} )
- Parameters
account_id (string) –
[REQUIRED]
AIMS Account ID
data (dict) –
- Returns
None