POST
/
v1
/
charts
v1 Create Chart
curl --request POST \
  --url http://api.globalwebindex.com/v1/charts \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "attributes": [
    {
      "datapoint_code": "<string>",
      "namespace_code": "<string>",
      "question_code": "<string>",
      "suffix_code": "<string>"
    }
  ],
  "audiences": [
    {
      "color_index": 123,
      "expression": {
        "and": [
          {}
        ],
        "datapoints": [
          "<string>"
        ],
        "min_count": 123,
        "not": true,
        "or": [
          {}
        ],
        "question": "<string>",
        "suffixes": [
          "<any>"
        ]
      },
      "id": "<string>",
      "is_hidden": true,
      "name": "<string>"
    }
  ],
  "base_audience": {
    "color_index": 123,
    "expression": {
      "and": [
        {}
      ],
      "datapoints": [
        "<string>"
      ],
      "min_count": 123,
      "not": true,
      "or": [
        {}
      ],
      "question": "<string>",
      "suffixes": [
        "<any>"
      ]
    },
    "id": "<string>",
    "is_hidden": true,
    "name": "<string>"
  },
  "color": "<string>",
  "dataset_codes": [
    "<string>"
  ],
  "dataset_names": [
    "<string>"
  ],
  "folder_id": "<string>",
  "group_type": 123,
  "location_codes": [
    "<string>"
  ],
  "metrics": [
    "<string>"
  ],
  "name": "<string>",
  "segmented_base": true,
  "segments": [
    "<string>"
  ],
  "sort_parameter_type": 123,
  "sort_parameter_value": "<string>",
  "sort_type": 123,
  "splitter": "<string>",
  "view_type": 123,
  "wave_codes": [
    "<string>"
  ]
}'
{
  "audience_replacements": [
    {
      "from": "<string>",
      "to": "<string>"
    }
  ],
  "id": "<string>"
}

Authorizations

Authorization
string
header
required

JWT token for authentication

Body

application/json

Chart to create.

The body is of type object.

Response

OK

The response is of type object.