Create an experiment
const url = 'http://localhost:8080/api/v1/projects/example/experiments';const options = { method: 'POST', headers: { cookie: 'cetra_session=<cetra_session>', 'Content-Type': 'application/json' }, body: '{"dataset":"example","dataset_version":1,"description":"example","metadata":{},"name":"example","repetitions":1}'};
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/v1/projects/example/experiments \ --header 'Content-Type: application/json' \ --cookie cetra_session=<cetra_session> \ --data '{ "dataset": "example", "dataset_version": 1, "description": "example", "metadata": {}, "name": "example", "repetitions": 1 }'Project members and above, a read-write personal access token, or an API key with write (D-J-5). Pins the dataset’s version and copies its items into the first page of the answer; the SDK pages the rest from the items list.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Project UUID, URL-encoded org-slug/project-slug, or current.
Request Bodyrequired
Section titled “Request Bodyrequired”POST /api/v1/projects/{project}/experiments body.
object
The dataset, by id or by name.
The version to pin. Defaults to the dataset’s current version. 0 is refused.
Free text, at most 2 000 characters.
object
Experiment name, 1 to 200 characters after trimming.
Repetitions of every item, 1 to 20. Defaults to 1.
Example generated
{ "dataset": "example", "dataset_version": 1, "description": "example", "metadata": {}, "name": "example", "repetitions": 1}Responses
Section titled “Responses”The experiment and the first page of its pinned items.
The created experiment and the first page of its pinned items. The SDK pages the rest with
GET …/datasets/{dataset}/items?version= from next_cursor.
object
The experiment, running.
object
Creation time. JSON is RFC 3339.
The dataset. Omitted once the dataset is deleted.
The dataset’s name when the experiment was created.
The dataset version the experiment is pinned to.
Free text. Omitted when unset.
The error the experiment finished with. Omitted when none.
When the experiment finished. Omitted while it runs. JSON is RFC 3339.
Experiment id.
Live items of the pinned version.
object
Not unique. 1 to 200 characters.
Repetitions of every item, 1 to 20.
Results stored so far.
running, completed or failed.
The first 1 000 items of the pinned version, by item id.
One item as it is in a version.
object
Creation time of this revision. JSON is RFC 3339.
Any JSON value.
The item id, stable across versions.
Any JSON value.
object
This revision.
The span the item was copied from. Omitted when none.
The trace the item was copied from. Omitted when none.
The version that introduced this revision.
The item id to pass as cursor of GET …/items for the next page, or null on the last
page. Always present.
Example
{ "experiment": { "status": "running" }}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"}No credentials, or the credentials are 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 resource does not exist.
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 body is larger than the limit.
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"}