Zum Inhalt springen
Odinex Cloud
API-Referenz

Konto

Diese Referenz wird aus der OpenAPI-Spezifikation erzeugt; die Beschreibungen der Endpunkte und Felder sind auf Englisch.

GET
/account

Autorisierung

cookieAuth
cookieodx_session<token>

Response-Body

Current account

application/json
  1. response
user*
organizations*array<>
mfa_required*boolean

True while the session still needs a second factor; other endpoints return 401 mfa_required.

curl -X GET "https://example.com/account"
{  "user": {    "id": 0,    "email": "string",    "name": "string",    "locale": "string",    "email_verified": true,    "mfa_enabled": true,    "has_password": true,    "created": "2019-08-24T14:15:22Z"  },  "organizations": [    {      "id": 0,      "name": "string",      "kind": "personal",      "role": "owner",      "status": "active"    }  ],  "mfa_required": true}

Update name or locale

PATCH
/account

Autorisierung

cookieAuth
cookieodx_session<token>

Request-Body

application/json
  1. body
name?string
Länge1 <= length <= 100
locale?string
Wert in"en""de""fa""tr"

Response-Body

Updated user

application/json
  1. response
user*
curl -X PATCH "https://example.com/account" \  -H "Content-Type: application/json" \  -d '{}'
{  "user": {    "id": 0,    "email": "string",    "name": "string",    "locale": "string",    "email_verified": true,    "mfa_enabled": true,    "has_password": true,    "created": "2019-08-24T14:15:22Z"  }}

Change password (revokes other sessions)

POST
/account/password

Autorisierung

cookieAuth
cookieodx_session<token>

Request-Body

application/json
  1. body
current_password?string

Required when the account has a password

new_password*string
Länge10 <= length <= 128

Response-Body

Changed

curl -X POST "https://example.com/account/password" \  -H "Content-Type: application/json" \  -d '{    "new_password": "stringstri"  }'
Leer

Start TOTP enrollment

POST
/account/mfa/totp/setup

Autorisierung

cookieAuth
cookieodx_session<token>

Response-Body

Secret to show as a QR code

application/json
  1. response
secret*string
otpauth_url*string
curl -X POST "https://example.com/account/mfa/totp/setup"
{  "secret": "string",  "otpauth_url": "string"}
POST
/account/mfa/totp/enable

Autorisierung

cookieAuth
cookieodx_session<token>

Request-Body

application/json
  1. body
code*string

Response-Body

Enabled

application/json
  1. response
recovery_codes*array<string>
curl -X POST "https://example.com/account/mfa/totp/enable" \  -H "Content-Type: application/json" \  -d '{    "code": "string"  }'
{  "recovery_codes": [    "string"  ]}

Turn off TOTP (needs a current code)

POST
/account/mfa/totp/disable

Autorisierung

cookieAuth
cookieodx_session<token>

Request-Body

application/json
  1. body
code*string

Response-Body

Disabled

curl -X POST "https://example.com/account/mfa/totp/disable" \  -H "Content-Type: application/json" \  -d '{    "code": "string"  }'
Leer

Active sessions of the current user

GET
/account/sessions

Autorisierung

cookieAuth
cookieodx_session<token>

Response-Body

Sessions

application/json
  1. response
sessions*array<>
curl -X GET "https://example.com/account/sessions"
{  "sessions": [    {      "id": 0,      "ip": "string",      "user_agent": "string",      "current": true,      "created": "2019-08-24T14:15:22Z",      "last_seen": "2019-08-24T14:15:22Z"    }  ]}

Sign out a session

DELETE
/account/sessions/{id}

Autorisierung

cookieAuth
cookieodx_session<token>

Pfadparameter

id*integer
Formatint64

Response-Body

Revoked

curl -X DELETE "https://example.com/account/sessions/0"
Leer
GET
/account/export

Autorisierung

cookieAuth
cookieodx_session<token>

Response-Body

JSON export

application/json
  1. response
[key: string]?any
curl -X GET "https://example.com/account/export"
{}

Delete your account (GDPR Art. 17)

POST
/account/delete

Only possible when your personal organization has no resources left and no negative balance. Personal data is erased; invoices and ledger entries are kept as the law requires, without your name.

Autorisierung

cookieAuth
cookieodx_session<token>

Request-Body

application/json
  1. body
confirm*string

Must be your email address

password?string

Required when the account has a password

code?string

TOTP code when two-factor authentication is on

Response-Body

Deleted and signed out

curl -X POST "https://example.com/account/delete" \  -H "Content-Type: application/json" \  -d '{    "confirm": "string"  }'
Leer