Requests API

URL: https://request.rapidauth.com/rapid/requests

This API can be used to replace or update credentials, using Request Identifier (RequestId) values to identify resources. If non-unique AnonId values have been used, then it is highly recommended to use this API instead of the credentials 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

GET /requests/{requestId}

Gets information about an existing credential that has the provided requestId.

cURL example

curl https://request.rapidauth.com/rapid/requests/<Current RequestId> -E ./SAC.pem:<SAC Password> -v

POST /requests/{requestId}/replace

Requests a replacement for an existing credential, that is not currently expired, for a user identified by the given requestId. This action cannot be undone.

{requestId} is the original RequestId 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/requests/<Current RequestId>/replace -d '{"AnonId":"<New AnonId>"}' -E ./SAC.pem:<SAC Password>

PATCH /requests/{requestId}

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.

{requestId} is the RequestId 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/requests/<Current RequestId> -d '{"PreventCollection":"true"}' -E ./SAC.pem:<SAC Password>