Skip to content

Instantly share code, notes, and snippets.

@lushkant
Created June 27, 2021 11:26
Show Gist options
  • Select an option

  • Save lushkant/f8c7680ce5ddfc7087f9f44d1d81fc4c to your computer and use it in GitHub Desktop.

Select an option

Save lushkant/f8c7680ce5ddfc7087f9f44d1d81fc4c to your computer and use it in GitHub Desktop.
[POST] /media/{id} - Response Data
{
"id": 26,
"date": "2021-06-26T05:32:32",
"date_gmt": "2021-06-26T05:32:32",
"guid": {
"rendered": "http://mediabrew.local/wp-content/uploads/2021/06/brew.jpg",
"raw": "http://mediabrew.local/wp-content/uploads/2021/06/brew.jpg"
},
"modified": "2021-06-27T11:23:38",
"modified_gmt": "2021-06-27T11:23:38",
"slug": "brew",
"status": "inherit",
"type": "attachment",
"link": "http://mediabrew.local/brew/",
"title": {
"raw": "brew",
"rendered": "brew"
},
"author": 1,
"featured_media": 0,
"comment_status": "open",
"ping_status": "closed",
"template": "",
"meta": {
"web_stories_poster_id": 0,
"web_stories_optimized_id": 0
},
"web_story_media_source": [
2
],
"permalink_template": "http://mediabrew.local/?attachment_id=26",
"generated_slug": "brew",
"media_source": "editor",
"featured_media_src": [],
"description": {
"raw": "",
"rendered": "<p class=\"attachment\"><a href='http://mediabrew.local/wp-content/uploads/2021/06/brew.jpg'><img width=\"300\" height=\"158\" src=\"http://mediabrew.local/wp-content/uploads/2021/06/brew-300x158.jpg\" class=\"attachment-medium size-medium\" alt=\"Awesome\" loading=\"lazy\" srcset=\"http://mediabrew.local/wp-content/uploads/2021/06/brew-300x158.jpg 300w, http://mediabrew.local/wp-content/uploads/2021/06/brew-1024x538.jpg 1024w, http://mediabrew.local/wp-content/uploads/2021/06/brew-768x403.jpg 768w, http://mediabrew.local/wp-content/uploads/2021/06/brew-150x79.jpg 150w, http://mediabrew.local/wp-content/uploads/2021/06/brew.jpg 1200w\" sizes=\"(max-width: 300px) 100vw, 300px\" style=\"width:100%;height:52.5%;max-width:1200px;\" /></a></p>\n"
},
"caption": {
"raw": "",
"rendered": ""
},
"alt_text": "Awesome",
"media_type": "image",
"mime_type": "image/jpeg",
"media_details": {
"width": 1200,
"height": 630,
"file": "2021/06/brew.jpg",
"sizes": {
"medium": {
"file": "brew-300x158.jpg",
"width": 300,
"height": 158,
"mime_type": "image/jpeg",
"source_url": "http://mediabrew.local/wp-content/uploads/2021/06/brew-300x158.jpg"
},
"large": {
"file": "brew-1024x538.jpg",
"width": 1024,
"height": 538,
"mime_type": "image/jpeg",
"source_url": "http://mediabrew.local/wp-content/uploads/2021/06/brew-1024x538.jpg"
},
"thumbnail": {
"file": "brew-150x150.jpg",
"width": 150,
"height": 150,
"mime_type": "image/jpeg",
"source_url": "http://mediabrew.local/wp-content/uploads/2021/06/brew-150x150.jpg"
},
"medium_large": {
"file": "brew-768x403.jpg",
"width": 768,
"height": 403,
"mime_type": "image/jpeg",
"source_url": "http://mediabrew.local/wp-content/uploads/2021/06/brew-768x403.jpg"
},
"web-stories-poster-portrait": {
"file": "brew-640x630.jpg",
"width": 640,
"height": 630,
"mime_type": "image/jpeg",
"source_url": "http://mediabrew.local/wp-content/uploads/2021/06/brew-640x630.jpg"
},
"web-stories-publisher-logo": {
"file": "brew-96x96.jpg",
"width": 96,
"height": 96,
"mime_type": "image/jpeg",
"source_url": "http://mediabrew.local/wp-content/uploads/2021/06/brew-96x96.jpg"
},
"web-stories-thumbnail": {
"file": "brew-150x79.jpg",
"width": 150,
"height": 79,
"mime_type": "image/jpeg",
"source_url": "http://mediabrew.local/wp-content/uploads/2021/06/brew-150x79.jpg"
},
"full": {
"file": "brew.jpg",
"width": 1200,
"height": 630,
"mime_type": "image/jpeg",
"source_url": "http://mediabrew.local/wp-content/uploads/2021/06/brew.jpg"
}
},
"image_meta": {
"aperture": "0",
"credit": "",
"camera": "",
"caption": "",
"created_timestamp": "0",
"copyright": "",
"focal_length": "0",
"iso": "0",
"shutter_speed": "0",
"title": "",
"orientation": "0",
"keywords": []
}
},
"post": null,
"source_url": "http://mediabrew.local/wp-content/uploads/2021/06/brew.jpg",
"missing_image_sizes": [],
"_links": {
"self": [
{
"href": "http://mediabrew.local/wp-json/web-stories/v1/media/26"
}
],
"collection": [
{
"href": "http://mediabrew.local/wp-json/web-stories/v1/media"
}
],
"about": [
{
"href": "http://mediabrew.local/wp-json/wp/v2/types/attachment"
}
],
"author": [
{
"embeddable": true,
"href": "http://mediabrew.local/wp-json/wp/v2/users/1"
}
],
"replies": [
{
"embeddable": true,
"href": "http://mediabrew.local/wp-json/wp/v2/comments?post=26"
}
],
"wp:term": [
{
"taxonomy": "web_story_media_source",
"embeddable": true,
"href": "http://mediabrew.local/wp-json/wp/v2/web_story_media_source?post=26"
}
],
"wp:action-unfiltered-html": [
{
"href": "http://mediabrew.local/wp-json/web-stories/v1/media/26"
}
],
"wp:action-assign-author": [
{
"href": "http://mediabrew.local/wp-json/web-stories/v1/media/26"
}
],
"wp:action-create-web_story_media_source": [
{
"href": "http://mediabrew.local/wp-json/web-stories/v1/media/26"
}
],
"wp:action-assign-web_story_media_source": [
{
"href": "http://mediabrew.local/wp-json/web-stories/v1/media/26"
}
],
"curies": [
{
"name": "wp",
"href": "https://api.w.org/{rel}",
"templated": true
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment