Skip to content
GitHubLog inStart free
cetra is not released yet. These docs describe the development version.

Create the first admin

POST
/api/auth/setup
curl --request POST \
--url http://localhost:8080/api/auth/setup \
--header 'Content-Type: application/json' \
--data '{ "email": "example", "name": "example", "org_name": "example", "password": "example", "project_name": "example", "setup_token": "example" }'
Media typeapplication/json

POST /api/auth/setup. The token is the one logged at startup (D144).

object
email
required

Email address of the first admin.

string
name

Display name. Absent when the admin does not set one.

string
org_name
required

Name of the first organization.

string
password
required

Password of the first admin.

string
project_name
required

Name of the first project.

string
setup_token
required

The setup token from the startup log.

string

Example generated

{
"email": "example",
"name": "example",
"org_name": "example",
"password": "example",
"project_name": "example",
"setup_token": "example"
}

The admin, org, project, and secret key shown once.

Media typeapplication/json

The first admin, org, project, and the secret key shown once.

POST /api/auth/setup returns 201. secret_key is not stored.

object
org
required

The org, with the owner role.

object
demo
required

The demo org (demo.org, D187). Its role is viewer for a caller without a row.

boolean
id
required

Org id.

string format: uuid
name
required

Display name.

string
role
required

Org role. A project override of none hides that project and is never returned.

string
Allowed values: owner admin member viewer
slug
required

URL slug.

string
project
required

The project, with the owner role.

object
created_at
required

Creation time, nanoseconds since the Unix epoch. JSON is RFC 3339.

string format: date-time
genai_log_events

GenAI content log records received on /v1/logs and dropped since the project was created (D-G-40). Present when one project is read or updated; omitted in lists and when the project is created.

integer format: int64
id
required

Project id.

string format: uuid
last_ingest_at

When the server last committed spans sent over OTLP to this project (D-C-20). Kept in memory: absent until the first batch after the server starts. Present when one project is read; lists omit it. GET /orgs/{org}/projects/activity also returns it per project (D-C-27).

string format: date-time
name
required

Display name.

string
org_id
required

Owning org.

string format: uuid
retention_days

Days to keep data. Omitted when data is kept forever.

integer format: int32
role

The caller’s effective role. Omitted when the caller is an API key.

string
Allowed values: owner admin member viewer
slug
required

URL slug, unique within the org.

string
trace_completion_timeout_s
required

Seconds without a new span after which a trace counts as complete for online rules (D-I-7). 10 to 3600; 60 unless set.

integer format: int32
secret_key
required

Secret API key. Shown once.

string
secret_key_prefix
required

Type prefix plus the first 6 characters of the key tail.

string
user
required

The instance admin.

object
email
required

Email address.

string
email_verified
required

The address has been verified.

boolean
has_password
required

A password is set. SSO-only accounts are false.

boolean
id
required

User id.

string format: uuid
is_instance_admin
required

Instance administrator, allowed to manage instance settings.

boolean
name

Display name. Omitted when the user has not set one.

string

Example

{
"org": {
"role": "owner"
},
"project": {
"role": "owner"
}
}

The request is malformed or a filter is invalid.

Media typeapplication/problem+json

RFC 7807 problem document.

Spec 09 § Conventions.

object
code
required

Machine-readable error code.

string
Allowed values: bad_request invalid_filter query_failed query_timeout query_too_large too_many_traces too_many_items busy restore_mode unauthorized forbidden sso_required email_not_verified plan_limit plan_required scim_managed owner_not_allowed not_found method_not_allowed payload_too_large unsupported_media_type range_not_satisfiable conflict authorization_pending slow_down access_denied expired_token quota_exceeded rate_limited internal
detail

Extra explanation. Omitted when absent.

string
errors

Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.

Array<object>

One field that failed validation.

Spec 09 § Conventions.

object
field
required

Request field, query parameter, or expression the error refers to.

string
message
required

What is wrong with the field.

string
position

Location inside the field value, for filter and SQL errors.

