SPA Charts

SPA: Creates a new Chart

Creates a new chart for the authenticated user's client.

POST/api/spa/charts

Authorizations

X-AUTH-TOKEN
stringheaderrequired

Value for the X-AUTH-TOKEN header parameter.

Request Body

application/json
required

The new Chart resource

{
  "identifier": "key1",
  "jsConfiguration": "{type: 'line',data: {labels: ['Jan'...",
  "width": 500,
  "height": 300,
  "bgColor": "transparent",
  "chartJsVersion": "4",
  "templates": [
    "string"
  ],
  "subClient": {},
  "brandIdentifier": "default",
  "active": true,
  "activeFrom": "2024-01-01",
  "subClientDefault": false
}

Response

201application/json

Chart resource created

id
integer

Identifier generated by Output.Rocks.

Example: 12345

identifier
stringrequired

Unique identifier

Example: "key1"

jsConfiguration
string

Chart configuration. <<>> syntax is supported.

Example: "{type: 'line',data: {labels: ['Jan'..."

width
integer

Chart width

Example: 500

height
integer

Chart height

Example: 300

bgColor
string

Chart background color

Example: "transparent"

chartJsVersion
string

Chart JS version

Example: "4"

templates
string[]
createdBy
string

User, created this entry

Example: "user1@company.com"

updatedBy
string

User, updated this entry

Example: "user1@company.com"

createdAt
string<date-time>

UTC date time of entry creation

Example: "2024-08-23T00:00:00+00:00"

updatedAt
string<date-time>

UTC date time of last entry update

Example: "2024-08-23T00:00:00+00:00"

brandIdentifier
stringrequired

Example: "default"

active
boolean

Active flag. Default: true

Available options: truefalse

Example: true

activeFrom
string<date-time>

Date to activate the entry. Default: today

Example: "2024-01-01"

subClientDefault
boolean

Default for environmental tenants (sub-clients)

Available options: truefalse

Example: false

subClientId
integer

SubClient ID. Provided on instances with enabled sub-client module only.

Example: 3

subClientDescription
string

SubClient description. Provided on instances with enabled sub-client module only.

Example: "Branch Office A"