In this guide, we'll walk through the different Central End User Registry endpoints:
POST
Create userGET
Get user by numberGET
Get all usersGET
Health
Information about various errors returned can be found here:
The different endpoints often deal with these data structures:
This endpoint allows a user to be registered and used with the registry.
POST http://central-end-user-registry/register
Field | Type | Description |
---|---|---|
Content-Type | String | Must be set to application/json |
Field | Type | Description |
---|---|---|
number | String | Number for user to associate with DFSP |
dfspIdentifier | String | Identifier for DFSP assigned by Central Directory |
Field | Type | Description |
---|---|---|
Object | User | The User object created |
POST http://central-directory/commands/register HTTP/1.1
Content-Type: application/json
{
"number": "12345679",
"dfspIdentifer": "001:124"
}
HTTP/1.1 201 CREATED
Content-Type: application/json
{
"number": "123456789",
"dfspIdentifer": "001:124"
}
Field | Description |
---|---|
AlreadyExistsError | The number has already been registered for this DFSP |
{
"id": "AlreadyExistsError",
"message": "The number has already been registered for this DFSP"
}
This endpoint retrieves a user's information from the registry by number.
GET http://central-end-user-registry/users/{number}
Field | Type | Description |
---|---|---|
number | String | Number for the user |
Field | Type | Description |
---|---|---|
Object | Array | List of registered User objects for the number |
GET http://central-end-user-registry/users/12345678 HTTP/1.1 HTTP/1.1
HTTP/1.1 200 OK
[
{
"number": "12345678",
"dfspIdentifer": "001:123"
}
]
Field | Description |
---|---|
NotFoundError | The requested resource could not be found |
{
"id": "NotFoundError",
"message": "The requested resource could not be found."
}
This endpoint allows retrieval of all of the registry's users
GET http://central-end-user-registry/users
Field | Type | Description |
---|---|---|
Object | Array | List of supported User objects |
GET http://central-end-user-registry/users HTTP/1.1
HTTP/1.1 200 OK
[
{
"number": "12345678",
"dfspIdentifer": "001:123"
},
{
"number": "90123456",
"dfspIdentifier": "001:321"
},
{
"number": "08901234",
"dfspIdentifier": "001:456"
}
]
Get the current status of the service
GET http://central-ledger/health
Field | Type | Description |
---|---|---|
status | String | The status of the end user registry, OK if the service is working |
GET http://central-end-user-registry/health HTTP/1.1
HTTP/1.1 200 OK
{
"status": "OK"
}
Represents a user that has registered with the Central End User Registry.
Name | Type | Description |
---|---|---|
number | String | Number for user to associate with DFSP |
dfspIdentifier | String | Identifier for DFSP assigned by Central Directory |
This section identifies the potential errors returned and the structure of the response.
An error object can have the following fields:
Name | Type | Description |
---|---|---|
id | String | An identifier for the type of error |
message | String | A message describing the error that occurred |
validationErrors | Array | Optional An array of validation errors |
validationErrors[].message | String | A message describing the validation error |
validationErrors[].params | Object | An object containing the field that caused the validation error |
validationErrors[].params.key | String | The name of the field that caused the validation error |
validationErrors[].params.value | String | The value that caused the validation error |
validationErrors[].params.child | String | The name of the child field |
HTTP/1.1 404 Not Found
Content-Type: application/json
{
"id": "InvalidUriParameterError",
"message": "Error validating one or more uri parameters",
"validationErrors": [
{
"message": "number with value \"79544291a\" fails to match the required pattern: /^[0-9]{1,8}$/",
"params": {
"value": "79544291a",
"key": "number"
}
}
]
}