Operations

This set of API calls allows you to fetch operations on various Keyless entities.

Get a user's pending operations

Get a user's pending operations

GET/v2/users/{userId}/operations/pending
Path parameters
userId*string (Uppercase HEX string)

The user id

Response

An user's pending operations

Body
operationId*operationId (string)

Unique operation identifier set and managed by the client

operationPayloadoperationPayload (string)

Operation payload set and managed by the client

externalUserIdexternalUserId (string)

User id set and managed by the client

authTypeenum

Authentication type of the operation

biompin
Request
const response = await fetch('/v2/users/{userId}/operations/pending', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
[
  {
    "operationId": "text",
    "operationPayload": "text",
    "externalUserId": "text",
    "authType": "biom"
  }
]

Get a customer operation

Get a customer operation

GET/v2/operations/{operationId}
Path parameters
operationId*string

Unique operation identifier set and managed by the client

Response

A customer operation

Body
id*number

Unique operation identifier

timestamp*string

Creation date time

nodeId*string

Name of the service that created the operation

userId*userId (string (HEX))

An HEX string representing the user id

apiKey*string

Customer SDK api key

externalUserIdexternalUserId (string)

User id set and managed by the client

operationId*operationId (string)

Unique operation identifier set and managed by the client

operationPayloadoperationPayload (string)

Operation payload set and managed by the client

result*boolean

True if the operation is approved, false otherwise

authTypeenum

Authentication type of the operation

biompin
state*string

State of the operation. Possible values are 'approved' or 'pending'

Request
const response = await fetch('/v2/operations/{operationId}', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "id": 0,
  "timestamp": "text",
  "nodeId": "text",
  "userId": "text",
  "apiKey": "text",
  "externalUserId": "text",
  "operationId": "text",
  "operationPayload": "text",
  "result": false,
  "authType": "biom",
  "state": "text"
}

Create a pending operation

Create a pending operation

POST/v2/users/{userId}/operations
Path parameters
userId*string (Uppercase HEX string)

The user id

Body
externalUserIdexternalUserId (string)

User id set and managed by the client

operationId*operationId (string)

Unique operation identifier set and managed by the client

operationPayloadoperationPayload (string)

Operation payload set and managed by the client

Response

Operation created successfully

Body
success*boolean

Always true

Request
const response = await fetch('/v2/users/{userId}/operations', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "operationId": "text"
    }),
});
const data = await response.json();
Response
{
  "success": false
}

Last updated