Create the first admin
const url = 'http://localhost:8080/api/auth/setup';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"email":"example","name":"example","org_name":"example","password":"example","project_name":"example","setup_token":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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" }'Request Bodyrequired
Section titled “Request Bodyrequired”POST /api/auth/setup. The token is the one logged at startup (D144).
object
Email address of the first admin.
Display name. Absent when the admin does not set one.
Name of the first organization.
Password of the first admin.
Name of the first project.
The setup token from the startup log.
Example generated
{ "email": "example", "name": "example", "org_name": "example", "password": "example", "project_name": "example", "setup_token": "example"}Responses
Section titled “Responses”The admin, org, project, and secret key shown once.
The first admin, org, project, and the secret key shown once.
POST /api/auth/setup returns 201. secret_key is not stored.
object
The org, with the owner role.
object
The demo org (demo.org, D187). Its role is viewer for a caller without a row.
Org id.
Display name.
Org role. A project override of none hides that project and is never returned.
URL slug.
The project, with the owner role.
object
Creation time, nanoseconds since the Unix epoch. JSON is RFC 3339.
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.
Project id.
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).
Display name.
Owning org.
Days to keep data. Omitted when data is kept forever.
The caller’s effective role. Omitted when the caller is an API key.
URL slug, unique within the org.
Seconds without a new span after which a trace counts as complete for online rules (D-I-7). 10 to 3600; 60 unless set.
Secret API key. Shown once.
Type prefix plus the first 6 characters of the key tail.
The instance admin.
object
Email address.
The address has been verified.
A password is set. SSO-only accounts are false.
User id.
Instance administrator, allowed to manage instance settings.
Display name. Omitted when the user has not set one.
Example
{ "org": { "role": "owner" }, "project": { "role": "owner" }}The request is malformed or a filter is invalid.
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}The credentials do not allow this operation, or the organization’s plan does not include it (code plan_required).
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}The request conflicts with the current state.
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}Too many requests.
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}