lib/swagger/wordpress.yaml

1036 lines
26 KiB
YAML

swagger: "2.0"
info:
title: taxnexus.net WordPress API
description: The Cannabis Tax Compliance Company
version: 5.2.3
contact:
email: info@taxnexus.net
host: taxnexus.net
basePath: /wp-json
tags:
- name: wordpress
schemes:
- https
paths:
/wp/v2/posts:
get:
operationId: wpGetPosts
tags:
- wordpress
consumes:
- application/x-www-form-urlencoded
- multipart/form-data
- application/json
produces:
- application/json
parameters:
- name: context
in: query
description: >-
Scope under which the request is made; determines fields present in
response.
required: false
type: array
items:
type: string
enum:
- view
- embed
- edit
default: view
collectionFormat: multi
- name: page
in: query
description: Current page of the collection.
required: false
type: integer
minimum: 1
format: int64
- name: per_page
in: query
description: Maximum number of items to be returned in result set.
required: false
type: integer
maximum: 100
minimum: 1
format: int64
- name: search
in: query
description: Limit results to those matching a string.
required: false
type: string
- name: after
in: query
description: >-
Limit response to posts published after a given ISO8601 compliant
date.
required: false
type: string
format: date-time
- name: author
in: query
description: Limit result set to posts assigned to specific authors.
required: false
type: array
items:
type: integer
- name: author_exclude
in: query
description: Ensure result set excludes posts assigned to specific authors.
required: false
type: array
items:
type: integer
- name: before
in: query
description: >-
Limit response to posts published before a given ISO8601 compliant
date.
required: false
type: string
format: date-time
- name: exclude
in: query
description: Ensure result set excludes specific IDs.
required: false
type: array
items:
type: integer
- name: include
in: query
description: Limit result set to specific IDs.
required: false
type: array
items:
type: integer
- name: offset
in: query
description: Offset the result set by a specific number of items.
required: false
type: integer
format: int64
- name: order
in: query
description: Order sort attribute ascending or descending.
required: false
type: array
items:
type: string
enum:
- asc
- desc
default: desc
collectionFormat: multi
- name: orderby
in: query
description: Sort collection by object attribute.
required: false
type: array
items:
type: string
enum:
- author
- date
- id
- include
- modified
- parent
- relevance
- slug
- include_slugs
- title
default: date
collectionFormat: multi
- name: slug
in: query
description: Limit result set to posts with one or more specific slugs.
required: false
type: array
items:
type: string
- name: status
in: query
description: Limit result set to posts assigned one or more statuses.
required: false
type: array
items:
type: string
- name: categories
in: query
description: >-
Limit result set to all items that have the specified term assigned
in the categories taxonomy.
required: false
type: array
items:
type: integer
- name: categories_exclude
in: query
description: >-
Limit result set to all items except those that have the specified
term assigned in the categories taxonomy.
required: false
type: array
items:
type: integer
- name: tags
in: query
description: >-
Limit result set to all items that have the specified term assigned
in the tags taxonomy.
required: false
type: array
items:
type: integer
- name: tags_exclude
in: query
description: >-
Limit result set to all items except those that have the specified
term assigned in the tags taxonomy.
required: false
type: array
items:
type: integer
- name: sticky
in: query
description: Limit result set to items that are sticky.
required: false
type: boolean
security:
- basic: []
responses:
"200":
$ref: "#/responses/wpPostResponse"
"400":
description: Bad Request
"404":
description: Not Found
"/wp/v2/posts/{id}":
get:
operationId: wpGetPost
tags:
- wordpress
consumes:
- application/x-www-form-urlencoded
- multipart/form-data
- application/json
produces:
- application/json
parameters:
- name: id
in: path
description: Unique identifier for the object.
required: true
type: integer
format: int64
- name: context
in: query
description: >-
Scope under which the request is made; determines fields present in
response.
required: false
type: array
items:
type: string
enum:
- view
- embed
- edit
default: view
collectionFormat: multi
- name: password
in: query
description: The password for the post if it is password protected.
required: false
type: string
security:
- basic: []
responses:
"200":
$ref: "#/responses/wpPostResponse"
"400":
description: Bad Request
"404":
description: Not Found
/wp/v2/pages:
get:
operationId: wpGetPages
tags:
- wordpress
consumes:
- application/x-www-form-urlencoded
- multipart/form-data
- application/json
produces:
- application/json
parameters:
- name: context
in: query
description: >-
Scope under which the request is made; determines fields present in
response.
required: false
type: array
items:
type: string
enum:
- view
- embed
- edit
default: view
collectionFormat: multi
- name: page
in: query
description: Current page of the collection.
required: false
type: integer
minimum: 1
format: int64
- name: per_page
in: query
description: Maximum number of items to be returned in result set.
required: false
type: integer
maximum: 100
minimum: 1
format: int64
- name: search
in: query
description: Limit results to those matching a string.
required: false
type: string
- name: after
in: query
description: >-
Limit response to posts published after a given ISO8601 compliant
date.
required: false
type: string
format: date-time
- name: author
in: query
description: Limit result set to posts assigned to specific authors.
required: false
type: array
items:
type: integer
- name: author_exclude
in: query
description: Ensure result set excludes posts assigned to specific authors.
required: false
type: array
items:
type: integer
- name: before
in: query
description: >-
Limit response to posts published before a given ISO8601 compliant
date.
required: false
type: string
format: date-time
- name: exclude
in: query
description: Ensure result set excludes specific IDs.
required: false
type: array
items:
type: integer
- name: include
in: query
description: Limit result set to specific IDs.
required: false
type: array
items:
type: integer
- name: menu_order
in: query
description: Limit result set to posts with a specific menu_order value.
required: false
type: integer
format: int64
- name: offset
in: query
description: Offset the result set by a specific number of items.
required: false
type: integer
format: int64
- name: order
in: query
description: Order sort attribute ascending or descending.
required: false
type: array
items:
type: string
enum:
- asc
- desc
default: desc
collectionFormat: multi
- name: orderby
in: query
description: Sort collection by object attribute.
required: false
type: array
items:
type: string
enum:
- author
- date
- id
- include
- modified
- parent
- relevance
- slug
- include_slugs
- title
- menu_order
default: date
collectionFormat: multi
- name: parent
in: query
description: Limit result set to items with particular parent IDs.
required: false
type: array
items:
type: integer
- name: parent_exclude
in: query
description: >-
Limit result set to all items except those of a particular parent
ID.
required: false
type: array
items:
type: integer
- name: slug
in: query
description: Limit result set to posts with one or more specific slugs.
required: false
type: array
items:
type: string
- name: status
in: query
description: Limit result set to posts assigned one or more statuses.
required: false
type: array
items:
type: string
security:
- basic: []
responses:
"200":
$ref: "#/responses/wpPageResponse"
"400":
description: Bad Request
"404":
description: Not Found
"/wp/v2/pages/{id}":
get:
operationId: wpGetPage
tags:
- wordpress
consumes:
- application/x-www-form-urlencoded
- multipart/form-data
- application/json
produces:
- application/json
parameters:
- name: id
in: path
description: Unique identifier for the object.
required: true
type: integer
format: int64
- name: context
in: query
description: >-
Scope under which the request is made; determines fields present in
response.
required: false
type: array
items:
type: string
enum:
- view
- embed
- edit
default: view
collectionFormat: multi
- name: password
in: query
description: The password for the post if it is password protected.
required: false
type: string
security:
- basic: []
responses:
"200":
$ref: "#/responses/wpPageResponse"
"400":
description: Bad Request
"404":
description: Not Found
/wp/v2/media:
get:
operationId: wpGetMedias
tags:
- wordpress
consumes:
- application/x-www-form-urlencoded
- multipart/form-data
- application/json
produces:
- application/json
parameters:
- name: context
in: query
description: >-
Scope under which the request is made; determines fields present in
response.
required: false
type: array
items:
type: string
enum:
- view
- embed
- edit
default: view
collectionFormat: multi
- name: page
in: query
description: Current page of the collection.
required: false
type: integer
minimum: 1
format: int64
- name: per_page
in: query
description: Maximum number of items to be returned in result set.
required: false
type: integer
maximum: 100
minimum: 1
format: int64
- name: search
in: query
description: Limit results to those matching a string.
required: false
type: string
- name: after
in: query
description: >-
Limit response to posts published after a given ISO8601 compliant
date.
required: false
type: string
format: date-time
- name: author
in: query
description: Limit result set to posts assigned to specific authors.
required: false
type: array
items:
type: integer
- name: author_exclude
in: query
description: Ensure result set excludes posts assigned to specific authors.
required: false
type: array
items:
type: integer
- name: before
in: query
description: >-
Limit response to posts published before a given ISO8601 compliant
date.
required: false
type: string
format: date-time
- name: exclude
in: query
description: Ensure result set excludes specific IDs.
required: false
type: array
items:
type: integer
- name: include
in: query
description: Limit result set to specific IDs.
required: false
type: array
items:
type: integer
- name: offset
in: query
description: Offset the result set by a specific number of items.
required: false
type: integer
format: int64
- name: order
in: query
description: Order sort attribute ascending or descending.
required: false
type: array
items:
type: string
enum:
- asc
- desc
default: desc
collectionFormat: multi
- name: orderby
in: query
description: Sort collection by object attribute.
required: false
type: array
items:
type: string
enum:
- author
- date
- id
- include
- modified
- parent
- relevance
- slug
- include_slugs
- title
default: date
collectionFormat: multi
- name: parent
in: query
description: Limit result set to items with particular parent IDs.
required: false
type: array
items:
type: integer
- name: parent_exclude
in: query
description: >-
Limit result set to all items except those of a particular parent
ID.
required: false
type: array
items:
type: integer
- name: slug
in: query
description: Limit result set to posts with one or more specific slugs.
required: false
type: array
items:
type: string
- name: status
in: query
description: Limit result set to posts assigned one or more statuses.
required: false
type: array
items:
type: string
- name: media_type
in: query
description: Limit result set to attachments of a particular media type.
required: false
type: array
items:
type: string
enum:
- image
- video
- text
- application
- audio
collectionFormat: multi
- name: mime_type
in: query
description: Limit result set to attachments of a particular MIME type.
required: false
type: string
security:
- basic: []
responses:
"200":
$ref: "#/responses/wpMediaResponse"
"400":
description: Bad Request
"404":
description: Not Found
"/wp/v2/media/{id}":
get:
operationId: wpGetMedia
tags:
- wordpress
consumes:
- application/x-www-form-urlencoded
- multipart/form-data
- application/json
produces:
- application/json
parameters:
- name: id
in: path
description: Unique identifier for the object.
required: true
type: integer
format: int64
- name: context
in: query
description: >-
Scope under which the request is made; determines fields present in
response.
required: false
type: array
items:
type: string
enum:
- view
- embed
- edit
default: view
collectionFormat: multi
security:
- basic: []
responses:
"200":
$ref: "#/responses/wpMediaResponse"
"400":
description: Bad Request
"404":
description: Not Found
responses:
wpPostResponse:
description: "Wordpress Post Response"
schema:
$ref: "#/definitions/wpPostResponse"
wpPageResponse:
description: "Wordpress Page Response"
schema:
$ref: "#/definitions/wpPageResponse"
wpMediaResponse:
description: "Wordpress Media Response"
schema:
$ref: "#/definitions/wpMediaResponse"
definitions:
wpPostResponse:
description: "WP Post Response Array"
type: "array"
items:
$ref: "#/definitions/wpPage"
wpPageResponse:
description: "WP Page Response Array"
type: "array"
items:
$ref: "#/definitions/wpPost"
wpMediaResponse:
description: "WP Media Response Array"
type: "array"
items:
$ref: "#/definitions/wpMedia"
wpMedia:
properties:
id:
type: "number"
date:
type: "string"
date_gmt:
type: "string"
guid:
required:
- "rendered"
properties:
rendered:
type: "string"
type: "object"
modified:
type: "string"
modified_gmt:
type: "string"
slug:
type: "string"
status:
type: "string"
type:
type: "string"
link:
type: "string"
title:
required:
- "rendered"
properties:
rendered:
type: "string"
type: "object"
author:
type: "number"
comment_status:
type: "string"
ping_status:
type: "string"
template:
type: "string"
meta:
required:
- "amp_status"
- "spay_email"
properties:
amp_status:
type: "string"
spay_email:
type: "string"
type: "object"
jetpack_sharing_enabled:
type: "boolean"
jetpack_shortlink:
type: "string"
jetpack_likes_enabled:
type: "boolean"
description:
required:
- "rendered"
properties:
rendered:
type: "string"
type: "object"
caption:
required:
- "rendered"
properties:
rendered:
type: "string"
type: "object"
alt_text:
type: "string"
media_type:
type: "string"
mime_type:
type: "string"
media_details:
required:
- "width"
- "height"
- "file"
- "sizes"
- "image_meta"
properties:
width:
type: "number"
height:
type: "number"
file:
type: "string"
image_meta:
properties:
aperture:
type: "string"
credit:
type: "string"
camera:
type: "string"
caption:
type: "string"
created_timestamp:
type: "string"
copyright:
type: "string"
focal_length:
type: "string"
iso:
type: "string"
shutter_speed:
type: "string"
title:
type: "string"
orientation:
type: "string"
keywords:
type: "array"
items:
type: "string"
type: "object"
type: "object"
post:
type: "number"
source_url:
type: "string"
_links:
properties:
self:
type: "array"
items:
type: "object"
properties:
href:
type: "string"
collection:
type: "array"
items:
type: "object"
properties:
href:
type: "string"
about:
type: "array"
items:
type: "object"
properties:
href:
type: "string"
author:
type: "array"
items:
type: "object"
properties:
embeddable:
type: "boolean"
href:
type: "string"
replies:
type: "array"
items:
type: "object"
properties:
embeddable:
type: "boolean"
href:
type: "string"
type: "object"
type: "object"
wpPage:
properties:
id:
type: "number"
date:
type: "string"
date_gmt:
type: "string"
guid:
properties:
rendered:
type: "string"
type: "object"
modified:
type: "string"
modified_gmt:
type: "string"
slug:
type: "string"
status:
type: "string"
type:
type: "string"
link:
type: "string"
title:
properties:
rendered:
type: "string"
type: "object"
content:
properties:
rendered:
type: "string"
protected:
type: "boolean"
type: "object"
excerpt:
properties:
rendered:
type: "string"
protected:
type: "boolean"
type: "object"
author:
type: "number"
featured_media:
type: "number"
parent:
type: "number"
menu_order:
type: "number"
comment_status:
type: "string"
ping_status:
type: "string"
template:
type: "string"
meta:
properties:
amp_status:
type: "string"
spay_email:
type: "string"
type: "object"
type: "object"
wpPost:
properties:
id:
type: "number"
date:
type: "string"
date_gmt:
type: "string"
guid:
properties:
rendered:
type: "string"
type: "object"
modified:
type: "string"
modified_gmt:
type: "string"
slug:
type: "string"
status:
type: "string"
type:
type: "string"
link:
type: "string"
title:
properties:
rendered:
type: "string"
type: "object"
content:
properties:
rendered:
type: "string"
protected:
type: "boolean"
type: "object"
excerpt:
properties:
rendered:
type: "string"
protected:
type: "boolean"
type: "object"
author:
type: "number"
featured_media:
type: "number"
parent:
type: "number"
menu_order:
type: "number"
comment_status:
type: "string"
ping_status:
type: "string"
template:
type: "string"
meta:
properties:
amp_status:
type: "string"
spay_email:
type: "string"
type: "object"
type: "object"