DeviceMgmtPkis Resource

GET /deviceMgmtPkis

Returns the list of all the DeviceMgmtPki.

If the flag DeviceMgmtPkisResult.limitExceeded is set, the maximum number of entries to be returned has been reached, more pkis exist and can be read by moving the offset forward in a new request

Example to get all DeviceMgmtPkis:

    String apiPath = "deviceMgmtPkis.xml";
    WebResource apisWeb = client.resource(API_URL).path(apiPath);
    
    DeviceMgmtPkisResult result;
    int offset = 0;
    do {
       // if the "limit" queryParam is not initialized, limit default value = 50
       // if the "offset" queryParam is not initialized, offset default value = 0
       apisWeb = apisWeb.queryParam("limit", "" + limit);
       if (offset > 0) 
          apisWeb = apisWeb.queryParam("offset", "" + offset);
       result = apisWeb.get(DeviceMgmtPkisResult.class);
       offset += limit;
    } while (result.isLimitExceeded()):
 

Example of query in CURL :
curl --user 'username:password' -k https://api-sandbox.everyware-cloud.com/v2/deviceMgmtPkis

Request Parameters
name type description default constraints
limit query Maximum number of entries to be returned. Note that an error will be returned if the maximum allowed value is exceeded. 50 required
offset query Starting offset for the entries to be returned. Note that an error will be returned if the maximum allowed value is exceeded. 0 required
Response Body
media type data type description
application/json DeviceMgmtPkisResult (JSON) The list of requested DeviceMgmtPkis.
application/xml deviceMgmtPkisResult (XML)

Example

