Aepublish

Table of Contents

Client

class Aepublish.Client

A client object representing ‘Aepublish’ Service:

import almdrlib

client = almdrlib.client('aepublish')

Available methods:

publish_observations(**kwargs)

Publishes observations to Ingest subsystem, and returns the publication outcome of each observation plus potentially various stats in an object. This API expects the body to contain a JSON list of observations. Outcomes are objects containing at least an outcome key. Its value may be one of:

  • success: The publication succeeded. The object also contain an ingest_id property with the observation ingest ID. The object may contain an additional chkpt property containing the checkpoint marker given to Ingest.

  • retry: The publication of the observation may be retried. The object may contain an additional delay property with the recommended retry interval in second as an integer value.

  • error: The publication of the observation failed due to a caller error. The object may contain an additional details property. The publication should not be retried.

  • suppressed: The publication of the observation was suppressed as a similar observation has been published in recent past. See the observation definition’s unique value. The object may contain an additional ingest_id property with the ingest ID of the previously published observation. The publication should not be retried.

  • throttled: The publication of the observation was not sent as the allowed observation quota with that definition is reached. See the observation definition’s throttle_count and throttle_period values. The publication should not be retried.

  • duplicate: The observation’s progress marker has already been processed. The object may contain an additional ingest_id property with the ingest ID issued the first time the progress marker was submitted. The publication should not be retried.

Request Syntax

response = client.publish_observations(
    account_id='string'
    data=[
        {}
    ]
)
Parameters
  • account_id (string) –

    [REQUIRED]

    AIMS Account ID

  • data (list) –

    • (dict) –

Return type

dict

Returns

Response Syntax

{
    'observations': [
        {
            'chkpt': 'string',
            'delay': 'integer',
            'ingest_id': 'string',
            'outcome': 'success'|'retry'|'error'|'suppressed'|'throttled'|'duplicate'
        }
    ]
}

Response Definitions

  • observations (list) –

    • (dict) –

      • chkpt (string) –

      • delay (integer) –

      • ingest_id (string) –

      • outcome (string) –

        Valid values: success, retry, error, suppressed, throttled, duplicate