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.
The export process is a two phase protocol.
- 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:
- creating a record for the export operation
- sending the response to the user which includes export request identifier.
- 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:
- packing exported data to the archive
- updating status of the export operation
- sending the archive.
Request
Supported Media Types
- */*
Response
Supported Media Types
- application/json
201 Response
Successfully processed.
Root Schema : ExportRequestImpl_receive
Type:
Show Source
object
-
completed:
integer
Date of the request completion in milliseconds since January 1, 1970
-
completedAsString:
string
Date of the request completion represented as ISO string.
-
created:
integer
Date of the request creation in milliseconds since January 1, 1970
-
createdAsString:
string
Date of the request creation represented as ISO string.
-
createdBy:
string
Name of the user who created this request.
-
description:
string
Export request description.
-
fileName:
string
The file name which is associated with this request.
-
id:
string
Unique identifier that identifies the export request.
-
status:
string
The state associated with the request.One of [CREATED, VERIFIED, CONFLICT, RUNNING, COMPLETED, FAILED].
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.
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.