/navigation
GET
Get a list of topics for site navigation
Parameters
Name | Type | Description |
---|---|---|
lang | query | the 2 character code of the language required in returned labels, e.g. cy for welsh |
Responses
200: Provides a hierarchical list of navigation items with their links, copy, and localisation references.
Example value
{
"description": "Resource describing the structure for the ONS website navbar.",
"type": "object",
"properties": {
"context": {
"description": "The URL to the context file",
"type": "string",
"example": "https://cdn.ons.gov.uk/assets/json-ld/context.json"
},
"description": {
"description": "A description of the navigation",
"type": "string"
},
"items": {
"description": "An array of navigation items",
"type": "array",
"items": {
"description": "A list of navigation items",
"type": "array",
"items": {
"type": "object",
"properties": {
"description": {
"description": "A human-readable description as a string",
"type": "string"
},
"label": {
"description": "The label to be displayed to a user, translated based on the lang parameter",
"type": "string"
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "object",
"properties": {
"href": {
"description": "The URL to the resource.",
"type": "string"
},
"id": {
"description": "The ID of the resource.",
"type": "string"
}
}
}
}
},
"name": {
"description": "A hyphenated reference to the item",
"type": "string"
},
"slug": {
"description": "The slug of the item",
"type": "string"
},
"subtopics": {
"type": "array",
"items": {
"properties": {
"description": {
"description": "A human-readable description as a string",
"type": "string"
},
"label": {
"description": "The label to be displayed to a user, translated based on the lang parameter",
"type": "string"
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "object",
"properties": {
"href": {
"description": "The URL to the resource.",
"type": "string"
},
"id": {
"description": "The ID of the resource.",
"type": "string"
}
}
}
}
},
"name": {
"description": "A hyphenated reference to the item",
"type": "string"
},
"slug": {
"description": "The slug of the item",
"type": "string"
},
"title": {
"description": "A string containing the title of something",
"type": "string"
},
"uri": {
"description": "The path to the resource on the web domain",
"type": "string"
}
}
}
},
"title": {
"description": "A string containing the title of something",
"type": "string"
},
"uri": {
"description": "The path to the resource on the web domain",
"type": "string"
}
}
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "object",
"properties": {
"href": {
"description": "The URL to the resource",
"type": "string"
}
}
}
}
}
}
}
500: Failed to process the request due to an internal error.
Example value
null