Operator
Create a new instance
POST /PADs
Description
Operator creates an instance. The request body consists of the Operator's choice of the instance name, the list of trustees referencing the instance, and the corresponding threshold. All validators will be nominated automatically, with a threshold . This endpoint also binds the API key to the instance, i.e. the API key can only access endpoints associated to the created instance afterwards.
Choose the parameters carefully. They cannot be changed once the instance is created.
The instance is not fully functional after creation. It takes time for the trustees and validators to realise this change. They may choose not to serve this instance as well.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
padName | body | true | The ID of the instance chosen by the Operator | |
trusteeIds | body | array<TrusteeId> | true | The IDs of the trustees nominated by the Operator |
t | body | integer | true | The minimum number of trustee responses needed for a decryption |
Example
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Succeeded | ||
400 | Invalid instance ID, non-existing trustee or invalid trustee threshold is provided | ||
401 | API key is missing or invalid | ||
403 | User does not have permission for this request | ||
409 | Instance with the same name already exists |
201 Created
The instance is successfully created. This response is returned after the instance is created. The creation process could take up to 30 seconds.
Example
400 Bad Request
The request is malformed. Check that:
The PAD instance name is valid. See the PadName schema for details.
All the trustee IDs are valid. Check out this endpoint which retrieves all the registered trustees.
The trustee threshold is valid. It should be a positive integer at most the number of trustees nominated.
Example1
Example2
401 Unauthorized
Api key is missing or invalid.
Example
403 Forbidden
User does not have permission to make this request.
Example
409 Conflict
A PAD instance of the same name already existed.
Example
Get the Trustee universe
GET /all-trustees
Description
Retrieve all the registered Trustees - their IDs, descriptive names and public keys.
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | Succeeded | Inline | |
401 | API key is missing or invalid |
200 OK
Successfully retrieved the Trustees.
Schema
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
ok | boolean | true | none | none |
trusteeUniverse | true | none | none |
Example
401 Unauthorized
Api key is missing or invalid.
Example
Example
Get the Validator universe
GET /all-validators
Description
Retrieve all the registered Validators - their IDs, descriptive names and public keys.
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | Succeeded | Inline | |
401 | API key is missing or invalid |
200 OK
Successfully retrieved the Validators.
Schema
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
ok | boolean | true | none | none |
validatorUniverse | dict<ValidatorId,Validator> | true | none | none |
Example
401 Unauthorized
Api key is missing or invalid.
Example
Schemas
PadName
ID of a PAD instance. Its length must be inclusively between 4 and 30. It should contains only lowercase letters, digits, periods (.
) or dashes (-
). It must start with a lowercase letter.
It is seldom used as a request parameter because the API key in the request already identifies a PAD instance.
Example
Schema
Type | Restrictions |
---|---|
string |
|
TrusteeId
ID of a trustee. It contains only alphanumerical characters, underscores (_) and dashes (-). It has length inclusively between 3 and 30.
Example
Schema
Type | Restrictions |
---|---|
string |
|
Trustee
An object listing details of a trustee, including its ID, human-readable description/name, its role (Trustee
) and its public keys.
Example
Schema
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | true |
| none | |
fullName | string | true |
| none |
role | enum | true | none | none |
encryptionKey | string | true | none | PEM-encoded (public) encryption key of the trustee. Used by encryptors at encryption time |
verificationKey | string | true | none | PEM-encoded (public) verification key of trustee |
Validator
An object listing details of a validator, including its ID, human-readable description/name, its role (Validator
) and its public keys.
Example
Schema
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | true | - | none | |
fullName | string | true |
| none |
role | enum | true | none | none |
encryptionKey | string | true | none | PEM-encoded (public) encryption key of the validator. Used by encryptors at encryption time |
verificationKey | string | true | none | PEM-encoded (public) verification key of validator |
ApiResponse
Example
Schema
Name | Type | Required | Description |
---|---|---|---|
ok | boolean | true | The request is successful or not |
message | string | true | none |
Last updated