Request
GET /deviceMgmtPkis
Content-Type: */*
Accept: application/json

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

                
{
  "limitExceeded" : true,
  "deviceMgmtPki" : [ {
    "privateKey" : "...",
    "password" : "...",
    "isDefault" : true,
    "caId" : 12345,
    "isCa" : true,
    "pkiStatus" : "REVOKED",
    "id" : 12345,
    "certificate" : "...",
    "accountId" : 12345,
    "version" : 12345,
    "serial" : "...",
    "algorithm" : "...",
    "subject" : "...",
    "issuer" : "...",
    "notBefore" : 12345,
    "notAfter" : 12345,
    "createdOn" : 12345,
    "createdBy" : 12345,
    "modifiedOn" : 12345,
    "modifiedBy" : 12345,
    "name" : "...",
    "optlock" : 12345
  }, {
    "privateKey" : "...",
    "password" : "...",
    "isDefault" : true,
    "caId" : 12345,
    "isCa" : true,
    "pkiStatus" : "VALID",
    "id" : 12345,
    "certificate" : "...",
    "accountId" : 12345,
    "version" : 12345,
    "serial" : "...",
    "algorithm" : "...",
    "subject" : "...",
    "issuer" : "...",
    "notBefore" : 12345,
    "notAfter" : 12345,
    "createdOn" : 12345,
    "createdBy" : 12345,
    "modifiedOn" : 12345,
    "modifiedBy" : 12345,
    "name" : "...",
    "optlock" : 12345
  } ]
}
                
              

POST /deviceMgmtPkis

Creates a new DeviceMgmtPki based on the information provided in DeviceMgmtPkiCreator parameter. *

Example of query in CURL (PLEASE note the --data-binary option):
curl -X PUT --data-binary \@DeviceMgmtPkiFile.xml -H "Content-type:application/xml" --user 'username:password' -k https://api-sandbox.everyware-cloud.com/v2/deviceMgmtPkis

Request Body
media type data type description
application/json DeviceMgmtPkiCreator (JSON) Provides the information for the new DeviceMgmtPki to be created.
application/xml deviceMgmtPkiCreator (XML)
Response Body
media type data type description
application/json DeviceMgmtPki (JSON) The newly created DeviceMgmtPki.
application/xml deviceMgmtPki (XML)

Example

Request
POST /deviceMgmtPkis
Content-Type: application/json
Accept: application/json

                
{
  "isDefault" : true,
  "caId" : 12345,
  "isCa" : true,
  "pkiStatus" : "...",
  "certificate" : "...",
  "privateKey" : "...",
  "password" : "...",
  "accountId" : 12345,
  "version" : 12345,
  "serial" : "...",
  "algorithm" : "...",
  "subject" : "...",
  "issuer" : "...",
  "notBefore" : 12345,
  "notAfter" : 12345,
  "createdOn" : 12345,
  "createdBy" : 12345,
  "name" : "..."
}
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "privateKey" : "...",
  "password" : "...",
  "isDefault" : true,
  "caId" : 12345,
  "isCa" : true,
  "pkiStatus" : "SUSPENDED",
  "id" : 12345,
  "certificate" : "...",
  "accountId" : 12345,
  "version" : 12345,
  "serial" : "...",
  "algorithm" : "...",
  "subject" : "...",
  "issuer" : "...",
  "notBefore" : 12345,
  "notAfter" : 12345,
  "createdOn" : 12345,
  "createdBy" : 12345,
  "modifiedOn" : 12345,
  "modifiedBy" : 12345,
  "name" : "...",
  "optlock" : 12345
}
                
              

PUT /deviceMgmtPkis

Updates the DeviceMgmtPki provided in the request body. * Example of query in CURL (PLEASE note the --data-binary option):
curl -X PUT --data-binary \@DeviceMgmtPkiCreatorFile.xml -H "Content-type:application/xml" --user 'username:password' -k https://api-sandbox.everyware-cloud.com/v2/deviceMgmtPkis

Request Body
media type data type description
application/json DeviceMgmtPki (JSON) The modified DeviceMgmtPki whose attributes need to be updated.
application/xml deviceMgmtPki (XML)
Response Body
media type data type description
application/json DeviceMgmtPki (JSON) The updated DeviceMgmtPki.
application/xml deviceMgmtPki (XML)

Example

Request
PUT /deviceMgmtPkis
Content-Type: application/json
Accept: application/json

                
{
  "privateKey" : "...",
  "password" : "...",
  "isDefault" : true,
  "caId" : 12345,
  "isCa" : true,
  "pkiStatus" : "EXPIRED",
  "id" : 12345,
  "certificate" : "...",
  "accountId" : 12345,
  "version" : 12345,
  "serial" : "...",
  "algorithm" : "...",
  "subject" : "...",
  "issuer" : "...",
  "notBefore" : 12345,
  "notAfter" : 12345,
  "createdOn" : 12345,
  "createdBy" : 12345,
  "modifiedOn" : 12345,
  "modifiedBy" : 12345,
  "name" : "...",
  "optlock" : 12345
}
                
              
Response
HTTP/1.1 204 No Content
Content-Type: application/json

                
{
  "privateKey" : "...",
  "password" : "...",
  "isDefault" : true,
  "caId" : 12345,
  "isCa" : true,
  "pkiStatus" : "SUSPENDED",
  "id" : 12345,
  "certificate" : "...",
  "accountId" : 12345,
  "version" : 12345,
  "serial" : "...",
  "algorithm" : "...",
  "subject" : "...",
  "issuer" : "...",
  "notBefore" : 12345,
  "notAfter" : 12345,
  "createdOn" : 12345,
  "createdBy" : 12345,
  "modifiedOn" : 12345,
  "modifiedBy" : 12345,
  "name" : "...",
  "optlock" : 12345
}
                
              

GET /deviceMgmtPkis/defaultPki

Returns the DeviceMgmtPki used as default to sign the command message by the platform

Response Body
media type data type description
application/json DeviceMgmtPki (JSON) The default DeviceMgmtPkis.
application/xml deviceMgmtPki (XML)

Example

Request
GET /deviceMgmtPkis/defaultPki
Content-Type: */*
Accept: application/json

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

                
{
  "privateKey" : "...",
  "password" : "...",
  "isDefault" : true,
  "caId" : 12345,
  "isCa" : true,
  "pkiStatus" : "VALID",
  "id" : 12345,
  "certificate" : "...",
  "accountId" : 12345,
  "version" : 12345,
  "serial" : "...",
  "algorithm" : "...",
  "subject" : "...",
  "issuer" : "...",
  "notBefore" : 12345,
  "notAfter" : 12345,
  "createdOn" : 12345,
  "createdBy" : 12345,
  "modifiedOn" : 12345,
  "modifiedBy" : 12345,
  "name" : "...",
  "optlock" : 12345
}
                
              

