Learn
Learn copied to clipboard
The WordPress REST API
Details
- Content type (Online Workshop, Lesson, Course, Tutorial, or Lesson Plan): Lesson
- Content title: The WordPress REST API
- Topic description: Introduce the learner to the WordPress REST API, what it is, how it works, and how it's used in WordPress.
- Audience (User, Developer, Designer, Contributor, etc.): Developer
- Experience Level (Beginner, Intermediate, Advanced, Any): Beginner
Learning Objectives
- Explain what a REST API is
- Identify the key elements of the WP REST API
- Use the WordPress REST API global parameters to filter data in a browser
- Define where to find more information on the WP REST API
Related Resources and Other Notes
- https://learn.wordpress.org/tutorial/using-the-wordpress-rest-api/
- https://developer.wordpress.org/rest-api/
Automation Code
//lesson
Lesson Development Checklist
- [x] Gather any relevant links to Support, Docs, or related material
- [x] Description and Objectives finalized
- [ ] Lesson created and announced to the team for review
- [ ] Lesson reviewed
- [ ] Lesson video submitted and published to WPTV
- [ ] Lesson created on Learn.WordPress.org
- [ ] Lesson video published to YouTube
- [ ] Lesson on Learn.WordPress.org updated with YouTube video
- [ ] Lesson published to Learn.WordPress.org
Script: https://github.com/jonathanbossenger/wp-content/blob/main/developer-learning-pathway/08-wordpress-rest-api/01-the-wordpress-rest-api.md
https://github.com/WordPress/Learn/assets/180629/299e7d01-fca8-4657-aec6-aacb543fe1eb
Video ready for review
Please follow the Guidelines for reviewing content to review this lesson.
Tutorial/Lessons Review Checklist
- [x] Learning outcomes/objectives are clear.
- [x] Technical concepts introduced in the content are accurate.
- [x] The speed of demonstrations are easy to follow.
- [x] The narration audio matches what is shown visually.
- [x] Spelling and grammar are correct.
- [x] Sound quality is consistent throughout the video.
- [ ] Brand Usage Guidelines and Promotional Guidelines are being followed.
- [ ] Media assets are all in the public domain (CC0).
@jonathanbossenger, all Learning Objectives achieved :-)
- At 2:44, when you list sample methods for Routes & Endpoints, it might be helpful to use the WordPress REST API specific endpoints instead of the more generic
/posts. - At ~3:28, when you demonstrate the response from a few endpoints, it'll be great to highlight/zoom-in on the URL (right now, it's only narrated).
- At 3:55, you recommend installing a browser extension to format JSON responses in Firefox, but as far as I know, this functionality is built-in.
Hi @ironnysh thanks for the review/feedback.
At 2:44, when you list sample methods for Routes & Endpoints, it might be helpful to use the WordPress REST API specific endpoints instead of the more generic /posts.
The generic-ness here was intentional, the learning outcome here being that an HTTP verb + a URL endpoint combination is what makes up a route.
At 3:55, you recommend installing a browser extension to format JSON responses in Firefox, but as far as I know, this functionality is built-in.
Huh, that's new, I'll adjust the text accordingly. Thanks for pointing that out.
Updated video with the fixes.
https://github.com/WordPress/Learn/assets/180629/8148e64d-79c2-4a4c-8f88-7c6f264967e9
https://wordpress.tv/2024/04/07/the-wordpress-rest-api/