Intro to HTTP and REST
Great, you got to the second page of the Datawrapper API documentation. If you followed the Getting started section, you already used HTTP.
What is HTTP?
HTTP stands for Hypertext Transfer Protocol and is the main communication channel for the web. By entering google.com into your browser, the browser and Google's servers will communicate and send data through HTTP. The Datawrapper API (and Google) use HTTPS (that S means secure, we don't want other people to read your data).
RESTful APIs
Like almost everything on this page, REST is an abbreviation. It stands for Representational State Transfer and is a set of guidelines on how to build web services and organize interactions between them. The Datawrapper API mostly conforms to REST guidelines, but deviates where it makes sense for us.
You will mostly work on resources like users, charts or teams and take actions on them with standard HTTP verbs like GET, POST, PATCH and DELETE. Resources have associated URLs that you operate on. In the Getting started section, you already requested a resource with GET /v3/me, which tells the server that you want to see your user information.
The Datawrapper API uses the following verbs:
Verb | Explanation | Example |
|---|---|---|
GET | Request the representation of a resource. | This returns a list of your charts that you can search and filter. |
POST | Create a new resource. | This will create a new chart that you can edit with the API or through our app. |
PATCH | Modify a resource. | This moves one or more charts into a folder. |
PUT | Replace an existing resource. | This replaces a chart's entire metadata object with the one you send. |
DELETE | Delete an existing resource. | This moves a chart to the trash, where it gets deleted for good after 30 days. |