Skip to main content
POST
/
widgets
Create widget
curl --request POST \
  --url https://app.azalt.co/api/v1/widgets \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "type": "line_chart",
  "indicatorId": "<string>",
  "dashboardId": "<string>",
  "reportSectionId": "<string>",
  "x": 123,
  "y": 123,
  "w": 123,
  "h": 123
}
'
{
  "id": "<string>",
  "dashboardId": "<string>",
  "reportSectionId": "<string>",
  "relatedModelType": "<string>",
  "relatedModelId": "<string>",
  "name": "<string>",
  "type": "line_chart",
  "indicatorId": "<string>",
  "indicatorName": "<string>",
  "indicatorLabel": "<string>",
  "x": 123,
  "y": 123,
  "w": 123,
  "h": 123,
  "settings": {},
  "filter": {
    "siteIds": [
      "<string>"
    ],
    "startYear": 123,
    "endYear": 123,
    "startDate": "<string>",
    "endDate": "<string>",
    "statuses": [
      "COMPLETED"
    ]
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
name
string
required
type
enum<string>
required
Available options:
line_chart,
bar_chart,
pie_chart,
value,
table,
periodic_values
indicatorId
string
required
dashboardId
string
reportSectionId
string
x
number
y
number
w
number
h
number

Response

Successful response

id
string
required
dashboardId
string | null
required
reportSectionId
string | null
required
name
string
required
type
enum<string>
required
Available options:
line_chart,
bar_chart,
pie_chart,
value,
table,
periodic_values
indicatorId
string
required
indicatorName
string
required
indicatorLabel
string | null
required
x
number | null
required
y
number | null
required
w
number | null
required
h
number | null
required
settings
object
required
filter
object
required