Save the project's Overview
const url = 'http://localhost:8080/api/v1/projects/example/dashboards/overview';const options = { method: 'PUT', headers: { cookie: 'cetra_session=<cetra_session>', 'Content-Type': 'application/json' }, body: '{"definition":{"widgets":[{"chart":{"fade_below":1,"share":true,"split":true,"stacked":true,"type":"line"},"id":"example","kind":"chart","layout":{"h":1,"w":1,"x":1,"y":1},"query":{"breakdown":{"field":"example","limit":1,"other":true},"filter":"example","measures":[{"agg":"count","field":"example","label":"example","where":"example"}],"source":"traces"},"title":"example"}]},"version":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url http://localhost:8080/api/v1/projects/example/dashboards/overview \ --header 'Content-Type: application/json' \ --cookie cetra_session=<cetra_session> \ --data '{ "definition": { "widgets": [ { "chart": { "fade_below": 1, "share": true, "split": true, "stacked": true, "type": "line" }, "id": "example", "kind": "chart", "layout": { "h": 1, "w": 1, "x": 1, "y": 1 }, "query": { "breakdown": { "field": "example", "limit": 1, "other": true }, "filter": "example", "measures": [ { "agg": "count", "field": "example", "label": "example", "where": "example" } ], "source": "traces" }, "title": "example" } ] }, "version": 1 }'Stores the widgets as the project’s Overview. With nothing stored and no version, creates it at version 1 (201). Otherwise version must be the stored version: the save updates it (200) and raises the version by one. Any other version is 409 with the stored version in detail; without a stored Overview, a version is also 409 with 0. Every widget query is checked before the write. Same roles as create.
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”The body of PUT /api/v1/projects/{project}/dashboards/overview.
object
The widgets.
object
Up to 50 widgets.
One widget of a dashboard.
object
Chart settings. Chart widgets only.
object
Fades the buckets with fewer rows than this, 1 to 1000. Bar only.
Shows each row’s share of the first measure’s total. Table only.
One small chart per group. Line only.
Stacks the series. Bar and area only.
The chart type.
1 to 64 characters of [A-Za-z0-9_-], unique in the dashboard.
Chart or heading.
Position and size.
object
Height in rows, 1 to 40.
Width in columns, 1 to 60; x + w is at most 60.
Column, 0 to 59.
Row, 0 to 1000.
The data. Chart widgets only.
object
The split, if any.
object
The field the rows are grouped by.
Groups kept, 1 to 20. Default 5.
Whether the rows of every other value form one more group. Default true.
A filter over the source view.
One to six measures.
One measure of a widget query.
object
How the rows aggregate.
The field aggregated. Absent for count and rate.
Name shown in the legend, 0 to 60 characters. Not part of the query.
A filter over the source view. Required for rate.
The view the query reads.
Title, 0 to 100 characters (1 to 100 for a heading).
The version the caller read; absent when the project shows the built-in preset.
Responses
Section titled “Responses”The updated Overview.
A dashboard with its definition.
object
Creation time, nanoseconds since the Unix epoch. JSON is RFC 3339.
Creator. Omitted when the user is gone.
The widgets.
object
Up to 50 widgets.
One widget of a dashboard.
object
Chart settings. Chart widgets only.
object
Fades the buckets with fewer rows than this, 1 to 1000. Bar only.
Shows each row’s share of the first measure’s total. Table only.
One small chart per group. Line only.
Stacks the series. Bar and area only.
The chart type.
1 to 64 characters of [A-Za-z0-9_-], unique in the dashboard.
Chart or heading.
Position and size.
object
Height in rows, 1 to 40.
Width in columns, 1 to 60; x + w is at most 60.
Column, 0 to 59.
Row, 0 to 1000.
The data. Chart widgets only.
object
The split, if any.
object
The field the rows are grouped by.
Groups kept, 1 to 20. Default 5.
Whether the rows of every other value form one more group. Default true.
A filter over the source view.
One to six measures.
One measure of a widget query.
object
How the rows aggregate.
The field aggregated. Absent for count and rate.
Name shown in the legend, 0 to 60 characters. Not part of the query.
A filter over the source view. Required for rate.
The view the query reads.
Title, 0 to 100 characters (1 to 100 for a heading).
Free text, 0 to 500 characters.
Dashboard id.
Display name. Names are not unique.
Last update, nanoseconds since the Unix epoch. JSON is RFC 3339.
Last editor. Omitted when the user is gone.
Incremented by every change. A PATCH names the version it read.
Example
{ "definition": { "widgets": [ { "chart": { "type": "line" }, "kind": "chart", "query": { "measures": [ { "agg": "count" } ], "source": "traces" } } ] }}The created Overview.
A dashboard with its definition.
object
Creation time, nanoseconds since the Unix epoch. JSON is RFC 3339.
Creator. Omitted when the user is gone.
The widgets.
object
Up to 50 widgets.
One widget of a dashboard.
object
Chart settings. Chart widgets only.
object
Fades the buckets with fewer rows than this, 1 to 1000. Bar only.
Shows each row’s share of the first measure’s total. Table only.
One small chart per group. Line only.
Stacks the series. Bar and area only.
The chart type.
1 to 64 characters of [A-Za-z0-9_-], unique in the dashboard.
Chart or heading.
Position and size.
object
Height in rows, 1 to 40.
Width in columns, 1 to 60; x + w is at most 60.
Column, 0 to 59.
Row, 0 to 1000.
The data. Chart widgets only.
object
The split, if any.
object
The field the rows are grouped by.
Groups kept, 1 to 20. Default 5.
Whether the rows of every other value form one more group. Default true.
A filter over the source view.
One to six measures.
One measure of a widget query.
object
How the rows aggregate.
The field aggregated. Absent for count and rate.
Name shown in the legend, 0 to 60 characters. Not part of the query.
A filter over the source view. Required for rate.
The view the query reads.
Title, 0 to 100 characters (1 to 100 for a heading).
Free text, 0 to 500 characters.
Dashboard id.
Display name. Names are not unique.
Last update, nanoseconds since the Unix epoch. JSON is RFC 3339.
Last editor. Omitted when the user is gone.
Incremented by every change. A PATCH names the version it read.
Example
{ "definition": { "widgets": [ { "chart": { "type": "line" }, "kind": "chart", "query": { "measures": [ { "agg": "count" } ], "source": "traces" } } ] }}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 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"}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"}The request body is not JSON.
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"}