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 or credential name.

value is the attribute or credential value.

type is the attribute or credential type.

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

credential is the credential ID corresponding to an attribute.

flag is the attribute flag. It provides insights, whether the attribute is third-party attested.

An Attribute JSON object is defined as follows

{
  "id": string,
  "name": string,
  "type": string,
  "value": string,
  "credential": string,
  "flag": string
}

A Credential JSON object is defined as follows

{
  "id": string,
  "name": string,
  "type": string,
  "value": string,
  "attributes": Attribute[]
}

the attributes property can be omitted when modifying a credential. It will be populated in read requests for convenience only.

A Ticket JSON object is defined as follows

{
  "issuer": string,
  "audience": string,
  "rnd": string,
}

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

In order to add a self-asserted attribute make sure “credential” is empty and specity the attribute value in the “value” parameter.

In order to add an attribute which is attested by a credential, add the id of the credential to the “credential” field and specify the attribute in the credential as attribute “value”. The credential must exist.

Title

Returns all attributes for an identity

URL

/reclaim/attributes/'ego'

Method

GET

URL Params

none

Data Params

none

Success Response

Attribute[]

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

Attribute

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

Credential Management

Title

Returns all credentials for an identity

URL

/reclaim/credential/'ego'

Method

GET

URL Params

none

Data Params

none

Success Response

Credential[]

Error Response

{“error”:”error_desc”} 2

Attention

The response in this request is an array.



Title

Delete a credential from an identity

URL

/reclaim/credential/'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

Ticket[]

Error Response

{“error”:”error_desc”} 6; 7

Title

Revoke an issued ticket

URL

/reclaim/revoke

Method

POST

URL Params

none

Data Params

Ticket

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

Ticket

Success Response

Attribute[]

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