Analysis

Export a session as a file

csv and json are ready at 200. xlsx and pdf generate and answer 202; poll the job.

post/v1/sessions/{session_id}/exports

Request

  • Base URL: https://carbonguru.io
  • URL: https://carbonguru.io/v1/sessions/{session_id}/exports
  • Auth: HTTP bearer

Path parameters

session_idstring required

The analysis session id.

Headers

Idempotency-Keystring

A key of the caller's choosing, held 24 hours and scoped to the account, the method and the path. The same key with the same body replays the stored response with Idempotent-Replayed: true. The same key with a different body is a 409 idempotency_key_reuse. A request still running under the key is a 409 idempotency_in_progress. A key longer than 255 characters or holding control characters is a 422. A write whose record cannot be stored is still processed once, without the replay guarantee. A response carrying a secret is never replayed: the second request receives a 409 idempotency_secret_not_replayable.

Request body

format'csv' | 'xlsx' | 'json' | 'pdf' required

Response

The file is ready.

job_idstring required
status'ready' | 'generating' | 'failed' required
format'csv' | 'xlsx' | 'json' | 'pdf' required
download_urlstring

Changes

No recorded changes to this operation across all 1 revision of this API.