Create an Export Request

post

/iot/api/v2/exports

Creates an export request object that provides status of the operation and a link to get the generated data from in case of success.
The export process is a two phase protocol.
  1. The first phase of the protocol involves the user to define an application or/and the settings should be exported from Oracle IOT Cloud Service. The server performs the following tasks:
    1. creating a record for the export operation
    2. sending the response to the user which includes export request identifier.
  2. The second phase of the protocol allows the user to retrieve the status of the export operation and to download the archive containing exported data. The server performs the following tasks:
    1. packing exported data to the archive
    2. updating status of the export operation
    3. sending the archive.

Request

Supported Media Types
Body ()
Root Schema : ExportRequestImpl_create
Type: object
Show Source
Back to Top

Response

Supported Media Types

201 Response

Successfully processed.
Body ()
Root Schema : ExportRequestImpl_receive
Type: object
Show Source

400 Response

Bad Request. The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications.

401 Response

Unauthorized. The request requires user authentication.

403 Response

Forbidden. The server understood the request, but is refusing to fulfill it. Authorization will not help and the request SHOULD NOT be repeated.

409 Response

Conflict. The request could not be completed due to a conflict with the current state of the resource. This code is only allowed in situations where it is expected that the user might be able to resolve the conflict and resubmit the request.
Back to Top

Examples

curl -X POST 
   -u <username>:<password>
   -H 'Accept: application/json'
   https://iotserver/iot/api/v2/exports

Example of Request Body

The following example shows the content of the request body in JSON format:


{
}

Example of Response Body

The following example shows the content of the response body in JSON format:


{
"id":"666649074d92-53f6",
"status":"The state associated with the request.One of [CREATED, VERIFIED, CONFLICT, RUNNING, COMPLETED, FAILED].",
"description":"Export request description.",
"fileName":"The file name which is associated with this request.",
"createdBy":"Name of the user who created this request.",
"created":1469184297746,
"createdAsString":"2016-07-22T10:44:57.746Z",
"completed":12345,
"completedAsString":"Date of the request completion represented as ISO string."
}



Complete cURL Example

The following example shows a complete cURL command that you can use to perform the described operation:

curl -X POST 
   -u <username>:<password>
   -H 'Accept: application/json'
   -d '{}'
   https://iotserver/iot/api/v2/exports



Note that in the request, https://iotserver will be replaced by the name and port of your assigned IoT Cloud Service instance. The format of the Cloud Service instance is https://myinstance-myidentitydomain.iot.us.oraclecloud.com and the default port is 443.
Back to Top