Private

Create one or more dimensions

Create one or more dimensions which are related to an instance

patch/instances/{instance_id}/dimensions

Request

  • Base URL
    https://api.beta.ons.gov.uk/v1
  • Auth
    API key in header Authorization

Path parameters

instance_idstring required

A unique id for an instance

Headers

If-Matchstring

Filter resource version, as returned by a previous ETag, to be validated; or '*' to skip the version check

Request body

op'add'

The operation to be made on path.

  • add - Sets the value for the provided path
path'/-' | '/{dimension}/options/{option}/order' | '/{dimension}/options/{option}/node_id'

Path to value that needs to be operated on.

valuestring

A list of dimensions that will be added to the instance.

Example request

[
  {
    "path": "/-",
    "value": "[{\"dimension\": \"dim1\", \"option\": \"op1\"}, {\"dimension\": \"dim1\", \"option\": \"op2\"}, {\"op\": \"add\", \"path\": \"/dim1/options/op1/order\", \"value\": 3}, {\"op\": \"add\", \"path\": \"/dim1/options/op2/node_id\", \"value\": \"node123\"}]"
  }
]

Response

All dimensions were successfully created

op'add'

The operation to be made on path.

  • add - Sets the value for the provided path
path'/-' | '/{dimension}/options/{option}/order' | '/{dimension}/options/{option}/node_id'

Path to value that needs to be operated on.

valuestring

A list of dimensions that will be added to the instance.

Example response

[
  {
    "path": "/-",
    "value": "[{\"dimension\": \"dim1\", \"option\": \"op1\"}, {\"dimension\": \"dim1\", \"option\": \"op2\"}, {\"op\": \"add\", \"path\": \"/dim1/options/op1/order\", \"value\": 3}, {\"op\": \"add\", \"path\": \"/dim1/options/op2/node_id\", \"value\": \"node123\"}]"
  }
]

Changes

No recorded changes to this operation across all 1 revision of this API.