Last active
June 20, 2017 10:09
-
-
Save thomasleese/33f4760e85fa598d4bcbbeca29a55696 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| swagger: '2.0' | |
| info: | |
| version: 0.1.0 | |
| title: GOV.UK Content API | |
| description: An API for accessing the content available on GOV.UK. | |
| schemes: | |
| - https | |
| host: gov.uk | |
| basePath: /api/content | |
| paths: | |
| /content/{path}: | |
| get: | |
| summary: Get some content. | |
| description: Returns the content at a path. | |
| parameters: | |
| - name: path | |
| in: path | |
| required: true | |
| description: The path of the content | |
| type: string | |
| responses: | |
| 200: | |
| description: A resource | |
| schema: | |
| $ref: '#/definitions/Path' | |
| /content/{content_id}/{locale}/{version}: | |
| get: | |
| summary: Get a versioned piece of content. | |
| description: Returns the content at the path. | |
| parameters: | |
| - name: content_id | |
| in: path | |
| required: true | |
| description: The content ID of the content | |
| type: string | |
| - name: locale | |
| in: path | |
| required: true | |
| description: The locale of the content | |
| type: string | |
| - name: version | |
| in: path | |
| required: true | |
| description: The version of the content | |
| type: integer | |
| responses: | |
| 200: | |
| description: A resource | |
| schema: | |
| $ref: '#/definitions/Path' | |
| definitions: | |
| Path: | |
| required: | |
| - path | |
| - resource | |
| properties: | |
| path: | |
| type: string | |
| resource: | |
| $ref: '#/definitions/Resource' | |
| Resource: | |
| properties: | |
| document: | |
| $ref: '#/definitions/Document' | |
| redirect: | |
| $ref: '#/definitions/Redirect' | |
| gone: | |
| $ref: '#/definitions/Gone' | |
| Document: | |
| required: | |
| - content_id | |
| - locale | |
| - editions | |
| - schema_name | |
| - document_type | |
| - document_supertypes | |
| - first_published_at | |
| properties: | |
| content_id: | |
| type: string | |
| locale: | |
| type: string | |
| editions: | |
| type: array | |
| items: | |
| $ref: '#/definitions/Edition' | |
| schema_name: | |
| type: string | |
| document_type: | |
| type: string | |
| document_supertypes: | |
| $ref: '#/definitions/DocumentSupertypes' | |
| first_published_at: | |
| type: string | |
| format: date-time | |
| DocumentSupertypes: | |
| required: | |
| - government | |
| - navigation | |
| - user_journey | |
| properties: | |
| email: | |
| type: string | |
| government: | |
| type: string | |
| navigation: | |
| type: string | |
| user_journey: | |
| type: string | |
| AccessLimited: | |
| required: | |
| - users | |
| - auth_bypass_ids | |
| properties: | |
| users: | |
| type: array | |
| items: | |
| type: integer | |
| format: int64 | |
| auth_bypass_ids: | |
| type: array | |
| items: | |
| type: integer | |
| format: int64 | |
| Edition: | |
| required: | |
| - id | |
| - title | |
| - description | |
| - need_ids | |
| - public_updated_at | |
| - details | |
| - publishing_app | |
| - rendering_app | |
| - links | |
| - expanded_links | |
| - access_limited | |
| - phase | |
| - analytics_identifier | |
| - payload_version | |
| - request_ids | |
| properties: | |
| id: | |
| type: integer | |
| title: | |
| type: string | |
| description: | |
| type: string | |
| need_ids: | |
| type: array | |
| items: | |
| type: integer | |
| public_updated_at: | |
| type: string | |
| format: date-time | |
| details: | |
| additionalProperties: | |
| type: string | |
| publishing_app: | |
| type: string | |
| rendering_app: | |
| type: string | |
| links: | |
| additionalProperties: | |
| type: string | |
| expanded_links: | |
| additionalProperties: | |
| type: string | |
| access_limited: | |
| $ref: '#/definitions/AccessLimited' | |
| phase: | |
| type: string | |
| analytics_identifier: | |
| type: string | |
| payload_version: | |
| type: integer | |
| request_ids: | |
| $ref: '#/definitions/EditionRequestIds' | |
| EditionRequestIds: | |
| required: | |
| - publishing | |
| properties: | |
| publishing: | |
| type: string | |
| Redirect: | |
| required: | |
| - target | |
| properties: | |
| target: | |
| type: string | |
| WithdrawnNotice: | |
| required: | |
| - explanation | |
| - date | |
| properties: | |
| explanation: | |
| type: string | |
| date: | |
| type: string | |
| format: date-time | |
| Gone: | |
| required: | |
| - withdrawn_notice | |
| properties: | |
| withdrawn_notice: | |
| $ref: '#/definitions/WithdrawnNotice' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment