Retrieve the Storage Service Location and Authorization Token
get
/iot/api/v2/provisioner/storage
Gets the location URL for the Storage Cloud Service associated with this IoT Cloud Service instance along with a temporary access token to be used for access to the storage service
Request
There are no request parameters for this operation.
Back to TopResponse
Supported Media Types
- application/zip
200 Response
Successfully processed
Root Schema : ProvisioningStorageRequest_receive
Type:
Show Source
object
-
authToken(optional):
string
Authorization token for accessing the Storage Cloud Service as an X-Auth-Token header value.
-
storageContainerUrl(optional):
string
URL to to Storage Cloud Service container associated with this IoT Cloud Service
401 Response
Unauthorized. The request requires user authentication.
404 Response
Not Found. The server was unable to connect to the storage service. No indication is given of whether the condition is temporary or permanent.
412 Response
Precondition Failed. The server is not correctly configured to provide storage cloud service information.
503 Response
Service Unavailable. The request could not be completed because the resource is in busy and is not available. The request can be repeated if at a later time, when it can succeed
Examples
curl -u <username>:<password>
https://iotserver/iot/api/v2/provisioner/storage
Example of Response Body
The following example shows the content of the request body in JSON format
{
"storageContainerURL":"https://a210401.storage.oraclecloud.com/v1/Storage-a210401/MediaStorageContainer",
"authToken":"AUTH_tkaa1e88e1210200270d4d6cf4ae68ff4e"
}
Complete cURL Example
The following example shows compete cURL command that can be used to perform described operation
curl -u <username>:<password>
https://iotserver/iot/api/v2/provisioner/storage
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.