API Training

1

What's an API?

An Application Programming Interface (API) is a way for two computers to talk to each other over the web.

2

Commonly used Terms

Client

Server

Request/Respose

HTTP Method/Verb

Endpoint

Payload

JSON

Status code

Authentication token

3

JSON Example

GET https://api.gitbook.com/v1/user

{
  "object": "user",
  "id": "text",
  "displayName": "text",
  "email": "text",
  "photoURL": "text",
  "urls": {
    "location": "https://example.com"
  }
}
4
5

What you can do?

  • Retrieve most kinds of information from your account and content (change requests, revisions, etc)
  • Add, remove and update users in an organization
  • Use keyword and AI search
6

What you can't do?

  • Add a specific text/content to a page (only full imports)
  • Export content in HTML, React, etc
  • Approve CR review
7

Resources

https://mannhowie.com/rest-api

https://www.ibm.com/docs/en/cics-ts/5.3?topic=protocol-http-requests

https://blog.hubspot.com/website/what-is-payload

https://www.w3schools.com/whatis/whatis_json.asp

https://developer.mozilla.org/en-US/docs/Web/HTTP/Status

https://pokeapi.co/

8