Skip to content

Accounts and sign-in ​

Sign-in, sessions, personal access tokens, users, groups and the security audit.

Operations of this group with their access rule, retry rule, parameters and answers. Every request carries a key: Authorization: Bearer <key> (see Authentication).

Operations ​

Sign in ​

POST /api/v1/auth/login

Access: Anyone, without a key · Retry: Do not repeat automatically

Exchanges an account name and password for a bearer session token valid for 12 hours, with its expiresAt and the account; send it as Authorization: Bearer. An unknown name, a wrong password and a disabled account all answer the same 401 invalid_credentials. Attempts are throttled per client address and per account (429 rate_limited with Retry-After), and an account keeps at most 32 sessions: a new one ends the oldest.

Request body (application/json)

FieldTypeRequiredRules
namestringyes—
passwordstring (password)yes—

Response 200

FieldTypeRequiredRules
tokenstringyes—
expiresAtstring (date-time)yes—
accountobjectyes—
account.idstring (uuid)yes—
account.namestringyes—
account.administratorbooleanyes—
account.enabledbooleanyes—

Responses: 200, 400, 401, 403, 405, 413, 415, 429, 503

Example

bash
curl -X POST "$ARKVORY_URL/api/v1/auth/login" \
  -H "Content-Type: application/json" \
  -d '{"name":"<name>","password":"<password>"}'

Register an account ​

POST /api/v1/auth/register

Access: Anyone, without a key · Retry: Do not repeat automatically

Creates an ordinary account (never an administrator) with name (3–64 letters, digits or _.-) and password (12–128 characters) and signs it in, answering 201 with a 12-hour session like login. Works only when the server allows self-registration (see getAuthOptions), otherwise 403 registration_disabled; a taken name is a 409 already_exists. Attempts are throttled per client address (429 with Retry-After), and self-registration stops at 900 accounts.

Request body (application/json)

FieldTypeRequiredRules
namestringyes—
passwordstring (password)yes—

Response 201

FieldTypeRequiredRules
tokenstringyes—
expiresAtstring (date-time)yes—
accountobjectyes—
account.idstring (uuid)yes—
account.namestringyes—
account.administratorbooleanyes—
account.enabledbooleanyes—

Responses: 201, 400, 403, 405, 413, 415, 429, 503

Example

bash
curl -X POST "$ARKVORY_URL/api/v1/auth/register" \
  -H "Content-Type: application/json" \
  -d '{"name":"<name>","password":"<password>"}'

Get the sign-in options ​

GET HEAD /api/v1/auth/options

Access: Anyone, without a key · Retry: Safe to repeat (read)

Tells a console before sign-in which forms to show: selfRegistration is true when registerAccount is open on this server.

Response 200

FieldTypeRequiredRules
selfRegistrationbooleanyes—

Responses: 200, 400, 403, 503

Example

bash
curl -X GET "$ARKVORY_URL/api/v1/auth/options"

List your personal access tokens ​

GET HEAD /api/v1/auth/tokens

Access: A signed-in account session (not a key) · Retry: Safe to repeat (read)

Lists the personal access tokens of the signed-in account, active first, with name, prefix, scope, creation, expiry, last use and whether it is revoked; the secrets are never shown again.

Response 200

FieldTypeRequiredRules
itemsarray of objectyesup to 100 items
items[].idstring (uuid)yes—
items[].namestringyes—
items[].prefixstringyes—
items[].scopestringyesone of read, read-write
items[].createdAtstring (date-time)yes—
items[].expiresAtstring (date-time)nomay be null
items[].lastUsedAtstring (date-time)nomay be null
items[].revokedbooleanyes—

Responses: 200, 400, 401, 403, 404, 409, 422, 503, 507

Example

bash
curl -X GET "$ARKVORY_URL/api/v1/auth/tokens" \
  -H "Authorization: Bearer $ARKVORY_TOKEN"

Create a personal access token ​

POST /api/v1/auth/tokens

