API

The Reading API for this site allows users and apps to access book and chapter objects in JSON format. The url for the Read API is the site's base url plus "api.php" (e.g., https://edtechbooks.org/api.php).

Two types of objects may be requested via the Read API: (a) a book or (b) a chapter. Book calls require the book variable, which will look up the book based upon the unique "short name" provided. Chapter calls require both the book variable and the chapter variable, which will look up the chapter based upon the unique "short name" for each.

Usage

The API may be used to display content in your own site or app provided that you include proper attribution for the content and the hosting site. This can easily be done by displaying the suggested citation for the book or chapter.

Variables

Variable Type Status Default Description
action string optional read Specify the action to be performed. If no action is specified, the API will attempt to return a book or chapter.
book string optional - The short name of the book, which is the path of the book's base or cover url. For example: http://edtechbooks.org/qualitativeinquiry
chapter string optional - The short name of the chapter, which is the last part of the chapter's url. For example: http://edtechbooks.org/qualitativeinquiry/storyanalysis
term string optional - Specify a search term for some actions.
limit integer optional 10 Specify a limit. Maximum: 200
offset integer optional 0 Specify an offset for pagination purposes.
key string unused - The Reading API currently does not require a key.

Actions

Options for the action variable include the following:

Examples

To request the book object for https://edtechbooks.org/k12handbook, the API call would be:

https://edtechbooks.org/api.php?book=k12handbook

To request the chapter object for https://edtechbooks.org/k12handbook/connectivism, the API call would be:

https://edtechbooks.org/api.php?book=k12handbook&chapter=connectivism

To search for books with the term "education" in the title, the API call would be:

https://edtechbooks.org/api.php?action=search_books&term=education

To search for an author with the name "Royce," the API call would be:

https://edtechbooks.org/api.php?action=search_authors&term=royce

App Structure Example

An example of a simple app that accessed books on this site might follow this structure:

  1. A home page that called https://edtechbooks.org/api.php?action=search_books to return all available books (with short names).
  2. If a book is selected, https://edtechbooks.org/api.php?book=[book_short_name_here] is called with the appropriate short name.
  3. If a chapter is selected, https://edtechbooks.org/api.php?book=[book_short_name_here]&chapter=[chapter_short_name_here] is called with the appropriate short name.

Authentication

The API currently does not require a key, but that could change as the site and its services develop. For more information on future plans for the API or to request a key, please contact the site administrator [mailto:admin@edtechbooks.org].

End-of-Chapter Survey

: How would you rate the overall quality of this chapter?
  1. Very Low Quality
  2. Low Quality
  3. Moderate Quality
  4. High Quality
  5. Very High Quality
Comments will be automatically submitted when you navigate away from the page.