Legendary Entertainment templates API
The templates API from Legendary Entertainment — 7 operation(s) for templates.
The templates API from Legendary Entertainment — 7 operation(s) for templates.
openapi: 3.1.0
info:
title: Legendary Entertainment WordPress REST block-directory templates API
version: wp/v2
description: 'Read-oriented content API exposed by legendary.com: the WordPress REST API (namespace wp/v2) serving Legendary Entertainment news posts, pages, media, categories and tags. Derived by API Evangelist from the live route discovery document at https://www.legendary.com/wp-json/wp/v2 . This is the platform API exposed by the marketing site, NOT a documented first-party Legendary developer program. GET collections are publicly readable without authentication; write operations require WordPress Application Password credentials.'
contact:
name: Legendary Entertainment
url: https://www.legendary.com/about/
servers:
- url: https://www.legendary.com/wp-json/wp/v2
description: Production
tags:
- name: templates
paths:
/templates:
get:
operationId: getTemplates
summary: GET /templates
tags:
- templates
parameters:
- name: area
in: query
required: false
schema:
type: string
description: Limit to the specified template part area.
- name: context
in: query
required: false
schema:
type: string
enum:
- view
- embed
- edit
default: view
description: Scope under which the request is made; determines fields present in response.
- name: post_type
in: query
required: false
schema:
type: string
description: Post type to get the templates for.
- name: wp_id
in: query
required: false
schema:
type: integer
description: Limit to the specified post id.
responses:
'200':
description: Successful response
headers:
X-WP-Total:
description: Total number of records
schema:
type: integer
X-WP-TotalPages:
description: Total number of pages
schema:
type: integer
Link:
description: RFC 8288 pagination links (rel=next/prev)
schema:
type: string
content:
application/json:
schema:
type: object
'400':
$ref: '#/components/responses/Error'
'401':
$ref: '#/components/responses/Error'
'404':
$ref: '#/components/responses/Error'
post:
operationId: createTemplates
summary: POST /templates
tags:
- templates
security:
- applicationPassword: []
responses:
'201':
description: Successful response
content:
application/json:
schema:
type: object
'400':
$ref: '#/components/responses/Error'
'401':
$ref: '#/components/responses/Error'
'404':
$ref: '#/components/responses/Error'
/templates/{id}?)[\/\w%-]+):
parameters:
- name: id
in: path
required: true
schema:
type: integer
get:
operationId: getTemplatesById}?)[\W%]+)
summary: GET /templates/{id}?)[\/\w%-]+)
tags:
- templates
parameters:
- name: context
in: query
required: false
schema:
type: string
enum:
- view
- embed
- edit
default: view
description: Scope under which the request is made; determines fields present in response.
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
'400':
$ref: '#/components/responses/Error'
'401':
$ref: '#/components/responses/Error'
'404':
$ref: '#/components/responses/Error'
post:
operationId: createTemplatesById}?)[\W%]+)
summary: POST /templates/{id}?)[\/\w%-]+)
tags:
- templates
security:
- applicationPassword: []
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
'400':
$ref: '#/components/responses/Error'
'401':
$ref: '#/components/responses/Error'
'404':
$ref: '#/components/responses/Error'
delete:
operationId: deleteTemplatesById}?)[\W%]+)
summary: DELETE /templates/{id}?)[\/\w%-]+)
tags:
- templates
security:
- applicationPassword: []
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
'400':
$ref: '#/components/responses/Error'
'401':
$ref: '#/components/responses/Error'
'404':
$ref: '#/components/responses/Error'
/templates/{id}?)[\/\w%-]+)/autosaves:
parameters:
- name: id
in: path
required: true
schema:
type: integer
get:
operationId: getTemplatesById}?)[\W%]+)Autosaves
summary: GET /templates/{id}?)[\/\w%-]+)/autosaves
tags:
- templates
parameters:
- name: context
in: query
required: false
schema:
type: string
enum:
- view
- embed
- edit
default: view
description: Scope under which the request is made; determines fields present in response.
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
'400':
$ref: '#/components/responses/Error'
'401':
$ref: '#/components/responses/Error'
'404':
$ref: '#/components/responses/Error'
post:
operationId: createTemplatesById}?)[\W%]+)Autosaves
summary: POST /templates/{id}?)[\/\w%-]+)/autosaves
tags:
- templates
security:
- applicationPassword: []
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
'400':
$ref: '#/components/responses/Error'
'401':
$ref: '#/components/responses/Error'
'404':
$ref: '#/components/responses/Error'
/templates/{parent}?)[\/\w%-]+)/autosaves/{id}:
parameters:
- name: parent
in: path
required: true
schema:
type: integer
- name: id
in: path
required: true
schema:
type: integer
get:
operationId: getTemplatesByParent}?)[\W%]+)AutosavesById
summary: GET /templates/{parent}?)[\/\w%-]+)/autosaves/{id}
tags:
- templates
parameters:
- name: context
in: query
required: false
schema:
type: string
enum:
- view
- embed
- edit
default: view
description: Scope under which the request is made; determines fields present in response.
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
'400':
$ref: '#/components/responses/Error'
'401':
$ref: '#/components/responses/Error'
'404':
$ref: '#/components/responses/Error'
/templates/{parent}?)[\/\w%-]+)/revisions:
parameters:
- name: parent
in: path
required: true
schema:
type: integer
get:
operationId: getTemplatesByParent}?)[\W%]+)Revisions
summary: GET /templates/{parent}?)[\/\w%-]+)/revisions
tags:
- templates
parameters:
- name: context
in: query
required: false
schema:
type: string
enum:
- view
- embed
- edit
default: view
description: Scope under which the request is made; determines fields present in response.
- name: exclude
in: query
required: false
schema:
type: array
default: []
description: Ensure result set excludes specific IDs.
- name: include
in: query
required: false
schema:
type: array
default: []
description: Limit result set to specific IDs.
- name: offset
in: query
required: false
schema:
type: integer
description: Offset the result set by a specific number of items.
- name: order
in: query
required: false
schema:
type: string
enum:
- asc
- desc
default: desc
description: Order sort attribute ascending or descending.
- name: orderby
in: query
required: false
schema:
type: string
enum:
- date
- id
- include
- relevance
- slug
- include_slugs
- title
default: date
description: Sort collection by object attribute.
- name: page
in: query
required: false
schema:
type: integer
default: 1
description: Current page of the collection.
- name: per_page
in: query
required: false
schema:
type: integer
description: Maximum number of items to be returned in result set.
- name: search
in: query
required: false
schema:
type: string
description: Limit results to those matching a string.
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
'400':
$ref: '#/components/responses/Error'
'401':
$ref: '#/components/responses/Error'
'404':
$ref: '#/components/responses/Error'
/templates/{parent}?)[\/\w%-]+)/revisions/{id}:
parameters:
- name: parent
in: path
required: true
schema:
type: integer
- name: id
in: path
required: true
schema:
type: integer
get:
operationId: getTemplatesByParent}?)[\W%]+)RevisionsById
summary: GET /templates/{parent}?)[\/\w%-]+)/revisions/{id}
tags:
- templates
parameters:
- name: context
in: query
required: false
schema:
type: string
enum:
- view
- embed
- edit
default: view
description: Scope under which the request is made; determines fields present in response.
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
'400':
$ref: '#/components/responses/Error'
'401':
$ref: '#/components/responses/Error'
'404':
$ref: '#/components/responses/Error'
delete:
operationId: deleteTemplatesByParent}?)[\W%]+)RevisionsById
summary: DELETE /templates/{parent}?)[\/\w%-]+)/revisions/{id}
tags:
- templates
security:
- applicationPassword: []
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
'400':
$ref: '#/components/responses/Error'
'401':
$ref: '#/components/responses/Error'
'404':
$ref: '#/components/responses/Error'
/templates/lookup:
get:
operationId: getTemplatesLookup
summary: GET /templates/lookup
tags:
- templates
parameters:
- name: is_custom
in: query
required: false
schema:
type: boolean
description: Indicates if a template is custom or part of the template hierarchy
- name: slug
in: query
required: true
schema:
type: string
description: The slug of the template to get the fallback for
- name: template_prefix
in: query
required: false
schema:
type: string
description: The template prefix for the created template. This is used to extract the main template type, e.g. in `taxonomy-books` extracts the `taxonomy`
responses:
'200':
description: Successful response
headers:
X-WP-Total:
description: Total number of records
schema:
type: integer
X-WP-TotalPages:
description: Total number of pages
schema:
type: integer
Link:
description: RFC 8288 pagination links (rel=next/prev)
schema:
type: string
content:
application/json:
schema:
type: object
'400':
$ref: '#/components/responses/Error'
'401':
$ref: '#/components/responses/Error'
'404':
$ref: '#/components/responses/Error'
components:
schemas:
Error:
type: object
description: WordPress REST API error envelope (not RFC 9457)
properties:
code:
type: string
message:
type: string
data:
type: object
properties:
status:
type: integer
responses:
Error:
description: WordPress REST error envelope
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
code: rest_post_invalid_id
message: Invalid post ID.
data:
status: 404
securitySchemes:
applicationPassword:
type: http
scheme: basic
description: WordPress Application Passwords, advertised by the site at https://www.legendary.com/wp-admin/authorize-application.php