splinterd API (0.4.1)

Download OpenAPI specification:Download

REST API for the Splinter daemon

Biome

Routes supporting user management in Splinter applications. Optionally compiled.

Create new user with username and password credent

Create new user with username and password credentials

header Parameters
SplinterProtocolVersion
integer
Example: 1

The protocol version which the client can understand. If not provided, the node will respond using its latest protocol version.

Request Body schema: application/json
username
required
any

username of a new user

hashed_password
required
any

Hashed password to be used for user authentication

Responses

Request samples

Content type
application/json
{
  • "username": "alice@acme.com",
  • "hashed_password": "F4AABE0B40C9ABB8B6FD2EEACB39C965"
}

Response samples

Content type
application/json
{
  • "message": "User created successfully",
  • "data": {
    }
}

Authenticates a user with username and password cr

Authenticates a user with username and password credentials

header Parameters
SplinterProtocolVersion
integer
Example: 1

The protocol version which the client can understand. If not provided, the node will respond using its latest protocol version.

Request Body schema: application/json
username
required
any

username of user

hashed_password
required
any

Hashed password to be used for user authentication

Responses

Request samples

Content type
application/json
{
  • "username": "alice@acme.com",
  • "hashed_password": "8945622435187243046536949706b5272644c71336c7254563679727565494b376d4b3554696b734662685962652f6v52562e437a70462f6552489c8b"
}

Response samples

Content type
application/json
{
  • "message": "Successful login",
  • "user_id": "f35aacc1-a9cd-4eda-b6d0-2efaddf0c8a4",
  • "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiZjM1YWFjYzEtYTljZC00ZWRhLWI2ZDAtMmVmYWRkZjBjOGE0IiwiaXNzIjoic2VsZi1pc3N1ZWQiLCJleHAiOjE1ODAyMzkyMjh9.P8hA0ru_xriYX7qryl08ZEp86t5HD_AEVPEUXY70Ehc",
  • "refresh_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiZjM1YWFjYzEtYTljZC00ZWRhLWI2ZDAtMmVmYWRkZjBjOGE0IiwiaXNzIjoic2VsZi1pc3N1ZWQiLCJleHAiOjE1ODAyMzkyMjh9.P8hA0ru_xriYX7qryl08ZEp86t5HD_AEVPEUXY70Ehc"
}

Removes access tokens associated with a user

Removes access tokens associated with a user

header Parameters
SplinterProtocolVersion
integer
Example: 1

The protocol version which the client can understand. If not provided, the node will respond using its latest protocol version.

Responses

Response samples

Content type
application/json
{
  • "message": "User successfully logged out"
}

Issues a new access token

Issues a new access token

header Parameters
SplinterProtocolVersion
integer
Example: 1

The protocol version which the client can understand. If not provided, the node will respond using its latest protocol version.

Request Body schema: application/json
refresh_token
required
any

a refresh token issues by biome

Responses

Request samples

Content type
application/json
{
  • "refresh_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiZjM1YWFjYzEtYTljZC00ZWRhLWI2ZDAtMmVmYWRkZjBjOGE0IiwiaXNzIjoic2VsZi1pc3N1ZWQiLCJleHAiOjE1ODAyMzkyMjh9.P8hA0ru_xriYX7qryl08ZEp86t5HD_AEVPEUXY70Ehc"
}

Response samples

Content type
application/json
{
  • "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiZjM1YWFjYzEtYTljZC00ZWRhLWI2ZDAtMmVmYWRkZjBjOGE0IiwiaXNzIjoic2VsZi1pc3N1ZWQiLCJleHAiOjE1ODAyMzkyMjh9.P8hA0ru_xriYX7qryl08ZEp86t5HD_AEVPEUXY70Ehc"
}

Verifies a user with username and password credent

Verifies a user with username and password credentials

header Parameters
SplinterProtocolVersion
integer
Example: 1

The protocol version which the client can understand. If not provided, the node will respond using its latest protocol version.

Request Body schema: application/json
username
required
any

username of user

hashed_password
required
any

Hashed password to be used for user authentication

Responses

Request samples

Content type
application/json
{
  • "username": "alice@acme.com",
  • "hashed_password": "8945622435187243046536949706b5272644c71336c7254563679727565494b376d4b3554696b734662685962652f6v52562e437a70462f6552489c8b"
}

Response samples

Content type
application/json
{
  • "message": "Successful verification",
  • "user_id": "f35aacc1-a9cd-4eda-b6d0-2efaddf0c8a4"
}

Lists all users

Lists all users

header Parameters
SplinterProtocolVersion
integer
Example: 1

The protocol version which the client can understand. If not provided, the node will respond using its latest protocol version.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Fetch a user by ID

Fetch a user by ID

path Parameters
user_id
required
string
Example: f35aacc1-a9cd-4eda-b6d0-2efaddf0c8a4

ID of the user

header Parameters
SplinterProtocolVersion
integer
Example: 1

The protocol version which the client can understand. If not provided, the node will respond using its latest protocol version.

Responses

Response samples

Content type
application/json
{
  • "username": "alice@acme.com",
  • "user_id": "f35aacc1-a9cd-4eda-b6d0-2efaddf0c8a4"
}

Update a user

Update a user

path Parameters
user_id
required
string
Example: f35aacc1-a9cd-4eda-b6d0-2efaddf0c8a4

ID of the user

header Parameters
SplinterProtocolVersion
integer
Example: 1

The protocol version which the client can understand. If not provided, the node will respond using its latest protocol version.

Request Body schema: application/json
username
required
any

Existing username of user

hashed_password
required
any

Hashed password to be used for user authentication

new_password