openapi: 3.1.0
info:
title: Wikimedia Enterprise API spec articles codes API
description: 'OpenAPI 3.0 specification for the Metadata, On-demand, Snapshot, and Realtime Batch API(s) of WME.
While we provide this swagger spec for quick reference, our official documentation is located on our website:
- [Official Documentation](https://enterprise.wikimedia.com/docs/)
- [Data Dictionary & Schema](https://enterprise.wikimedia.com/docs/data-dictionary/)
'
version: 2.0.0
servers:
- url: https://api.enterprise.wikimedia.com
security:
- bearerAuth: []
tags:
- name: codes
description: Metadata
externalDocs:
description: enterprise docs - metadata
url: https://enterprise.wikimedia.com/docs/metadata/
paths:
/v2/codes:
summary: Project Codes Available
description: 'Lists available project codes (types). Includes project code (type) identifier, name and description.
'
get:
tags:
- codes
parameters:
- in: query
name: fields
description: Select which fields to receive in your response, using JSON dot notation.
schema:
type: array
items:
type: string
example: name
- in: query
name: filters
description: Select which projects and languages to receive in your response.
schema:
type: array
items:
$ref: '#/components/schemas/filter'
responses:
200:
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/code'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"identifier":"string","name":"string","description":"string"} {"identifier":"string","name":"string","description":"string"}
'
401:
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/error'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"message":"string","status": 401}
'
404:
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/error'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"message":"string","status": 404}
'
403:
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/error'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"message":"string","status": 403}
'
422:
description: Unprocessable Entity
content:
application/json:
schema:
$ref: '#/components/schemas/error'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"message":"string","status":422}
'
500:
description: Internal Server Error, Retry Request
content:
application/json:
schema:
$ref: '#/components/schemas/error'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"message":"string","status":500}
'
post:
tags:
- codes
requestBody:
content:
application/json:
schema:
type: object
properties:
fields:
type: array
example: '["name","identifier"]'
description: Select which fields to receive in your response, using JSON dot notation.
items:
type: string
filters:
type: array
description: Select which projects and languages to receive in your response.
items:
$ref: '#/components/schemas/filter'
example: '[{"field": "identifier", "value": "wiki"}]'
responses:
200:
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/code'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"identifier":"string","name":"string","description":"string"} {"identifier":"string","name":"string","description":"string"}
'
401:
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/error'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"message":"string","status": 401}
'
404:
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/error'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"message":"string","status": 404}
'
403:
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/error'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"message":"string","status": 403}
'
422:
description: Unprocessable Entity
content:
application/json:
schema:
$ref: '#/components/schemas/error'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"message":"string","status":422}
'
500:
description: Internal Server Error, Retry Request
content:
application/json:
schema:
$ref: '#/components/schemas/error'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"message":"string","status":500}
'
/v2/codes/{identifier}:
summary: Project Code Info
description: Information on a specific project code (type). Includes identifier, name and description.
get:
tags:
- codes
parameters:
- in: path
name: identifier
description: Identifier of the code.
required: true
schema:
type: string
minLength: 1
- in: query
name: fields
description: Select which fields to receive in your response, using JSON dot notation.
schema:
type: array
items:
type: string
example: name
responses:
200:
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/code'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"identifier":"string","name": "string","description": "string"}
'
401:
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/error'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"message":"string","status": 401}
'
403:
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/error'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"message":"string","status": 403}
'
404:
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/error'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"message":"string","status": 404}
'
422:
description: Unprocessable Entity
content:
application/json:
schema:
$ref: '#/components/schemas/error'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"message":"string","status":422}
'
500:
description: Internal Server Error, Retry Request
content:
application/json:
schema:
$ref: '#/components/schemas/error'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"message":"string","status":500}
'
post:
tags:
- codes
parameters:
- in: path
name: identifier
description: Identifier of the code.
required: true
schema:
type: string
minLength: 1
requestBody:
content:
application/json:
schema:
type: object
properties:
fields:
type: array
example: '["name","identifier"]'
description: Select which fields to receive in your response, using JSON dot notation.
items:
type: string
responses:
200:
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/code'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"identifier":"string","name": "string","description": "string"}
'
401:
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/error'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"message":"string","status": 401}
'
403:
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/error'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"message":"string","status": 403}
'
404:
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/error'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"message":"string","status": 404}
'
422:
description: Unprocessable Entity
content:
application/json:
schema:
$ref: '#/components/schemas/error'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"message":"string","status":422}
'
500:
description: Internal Server Error, Retry Request
content:
application/json:
schema:
$ref: '#/components/schemas/error'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"message":"string","status":500}
'
components:
schemas:
code:
type: object
properties:
identifier:
type: string
name:
type: string
description:
type: string
error:
type: object
properties:
message:
type: string
status:
type: integer
filter:
type: object
properties:
field:
type: string
value:
type: string
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT