GlobalSign Inventory API documentation version v1.0
http://api.inventory/v1
GlobalSign Inventory API
/login
Login to obtain a JWT token for authentication on further requests
post /login
Login to obtain a JWT token for authentication on further requests
Headers
- Content-Type: required(string - pattern: ^application/json;charset=utf-8$)
Request Content-Type
- Content-Length: required(integer - minimum: 1)
Length of the request in bytes
Body
Media type: application/json;charset=utf-8
Type: object
Properties- api_key: required(string)
- api_secret: required(string)
Example:
{
"api_key": "e510e289e6cd8947",
"api_secret": "a477a8393d17a55ecb2ba6a61f58feb84770b621"
}
HTTP status code 200
Returned on successful authentication
Body
Media type: application/json;charset=utf-8
Type: object
Properties- access_token: required(string)
Example:
{
"access_token": "eyJhbGciOiAiSFMyNTYiLCAidHlwIjogIkpXVCJ9.eyJ1c2VyX2lkIjogMX0.BSf1w1blYKcbxVlyOtUogUsozH2clY34xxYPd8lQIlQ"
}
HTTP status code 400
Request could not be parsed
Body
Media type: application/problem+json;charset=utf-8
Type: object
Properties- description: required(string)
- id: (string)
- errors: (object)
key value error type
- /^.+$/: required(string)
key is the error type, and value contains error details
- /^.+$/: required(string)
Example:
{
"description": "Bad Request"
}
HTTP status code 401
Returned on unsuccessful authentication
Body
Media type: application/problem+json;charset=utf-8
Type: object
Properties- description: required(string)
- id: (string)
- errors: (object)
key value error type
- /^.+$/: required(string)
key is the error type, and value contains error details
- /^.+$/: required(string)
Example:
{
"description": "Unauthorized"
}
HTTP status code 411
Request Content-Length is absent or 0
Body
Media type: application/problem+json;charset=utf-8
Type: object
Properties- description: required(string)
- id: (string)
- errors: (object)
key value error type
- /^.+$/: required(string)
key is the error type, and value contains error details
- /^.+$/: required(string)
Example:
{
"description": "Content-Length required"
}
HTTP status code 415
Request content type is not application/json;charset=utf-8
Body
Media type: application/problem+json;charset=utf-8
Type: object
Properties- description: required(string)
- id: (string)
- errors: (object)
key value error type
- /^.+$/: required(string)
key is the error type, and value contains error details
- /^.+$/: required(string)
Example:
{
"description": "Bad Content-Type"
}
HTTP status code 422
Invalid request
Body
Media type: application/problem+json;charset=utf-8
Type: object
Properties- description: required(string)
- id: (string)
- errors: (object)
key value error type
- /^.+$/: required(string)
key is the error type, and value contains error details
- /^.+$/: required(string)
Example:
{
"description": "Validation error message"
}
HTTP status code 503
System temporarily cannot process the request
Body
Media type: application/problem+json;charset=utf-8
Type: object
Properties- description: required(string)
- id: (string)
- errors: (object)
key value error type
- /^.+$/: required(string)
key is the error type, and value contains error details
- /^.+$/: required(string)
Example:
{
"description": "Service busy, please retry later",
"id": "0vqe8FWeDe4DQ7rU7wbzzGmPc4B"
}
/certificates
Upload a certificate to the inventory
post /certificates
Upload a certificate to the inventory
Headers
- Content-Type: required(string - pattern: ^application/json;charset=utf-8$)
Request Content-Type
- Content-Length: required(integer - minimum: 1)
Length of the request in bytes
- Authorization: required(string)
The Authorization header. Only "Bearer" is supported
Example:
Bearer eyJhbGciOiAiSFMyNTYiLCAidHlwIjogIkpXVCJ9.eyJ1c2VyX2lkIjogMX0.BSf1w1blYKcbxVlyOtUogUsozH2clY34xxYPd8lQIlQ
Body
Media type: application/json;charset=utf-8
Type: object
Properties- certificate: required(string - pattern: -{5}BEGIN CERTIFICATE-{5}.+-{5}END CERTIFICATE-{5})
The certificate is PEM encoded. The PEM encoding format (defined in RFC 1421) requires a line length of 64 characters, except for the last line which can be shorter. In JSON newlines are delimited with ASCII newline symbol "\n".
- status: required(one of ISSUED, REVOKED)
- revocation_reason: (one of unspecified, keyCompromise, cACompromise, affiliationChanged, superseded, cessationOfOperation, certificateHold, removeFromCRL, privilegeWithdrawn, aACompromise)
Revocation reason as per RFC 5280 section 5.3.1
Example:
{
"certificate": "-----BEGIN CERTIFICATE-----...-----END CERTIFICATE-----",
"status": "ISSUED"
}
HTTP status code 201
Certificate successfully uploaded
Headers
- Location: required(string)
The URL of the newly uploaded certificate
Example:
{baseUri}/certificate/{certID}
- Content-Length: required(integer - default: 0)
This response does not contain a body
HTTP status code 400
Request could not be parsed
Body
Media type: application/problem+json;charset=utf-8
Type: object
Properties- description: required(string)
- id: (string)
- errors: (object)
key value error type
- /^.+$/: required(string)
key is the error type, and value contains error details
- /^.+$/: required(string)
Example:
{
"description": "Bad Request"
}
HTTP status code 401
Request is unauthorized
Body
Media type: application/problem+json;charset=utf-8
Type: object
Properties- description: required(string)
- id: (string)
- errors: (object)
key value error type
- /^.+$/: required(string)
key is the error type, and value contains error details
- /^.+$/: required(string)
Example:
{
"description": "Unauthorized"
}
HTTP status code 409
A certificate issued by the same CA with the same serial number already exists
Body
Media type: application/problem+json;charset=utf-8
Type: object
Properties- description: required(string)
- id: (string)
- errors: (object)
key value error type
- /^.+$/: required(string)
key is the error type, and value contains error details
- /^.+$/: required(string)
HTTP status code 411
Request Content-Length is absent or 0
Body
Media type: application/problem+json;charset=utf-8
Type: object
Properties- description: required(string)
- id: (string)
- errors: (object)
key value error type
- /^.+$/: required(string)
key is the error type, and value contains error details
- /^.+$/: required(string)
Example:
{
"description": "Content-Length required"
}
HTTP status code 415
Request content type is not application/json;charset=utf-8
Body
Media type: application/problem+json;charset=utf-8
Type: object
Properties- description: required(string)
- id: (string)
- errors: (object)
key value error type
- /^.+$/: required(string)
key is the error type, and value contains error details
- /^.+$/: required(string)
Example:
{
"description": "Bad Content-Type"
}
HTTP status code 422
Invalid request
Body
Media type: application/problem+json;charset=utf-8
Type: object
Properties- description: required(string)
- id: (string)
- errors: (object)
key value error type
- /^.+$/: required(string)
key is the error type, and value contains error details
- /^.+$/: required(string)
Example:
{
"description": "Validation error message"
}
HTTP status code 429
Request rate exceeded the set limit
Body
Media type: application/problem+json;charset=utf-8
Type: object
Properties- description: required(string)
- id: (string)
- errors: (object)
key value error type
- /^.+$/: required(string)
key is the error type, and value contains error details
- /^.+$/: required(string)
Example:
{
"description": "Rate Limit Reached"
}
HTTP status code 503
System temporarily cannot process the request
Body
Media type: application/problem+json;charset=utf-8
Type: object
Properties- description: required(string)
- id: (string)
- errors: (object)
key value error type
- /^.+$/: required(string)
key is the error type, and value contains error details
- /^.+$/: required(string)
Example:
{
"description": "Service busy, please retry later",
"id": "0vqe8FWeDe4DQ7rU7wbzzGmPc4B"
}
get /certificates
Headers
- Authorization: required(string)
The Authorization header. Only "Bearer" is supported
Example:
Bearer eyJhbGciOiAiSFMyNTYiLCAidHlwIjogIkpXVCJ9.eyJ1c2VyX2lkIjogMX0.BSf1w1blYKcbxVlyOtUogUsozH2clY34xxYPd8lQIlQ
Query Parameters
- status: (one of ISSUED, REVOKED)
- not_before: (integer)
UTC UNIX timestamp filtering for the beginning of the certificate validity window.
Example:
1524570139
- not_after: (integer)
UTC UNIX timestamp filtering for the end of the certificate validity window.
Example:
1524573739
- serial_number: (string - pattern: ^[A-Z0-9]+$)
Full or partial serial number to filter by
Example:
3A36670571841985917699178058350683260
- ca_name: (string - pattern: ^[a-z0-9_]{1,32}$)
Full or partial common name of the CA to filter by
Example:
globalsign-ca
- page: (integer - default: 1)
Page number
Example:
1
- per_page: (integer - default: 100)
Number of elements displayed per page
Example:
10
HTTP status code 200
Return a list of certificates
Headers
- Total-Count: required(integer)
Total number of elements found
Example:
20
- Links: required(string)
Links to previous/next/last page if available
Example:
</certificates?page=2>; rel="previous"; </certificates?page=4>; rel="next", </certificates?page=5>; rel="last"
Body
Media type: application/json;charset=utf-8
Type: array of certificate_info
Items: certificate_info
- id: required(integer)
- serial_number: required(string)
- ca_id: required(integer)
internal inventory id of the CA that issued the certificate
- certificate: required(string - pattern: -{5}BEGIN CERTIFICATE-{5}.+-{5}END CERTIFICATE-{5})
The certificate is PEM encoded. The PEM encoding format (defined in RFC 1421) requires a line length of 64 characters, except for the last line which can be shorter. In JSON newlines are delimited with ASCII newline symbol "\n".
- not_before: required(integer)
UTC UNIX timestamp the certificate is valid from
- not_after: required(integer)
UTC UNIX timestamp after which the certificate is no longer valid
- status: required(one of ISSUED, REVOKED)
- uploaded_at: required(integer)
UTC UNIX timestamp at which the certificate was uploaded
- revoked_at: (integer)
UTC UNIX timestamp at which the certificate was revoked
- revocation_reason: (one of unspecified, keyCompromise, cACompromise, affiliationChanged, superseded, cessationOfOperation, certificateHold, removeFromCRL, privilegeWithdrawn, aACompromise)
Revocation reason as per RFC 5280 section 5.3.1
Example:
[
{
"id": 1,
"serial_number": "A098890043958186465006748393764320813",
"ca_id": 5,
"certificate": "-----BEGIN CERTIFICATE-----...-----END CERTIFICATE-----",
"not_before": 1477958400,
"not_after": 1577836800,
"status": "REVOKED",
"uploaded_at": 1555514914,
"revoked_at": 1555615914,
"revocation_reason": "keyCompromise"
},
{
"id": 2,
"serial_number": "B098890043958186465006748393764320813",
"ca_id": 3,
"certificate": "-----BEGIN CERTIFICATE-----...-----END CERTIFICATE-----",
"not_before": 1567958400,
"not_after": 1578836800,
"status": "ISSUED",
"uploaded_at": 1555514914
}
]
HTTP status code 401
Request is unauthorized
Body
Media type: application/problem+json;charset=utf-8
Type: object
Properties- description: required(string)
- id: (string)
- errors: (object)
key value error type
- /^.+$/: required(string)
key is the error type, and value contains error details
- /^.+$/: required(string)
Example:
{
"description": "Unauthorized"
}
HTTP status code 422
Invalid request
Body
Media type: application/problem+json;charset=utf-8
Type: object
Properties- description: required(string)
- id: (string)
- errors: (object)
key value error type
- /^.+$/: required(string)
key is the error type, and value contains error details
- /^.+$/: required(string)
Example:
{
"description": "Validation error message"
}
HTTP status code 429
Request rate exceeded the set limit
Body
Media type: application/problem+json;charset=utf-8
Type: object
Properties- description: required(string)
- id: (string)
- errors: (object)
key value error type
- /^.+$/: required(string)
key is the error type, and value contains error details
- /^.+$/: required(string)
Example:
{
"description": "Rate Limit Reached"
}
HTTP status code 503
System temporarily cannot process the request
Body
Media type: application/problem+json;charset=utf-8
Type: object
Properties- description: required(string)
- id: (string)
- errors: (object)
key value error type
- /^.+$/: required(string)
key is the error type, and value contains error details
- /^.+$/: required(string)
Example:
{
"description": "Service busy, please retry later",
"id": "0vqe8FWeDe4DQ7rU7wbzzGmPc4B"
}
Retrieve a certificate from the inventory by ID
Revoke a certificate
get /certificates/{certID}
Retrieve a certificate from the inventory by ID
URI Parameters
- certID: required(string)
certificate unique identifier
Headers
- Authorization: required(string)
The Authorization header. Only "Bearer" is supported
Example:
Bearer eyJhbGciOiAiSFMyNTYiLCAidHlwIjogIkpXVCJ9.eyJ1c2VyX2lkIjogMX0.BSf1w1blYKcbxVlyOtUogUsozH2clY34xxYPd8lQIlQ
HTTP status code 200
Certificate available for retrieval
Body
Media type: application/json;charset=utf-8
Type: object
Properties- id: required(integer)
- serial_number: required(string)
- ca_id: required(integer)
internal inventory id of the CA that issued the certificate
- certificate: required(string - pattern: -{5}BEGIN CERTIFICATE-{5}.+-{5}END CERTIFICATE-{5})
The certificate is PEM encoded. The PEM encoding format (defined in RFC 1421) requires a line length of 64 characters, except for the last line which can be shorter. In JSON newlines are delimited with ASCII newline symbol "\n".
- not_before: required(integer)
UTC UNIX timestamp the certificate is valid from
- not_after: required(integer)
UTC UNIX timestamp after which the certificate is no longer valid
- status: required(one of ISSUED, REVOKED)
- uploaded_at: required(integer)
UTC UNIX timestamp at which the certificate was uploaded
- revoked_at: (integer)
UTC UNIX timestamp at which the certificate was revoked
- revocation_reason: (one of unspecified, keyCompromise, cACompromise, affiliationChanged, superseded, cessationOfOperation, certificateHold, removeFromCRL, privilegeWithdrawn, aACompromise)
Revocation reason as per RFC 5280 section 5.3.1
Example:
{
"id": 1,
"serial_number": "A098890043958186465006748393764320813",
"ca_id": 5,
"certificate": "-----BEGIN CERTIFICATE-----...-----END CERTIFICATE-----",
"not_before": 1477958400,
"not_after": 1577836800,
"status": "REVOKED",
"uploaded_at": 1555514914,
"revoked_at": 1555615914,
"revocation_reason": "keyCompromise"
}
HTTP status code 401
Request is unauthorized
Body
Media type: application/problem+json;charset=utf-8
Type: object
Properties- description: required(string)
- id: (string)
- errors: (object)
key value error type
- /^.+$/: required(string)
key is the error type, and value contains error details
- /^.+$/: required(string)
Example:
{
"description": "Unauthorized"
}
HTTP status code 404
Requested resource is not found
Body
Media type: application/problem+json;charset=utf-8
Type: object
Properties- description: required(string)
- id: (string)
- errors: (object)
key value error type
- /^.+$/: required(string)
key is the error type, and value contains error details
- /^.+$/: required(string)
Example:
{
"description": "Not found"
}
HTTP status code 422
Invalid request
Body
Media type: application/problem+json;charset=utf-8
Type: object
Properties- description: required(string)
- id: (string)
- errors: (object)
key value error type
- /^.+$/: required(string)
key is the error type, and value contains error details
- /^.+$/: required(string)
Example:
{
"description": "Validation error message"
}
HTTP status code 429
Request rate exceeded the set limit
Body
Media type: application/problem+json;charset=utf-8
Type: object
Properties- description: required(string)
- id: (string)
- errors: (object)
key value error type
- /^.+$/: required(string)
key is the error type, and value contains error details
- /^.+$/: required(string)
Example:
{
"description": "Rate Limit Reached"
}
HTTP status code 503
System temporarily cannot process the request
Body
Media type: application/problem+json;charset=utf-8
Type: object
Properties- description: required(string)
- id: (string)
- errors: (object)
key value error type
- /^.+$/: required(string)
key is the error type, and value contains error details
- /^.+$/: required(string)
Example:
{
"description": "Service busy, please retry later",
"id": "0vqe8FWeDe4DQ7rU7wbzzGmPc4B"
}
patch /certificates/{certID}
Revoke a certificate
URI Parameters
- certID: required(string)
certificate unique identifier
Headers
- Content-Type: required(string - pattern: ^application/json;charset=utf-8$)
Request Content-Type
- Content-Length: required(integer - minimum: 1)
Length of the request in bytes
- Authorization: required(string)
The Authorization header. Only "Bearer" is supported
Example:
Bearer eyJhbGciOiAiSFMyNTYiLCAidHlwIjogIkpXVCJ9.eyJ1c2VyX2lkIjogMX0.BSf1w1blYKcbxVlyOtUogUsozH2clY34xxYPd8lQIlQ
Body
Media type: application/json;charset=utf-8
Type: object
Properties- revocation_reason: required(one of unspecified, keyCompromise, cACompromise, affiliationChanged, superseded, cessationOfOperation, certificateHold, removeFromCRL, privilegeWithdrawn, aACompromise)
Revocation reason as per RFC 5280 section 5.3.1
Example:
{
"revocation_reason": "keyCompromise"
}
HTTP status code 200
Certificate succesfully revoked
Headers
- Content-Length: required(integer - default: 0)
This response does not return a body
HTTP status code 204
Certificate is already revoked
Headers
- Content-Length: required(integer - default: 0)
This response does not return a body
HTTP status code 400
Request could not be parsed
Body
Media type: application/problem+json;charset=utf-8
Type: object
Properties- description: required(string)
- id: (string)
- errors: (object)
key value error type
- /^.+$/: required(string)
key is the error type, and value contains error details
- /^.+$/: required(string)
Example:
{
"description": "Bad Request"
}
HTTP status code 401
Request is unauthorized
Body
Media type: application/problem+json;charset=utf-8
Type: object
Properties- description: required(string)
- id: (string)
- errors: (object)
key value error type
- /^.+$/: required(string)
key is the error type, and value contains error details
- /^.+$/: required(string)
Example:
{
"description": "Unauthorized"
}
HTTP status code 404
Requested resource is not found
Body
Media type: application/problem+json;charset=utf-8
Type: object
Properties- description: required(string)
- id: (string)
- errors: (object)
key value error type
- /^.+$/: required(string)
key is the error type, and value contains error details
- /^.+$/: required(string)
Example:
{
"description": "Not found"
}
HTTP status code 411
Request Content-Length is absent or 0
Body
Media type: application/problem+json;charset=utf-8
Type: object
Properties- description: required(string)
- id: (string)
- errors: (object)
key value error type
- /^.+$/: required(string)
key is the error type, and value contains error details
- /^.+$/: required(string)
Example:
{
"description": "Content-Length required"
}
HTTP status code 415
Request content type is not application/json;charset=utf-8
Body
Media type: application/problem+json;charset=utf-8
Type: object
Properties- description: required(string)
- id: (string)
- errors: (object)
key value error type
- /^.+$/: required(string)
key is the error type, and value contains error details
- /^.+$/: required(string)
Example:
{
"description": "Bad Content-Type"
}
HTTP status code 422
Invalid request
Body
Media type: application/problem+json;charset=utf-8
Type: object
Properties- description: required(string)
- id: (string)
- errors: (object)
key value error type
- /^.+$/: required(string)
key is the error type, and value contains error details
- /^.+$/: required(string)
Example:
{
"description": "Validation error message"
}
HTTP status code 429
Request rate exceeded the set limit
Body
Media type: application/problem+json;charset=utf-8
Type: object
Properties- description: required(string)
- id: (string)
- errors: (object)
key value error type
- /^.+$/: required(string)
key is the error type, and value contains error details
- /^.+$/: required(string)
Example:
{
"description": "Rate Limit Reached"
}
HTTP status code 503
System temporarily cannot process the request
Body
Media type: application/problem+json;charset=utf-8
Type: object
Properties- description: required(string)
- id: (string)
- errors: (object)
key value error type
- /^.+$/: required(string)
key is the error type, and value contains error details
- /^.+$/: required(string)
Example:
{
"description": "Service busy, please retry later",
"id": "0vqe8FWeDe4DQ7rU7wbzzGmPc4B"
}