DeviceCertificates

The following resources are applicable:

/deviceCerts

Mount Point: /v2/deviceCerts

The following operations are supported on this resource:

GET

Returns the list of all the device certificate.

If the flag AllowedCertificatesResult.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 device certificates:

String apiPath = "deviceCerts.xml";
WebResource apisWeb = client.resource(API_URL).path(apiPath);

AllowedCertificatesResult 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(AllowedCertificatesResult.class);
offset += limit;
} while (result.isLimitExceeded()):

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

Parameters

name description type default
limit Maximum number of entries to be returned. Note that an error will be returned if the maximum allowed value is exceeded. query 50
offset Starting offset for the entries to be returned. Note that an error will be returned if the maximum allowed value is exceeded. query 0

Response Body

element: allowedCerticatesResult
media types: application/xml
application/json

The list of requested device certificates.

POST

Creates a new device certificate based on the information provided in certificateCreator parameter.

Request Body

element: allowedCertificateCreator
media types: application/xml
application/json

Provides the information for the new device certificate to be created.

Response Body

element: AllowedCertificate
media types: application/xml
application/json

The newly created device certificate.

PUT

Updates the device certificate provided in the request body.

Request Body

element: AllowedCertificate
media types: application/xml
application/json

The modified device certificate whose attributes need to be updated.

Response Body

element: AllowedCertificate
media types: application/xml
application/json

The updated device certificate.

/deviceCerts/{certificateId}

Mount Point: /v2/deviceCerts/{certificateId}

GET

Returns the device certificate identified by the specified certificateId.

Example of query in CURL :
curl --user 'username:password' -k https://api-sandbox.everyware-cloud.com/v2/deviceCerts/{certificateId}.xml | xmllint --format -

Parameters

name description type default
certificateId The id of the device certificate requested. path

Response Body

element: AllowedCertificate
media types: application/xml
application/json

The device certificate requested.

DELETE

Deletes the device certificate specified by the "certificateId" path parameter.

Parameters

name description type default
certificateId The id of the device certificate to be deleted. path

/deviceCerts/{certificateId}/block

Mount Point: /v2/deviceCerts/{certificateId}/block

GET

Returns the blocked device certificate identified by the specified certificateId.

Example of query in CURL :
curl --user 'username:password' -k https://api-sandbox.everyware-cloud.com/v2/deviceCerts/{certificateId}.xml | xmllint --format -

Parameters

name description type default
certificateId (no documentation provided) path

Response Body

element: BlockedCertificate
media types: application/xml
application/json

The blocked device certificate requested.

DELETE

Deletes the blocked device certificate specified by the "certificateId" path parameter.

Parameters

name description type default
certificateId The id of the blocked device certificate to be deleted. path

/deviceCerts/{certificateId}/install

Mount Point: /v2/deviceCerts/{certificateId}/install

POST

Try to install the device certificate specified by the "certificateId" path parameter into the message broker truststore.

Parameters

name description type default
certificateId The id of the device certificate to be installed. path

/deviceCerts/{certificateId}/revoke

Mount Point: /v2/deviceCerts/{certificateId}/revoke

POST

Revoke the device certificate specified by the "certificateId" path parameter.

Parameters

name description type default
certificateId The id of the device certificate to be revoked. path

Response Body

element: allowedCerticatesResult
media types: application/xml
application/json

(no documentation provided)

/deviceCerts/blocked

Mount Point: /v2/deviceCerts/blocked

The following operations are supported on this resource:

GET

Returns the list of all the blocked device certificates.

If the flag BlockedCertificatesResult.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 blocked device certificates:

String apiPath = "deviceCerts.xml";
WebResource apisWeb = client.resource(API_URL).path(apiPath);

BlockedCertificatesResult 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(BlockedCertificatesResult.class);
offset += limit;
} while (result.isLimitExceeded()):

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

Parameters

name description type default
limit Maximum number of entries to be returned. Note that an error will be returned if the maximum allowed value is exceeded. query 50
offset Starting offset for the entries to be returned. Note that an error will be returned if the maximum allowed value is exceeded. query 0

Response Body

element: blockedCerticatesResult
media types: application/xml
application/json

The list of requested blocked device certificates.

POST

Creates a new blocked device certificate based on the information provided in BlockedCertificateCreator parameter.

Request Body

element: blockedCertificateCreator
media types: application/xml
application/json

Provides the information for the new blocked device certificate to be created.

Response Body

element: BlockedCertificate
media types: application/xml
application/json

The newly created blocked device certificate.

PUT

Updates the blocked device certificate provided in the request body.

Request Body

element: BlockedCertificate
media types: application/xml
application/json

The modified BlockedCertificate whose attributes need to be updated.

Response Body

element: BlockedCertificate
media types: application/xml
application/json

The updated blocked device certificate.

/deviceCerts/revoked

Mount Point: /v2/deviceCerts/revoked

GET

Returns the list of all the revoked device certificates.

Parameters

name description type default
limit Maximum number of entries to be returned. Note that an error will be returned if the maximum allowed value is exceeded. query 50
offset Starting offset for the entries to be returned. Note that an error will be returned if the maximum allowed value is exceeded. query 0

Response Body

element: allowedCerticatesResult
media types: application/xml
application/json

The list of requested revoked device certificates.