Awesome Support Developer Documentation

Attachments: Schema

The schema defines all the fields that exist for a attachment object.

date
string, datetime (ISO8601)
The date the object was published, in the site’s timezone.

Context: view, edit, embed

date_gmt
string, datetime (ISO8601)
The date the object was published, as GMT.

Context: view, edit

guid
object
The globally unique identifier for the object.

Read only

Context: view, edit

id
integer
Unique identifier for the object.

Read only

Context: view, edit, embed

modified
string, datetime (ISO8601)
The date the object was last modified, in the site’s timezone.

Read only

Context: view, edit

modified_gmt
string, datetime (ISO8601)
The date the object was last modified, as GMT.

Read only

Context: view, edit

slug
string
An alphanumeric identifier for the object unique to its type.

Context: view, edit, embed

status
string
A named status for the object.

Context: view, edit

One of: publish, future, draft, pending, private, in-progress, failed, wc-active, wc-switched, wc-expired, wc-pending-cancel, wc-pending, wc-processing, wc-on-hold, wc-completed, wc-cancelled, wc-refunded, wc-failed, queued, processing, hold, read, unread, wcm-active, wcm-free_trial, wcm-delayed, wcm-complimentary, wcm-pending, wcm-paused, wcm-expired, wcm-cancelled

type
string
Type of Post for the object.

Read only

Context: view, edit, embed

title
object
The title for the object.

Context: view, edit, embed

author
integer
The ID for the author of the object.

Context: view, edit, embed

comment_status
string
Whether or not comments are open on the object.

Context: view, edit

One of: open, closed

ping_status
string
Whether or not the object can be pinged.

Context: view, edit

One of: open, closed

meta
object
Meta fields.

Context: view, edit

template
string
The theme file to use to display the object.

Context: view, edit

alt_text
string
Alternative text to display when attachment is not displayed.

Context: view, edit, embed

caption
object
The attachment caption.

Context: view, edit, embed

description
object
The attachment description.

Context: view, edit

media_type
string
Attachment type.

Read only

Context: view, edit, embed

One of: image, file

mime_type
string
The attachment MIME type.

Read only

Context: view, edit, embed

media_details
object
Details about the media file, specific to its type.

Read only

Context: view, edit, embed

post
integer
The ID for the associated post of the attachment.

Context: view, edit

source_url
string, uri
URL to the original attachment file.

Read only

Context: view, edit, embed



Example Request

$ curl -X OPTIONS -i http://demo.getawesomesupport.com/wp-json/wpas-api/v1/attachments

Share: