form 'media_attrs=This will be the caption for file1.jpg' \ You must use a numeric index for the keys of `media_attrs` which follow the same sequence as `media` and `media_urls`. Errors produced by media sideloading, if any, will be in `media_errors` in the response.Īn array of attributes (`title`, `description` and `caption`) are supported to assign to the media uploaded via the `media` or `media_urls` properties. form 'media_attrs=My Great Photo' \Īn array of URLs for images to attach to a post. Errors produced by media uploads, if any, will be in `media_errors` in the response. See allowed_file_types in the options response of the site endpoint. Accepts jpg, jpeg, png, gif, pdf, doc, ppt, odt, pptx, docx, pps, ppsx, xls, xlsx, key. Multiple media items will be displayed in a gallery. To upload media, the entire request should be multipart/form-data encoded. Pass an empty string to delete the existing image.Īn array of files to attach to the post. The post ID of an existing attachment to set as the featured image. Mapping of taxonomy to comma-separated list or array of term IDsĬomma-separated list or array of category IDsĭefault: (default) Use default post format standard: Standard aside: Aside chat: Chat gallery: Gallery link: Link image: Image quote: Quote status: Status video: Video audio: Audio Mapping of taxonomy to comma-separated list or array of term namesĬomma-separated list or array of category namesĬomma-separated list or array of tag names Post types besides post and page need to be whitelisted using the rest_api_allowed_post_types filter. The plaintext password protecting the post, or, more likely, the empty string if the post is not password protected. auto-draft: Save a placeholder for a newly created post, with no content.įalse: (default) Post is not marked as sticky. future: Schedule the post (alias for publish you must also set a future date). pending: Mark the post as pending editorial approval. Defaults to true.Ĭustom message to be shared to external services. An array of services if we only want to share to a select few. True or false if the post be shared to external services. The username or ID for the user to assign the post to. The name (slug) for the post, used in URLs. True if the post was saved automatically. Loads data from the endpoints found in the 'meta' part of the response. The JSON response is wrapped in an "envelope" containing the "real" HTTP status code and headers.įalse: (default) true: Output pretty JSON Setting this parameter will force the HTTP status code to always be 200. Shortcodes are left unparsed, significant whitespace is kept, etc.įalse: (default) true: Some environments (like in-browser JavaScript or Flash) block or divert responses with a non-200 HTTP status code. Shortcodes are parsed, paragraph tags are added, etc. Display: (default) Formats the output as HTML for display.
0 Comments
Leave a Reply. |