GET /deviceMgmtPkis/findCAs

Returns the list of all the DeviceMgmtPki that are Certification Authority.

Request Parameters
name type description default constraints
limit query Maximum number of entries to be returned. Note that an error will be returned if the maximum allowed value is exceeded. 50 required
offset query Starting offset for the entries to be returned. Note that an error will be returned if the maximum allowed value is exceeded. 0 required
Response Body
media type data type description
application/json DeviceMgmtPkisResult (JSON) The list of requested Certification Authority DeviceMgmtPkis.
application/xml deviceMgmtPkisResult (XML)

Example

Request
GET /deviceMgmtPkis/findCAs
Content-Type: */*
Accept: application/json

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

                
{
  "limitExceeded" : true,
  "deviceMgmtPki" : [ {
    "privateKey" : "...",
    "password" : "...",
    "isDefault" : true,
    "caId" : 12345,
    "isCa" : true,
    "pkiStatus" : "VALID",
    "id" : 12345,
    "certificate" : "...",
    "accountId" : 12345,
    "version" : 12345,
    "serial" : "...",
    "algorithm" : "...",
    "subject" : "...",
    "issuer" : "...",
    "notBefore" : 12345,
    "notAfter" : 12345,
    "createdOn" : 12345,
    "createdBy" : 12345,
    "modifiedOn" : 12345,
    "modifiedBy" : 12345,
    "name" : "...",
    "optlock" : 12345
  }, {
    "privateKey" : "...",
    "password" : "...",
    "isDefault" : true,
    "caId" : 12345,
    "isCa" : true,
    "pkiStatus" : "SUSPENDED",
    "id" : 12345,
    "certificate" : "...",
    "accountId" : 12345,
    "version" : 12345,
    "serial" : "...",
    "algorithm" : "...",
    "subject" : "...",
    "issuer" : "...",
    "notBefore" : 12345,
    "notAfter" : 12345,
    "createdOn" : 12345,
    "createdBy" : 12345,
    "modifiedOn" : 12345,
    "modifiedBy" : 12345,
    "name" : "...",
    "optlock" : 12345
  } ]
}
                
              

GET /deviceMgmtPkis/findNotCAs

Returns the list of all the DeviceMgmtPki that aren't Certification Authority.

Request Parameters
name type description default constraints
limit query Maximum number of entries to be returned. Note that an error will be returned if the maximum allowed value is exceeded. 50 required
offset query Starting offset for the entries to be returned. Note that an error will be returned if the maximum allowed value is exceeded. 0 required
Response Body
media type data type description
application/json DeviceMgmtPkisResult (JSON) The list of requested DeviceMgmtPkis.
application/xml deviceMgmtPkisResult (XML)

Example

Request
GET /deviceMgmtPkis/findNotCAs
Content-Type: */*
Accept: application/json

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

                
{
  "limitExceeded" : true,
  "deviceMgmtPki" : [ {
    "privateKey" : "...",
    "password" : "...",
    "isDefault" : true,
    "caId" : 12345,
    "isCa" : true,
    "pkiStatus" : "SUSPENDED",
    "id" : 12345,
    "certificate" : "...",
    "accountId" : 12345,
    "version" : 12345,
    "serial" : "...",
    "algorithm" : "...",
    "subject" : "...",
    "issuer" : "...",
    "notBefore" : 12345,
    "notAfter" : 12345,
    "createdOn" : 12345,
    "createdBy" : 12345,
    "modifiedOn" : 12345,
    "modifiedBy" : 12345,
    "name" : "...",
    "optlock" : 12345
  }, {
    "privateKey" : "...",
    "password" : "...",
    "isDefault" : true,
    "caId" : 12345,
    "isCa" : true,
    "pkiStatus" : "EXPIRED",
    "id" : 12345,
    "certificate" : "...",
    "accountId" : 12345,
    "version" : 12345,
    "serial" : "...",
    "algorithm" : "...",
    "subject" : "...",
    "issuer" : "...",
    "notBefore" : 12345,
    "notAfter" : 12345,
    "createdOn" : 12345,
    "createdBy" : 12345,
    "modifiedOn" : 12345,
    "modifiedBy" : 12345,
    "name" : "...",
    "optlock" : 12345
  } ]
}
                
              