Access: A signed-in account session (not a key) · Retry: Do not repeat automatically

Creates a token for scripts and tools that acts as the signed-in account; the secret is in this answer only. name has 1–64 characters, expiresAt defaults to 90 days and must lie in the future and within 365 days, and scope is read-write (default) or read, which can never change anything. Tokens never carry administrator rights, cannot create tokens, and an account has at most 50 active ones (507 token_limit).

Request body (application/json)

FieldTypeRequiredRules
namestringyes—
expiresAtstring (date-time)no—
scopestringnoone of read, read-write

Response 201

FieldTypeRequiredRules
idstring (uuid)yes—
namestringyes—
prefixstringyes—
scopestringyesone of read, read-write
createdAtstring (date-time)yes—
expiresAtstring (date-time)nomay be null
lastUsedAtstring (date-time)nomay be null
revokedbooleanyes—
tokenstringyes—

Responses: 201, 400, 401, 403, 404, 405, 409, 413, 415, 422, 503, 507

Example

bash
curl -X POST "$ARKVORY_URL/api/v1/auth/tokens" \
  -H "Authorization: Bearer $ARKVORY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"<name>"}'

Revoke your personal access token ​

DELETE /api/v1/auth/tokens/{id}

Access: A signed-in account session (not a key) · Retry: Safe to repeat: the same request has the same effect

Revokes one personal access token of the signed-in account; requests with it fail from now on. Revoking an already revoked token succeeds as well.

Parameters

NameInTypeRequiredRules
idpathstring (uuid)yes—

Responses: 204, 400, 401, 403, 404, 405, 409, 422, 503, 507

Example

bash
curl -X DELETE "$ARKVORY_URL/api/v1/auth/tokens/$ID" \
  -H "Authorization: Bearer $ARKVORY_TOKEN"

Sign out ​

POST /api/v1/auth/logout

Access: Any valid key or session · Retry: Safe to repeat: the same request has the same effect

Ends the account session sent in Authorization; its token stops working at once. With any other credential (a personal token or a service key) it answers 204 and revokes nothing.

Responses: 204, 400, 401, 403, 404, 405, 409, 422, 503, 507

Example

bash
curl -X POST "$ARKVORY_URL/api/v1/auth/logout" \
  -H "Authorization: Bearer $ARKVORY_TOKEN"

Change your password ​

POST /api/v1/auth/password

Access: A signed-in account session (not a key) · Retry: Do not repeat automatically

Sets newPassword (12–128 characters) after checking currentPassword; a wrong current password is a 401 current_password_invalid and counts toward the sign-in backoff. On success every session and every personal access token of the account is revoked, including the current session, so sign in again.

Request body (application/json)

FieldTypeRequiredRules
currentPasswordstring (password)yes—
newPasswordstring (password)yes—

Responses: 204, 400, 401, 403, 404, 405, 409, 413, 415, 422, 429, 503, 507

Example

bash
curl -X POST "$ARKVORY_URL/api/v1/auth/password" \
  -H "Authorization: Bearer $ARKVORY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"currentPassword":"<currentPassword>","newPassword":"<newPassword>"}'

Get the current identity ​

GET HEAD /api/v1/auth/me

Access: Any valid key or session · Retry: Safe to repeat (read)

Returns who the credential belongs to: its id, whether it is an administrator, the credential kind (session, personal-token, service-key or file-key), the scope of a personal token, and the repositories it has read or write access to. Use it to show the signed-in user and to choose a repository; for the exact permissions of a managed service key use getOwnPermissions.

Response 200

FieldTypeRequiredRules
idstringyes—
administratorbooleanyes—
credentialstringnoone of session, personal-token, service-key, file-key
tokenScopestringnoone of read, read-write
grantsarray of objectyes—
grants[].repositorystringyes—
grants[].permissionsarray of stringyeseach: one of read, write

Responses: 200, 400, 401, 403, 404, 409, 422, 503, 507

Example