object
column
required

1-based column number, in characters.

integer format: int32
line
required

1-based line number, in characters.

integer format: int32
status
required

HTTP status code.

integer format: int32
title
required

Short human-readable summary, the reason phrase of status.

string
type
required

Problem type URI. Always about:blank in this version.

string

Example

{
"code": "bad_request"
}

The credentials do not allow this operation, or the organization’s plan does not include it (code plan_required).

Media typeapplication/problem+json

RFC 7807 problem document.

Spec 09 § Conventions.

object
code
required

Machine-readable error code.

string
Allowed values: bad_request invalid_filter query_failed query_timeout query_too_large too_many_traces too_many_items busy restore_mode unauthorized forbidden sso_required email_not_verified plan_limit plan_required scim_managed owner_not_allowed not_found method_not_allowed payload_too_large unsupported_media_type range_not_satisfiable conflict authorization_pending slow_down access_denied expired_token quota_exceeded rate_limited internal
detail

Extra explanation. Omitted when absent.

string
errors

Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.

Array<object>

One field that failed validation.

Spec 09 § Conventions.

object
field
required

Request field, query parameter, or expression the error refers to.

string
message
required

What is wrong with the field.

string
position

Location inside the field value, for filter and SQL errors.

object
column
required

1-based column number, in characters.

integer format: int32
line
required

1-based line number, in characters.

integer format: int32
status
required

HTTP status code.

integer format: int32
title
required

Short human-readable summary, the reason phrase of status.

string
type
required

Problem type URI. Always about:blank in this version.

string

Example

{
"code": "bad_request"
}

The request conflicts with the current state.

Media typeapplication/problem+json

RFC 7807 problem document.

Spec 09 § Conventions.

object
code
required

Machine-readable error code.

string
Allowed values: bad_request invalid_filter query_failed query_timeout query_too_large too_many_traces too_many_items busy restore_mode unauthorized forbidden sso_required email_not_verified plan_limit plan_required scim_managed owner_not_allowed not_found method_not_allowed payload_too_large unsupported_media_type range_not_satisfiable conflict authorization_pending slow_down access_denied expired_token quota_exceeded rate_limited internal
detail

Extra explanation. Omitted when absent.

string
errors

Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.

Array<object>

One field that failed validation.

Spec 09 § Conventions.

object
field
required

Request field, query parameter, or expression the error refers to.

string
message
required

What is wrong with the field.

string
position

Location inside the field value, for filter and SQL errors.

object
column
required

1-based column number, in characters.

integer format: int32
line
required

1-based line number, in characters.

integer format: int32
status
required

HTTP status code.

integer format: int32
title
required

Short human-readable summary, the reason phrase of status.

string
type
required

Problem type URI. Always about:blank in this version.

string

Example

{
"code": "bad_request"
}

Too many requests.

Media typeapplication/problem+json

RFC 7807 problem document.

Spec 09 § Conventions.

object
code
required

Machine-readable error code.

string
Allowed values: bad_request invalid_filter query_failed query_timeout query_too_large too_many_traces too_many_items busy restore_mode unauthorized forbidden sso_required email_not_verified plan_limit plan_required scim_managed owner_not_allowed not_found method_not_allowed payload_too_large unsupported_media_type range_not_satisfiable conflict authorization_pending slow_down access_denied expired_token quota_exceeded rate_limited internal
detail

Extra explanation. Omitted when absent.

string
errors

Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.

Array<object>

One field that failed validation.

Spec 09 § Conventions.

object
field
required

Request field, query parameter, or expression the error refers to.

string
message
required

What is wrong with the field.

string
position

Location inside the field value, for filter and SQL errors.

object
column
required

1-based column number, in characters.

integer format: int32
line
required

1-based line number, in characters.

integer format: int32
status
required

HTTP status code.

integer format: int32
title
required

Short human-readable summary, the reason phrase of status.

string
type
required

Problem type URI. Always about:blank in this version.

string

Example

{
"code": "bad_request"
}