Credentials API
URL: https://request.rapidauth.com/rapid/credentials
This API can be used to request new or replacement credentials or to update existing credentials, for example to prevent automatic renewal.
It uses anonymous Identifiers (AnonId
) to identify resources.
If you are using non-unique anonymous identifier values, this API will be used only for requesting new credentials. Other operations must
be performed using the Requests API.
All requests to this API require your Service Authentication Certificate (SAC) to be supplied for two way TLS authentication.
Note: For MacOSX developers see Using cURL on MacOSX
Response object
When a request is successful, all endpoints in this api will respond with a JSON object that is as follows:
{
"AnonId":"<AnonId for the User>",
"RequestId":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"PreventCollection":false,
"Status":"Collected",
"RequestedDate":"2016-01-01T12:30:45.9876543Z",
"CollectedDate":"2016-01-02T01:23:54.6789012Z",
}
Name | Type | Description |
---|---|---|
AnonId | string | The unique anonymous id for this credential |
RequestId | string | A unique identifier for this certificate request |
PreventCollection | boolean | True: This credential cannot be collected. False: Collection of this credential is possible. |
Status | string | The collection status of this credential the possible values for this are Requested, Collected and Expired |
RequestedDate | string | The date and time that this credential was requested at |
CollectedDate | string | The date and time that this credential was collected at |
POST /credentials
Requests a new credential for a user with the given Anonymous Identifier (AnonId
).
All parameters must be supplied in a JSON body for this request.
Example input
{"AnonId":"<AnonId for User>"}
Name | Type | Description |
---|---|---|
AnonId | string | A unique anonymous id generated by you for the user requesting a credential |
cURL example
curl https://request.rapidauth.com/rapid/credentials -d '{"AnonId":"AnonId for User"}' -E ./SAC.pem:<SAC Password> -v
GET /credentials/{anonId}
Gets information about an existing credential that has the provided anonId.
cURL example
curl https://request.rapidauth.com/rapid/credentials/<AnonId> -E ./SAC.pem:<SAC Password> -v
POST /credentials/{anonId}/replace
Requests a replacement for an existing collected credential, that is not currently expired, for a user identified by the given Anonymous Identifier (anonId
).
This action cannot be undone.
{anonId}
is the AnonId of the credential to be replaced.
Note: Replacing a credential will not consume an additional licence, and the replacement credential will be set to expire at the same time as the credential it replaces
Example input
{"AnonId":"<New AnonId>"}
Name | Type | Description |
---|---|---|
AnonId | string | Optional: A unique anonymous id generated by you for the user requesting a replacement credential. If no AnonId is provided then the AnonId of the users previous credential is used. |
cURL example
curl https://request.rapidauth.com/rapid/credentials/<Current AnonId>/replace -d '{"AnonId":"<New AnonId>"}' -E ./SAC.pem:<SAC Password>
PATCH /credentials/{anonId}
Updates the provided fields for a credential.
Currently the only field that can be updated via this API is PreventCollection
.
Preventing the collection of a credential may be useful if you have a need to prevent an existing users credential from automatically renewing after 1 year.
{anonId}
is the AnonId of the credential to be updated.
Example input
{"PreventCollection":true | false}
Name | Type | Description |
---|---|---|
PreventCollection | boolean | True: This credential cannot be collected. False: Collection of this credential is possible. |
cURL example
curl -X PATCH https://request.rapidauth.com/rapid/credentials/<Current AnonId> -d '{"PreventCollection":"true"}' -E ./SAC.pem:<SAC Password>