Skip to main content

exports

Creates, updates, deletes, gets or lists an exports resource.

Overview

Nameexports
TypeResource
Idgoogle.apigee.exports

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringDisplay name of the export job.
createdstringOutput only. Time the export job was created.
datastoreNamestringName of the datastore that is the destination of the export job [datastore]
descriptionstringDescription of the export job.
errorstringOutput only. Error is set when export fails
executionTimestringOutput only. Execution time for this export job. If the job is still in progress, it will be set to the amount of time that has elapsed sincecreated, in seconds. Else, it will set to (updated - created), in seconds.
selfstringOutput only. Self link of the export job. A URI that can be used to retrieve the status of an export job. Example: /organizations/myorg/environments/myenv/analytics/exports/9cfc0d85-0f30-46d6-ae6f-318d0cb961bd
statestringOutput only. Status of the export job. Valid values include enqueued, running, completed, and failed.
updatedstringOutput only. Time the export job was last updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
organizations_environments_analytics_exports_getselectorganizationsId, environmentsId, exportsIdGets the details and status of an analytics export job. If the export job is still in progress, its state is set to "running". After the export job has completed successfully, its state is set to "completed". If the export job fails, its state is set to failed.
organizations_environments_analytics_exports_listselectorganizationsId, environmentsIdLists the details and status of all analytics export jobs belonging to the parent organization and environment.
organizations_environments_analytics_exports_createinsertorganizationsId, environmentsIdSubmit a data export job to be processed in the background. If the request is successful, the API returns a 201 status, a URI that can be used to retrieve the status of the export job, and the state value of "enqueued".

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
environmentsIdstring
exportsIdstring
organizationsIdstring

SELECT examples

Gets the details and status of an analytics export job. If the export job is still in progress, its state is set to "running". After the export job has completed successfully, its state is set to "completed". If the export job fails, its state is set to failed.

SELECT
name,
created,
datastoreName,
description,
error,
executionTime,
self,
state,
updated
FROM google.apigee.exports
WHERE organizationsId = '{{ organizationsId }}' -- required
AND environmentsId = '{{ environmentsId }}' -- required
AND exportsId = '{{ exportsId }}' -- required;

INSERT examples

Submit a data export job to be processed in the background. If the request is successful, the API returns a 201 status, a URI that can be used to retrieve the status of the export job, and the state value of "enqueued".

INSERT INTO google.apigee.exports (
data__name,
data__description,
data__dateRange,
data__outputFormat,
data__csvDelimiter,
data__datastoreName,
organizationsId,
environmentsId
)
SELECT
'{{ name }}',
'{{ description }}',
'{{ dateRange }}',
'{{ outputFormat }}',
'{{ csvDelimiter }}',
'{{ datastoreName }}',
'{{ organizationsId }}',
'{{ environmentsId }}'
RETURNING
name,
created,
datastoreName,
description,
error,
executionTime,
self,
state,
updated
;