media.json•66.4 kB
{
"/wp/v2/media": {
"namespace": "wp/v2",
"methods": [
"GET",
"POST"
],
"endpoints": [
{
"methods": [
"GET"
],
"args": {
"context": {
"description": "Scope under which the request is made; determines fields present in response.",
"type": "string",
"enum": [
"view",
"embed",
"edit"
],
"default": "view",
"required": false
},
"page": {
"description": "Current page of the collection.",
"type": "integer",
"default": 1,
"minimum": 1,
"required": false
},
"per_page": {
"description": "Maximum number of items to be returned in result set.",
"type": "integer",
"default": 10,
"minimum": 1,
"maximum": 100,
"required": false
},
"search": {
"description": "Limit results to those matching a string.",
"type": "string",
"required": false
},
"after": {
"description": "Limit response to posts published after a given ISO8601 compliant date.",
"type": "string",
"format": "date-time",
"required": false
},
"modified_after": {
"description": "Limit response to posts modified after a given ISO8601 compliant date.",
"type": "string",
"format": "date-time",
"required": false
},
"author": {
"description": "Limit result set to posts assigned to specific authors.",
"type": "array",
"items": {
"type": "integer"
},
"default": [],
"required": false
},
"author_exclude": {
"description": "Ensure result set excludes posts assigned to specific authors.",
"type": "array",
"items": {
"type": "integer"
},
"default": [],
"required": false
},
"before": {
"description": "Limit response to posts published before a given ISO8601 compliant date.",
"type": "string",
"format": "date-time",
"required": false
},
"modified_before": {
"description": "Limit response to posts modified before a given ISO8601 compliant date.",
"type": "string",
"format": "date-time",
"required": false
},
"exclude": {
"description": "Ensure result set excludes specific IDs.",
"type": "array",
"items": {
"type": "integer"
},
"default": [],
"required": false
},
"include": {
"description": "Limit result set to specific IDs.",
"type": "array",
"items": {
"type": "integer"
},
"default": [],
"required": false
},
"search_semantics": {
"description": "How to interpret the search input.",
"type": "string",
"enum": [
"exact"
],
"required": false
},
"offset": {
"description": "Offset the result set by a specific number of items.",
"type": "integer",
"required": false
},
"order": {
"description": "Order sort attribute ascending or descending.",
"type": "string",
"default": "desc",
"enum": [
"asc",
"desc"
],
"required": false
},
"orderby": {
"description": "Sort collection by post attribute.",
"type": "string",
"default": "date",
"enum": [
"author",
"date",
"id",
"include",
"modified",
"parent",
"relevance",
"slug",
"include_slugs",
"title"
],
"required": false
},
"parent": {
"description": "Limit result set to items with particular parent IDs.",
"type": "array",
"items": {
"type": "integer"
},
"default": [],
"required": false
},
"parent_exclude": {
"description": "Limit result set to all items except those of a particular parent ID.",
"type": "array",
"items": {
"type": "integer"
},
"default": [],
"required": false
},
"search_columns": {
"default": [],
"description": "Array of column names to be searched.",
"type": "array",
"items": {
"enum": [
"post_title",
"post_content",
"post_excerpt"
],
"type": "string"
},
"required": false
},
"slug": {
"description": "Limit result set to posts with one or more specific slugs.",
"type": "array",
"items": {
"type": "string"
},
"required": false
},
"status": {
"default": "inherit",
"description": "Limit result set to posts assigned one or more statuses.",
"type": "array",
"items": {
"enum": [
"inherit",
"private",
"trash"
],
"type": "string"
},
"required": false
},
"media_type": {
"default": null,
"description": "Limit result set to attachments of a particular media type.",
"type": "string",
"enum": [
"image",
"video",
"text",
"application",
"audio"
],
"required": false
},
"mime_type": {
"default": null,
"description": "Limit result set to attachments of a particular MIME type.",
"type": "string",
"required": false
}
}
},
{
"methods": [
"POST"
],
"args": {
"date": {
"description": "The date the post was published, in the site's timezone.",
"type": [
"string",
"null"
],
"format": "date-time",
"required": false
},
"date_gmt": {
"description": "The date the post was published, as GMT.",
"type": [
"string",
"null"
],
"format": "date-time",
"required": false
},
"slug": {
"description": "An alphanumeric identifier for the post unique to its type.",
"type": "string",
"required": false
},
"status": {
"description": "A named status for the post.",
"type": "string",
"enum": [
"publish",
"future",
"draft",
"pending",
"private"
],
"required": false
},
"title": {
"description": "The title for the post.",
"type": "object",
"properties": {
"raw": {
"description": "Title for the post, as it exists in the database.",
"type": "string",
"context": [
"edit"
]
},
"rendered": {
"description": "HTML title for the post, transformed for display.",
"type": "string",
"context": [
"view",
"edit",
"embed"
],
"readonly": true
}
},
"required": false
},
"author": {
"description": "The ID for the author of the post.",
"type": "integer",
"required": false
},
"featured_media": {
"description": "The ID of the featured media for the post.",
"type": "integer",
"required": false
},
"comment_status": {
"description": "Whether or not comments are open on the post.",
"type": "string",
"enum": [
"open",
"closed"
],
"required": false
},
"ping_status": {
"description": "Whether or not the post can be pinged.",
"type": "string",
"enum": [
"open",
"closed"
],
"required": false
},
"meta": {
"description": "Meta fields.",
"type": "object",
"properties": {
"_uag_custom_page_level_css": {
"type": "string",
"title": "",
"description": "",
"default": ""
},
"site-sidebar-layout": {
"type": "string",
"title": "",
"description": "",
"default": "default"
},
"site-content-layout": {
"type": "string",
"title": "",
"description": "",
"default": ""
},
"ast-site-content-layout": {
"type": "string",
"title": "",
"description": "",
"default": "default"
},
"site-content-style": {
"type": "string",
"title": "",
"description": "",
"default": "default"
},
"site-sidebar-style": {
"type": "string",
"title": "",
"description": "",
"default": "default"
},
"ast-global-header-display": {
"type": "string",
"title": "",
"description": "",
"default": ""
},
"ast-banner-title-visibility": {
"type": "string",
"title": "",
"description": "",
"default": ""
},
"ast-main-header-display": {
"type": "string",
"title": "",
"description": "",
"default": ""
},
"ast-hfb-above-header-display": {
"type": "string",
"title": "",
"description": "",
"default": ""
},
"ast-hfb-below-header-display": {
"type": "string",
"title": "",
"description": "",
"default": ""
},
"ast-hfb-mobile-header-display": {
"type": "string",
"title": "",
"description": "",
"default": ""
},
"site-post-title": {
"type": "string",
"title": "",
"description": "",
"default": ""
},
"ast-breadcrumbs-content": {
"type": "string",
"title": "",
"description": "",
"default": ""
},
"ast-featured-img": {
"type": "string",
"title": "",
"description": "",
"default": ""
},
"footer-sml-layout": {
"type": "string",
"title": "",
"description": "",
"default": ""
},
"theme-transparent-header-meta": {
"type": "string",
"title": "",
"description": "",
"default": ""
},
"adv-header-id-meta": {
"type": "string",
"title": "",
"description": "",
"default": ""
},
"stick-header-meta": {
"type": "string",
"title": "",
"description": "",
"default": ""
},
"header-above-stick-meta": {
"type": "string",
"title": "",
"description": "",
"default": ""
},
"header-main-stick-meta": {
"type": "string",
"title": "",
"description": "",
"default": ""
},
"header-below-stick-meta": {
"type": "string",
"title": "",
"description": "",
"default": ""
},
"astra-migrate-meta-layouts": {
"type": "string",
"title": "",
"description": "",
"default": "default"
},
"ast-page-background-enabled": {
"type": "string",
"title": "",
"description": "",
"default": "default"
},
"ast-page-background-meta": {
"type": "object",
"title": "",
"description": "",
"default": {
"desktop": {
"background-color": "var(--ast-global-color-4)",
"background-image": "",
"background-repeat": "repeat",
"background-position": "center center",
"background-size": "auto",
"background-attachment": "scroll",
"background-type": "",
"background-media": "",
"overlay-type": "",
"overlay-color": "",
"overlay-opacity": "",
"overlay-gradient": ""
},
"tablet": {
"background-color": "",
"background-image": "",
"background-repeat": "repeat",
"background-position": "center center",
"background-size": "auto",
"background-attachment": "scroll",
"background-type": "",
"background-media": "",
"overlay-type": "",
"overlay-color": "",
"overlay-opacity": "",
"overlay-gradient": ""
},
"mobile": {
"background-color": "",
"background-image": "",
"background-repeat": "repeat",
"background-position": "center center",
"background-size": "auto",
"background-attachment": "scroll",
"background-type": "",
"background-media": "",
"overlay-type": "",
"overlay-color": "",
"overlay-opacity": "",
"overlay-gradient": ""
}
},
"properties": {
"desktop": {
"type": "object",
"properties": {
"background-color": {
"type": "string"
},
"background-image": {
"type": "string"
},
"background-repeat": {
"type": "string"
},
"background-position": {
"type": "string"
},
"background-size": {
"type": "string"
},
"background-attachment": {
"type": "string"
},
"background-type": {
"type": "string"
},
"background-media": {
"type": "string"
},
"overlay-type": {
"type": "string"
},
"overlay-color": {
"type": "string"
},
"overlay-opacity": {
"type": "string"
},
"overlay-gradient": {
"type": "string"
}
},
"additionalProperties": false
},
"tablet": {
"type": "object",
"properties": {
"background-color": {
"type": "string"
},
"background-image": {
"type": "string"
},
"background-repeat": {
"type": "string"
},
"background-position": {
"type": "string"
},
"background-size": {
"type": "string"
},
"background-attachment": {
"type": "string"
},
"background-type": {
"type": "string"
},
"background-media": {
"type": "string"
},
"overlay-type": {
"type": "string"
},
"overlay-color": {
"type": "string"
},
"overlay-opacity": {
"type": "string"
},
"overlay-gradient": {
"type": "string"
}
},
"additionalProperties": false
},
"mobile": {
"type": "object",
"properties": {
"background-color": {
"type": "string"
},
"background-image": {
"type": "string"
},
"background-repeat": {
"type": "string"
},
"background-position": {
"type": "string"
},
"background-size": {
"type": "string"
},
"background-attachment": {
"type": "string"
},
"background-type": {
"type": "string"
},
"background-media": {
"type": "string"
},
"overlay-type": {
"type": "string"
},
"overlay-color": {
"type": "string"
},
"overlay-opacity": {
"type": "string"
},
"overlay-gradient": {
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"ast-content-background-meta": {
"type": "object",
"title": "",
"description": "",
"default": {
"desktop": {
"background-color": "var(--ast-global-color-5)",
"background-image": "",
"background-repeat": "repeat",
"background-position": "center center",
"background-size": "auto",
"background-attachment": "scroll",
"background-type": "",
"background-media": "",
"overlay-type": "",
"overlay-color": "",
"overlay-opacity": "",
"overlay-gradient": ""
},
"tablet": {
"background-color": "var(--ast-global-color-5)",
"background-image": "",
"background-repeat": "repeat",
"background-position": "center center",
"background-size": "auto",
"background-attachment": "scroll",
"background-type": "",
"background-media": "",
"overlay-type": "",
"overlay-color": "",
"overlay-opacity": "",
"overlay-gradient": ""
},
"mobile": {
"background-color": "var(--ast-global-color-5)",
"background-image": "",
"background-repeat": "repeat",
"background-position": "center center",
"background-size": "auto",
"background-attachment": "scroll",
"background-type": "",
"background-media": "",
"overlay-type": "",
"overlay-color": "",
"overlay-opacity": "",
"overlay-gradient": ""
}
},
"properties": {
"desktop": {
"type": "object",
"properties": {
"background-color": {
"type": "string"
},
"background-image": {
"type": "string"
},
"background-repeat": {
"type": "string"
},
"background-position": {
"type": "string"
},
"background-size": {
"type": "string"
},
"background-attachment": {
"type": "string"
},
"background-type": {
"type": "string"
},
"background-media": {
"type": "string"
},
"overlay-type": {
"type": "string"
},
"overlay-color": {
"type": "string"
},
"overlay-opacity": {
"type": "string"
},
"overlay-gradient": {
"type": "string"
}
},
"additionalProperties": false
},
"tablet": {
"type": "object",
"properties": {
"background-color": {
"type": "string"
},
"background-image": {
"type": "string"
},
"background-repeat": {
"type": "string"
},
"background-position": {
"type": "string"
},
"background-size": {
"type": "string"
},
"background-attachment": {
"type": "string"
},
"background-type": {
"type": "string"
},
"background-media": {
"type": "string"
},
"overlay-type": {
"type": "string"
},
"overlay-color": {
"type": "string"
},
"overlay-opacity": {
"type": "string"
},
"overlay-gradient": {
"type": "string"
}
},
"additionalProperties": false
},
"mobile": {
"type": "object",
"properties": {
"background-color": {
"type": "string"
},
"background-image": {
"type": "string"
},
"background-repeat": {
"type": "string"
},
"background-position": {
"type": "string"
},
"background-size": {
"type": "string"
},
"background-attachment": {
"type": "string"
},
"background-type": {
"type": "string"
},
"background-media": {
"type": "string"
},
"overlay-type": {
"type": "string"
},
"overlay-color": {
"type": "string"
},
"overlay-opacity": {
"type": "string"
},
"overlay-gradient": {
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
},
"required": false
},
"template": {
"description": "The theme file to use to display the post.",
"type": "string",
"required": false
},
"alt_text": {
"description": "Alternative text to display when attachment is not displayed.",
"type": "string",
"required": false
},
"caption": {
"description": "The attachment caption.",
"type": "object",
"properties": {
"raw": {
"description": "Caption for the attachment, as it exists in the database.",
"type": "string",
"context": [
"edit"
]
},
"rendered": {
"description": "HTML caption for the attachment, transformed for display.",
"type": "string",
"context": [
"view",
"edit",
"embed"
],
"readonly": true
}
},
"required": false
},
"description": {
"description": "The attachment description.",
"type": "object",
"properties": {
"raw": {
"description": "Description for the attachment, as it exists in the database.",
"type": "string",
"context": [
"edit"
]
},
"rendered": {
"description": "HTML description for the attachment, transformed for display.",
"type": "string",
"context": [
"view",
"edit"
],
"readonly": true
}
},
"required": false
},
"post": {
"description": "The ID for the associated post of the attachment.",
"type": "integer",
"required": false
}
}
}
],
"_links": {
"self": [
{
"href": "https://therift.se/wp-json/wp/v2/media"
}
]
}
},
"/wp/v2/media/(?P<id>[\\d]+)": {
"namespace": "wp/v2",
"methods": [
"GET",
"POST",
"PUT",
"PATCH",
"DELETE"
],
"endpoints": [
{
"methods": [
"GET"
],
"args": {
"id": {
"description": "Unique identifier for the post.",
"type": "integer",
"required": false
},
"context": {
"description": "Scope under which the request is made; determines fields present in response.",
"type": "string",
"enum": [
"view",
"embed",
"edit"
],
"default": "view",
"required": false
}
}
},
{
"methods": [
"POST",
"PUT",
"PATCH"
],
"args": {
"id": {
"description": "Unique identifier for the post.",
"type": "integer",
"required": false
},
"date": {
"description": "The date the post was published, in the site's timezone.",
"type": [
"string",
"null"
],
"format": "date-time",
"required": false
},
"date_gmt": {
"description": "The date the post was published, as GMT.",
"type": [
"string",
"null"
],
"format": "date-time",
"required": false
},
"slug": {
"description": "An alphanumeric identifier for the post unique to its type.",
"type": "string",
"required": false
},
"status": {
"description": "A named status for the post.",
"type": "string",
"enum": [
"publish",
"future",
"draft",
"pending",
"private"
],
"required": false
},
"title": {
"description": "The title for the post.",
"type": "object",
"properties": {
"raw": {
"description": "Title for the post, as it exists in the database.",
"type": "string",
"context": [
"edit"
]
},
"rendered": {
"description": "HTML title for the post, transformed for display.",
"type": "string",
"context": [
"view",
"edit",
"embed"
],
"readonly": true
}
},
"required": false
},
"author": {
"description": "The ID for the author of the post.",
"type": "integer",
"required": false
},
"featured_media": {
"description": "The ID of the featured media for the post.",
"type": "integer",
"required": false
},
"comment_status": {
"description": "Whether or not comments are open on the post.",
"type": "string",
"enum": [
"open",
"closed"
],
"required": false
},
"ping_status": {
"description": "Whether or not the post can be pinged.",
"type": "string",
"enum": [
"open",
"closed"
],
"required": false
},
"meta": {
"description": "Meta fields.",
"type": "object",
"properties": {
"_uag_custom_page_level_css": {
"type": "string",
"title": "",
"description": "",
"default": ""
},
"site-sidebar-layout": {
"type": "string",
"title": "",
"description": "",
"default": "default"
},
"site-content-layout": {
"type": "string",
"title": "",
"description": "",
"default": ""
},
"ast-site-content-layout": {
"type": "string",
"title": "",
"description": "",
"default": "default"
},
"site-content-style": {
"type": "string",
"title": "",
"description": "",
"default": "default"
},
"site-sidebar-style": {
"type": "string",
"title": "",
"description": "",
"default": "default"
},
"ast-global-header-display": {
"type": "string",
"title": "",
"description": "",
"default": ""
},
"ast-banner-title-visibility": {
"type": "string",
"title": "",
"description": "",
"default": ""
},
"ast-main-header-display": {
"type": "string",
"title": "",
"description": "",
"default": ""
},
"ast-hfb-above-header-display": {
"type": "string",
"title": "",
"description": "",
"default": ""
},
"ast-hfb-below-header-display": {
"type": "string",
"title": "",
"description": "",
"default": ""
},
"ast-hfb-mobile-header-display": {
"type": "string",
"title": "",
"description": "",
"default": ""
},
"site-post-title": {
"type": "string",
"title": "",
"description": "",
"default": ""
},
"ast-breadcrumbs-content": {
"type": "string",
"title": "",
"description": "",
"default": ""
},
"ast-featured-img": {
"type": "string",
"title": "",
"description": "",
"default": ""
},
"footer-sml-layout": {
"type": "string",
"title": "",
"description": "",
"default": ""
},
"theme-transparent-header-meta": {
"type": "string",
"title": "",
"description": "",
"default": ""
},
"adv-header-id-meta": {
"type": "string",
"title": "",
"description": "",
"default": ""
},
"stick-header-meta": {
"type": "string",
"title": "",
"description": "",
"default": ""
},
"header-above-stick-meta": {
"type": "string",
"title": "",
"description": "",
"default": ""
},
"header-main-stick-meta": {
"type": "string",
"title": "",
"description": "",
"default": ""
},
"header-below-stick-meta": {
"type": "string",
"title": "",
"description": "",
"default": ""
},
"astra-migrate-meta-layouts": {
"type": "string",
"title": "",
"description": "",
"default": "default"
},
"ast-page-background-enabled": {
"type": "string",
"title": "",
"description": "",
"default": "default"
},
"ast-page-background-meta": {
"type": "object",
"title": "",
"description": "",
"default": {
"desktop": {
"background-color": "var(--ast-global-color-4)",
"background-image": "",
"background-repeat": "repeat",
"background-position": "center center",
"background-size": "auto",
"background-attachment": "scroll",
"background-type": "",
"background-media": "",
"overlay-type": "",
"overlay-color": "",
"overlay-opacity": "",
"overlay-gradient": ""
},
"tablet": {
"background-color": "",
"background-image": "",
"background-repeat": "repeat",
"background-position": "center center",
"background-size": "auto",
"background-attachment": "scroll",
"background-type": "",
"background-media": "",
"overlay-type": "",
"overlay-color": "",
"overlay-opacity": "",
"overlay-gradient": ""
},
"mobile": {
"background-color": "",
"background-image": "",
"background-repeat": "repeat",
"background-position": "center center",
"background-size": "auto",
"background-attachment": "scroll",
"background-type": "",
"background-media": "",
"overlay-type": "",
"overlay-color": "",
"overlay-opacity": "",
"overlay-gradient": ""
}
},
"properties": {
"desktop": {
"type": "object",
"properties": {
"background-color": {
"type": "string"
},
"background-image": {
"type": "string"
},
"background-repeat": {
"type": "string"
},
"background-position": {
"type": "string"
},
"background-size": {
"type": "string"
},
"background-attachment": {
"type": "string"
},
"background-type": {
"type": "string"
},
"background-media": {
"type": "string"
},
"overlay-type": {
"type": "string"
},
"overlay-color": {
"type": "string"
},
"overlay-opacity": {
"type": "string"
},
"overlay-gradient": {
"type": "string"
}
},
"additionalProperties": false
},
"tablet": {
"type": "object",
"properties": {
"background-color": {
"type": "string"
},
"background-image": {
"type": "string"
},
"background-repeat": {
"type": "string"
},
"background-position": {
"type": "string"
},
"background-size": {
"type": "string"
},
"background-attachment": {
"type": "string"
},
"background-type": {
"type": "string"
},
"background-media": {
"type": "string"
},
"overlay-type": {
"type": "string"
},
"overlay-color": {
"type": "string"
},
"overlay-opacity": {
"type": "string"
},
"overlay-gradient": {
"type": "string"
}
},
"additionalProperties": false
},
"mobile": {
"type": "object",
"properties": {
"background-color": {
"type": "string"
},
"background-image": {
"type": "string"
},
"background-repeat": {
"type": "string"
},
"background-position": {
"type": "string"
},
"background-size": {
"type": "string"
},
"background-attachment": {
"type": "string"
},
"background-type": {
"type": "string"
},
"background-media": {
"type": "string"
},
"overlay-type": {
"type": "string"
},
"overlay-color": {
"type": "string"
},
"overlay-opacity": {
"type": "string"
},
"overlay-gradient": {
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"ast-content-background-meta": {
"type": "object",
"title": "",
"description": "",
"default": {
"desktop": {
"background-color": "var(--ast-global-color-5)",
"background-image": "",
"background-repeat": "repeat",
"background-position": "center center",
"background-size": "auto",
"background-attachment": "scroll",
"background-type": "",
"background-media": "",
"overlay-type": "",
"overlay-color": "",
"overlay-opacity": "",
"overlay-gradient": ""
},
"tablet": {
"background-color": "var(--ast-global-color-5)",
"background-image": "",
"background-repeat": "repeat",
"background-position": "center center",
"background-size": "auto",
"background-attachment": "scroll",
"background-type": "",
"background-media": "",
"overlay-type": "",
"overlay-color": "",
"overlay-opacity": "",
"overlay-gradient": ""
},
"mobile": {
"background-color": "var(--ast-global-color-5)",
"background-image": "",
"background-repeat": "repeat",
"background-position": "center center",
"background-size": "auto",
"background-attachment": "scroll",
"background-type": "",
"background-media": "",
"overlay-type": "",
"overlay-color": "",
"overlay-opacity": "",
"overlay-gradient": ""
}
},
"properties": {
"desktop": {
"type": "object",
"properties": {
"background-color": {
"type": "string"
},
"background-image": {
"type": "string"
},
"background-repeat": {
"type": "string"
},
"background-position": {
"type": "string"
},
"background-size": {
"type": "string"
},
"background-attachment": {
"type": "string"
},
"background-type": {
"type": "string"
},
"background-media": {
"type": "string"
},
"overlay-type": {
"type": "string"
},
"overlay-color": {
"type": "string"
},
"overlay-opacity": {
"type": "string"
},
"overlay-gradient": {
"type": "string"
}
},
"additionalProperties": false
},
"tablet": {
"type": "object",
"properties": {
"background-color": {
"type": "string"
},
"background-image": {
"type": "string"
},
"background-repeat": {
"type": "string"
},
"background-position": {
"type": "string"
},
"background-size": {
"type": "string"
},
"background-attachment": {
"type": "string"
},
"background-type": {
"type": "string"
},
"background-media": {
"type": "string"
},
"overlay-type": {
"type": "string"
},
"overlay-color": {
"type": "string"
},
"overlay-opacity": {
"type": "string"
},
"overlay-gradient": {
"type": "string"
}
},
"additionalProperties": false
},
"mobile": {
"type": "object",
"properties": {
"background-color": {
"type": "string"
},
"background-image": {
"type": "string"
},
"background-repeat": {
"type": "string"
},
"background-position": {
"type": "string"
},
"background-size": {
"type": "string"
},
"background-attachment": {
"type": "string"
},
"background-type": {
"type": "string"
},
"background-media": {
"type": "string"
},
"overlay-type": {
"type": "string"
},
"overlay-color": {
"type": "string"
},
"overlay-opacity": {
"type": "string"
},
"overlay-gradient": {
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
},
"required": false
},
"template": {
"description": "The theme file to use to display the post.",
"type": "string",
"required": false
},
"alt_text": {
"description": "Alternative text to display when attachment is not displayed.",
"type": "string",
"required": false
},
"caption": {
"description": "The attachment caption.",
"type": "object",
"properties": {
"raw": {
"description": "Caption for the attachment, as it exists in the database.",
"type": "string",
"context": [
"edit"
]
},
"rendered": {
"description": "HTML caption for the attachment, transformed for display.",
"type": "string",
"context": [
"view",
"edit",
"embed"
],
"readonly": true
}
},
"required": false
},
"description": {
"description": "The attachment description.",
"type": "object",
"properties": {
"raw": {
"description": "Description for the attachment, as it exists in the database.",
"type": "string",
"context": [
"edit"
]
},
"rendered": {
"description": "HTML description for the attachment, transformed for display.",
"type": "string",
"context": [
"view",
"edit"
],
"readonly": true
}
},
"required": false
},
"post": {
"description": "The ID for the associated post of the attachment.",
"type": "integer",
"required": false
}
}
},
{
"methods": [
"DELETE"
],
"args": {
"id": {
"description": "Unique identifier for the post.",
"type": "integer",
"required": false
},
"force": {
"type": "boolean",
"default": false,
"description": "Whether to bypass Trash and force deletion.",
"required": false
}
}
}
]
},
"/wp/v2/media/(?P<id>[\\d]+)/post-process": {
"namespace": "wp/v2",
"methods": [
"POST"
],
"endpoints": [
{
"methods": [
"POST"
],
"args": {
"id": {
"description": "Unique identifier for the attachment.",
"type": "integer",
"required": false
},
"action": {
"type": "string",
"enum": [
"create-image-subsizes"
],
"required": true
}
}
}
]
},
"/wp/v2/media/(?P<id>[\\d]+)/edit": {
"namespace": "wp/v2",
"methods": [
"POST"
],
"endpoints": [
{
"methods": [
"POST"
],
"args": {
"src": {
"description": "URL to the edited image file.",
"type": "string",
"format": "uri",
"required": true
},
"modifiers": {
"description": "Array of image edits.",
"type": "array",
"minItems": 1,
"items": {
"description": "Image edit.",
"type": "object",
"required": [
"type",
"args"
],
"oneOf": [
{
"title": "Rotation",
"properties": {
"type": {
"description": "Rotation type.",
"type": "string",
"enum": [
"rotate"
]
},
"args": {
"description": "Rotation arguments.",
"type": "object",
"required": [
"angle"
],
"properties": {
"angle": {
"description": "Angle to rotate clockwise in degrees.",
"type": "number"
}
}
}
}
},
{
"title": "Crop",
"properties": {
"type": {
"description": "Crop type.",
"type": "string",
"enum": [
"crop"
]
},
"args": {
"description": "Crop arguments.",
"type": "object",
"required": [
"left",
"top",
"width",
"height"
],
"properties": {
"left": {
"description": "Horizontal position from the left to begin the crop as a percentage of the image width.",
"type": "number"
},
"top": {
"description": "Vertical position from the top to begin the crop as a percentage of the image height.",
"type": "number"
},
"width": {
"description": "Width of the crop as a percentage of the image width.",
"type": "number"
},
"height": {
"description": "Height of the crop as a percentage of the image height.",
"type": "number"
}
}
}
}
}
]
},
"required": false
},
"rotation": {
"description": "The amount to rotate the image clockwise in degrees. DEPRECATED: Use `modifiers` instead.",
"type": "integer",
"minimum": 0,
"exclusiveMinimum": true,
"maximum": 360,
"exclusiveMaximum": true,
"required": false
},
"x": {
"description": "As a percentage of the image, the x position to start the crop from. DEPRECATED: Use `modifiers` instead.",
"type": "number",
"minimum": 0,
"maximum": 100,
"required": false
},
"y": {
"description": "As a percentage of the image, the y position to start the crop from. DEPRECATED: Use `modifiers` instead.",
"type": "number",
"minimum": 0,
"maximum": 100,
"required": false
},
"width": {
"description": "As a percentage of the image, the width to crop the image to. DEPRECATED: Use `modifiers` instead.",
"type": "number",
"minimum": 0,
"maximum": 100,
"required": false
},
"height": {
"description": "As a percentage of the image, the height to crop the image to. DEPRECATED: Use `modifiers` instead.",
"type": "number",
"minimum": 0,
"maximum": 100,
"required": false
}
}
}
]
}
}