api-trail

api-trail count

Usage

  usage: symp api-trail count
[-f {adaptive_table,csv,json,table,value,yaml}]
                              [-c COLUMN] [--max-width <integer>] [--noindent]
                              [--quote {all,minimal,none,nonnumeric}]
                              [-m [NAME=VALUE [NAME=VALUE ...]]]
                              [--project-id [PROJECT_ID [PROJECT_ID ...]]]
                              [--account-id [ACCOUNT_ID [ACCOUNT_ID ...]]]
                              [--user-id [USER_ID [USER_ID ...]]]
                              [--api-path [API_PATH [API_PATH ...]]]
                              [--api-path-prefix [API_PATH_PREFIX [API_PATH_PREFIX ...]]]
                              [--status-code [STATUS_CODE [STATUS_CODE ...]]]
                              [--is-aws-request IS_AWS_REQUEST]
                              [--start-timestamp START_TIMESTAMP]
                              [--end-timestamp END_TIMESTAMP]
                              [--interval-length INTERVAL_LENGTH]
                              [--group-by GROUP_BY]

Description

Get API trail filtered by given params. If param value is None or [] it will not be used for filtering.

Returns

Returns list: List of {“<field>”: “<field_value>”, “count”: <count>} for events matching the provided filters

Optional

optional arguments:
  -h, --help            show this help message and exit
  --project-id [PROJECT_ID [PROJECT_ID ...]]
                        If the user is tenant/system admin,
                        the project ID from the credentials will be used to filter if it is not given, multiple values can be given
  --account-id [ACCOUNT_ID [ACCOUNT_ID ...]]
                        If the user is system admin,
                        the account ID from the credentials will be used to filter if it is not given, multiple values can be given
  --user-id [USER_ID [USER_ID ...]]
                        Filter by (default: None)
  --api-path [API_PATH [API_PATH ...]]
                        Filter by (default: None), multiple values can be given
  --api-path-prefix [API_PATH_PREFIX [API_PATH_PREFIX ...]]
                        Filter by prefixes of api path (default: None), multiple values can be given
  --status-code [STATUS_CODE [STATUS_CODE ...]]
                        Filter by (default: None), multiple values can be given
  --is-aws-request IS_AWS_REQUEST
                        Filter by (default: None)
  --start-timestamp START_TIMESTAMP
                        Start of query period (milliseconds since epoch), by default - 1 hour back
  --end-timestamp END_TIMESTAMP
                        End of query period (milliseconds since epoch), by default - now
  --interval-length INTERVAL_LENGTH
                        Length of query interval (seconds). No default
                        only two of start_timestamp, end_timestamp, interval_length can be present
  --group-by GROUP_BY   Count and group by specific field one of:
                        project_id, account_id, user_id, user_name, api_path, status_code, remote_addr (default: status_code)

api-trail query

Usage

  usage: symp api-trail query
[-f {adaptive_table,csv,json,table,value,yaml}]
                              [-c COLUMN] [--max-width <integer>] [--noindent]
                              [--quote {all,minimal,none,nonnumeric}]
                              [-m [NAME=VALUE [NAME=VALUE ...]]]
                              [--project-id [PROJECT_ID [PROJECT_ID ...]]]
                              [--account-id [ACCOUNT_ID [ACCOUNT_ID ...]]]
                              [--user-id [USER_ID [USER_ID ...]]]
                              [--api-path [API_PATH [API_PATH ...]]]
                              [--api-path-prefix [API_PATH_PREFIX [API_PATH_PREFIX ...]]]
                              [--status-code [STATUS_CODE [STATUS_CODE ...]]]
                              [--is-aws-request IS_AWS_REQUEST]
                              [--start-timestamp START_TIMESTAMP]
                              [--end-timestamp END_TIMESTAMP]
                              [--interval-length INTERVAL_LENGTH]
                              [--limit LIMIT] [--offset OFFSET]

Description

Get API trail filtered by given params. If param value is None or [] it will not be used for filtering.

Returns

Returns list: List of API calls matching the provided filters, ordered by time stamp, most recent event first

Optional

optional arguments:
  -h, --help            show this help message and exit
  --project-id [PROJECT_ID [PROJECT_ID ...]]
                        If the user is tenant/system admin,
                        the project ID from the credentials will be used to filter if it is not given, multiple values can be given
  --account-id [ACCOUNT_ID [ACCOUNT_ID ...]]
                        If the user is system admin,
                        the account ID from the credentials will be used to filter if it is not given, multiple values can be given
  --user-id [USER_ID [USER_ID ...]]
                        Filter by (default: None), multiple values can be given
  --api-path [API_PATH [API_PATH ...]]
                        Filter by (default: None), multiple values can be given
  --api-path-prefix [API_PATH_PREFIX [API_PATH_PREFIX ...]]
                        Filter by prefixes of api path (default: None), multiple values can be given
  --status-code [STATUS_CODE [STATUS_CODE ...]]
                        Filter by (default: None), multiple values can be given
  --is-aws-request IS_AWS_REQUEST
                        Filter by (default: None)
  --start-timestamp START_TIMESTAMP
                        Start of query period (seconds since epoch), by default - 1 hour back
  --end-timestamp END_TIMESTAMP
                        End of query period (seconds since epoch), by default - now
  --interval-length INTERVAL_LENGTH
                        Length of query interval (seconds). No default
                        only two of start_timestamp, end_timestamp, interval_length can be present
  --limit LIMIT         Limit amount of API calls (default: 50)
  --offset OFFSET       Offset to paginate the results (default: None)