bash
curl -X GET "$ARKVORY_URL/api/v1/auth/me" \
  -H "Authorization: Bearer $ARKVORY_TOKEN"

List accounts ​

GET HEAD /api/v1/users

Access: Administrator · Retry: Safe to repeat (read)

Lists all user accounts ordered by name, with ID, name, administrator flag and whether they are enabled. The server holds at most 1000 accounts.

Response 200

FieldTypeRequiredRules
itemsarray of objectno—
items[].idstring (uuid)yes—
items[].namestringyes—
items[].administratorbooleanyes—
items[].enabledbooleanyes—

Responses: 200, 400, 401, 403, 404, 409, 422, 503, 507

Example

bash
curl -X GET "$ARKVORY_URL/api/v1/users" \
  -H "Authorization: Bearer $ARKVORY_TOKEN"

Create an account ​

POST /api/v1/users

Access: Administrator · Retry: Do not repeat automatically

Creates an account with name (3–64 letters, digits or _.-), password (12–128 characters) and administrator (default false), and answers 201 with it. A taken name is a 409 already_exists; the server holds at most 1000 accounts (507 account_limit).

Request body (application/json)

FieldTypeRequiredRules
namestringyes—
passwordstring (password)yes—
administratorbooleanno—

Response 201

FieldTypeRequiredRules
idstring (uuid)yes—
namestringyes—
administratorbooleanyes—
enabledbooleanyes—

Responses: 201, 400, 401, 403, 404, 405, 409, 413, 415, 422, 503, 507

Example

bash
curl -X POST "$ARKVORY_URL/api/v1/users" \
  -H "Authorization: Bearer $ARKVORY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"<name>","password":"<password>"}'

Enable, disable or reset an account ​

PATCH /api/v1/users/{id}

Access: Administrator · Retry: Do not repeat automatically

Changes enabled and/or sets a new password of an account; the administrator flag cannot be changed here. Disabling ends every session of the account and its personal tokens stop working while it stays disabled; a password reset ends every session and revokes every personal token.

Parameters

NameInTypeRequiredRules
idpathstring (uuid)yes—

Request body (application/json)

FieldTypeRequiredRules
enabledbooleanno—
passwordstring (password)no—

Response 200

FieldTypeRequiredRules
idstring (uuid)yes—
namestringyes—
administratorbooleanyes—
enabledbooleanyes—

Responses: 200, 400, 401, 403, 404, 405, 409, 413, 415, 422, 503, 507

Example

bash
curl -X PATCH "$ARKVORY_URL/api/v1/users/$ID" \
  -H "Authorization: Bearer $ARKVORY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

List the personal access tokens of an account ​

GET HEAD /api/v1/users/{id}/tokens

Access: Administrator · Retry: Safe to repeat (read)

Lists the personal access tokens of any account, active first, with name, prefix, scope, creation, expiry, last use and revocation; never the secrets. Use it to review automation before disabling or resetting the account.

Parameters

NameInTypeRequiredRules
idpathstring (uuid)yes—

Response 200

FieldTypeRequiredRules
itemsarray of objectyesup to 100 items
items[].idstring (uuid)yes—
items[].namestringyes—
items[].prefixstringyes—
items[].scopestringyesone of read, read-write
items[].createdAtstring (date-time)yes—
items[].expiresAtstring (date-time)nomay be null
items[].lastUsedAtstring (date-time)nomay be null
items[].revokedbooleanyes—

Responses: 200, 400, 401, 403, 404, 409, 422, 503, 507

Example

bash
curl -X GET "$ARKVORY_URL/api/v1/users/$ID/tokens" \
  -H "Authorization: Bearer $ARKVORY_TOKEN"

Revoke a personal access token of an account ​

DELETE /api/v1/users/{id}/tokens/{tokenId}

Access: Administrator · Retry: Safe to repeat: the same request has the same effect

Revokes one personal access token of the account id; requests with it fail from now on, and the event is recorded in the security audit. Revoking an already revoked token succeeds as well.

