Retrieve Activation Parameters for a Device

get

/iot/api/v2/activation/policy

The API allows the device to get the parameters needed to perform activation. This API is needed only for direct activation. The caller sends the device attributes in the request and the server responds with the cryptographic parameters to be used during the activation process.

Request

Query Parameters
Back to Top

Response

Supported Media Types

200 Response

Successfully processed.
Body ()
Root Schema : ActivationPolicyResponse_receive
Type: object
Show Source
  • The message digest algorithm to be used with keyType to generate a digital signature (for example, sha256WithRSAEncryption, where sha256 is the hashAlgorithm)
  • The size of the key, in bits
  • The algorithm used to generate keys (for example, RSA)

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.

406 Response

Request Not Acceptable. The resource identified by the request is only capable of generating response entities which have content characteristics not acceptable according to the accept headers sent in the request.
Back to Top

Examples

The following example shows how to view the activation parameters of Device with Activation ID 6e5e3e593bcf-1c79 for the operating system Windows 7 Version 6.1 by submitting a GET request on the REST resource using cURL. The authorization token is obtained by calling the Authentication API, where issuer is the device with Activation Id : 6e5e3e593bcf-1c79 and scope=oracle/iot/activation.

The format of the Cloud Service instance is https://myinstance-myidentitydomain.iot.us.oraclecloud.com and the default port is 443.

For more information about cURL, see Use cURL.rom

curl -H 'Accept: application/json' -H 'Authorization: Bearer 0a6eed78d32f0cd49c82586ba5f113f7' -H 'X-ActivationId: 6e5e3e593bcf-1c79' "http://iotserver/iot/api/v2/activation/policy?OSName=Windows+7&OSVersion=6.1"

Example of Response Header

The following shows an example of the response header when the request is successful.

HTTP/1.1 200 OK 
Content-Type: application/json

Example of Response Body

The following example shows the activation parameters for the requested operating system in JSON format.

{
   "keyType":"RSA",
   "keySize":"2048",
   "hashAlgorithm":"SHA256withRSA"
} 
Back to Top