Operator
Last updated
Last updated
POST /PADs
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.
padName
body
true
The ID of the instance chosen by the Operator
trusteeIds
body
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
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
The instance is successfully created. This response is returned after the instance is created. The creation process could take up to 30 seconds.
Example
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
Api key is missing or invalid.
Example
User does not have permission to make this request.
Example
A PAD instance of the same name already existed.
Example
GET /all-trustees
Retrieve all the registered Trustees - their IDs, descriptive names and public keys.
200
Succeeded
Inline
401
API key is missing or invalid
Successfully retrieved the Trustees.
Schema
ok
boolean
true
none
none
trusteeUniverse
true
none
none
Example
Api key is missing or invalid.
Example
Example
GET /all-validators
Retrieve all the registered Validators - their IDs, descriptive names and public keys.
200
Succeeded
Inline
401
API key is missing or invalid
Successfully retrieved the Validators.
Schema
ok
boolean
true
none
none
validatorUniverse
true
none
none
Example
Api key is missing or invalid.
Example
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
string
/[a-z][a-z0-9.-]{3,29}/
ID of a trustee. It contains only alphanumerical characters, underscores (_) and dashes (-). It has length inclusively between 3 and 30.
Example
string
[a-zA-Z0-9-_]{3,30}
An object listing details of a trustee, including its ID, human-readable description/name, its role (Trustee
) and its public keys.
Example
id
true
/[0-9a-zA-Z-_]{3,30}/
none
fullName
string
true
/Trustee-[0-9a-zA-Z_]+/
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
An object listing details of a validator, including its ID, human-readable description/name, its role (Validator
) and its public keys.
Example
id
true
-
none
fullName
string
true
/Validator-[0-9a-zA-Z_]+/
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
Example
ok
boolean
true
The request is successful or not
message
string
true
none
array<>
dict<,>
dict<,>