Parameters

NameInTypeRequiredRules
idpathstring (uuid)yes—
tokenIdpathstring (uuid)yes—

Responses: 204, 400, 401, 403, 404, 405, 409, 422, 503, 507

Example

bash
curl -X DELETE "$ARKVORY_URL/api/v1/users/$ID/tokens/$TOKENID" \
  -H "Authorization: Bearer $ARKVORY_TOKEN"

List access groups ​

GET HEAD /api/v1/access-groups

Access: Administrator · Retry: Safe to repeat (read)

Lists all access groups with their member account IDs and repository grants (read or write). The server holds at most 100 groups and 10 000 memberships and grants each.

Response 200

FieldTypeRequiredRules
itemsarray of objectno—
items[].idstring (uuid)yes—
items[].namestringyes—
items[].membersarray of string (uuid)yes—
items[].grantsarray of objectyes—
items[].grants[].repositorystringyes—
items[].grants[].accessstringyesone of read, write

Responses: 200, 400, 401, 403, 404, 409, 422, 503, 507

Example

bash
curl -X GET "$ARKVORY_URL/api/v1/access-groups" \
  -H "Authorization: Bearer $ARKVORY_TOKEN"

Create an access group ​

POST /api/v1/access-groups

Access: Administrator · Retry: Do not repeat automatically

Creates an empty group with name (2–64 letters, digits or _.-) and answers 201 with it; a taken name is a 409 already_exists. Add members with addGroupMember and repositories with setGroupGrant.

Request body (application/json)

FieldTypeRequiredRules
namestringyes—

Response 201

FieldTypeRequiredRules
idstring (uuid)yes—
namestringyes—
membersarray of string (uuid)yes—
grantsarray of objectyes—
grants[].repositorystringyes—
grants[].accessstringyesone of read, write

Responses: 201, 400, 401, 403, 404, 405, 409, 413, 415, 422, 503, 507

Example

bash
curl -X POST "$ARKVORY_URL/api/v1/access-groups" \
  -H "Authorization: Bearer $ARKVORY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"<name>"}'

Add an account to a group ​

PUT /api/v1/access-groups/{id}/members/{userId}

Access: Administrator · Retry: Safe to repeat: the same request has the same effect

Makes the account userId a member of the group; it gains the group's repository access with its next request. Adding an existing member changes nothing; at most 10 000 memberships in all (507 membership_limit).

Parameters

NameInTypeRequiredRules
idpathstring (uuid)yes—
userIdpathstring (uuid)yes—

Responses: 204, 400, 401, 403, 404, 405, 409, 422, 503, 507

Example

bash
curl -X PUT "$ARKVORY_URL/api/v1/access-groups/$ID/members/$USERID" \
  -H "Authorization: Bearer $ARKVORY_TOKEN"

Remove an account from a group ​

DELETE /api/v1/access-groups/{id}/members/{userId}

Access: Administrator · Retry: Safe to repeat: the same request has the same effect

Removes the account userId from the group; the access it had through the group ends with its next request. Removing an account that is not a member succeeds as well.

Parameters

NameInTypeRequiredRules
idpathstring (uuid)yes—
userIdpathstring (uuid)yes—

Responses: 204, 400, 401, 403, 404, 405, 409, 422, 503, 507

Example

bash
curl -X DELETE "$ARKVORY_URL/api/v1/access-groups/$ID/members/$USERID" \
  -H "Authorization: Bearer $ARKVORY_TOKEN"

Grant a group access to a repository ​

PUT /api/v1/access-groups/{id}/grants/{repository}

Access: Administrator · Retry: Safe to repeat: the same request has the same effect

Gives the group's members access read or write to repository, replacing an earlier grant of the group there; it applies from their next request. A repository needs no separate creation: the grant makes it visible to them. At most 10 000 grants in all (507 grant_limit).

Parameters

NameInTypeRequiredRules
idpathstring (uuid)yes—
repositorypathstringyes—