GET /deviceMgmtPkis/revokedList

Returns the list of all the revoked DeviceMgmtPki.

Request Parameters
name type description default constraints
limit query Maximum number of entries to be returned. Note that an error will be returned if the maximum allowed value is exceeded. 50 required
offset query Starting offset for the entries to be returned. Note that an error will be returned if the maximum allowed value is exceeded. 0 required
Response Body
media type data type description
application/json DeviceMgmtPkisResult (JSON) The list of requested revoked DeviceMgmtPkis.
application/xml deviceMgmtPkisResult (XML)

Example

Request
GET /deviceMgmtPkis/revokedList
Content-Type: */*
Accept: application/json

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

                
{
  "limitExceeded" : true,
  "deviceMgmtPki" : [ {
    "privateKey" : "...",
    "password" : "...",
    "isDefault" : true,
    "caId" : 12345,
    "isCa" : true,
    "pkiStatus" : "SUSPENDED",
    "id" : 12345,
    "certificate" : "...",
    "accountId" : 12345,
    "version" : 12345,
    "serial" : "...",
    "algorithm" : "...",
    "subject" : "...",
    "issuer" : "...",
    "notBefore" : 12345,
    "notAfter" : 12345,
    "createdOn" : 12345,
    "createdBy" : 12345,
    "modifiedOn" : 12345,
    "modifiedBy" : 12345,
    "name" : "...",
    "optlock" : 12345
  }, {
    "privateKey" : "...",
    "password" : "...",
    "isDefault" : true,
    "caId" : 12345,
    "isCa" : true,
    "pkiStatus" : "REVOKED",
    "id" : 12345,
    "certificate" : "...",
    "accountId" : 12345,
    "version" : 12345,
    "serial" : "...",
    "algorithm" : "...",
    "subject" : "...",
    "issuer" : "...",
    "notBefore" : 12345,
    "notAfter" : 12345,
    "createdOn" : 12345,
    "createdBy" : 12345,
    "modifiedOn" : 12345,
    "modifiedBy" : 12345,
    "name" : "...",
    "optlock" : 12345
  } ]
}
                
              

DELETE /deviceMgmtPkis/{deviceMgmtPkiId}

Deletes the DeviceMgmtPki specified by the "deviceMgmtPki" path parameter.

Request Parameters
name type description
deviceMgmtPkiId path

Example

Request
DELETE /deviceMgmtPkis/{deviceMgmtPkiId}
Content-Type: */*

                
...
                
              
Response
HTTP/1.1 204 No Content

              

GET /deviceMgmtPkis/{deviceMgmtPkiId}

Returns the DeviceMgmtPki identified by the specified deviceMgmtPkiId.

Example of query in CURL :
curl --user 'username:password' -k https://api-sandbox.everyware-cloud.com/v2/deviceMgmtPkis/{deviceMgmtPkiId}

Request Parameters
name type description
deviceMgmtPkiId path The DeviceMgmtPki ID of the DeviceMgmtPki requested.
Response Body
media type data type description
application/json DeviceMgmtPki (JSON) The DeviceMgmtPki requested.
application/xml deviceMgmtPki (XML)

Example

