re:claimID

Definition

Variables in single quotes '...' can or must be changed according to your specific case.

ego is the name of an identity.

name is the attribute name.

value is the attribute value.

type is the attribute type.

id is the attribute ID. This ID is the name under which the attribute can be found in the namestore.

Error Response

An error response is sent in the JSON format: {"error":"*error_description*"}

Following numbers are added for references inside the documentation only.

Error descriptions are:

Nr. Error Description           - Explanation
1)  Unknown Error               - Error is not specified
2)  No identity found           - Identity was not found with given name, public key or no identity was found at all
3)  Missing identity public key - Identity public key length is zero
4)  Missing identity name       - Identity name length is zero
5)  Missing subsystem name      - Subsystem name length is zero
6)  No data                     - No JSON data given
7)  Data invalid                - Wrong JSON data given
8)  Rename failed               - Rename request failed due to wrong name, etc.
9)  Setting subsystem failed    - Setting the subsystem for an identity failed (usually this error does not occur)

Error 1) is always possible and is not listed in following requests.

ATTENTION: Any error message from the Identity API (not REST API) can occur and can be returned in the error response. These responses are not listed here.

Response Code

A response of a message has a HTTP response code. Usually, this code is 200 OK for a successful response. The code changes in some cases:

a) 200 OK         - Normal response (but may contain an error message)
b) 201 Created    - Success after POST request
c) 204 No Content - Success PUT or DELETE request
d) 404 Not Found  - Identity is not found with identifier
e) 409 Conflict   - PUT or POST request not possible due to existing duplicate

``d) 404 Not Found`` is always used when the error message is either ``2)``, ``3)`` or ``4)``.

Requests

Attribute Management

Title Returns all attributes for an identity
URL /reclaim/attributes/'ego'
Method GET
URL Params none
Data Params none
Success Response
[{“value”:”value”, “name”:”name”,
“type”: “type”, “id”: “id”},…]
Error Response {“error”:”error_desc”} 2
Attention The response in this request is an array.

Title Add an attribute to an identity
URL /reclaim/attributes/'ego'
Method POST
URL Params none
Data Params
{“value”:”value”, “name”:”name”,
“type”: “type”, “id”: “id”}
Success Response Response Code: :literal:` b) 200 OK`
Error Response {“error”:”error_desc”} 2; 3 or 4

Title Delete an attribute from an identity
URL /reclaim/attributes/'ego'/'id'
Method DELETE
URL Params none
Data Params none
Success Response Response Code: :literal:` b) 200 OK`
Error Response {“error”:”error_desc”} 2; 5

Ticket Management

Title Revoke an issued ticket
URL /reclaim/tickets/'ego'
Method POST
URL Params none
Data Params none
Success Response [{“issuer”: “key”, “audience”: “key”, “rnd”: “id”},…]
Error Response
{“error”:”error_desc”} 6; 7

Title Revoke an issued ticket
URL /reclaim/revoke
Method POST
URL Params none
Data Params {“issuer”: “key”, “audience”: “key”, “rnd”: “id”}
Success Response Response Code: :literal:` b) 200 OK`
Error Response
{“error”:”error_desc”} 6; 7

Title Consume/Exchange a ticket and retrieve attributes
URL /reclaim/consume
Method POST
URL Params none
Data Params {“issuer”: “key”, “audience”: “key”, “rnd”: “id”}
Success Response
[{“value”:”value”, “name”:”name”,
“type”: “type”, “id”: “id”},…]
Error Response
{“error”:”error_desc”} 6; 7

OPTIONS Request

Title Gets request options
URL /reclaim
Method OPTIONS
URL Params none
Data Params none
Success Response  
Error Response none