This repository was archived by the owner on Dec 27, 2022. It is now read-only.
Add initial read-only REST API endpoints for snapshots #63
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Examples:
Get all draft snapshots authored by user with username "jsmith":
Get a snapshot by a UUID:
An individual item will look like the following (take note of
content):{ "id": 6030, "date": "2016-07-23T06:11:22", "date_gmt": null, "guid": { "rendered": "http://src.wordpress-develop.dev/?customize_snapshot_uuid=fcc0a3f0-2d6d-4e4b-906b-46025857b07a" }, "modified": "2016-07-23T06:11:22", "modified_gmt": null, "slug": "fcc0a3f0-2d6d-4e4b-906b-46025857b07a", "type": "customize_snapshot", "link": "http://src.wordpress-develop.dev/?customize_snapshot_uuid=fcc0a3f0-2d6d-4e4b-906b-46025857b07a", "content": { "blogname": { "value": "WordPress Coool" } }, "author": 4, "_links": { "self": [ { "href": "http://src.wordpress-develop.dev/wp-json/wp/v2/customize_snapshots/6030" } ], "collection": [ { "href": "http://src.wordpress-develop.dev/wp-json/wp/v2/customize_snapshots" } ], "about": [ { "href": "http://src.wordpress-develop.dev/wp-json/wp/v2/types/customize_snapshot" } ], "author": [ { "embeddable": true, "href": "http://src.wordpress-develop.dev/wp-json/wp/v2/users/4" } ], "version-history": [ { "href": "http://src.wordpress-develop.dev/wp-json/wp/v2/customize_snapshots/6030/revisions" } ], "wp:attachment": [ { "href": "http://src.wordpress-develop.dev/wp-json/wp/v2/media?parent=6030" } ], "curies": [ { "name": "wp", "href": "https://api.w.org/{rel}", "templated": true } ] } }Fixes #29.