Reference
Dashboard registration endpoints let you manage dashboards and where they are displayed. Those endpoint usually take or return DashboardRegistration objects.
get
https://api.mediarithmics.com/v1
/dashboards?organisation_id=:organisation_id
List all dashboard registrations for a specific organisation
post
https://api.mediarithmics.com/v1
/dashboards
Create a dashboard registration.
put
https://api.mediarithmics.com/v1
/dashboards/:id?organisation_id=:organisation_id
Edit a dashboard registration
get
https://api.mediarithmics.com/v1
/dashboards/:id?organisation_id=:organisation_id
Get a specific dashboard registration
delete
https://api.mediarithmics.com/v1
/dashboards/:id?organisation_id=:organisation_id
Delete a dashboard registration
Dashboard content endpoints let you manage the sections, cards and charts in a specific dashboard.
get
https://api.mediarithmics.com/v1
/dashboards/:id/content?organisation_id=:organisation_id
Get the content of a dashboard. Returns a DashboardContentWrapper.
put
https://api.mediarithmics.com/v1
/dashboards/:id/content?organisation_id=:organisation_id
Edit the content of a dashboard with the specified DashboardContent.
This object represents a dashboard and where it should be displayed.
JSON representation
{
"title": String,
"scopes": [Scope]
"segment_ids": [String],
"builder_ids": [String],
"archived": Boolean,
"dashboard_content_id": String,
"organisation_id": String,
"community_id": String,
// Readonly fields
"created_ts": Timestamp,
"created_by": String,
"last_modified_ts": Timestamp,
"last_modified_by": String
}
title
stringThe title of the dashboard, as displayed in the UI
scopes[]
enum(home
,segments
,builders
)The list of scopes where the dashboard is visible. Mandatory, but can be an empty array.
segment_ids[]
stringWhen
scopes
property contains segments
, you can specify a list of segment IDs to only display the dashboard on those specific segments. Mandatory, but can be an empty array.builder_ids[]
stringWhen
scopes
property contains builders
, you can specify a list of standard segment builder IDs to only display the dashboard on those specific builders. Mandatory, but can be an empty array.archived
booleanSet to
true
to hide a dashboard from the UI without deleting it.dashboard_content_id
stringcommunity_id
stringID of the community on which the dashboard is visible.
organisation_id
stringID of the organisation on which the dashboard is visible. Must be on the
community_id
community.created_ts
timestampWhen the dashboard registration was created. ReadOnly.
created_by
user IDBy who the dashboard registration was created. ReadOnly.
last_modified_ts
timestampWhen the dashboard registration was last modified. Not updated when dashboard content is updated as DashboardContent object has its own
created_ts
field. ReadOnly.last_modified_by
user IDBy who the dashboard was last modified. Not updated when dashboard content is updated as DashboardContent object has its own
created_by
field. ReadOnly.This object is returned when doing a
GET
request to get the content of a dashboard. It returns useful metadata as well as dashboard's contentJSON representation
{
"id": String,
"content": DashboardContent
"organisation_id": String,
"created_ts": Timestamp,
"created_by": String
}
id
stringDashboard's JSON representation.
organisation_id
stringID of the organisation on which the dashboard is visible.
created_ts
timestampWhen the dashboard content was created. ReadOnly.
created_by
user IDBy who the dashboard content was created. ReadOnly.
Each time you do a PUT request to update a dashboard's content, a new
DashboardContentWrapper
resource is created with a new ID, and the new resource is associated with the dashboard registration. That means the created_ts
and created_by
fields also represent the last_modified_ts
and last_modified_by
fields you are used to see.This object represents the sections, cards and charts displayed in a dashboard.
JSON representation
{
"sections": [Section]
}
The list of sections inside a dashboard.
A section gives you a title and a new grid to display cards.
JSON representation
{
"title": String,
"cards": [Card],
}
title
stringThe title of the section, displayed in the UI.
The list of cards to display in the section.
A white zone in the section, that displays and organizes charts.
JSON representation
{
"x": Int,
"y": Int,
"h": Int,
"w": Int,
"layout": "vertical" || "horizontal",
"charts": [Chart],
}
x,y,h,w
intThe position of the card in the section's grid. See Sections, cards and charts for a guide on how to use it.
layout
enum(vertical
, horizontal
)Wether charts in the card will stack horizontally or vertically.
The list of charts to display in the card.
A chart displayed in a card.
JSON representation
{
"title": String,
"type": "Pie" || "Bars" || "Radar" || "Metric" || "Area",
"dataset": Dataset,
"options": PieOptions || BarsOptions || RadarOptions || MetricOptions || AreaOptions
}
title
stringThe chart's title, displayed in the UI.
type
enum(Pie
, Bars
, Radar
, Metric
)The type of chart to display
colors[]
stringOptional. You can use this property to override default chart colors, which are defined by the theme of the site. Define as many color codes (in
#FFFFFF
format) as needed by the chart.dataset
object(Dataset)How to get data for the chart
Optional. Options specific to the type of chart that has been selected.
Last modified 8mo ago