Learn icon indicating copy to clipboard operation
Learn copied to clipboard

The WordPress REST API

Open jonathanbossenger opened this issue 1 year ago • 7 comments

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

jonathanbossenger avatar Feb 28 '24 06:02 jonathanbossenger

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

github-actions[bot] avatar Mar 11 '24 13:03 github-actions[bot]

Script: https://github.com/jonathanbossenger/wp-content/blob/main/developer-learning-pathway/08-wordpress-rest-api/01-the-wordpress-rest-api.md

jonathanbossenger avatar Mar 17 '24 20:03 jonathanbossenger

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.

jonathanbossenger avatar Mar 28 '24 16:03 jonathanbossenger

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.

ironnysh avatar Apr 02 '24 11:04 ironnysh

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.

jonathanbossenger avatar Apr 03 '24 09:04 jonathanbossenger

Updated video with the fixes.

https://github.com/WordPress/Learn/assets/180629/8148e64d-79c2-4a4c-8f88-7c6f264967e9

jonathanbossenger avatar Apr 03 '24 10:04 jonathanbossenger

https://wordpress.tv/2024/04/07/the-wordpress-rest-api/

jonathanbossenger avatar Apr 08 '24 03:04 jonathanbossenger