Request
GET /deviceMgmtPkis/{deviceMgmtPkiId}
Content-Type: */*
Accept: application/json

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

                
{
  "privateKey" : "...",
  "password" : "...",
  "isDefault" : true,
  "caId" : 12345,
  "isCa" : true,
  "pkiStatus" : "VALID",
  "id" : 12345,
  "certificate" : "...",
  "accountId" : 12345,
  "version" : 12345,
  "serial" : "...",
  "algorithm" : "...",
  "subject" : "...",
  "issuer" : "...",
  "notBefore" : 12345,
  "notAfter" : 12345,
  "createdOn" : 12345,
  "createdBy" : 12345,
  "modifiedOn" : 12345,
  "modifiedBy" : 12345,
  "name" : "...",
  "optlock" : 12345
}
                
              

GET /deviceMgmtPkis/certificatesChain/{deviceMgmtPkiId}

Returns the chain, up to the root certification authority, related to the DeviceMgmtPki identified by deviceMgmtPkiId

Request Parameters
name type description
deviceMgmtPkiId path The id of the DeviceMgmtPki leaf of the chain
Response Body
media type data type description
application/json DeviceMgmtPkisResult (JSON) The list of requested DeviceMgmtPkis.
application/xml deviceMgmtPkisResult (XML)

Example

Request
GET /deviceMgmtPkis/certificatesChain/{deviceMgmtPkiId}
Content-Type: application/json
Accept: application/json

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

                
{
  "limitExceeded" : true,
  "deviceMgmtPki" : [ {
    "privateKey" : "...",
    "password" : "...",
    "isDefault" : true,
    "caId" : 12345,
    "isCa" : true,
    "pkiStatus" : "REVOKED",
    "id" : 12345,
    "certificate" : "...",
    "accountId" : 12345,
    "version" : 12345,
    "serial" : "...",
    "algorithm" : "...",
    "subject" : "...",
    "issuer" : "...",
    "notBefore" : 12345,
    "notAfter" : 12345,
    "createdOn" : 12345,
    "createdBy" : 12345,
    "modifiedOn" : 12345,
    "modifiedBy" : 12345,
    "name" : "...",
    "optlock" : 12345
  }, {
    "privateKey" : "...",
    "password" : "...",
    "isDefault" : true,
    "caId" : 12345,
    "isCa" : true,
    "pkiStatus" : "VALID",
    "id" : 12345,
    "certificate" : "...",
    "accountId" : 12345,
    "version" : 12345,
    "serial" : "...",
    "algorithm" : "...",
    "subject" : "...",
    "issuer" : "...",
    "notBefore" : 12345,
    "notAfter" : 12345,
    "createdOn" : 12345,
    "createdBy" : 12345,
    "modifiedOn" : 12345,
    "modifiedBy" : 12345,
    "name" : "...",
    "optlock" : 12345
  } ]
}
                
              

GET /deviceMgmtPkis/certificatesTree/{deviceMgmtPkiId}

Returns the list of all the DeviceMgmPkis that are son of a the DeviceMgmtPki identified by deviceMgmtPkiId

Request Parameters
name type description default constraints
deviceMgmtPkiId path The id of the DeviceMgmtPki root of the tree    
limit query Maximum number of entries to be returned. Note that an error will be returned if the maximum allowed value is exceeded. 50 required
offset query Starting offset for the entries to be returned. Note that an error will be returned if the maximum allowed value is exceeded. 0 required
Response Body
media type data type description
application/json DeviceMgmtPkisResult (JSON) The list of requested DeviceMgmtPkis.
application/xml deviceMgmtPkisResult (XML)

Example

Request
GET /deviceMgmtPkis/certificatesTree/{deviceMgmtPkiId}
Content-Type: application/json
Accept: application/json

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

                
{
  "limitExceeded" : true,
  "deviceMgmtPki" : [ {
    "privateKey" : "...",
    "password" : "...",
    "isDefault" : true,
    "caId" : 12345,
    "isCa" : true,
    "pkiStatus" : "VALID",
    "id" : 12345,
    "certificate" : "...",
    "accountId" : 12345,
    "version" : 12345,
    "serial" : "...",
    "algorithm" : "...",
    "subject" : "...",
    "issuer" : "...",
    "notBefore" : 12345,
    "notAfter" : 12345,
    "createdOn" : 12345,
    "createdBy" : 12345,
    "modifiedOn" : 12345,
    "modifiedBy" : 12345,
    "name" : "...",
    "optlock" : 12345
  }, {
    "privateKey" : "...",
    "password" : "...",
    "isDefault" : true,
    "caId" : 12345,
    "isCa" : true,
    "pkiStatus" : "VALID",
    "id" : 12345,
    "certificate" : "...",
    "accountId" : 12345,
    "version" : 12345,
    "serial" : "...",
    "algorithm" : "...",
    "subject" : "...",
    "issuer" : "...",
    "notBefore" : 12345,
    "notAfter" : 12345,
    "createdOn" : 12345,
    "createdBy" : 12345,
    "modifiedOn" : 12345,
    "modifiedBy" : 12345,
    "name" : "...",
    "optlock" : 12345
  } ]
}