6.4.2
OAS 3.0.3

Chibisafe API

Welcome to the API docs

These are the official docs for the Chibisafe project. On the sidebar you will find all available endpoints that the API has to offer. Keep in mind that some of those are accesible only to admins of the instance, for operations such as setting up the instance or managing users.

If you want to test the API, we've included a Thunder Client collection that you can import into your IDE of choice if you clone the repo. If you are using VSCode, you can install the Thunder Client extension and the collection should already be imported automatically for you.

The default rate limit for the API is 100 requests per 1000ms.

Client Libraries
Shell
Ruby
Node.js
PHP
Python
C
More

Change password

Change the password of the current user

Body
application/json
password
required
string

The current password of the user.

newPassword
required
string

The new password of the user.

Responses
  • 200

    Default Response

  • 4XX

    Default Response

  • 5XX

    Default Response

POST/api/auth/password/change
Shell cURL
curl --request POST \
  --url https://files.offshore.cat/api/auth/password/change \
  --header 'Content-Type: application/json' \
  --data '{
  "password": "",
  "newPassword": ""
}'
{
  "message": "…"
}

Generate API key

Generate a new API key for the current user

Responses
  • 200

    Default Response

  • 4XX

    Default Response

  • 5XX

    Default Response

POST/api/auth/apikey/change
Shell cURL
curl --request POST \
  --url https://files.offshore.cat/api/auth/apikey/change
{
  "message": "…",
  "apiKey": "…"
}

Login

Login to an existing account

Headers
  • invite
    string

    The invite code to use.

Body
application/json
username
required
string

The username of the user.

password
required
string

The password of the user.

Responses
  • 200

    Default Response

  • 4XX

    Default Response

  • 5XX

    Default Response

POST/api/auth/login
Shell cURL
curl --request POST \
  --url https://files.offshore.cat/api/auth/login \
  --header 'Content-Type: application/json' \
  --data '{
  "username": "",
  "password": ""
}'
{
  "message": "…",
  "user": {
    "uuid": "…",
    "username": "…",
    "roles": [
      {
        "name": "…"
      }
    ],
    "apiKey": "…",
    "passwordEditedAt": "…"
  },
  "token": "…"
}

Register

Create a new user account

Headers
  • invite
    string

    The invite code to use.

Body
application/json
username
required
string

The username of the user.

password
required
string

The password of the user.

Responses
  • 200

    Default Response

  • 4XX

    Default Response

  • 5XX

    Default Response

POST/api/auth/register
Shell cURL
curl --request POST \
  --url https://files.offshore.cat/api/auth/register \
  --header 'Content-Type: application/json' \
  --data '{
  "username": "",
  "password": ""
}'
{
  "message": "…"
}

User

Routes that return data related to the authenticated user.

Get own user

Return the current user

Responses
  • 200

    Default Response

  • 4XX

    Default Response

  • 5XX

    Default Response

GET/api/user/me
Shell cURL
curl --request GET \
  --url https://files.offshore.cat/api/user/me
{
  "message": "…",
  "user": {
    "uuid": "…",
    "username": "…",
    "roles": [
      {
        "name": "…"
      }
    ],
    "apiKey": "…",
    "passwordEditedAt": "…"
  },
  "storageQuota": {
    "used": 1,
    "quota": 1,
    "overQuota": true
  }
}

Invites

Routes that return data related to invites.

IP Management

Routes that return data related to IP Management.

Admin

Routes that return data related to the admin panel.