/topics

GET

Gets a public list of top-level root topics.

Responses

200: JSON object containing a list of all available root topics.

Example value
{
  "description": "A list of topics.",
  "type": "object",
  "properties": {
    "context": {
      "description": "The URL to the context file.",
      "type": "string",
      "example": "https://cdn.ons.gov.uk/assets/json-ld/context.json"
    },
    "count": {
      "description": "The number of results returned in this response.",
      "type": "integer"
    },
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "description": {
            "description": "A description of the topic.",
            "type": "string"
          },
          "id": {
            "description": "The ID of the topic.",
            "type": "string"
          },
          "keywords": {
            "description": "List of keywords that relate to the topic.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "content": {
                "description": "A link to the content for this topic.",
                "type": "object",
                "properties": {
                  "href": {
                    "description": "A URL to the content for this topic.",
                    "type": "string"
                  }
                }
              },
              "self": {
                "type": "object",
                "properties": {
                  "href": {
                    "description": "The URL to the resource.",
                    "type": "string"
                  },
                  "id": {
                    "description": "The ID of the resource.",
                    "type": "string"
                  }
                }
              },
              "subtopics": {
                "description": "A link to the subtopics of this topic.",
                "type": "object",
                "properties": {
                  "href": {
                    "description": "A URL to the subtopics of this topic.",
                    "type": "string"
                  }
                }
              }
            }
          },
          "slug": {
            "description": "The slug of the topic.",
            "type": "string",
            "example": "businessindustryandtrade"
          },
          "state": {
            "description": "The state of the resource.",
            "type": "string",
            "enum": [
              "created",
              "published",
              "completed"
            ]
          },
          "subtopics_ids": {
            "description": "Array of subtopic IDs.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "title": {
            "description": "The title of the topic.",
            "type": "string",
            "example": "Business, Industry and Trade"
          }
        }
      }
    },
    "limit": {
      "description": "The limit applied to the number of results returned.",
      "type": "integer"
    },
    "offset_index": {
      "description": "The offset applied to the number of results returned",
      "type": "integer"
    },
    "total_count": {
      "description": "The total number of results available.",
      "type": "integer"
    }
  }
}

500: Failed to process the request due to an internal error.

Example value
null