AllowedCertificates Resource

GET /allowedCertificates

Returns the list of all the AllowedCertificate.

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 AllowedCertificates:

    String apiPath = "allowedCertificates.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/allowedCertificates

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 AllowedCertificatesResult (JSON) The list of requested AllowedCertificates.
application/xml allowedCertificatesResult (XML)

Example

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

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

                
{
  "limitExceeded" : true,
  "allowedCertificate" : [ {
    "pkiStatus" : "REVOKED",
    "pkiAllowedCertificateStatus" : "INSTALL_FAILED",
    "digest" : "...",
    "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
  }, {
    "pkiStatus" : "EXPIRED",
    "pkiAllowedCertificateStatus" : "UNINSTALL_FAILED",
    "digest" : "...",
    "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 /allowedCertificates

Creates a new AllowedCertificate based on the information provided in AllowedCertificateCreator parameter.

Request Body
media type data type description
application/json AllowedCertificateCreator (JSON) Provides the information for the new AllowedCertificate to be created.
application/xml allowedCertificateCreator (XML)
Response Body
media type data type description
application/json AllowedCertificate (JSON) The newly created AllowedCertificate.
application/xml allowedCertificate (XML)

Example

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

                
{
  "pkiStatus" : "...",
  "pkiAllowedCertificateStatus" : "...",
  "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

                
{
  "pkiStatus" : "VALID",
  "pkiAllowedCertificateStatus" : "PENDING_INSTALL",
  "digest" : "...",
  "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 /allowedCertificates

Updates the AllowedCertificate provided in the request body.

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

Example

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

                
{
  "pkiStatus" : "SUSPENDED",
  "pkiAllowedCertificateStatus" : "PENDING_UNINSTALL",
  "digest" : "...",
  "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

                
{
  "pkiStatus" : "VALID",
  "pkiAllowedCertificateStatus" : "INSTALL_FAILED",
  "digest" : "...",
  "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 /allowedCertificates/revokedList

Returns the list of all the revoked AllowedCertificate.

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 AllowedCertificatesResult (JSON) The list of requested revoked AllowedCertificates.
application/xml allowedCertificatesResult (XML)

Example

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

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

                
{
  "limitExceeded" : true,
  "allowedCertificate" : [ {
    "pkiStatus" : "VALID",
    "pkiAllowedCertificateStatus" : "INSTALL_FAILED",
    "digest" : "...",
    "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
  }, {
    "pkiStatus" : "SUSPENDED",
    "pkiAllowedCertificateStatus" : "INSTALL_FAILED",
    "digest" : "...",
    "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 /allowedCertificates/{allowedCertificateId}

Deletes the AllowedCertificate specified by the "allowedCertificateId" path parameter.

Request Parameters
name type description
allowedCertificateId path The id of the AllowedCertificate to be deleted.

Example

Request
DELETE /allowedCertificates/{allowedCertificateId}
Content-Type: */*

                
...
                
              
Response
HTTP/1.1 204 No Content

              

GET /allowedCertificates/{allowedCertificateId}

Returns the AllowedCertificate identified by the specified allowedCertificateId.

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

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

Example

Request
GET /allowedCertificates/{allowedCertificateId}
Content-Type: */*
Accept: application/json

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

                
{
  "pkiStatus" : "EXPIRED",
  "pkiAllowedCertificateStatus" : "UNINSTALL_FAILED",
  "digest" : "...",
  "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 /allowedCertificates/install/{allowedCertificateId}

try to install the AllowedCertificate specified by the "allowedCertificateId" path parameter into the message broker truststore.

Request Parameters
name type description
allowedCertificateId path The id of the AllowedCertificate to be installed.

Example

Request
POST /allowedCertificates/install/{allowedCertificateId}
Content-Type: */*

                
...
                
              
Response
HTTP/1.1 201 Created

              

POST /allowedCertificates/revoke/{allowedCertificateId}

revoke the AllowedCertificate specified by the "allowedCertificateId" path parameter.

Request Parameters
name type description
allowedCertificateId path The id of the AllowedCertificate to be revoked.
Response Body
media type data type description
application/json AllowedCertificatesResult (JSON)
application/xml allowedCertificatesResult (XML)

Example

Request
POST /allowedCertificates/revoke/{allowedCertificateId}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "limitExceeded" : true,
  "allowedCertificate" : [ {
    "pkiStatus" : "REVOKED",
    "pkiAllowedCertificateStatus" : "INSTALL_FAILED",
    "digest" : "...",
    "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
  }, {
    "pkiStatus" : "VALID",
    "pkiAllowedCertificateStatus" : "INSTALL_FAILED",
    "digest" : "...",
    "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
  } ]
}