Request body (application/json)

FieldTypeRequiredRules
accessstringyesone of read, write

Responses: 204, 400, 401, 403, 404, 405, 409, 413, 415, 422, 503, 507

Example

bash
curl -X PUT "$ARKVORY_URL/api/v1/access-groups/$ID/grants/$REPOSITORY" \
  -H "Authorization: Bearer $ARKVORY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"access":"read"}'

Remove a group's access to a repository ​

DELETE /api/v1/access-groups/{id}/grants/{repository}

Access: Administrator · Retry: Safe to repeat: the same request has the same effect

Removes the group's grant for repository; its members keep only the access they have through other groups. Removing a grant that does not exist succeeds as well.

Parameters

NameInTypeRequiredRules
idpathstring (uuid)yes—
repositorypathstringyes—

Responses: 204, 400, 401, 403, 404, 405, 409, 422, 503, 507

Example

bash
curl -X DELETE "$ARKVORY_URL/api/v1/access-groups/$ID/grants/$REPOSITORY" \
  -H "Authorization: Bearer $ARKVORY_TOKEN"

Read the security audit ​

GET HEAD /api/v1/security/audit

Access: Administrator · Retry: Safe to repeat (read)

Returns the append-only journal of sign-ins, registrations, account, group, grant, password and personal token changes, newest first, each with actor, credential kind, target, outcome and client address; throttled attempts are not journaled. Pages hold limit entries (1–100, default 50); continue with after set to next.

Parameters

NameInTypeRequiredRules
afterquerystringnoa whole number in decimal digits, sent as a string
limitqueryintegerno1–100

Response 200

FieldTypeRequiredRules
itemsarray of objectyesup to 100 items
items[].idstringyesa whole number in decimal digits, sent as a string
items[].occurredAtstring (date-time)yes—
items[].actorstringyesmay be null
items[].credentialstringyesone of session, personal-token, service-key, file-key; may be null
items[].clientIpstringyesmay be null
items[].actionstringyes—
items[].targetstringyesmay be null
items[].outcomestringyesone of success, failure, denied
items[].codestringyesmay be null
items[].detailsobjectyes—
nextstringyesmay be null

Responses: 200, 400, 401, 403, 404, 409, 422, 503, 507

Example

bash
curl -X GET "$ARKVORY_URL/api/v1/security/audit" \
  -H "Authorization: Bearer $ARKVORY_TOKEN"

Get your effective permissions ​

GET HEAD /api/v1/auth/permissions

Access: Any valid key or session · Retry: Safe to repeat (read)

Returns the caller's profile (managed for a managed service key, legacy otherwise), its key ID, its effective bindings (each repository with the exact actions allowed there) and whether it is the bootstrap service administrator. Use it to adapt a client; the server still checks every request, so a change of permissions applies at once.

Response 200

FieldTypeRequiredRules
idstringyes—
profilestringyesone of legacy, managed
bindingsarray of objectyesup to 10000 items
bindings[].resourceobjectyes—
bindings[].resource.kindstringyesone of repository
bindings[].resource.idstringyesmatches ^[a-z0-9][a-z0-9_-]{0,63}$
bindings[].actionsarray of stringyes1–24 items; no repeated items; each: one of repository.read, storage.read, storage.manage, diagnostics.read, artifact.read, artifact.list, artifact.delete, artifact.promote, content.read, upload.create, upload.read, upload.write, upload.complete, upload.cancel, job.read, package.read, package.publish, asset.read, asset.write, asset.restore, annotation.read, annotation.write, reference.write, audit.read
serviceAdministrationbooleanyes—
credentialIdstring (uuid)nomay be null

Responses: 200, 400, 401, 403, 404, 409, 422, 503, 507

Example

bash
curl -X GET "$ARKVORY_URL/api/v1/auth/permissions" \
  -H "Authorization: Bearer $ARKVORY_TOKEN"

Arkvory · ProAnimaStudio