What is REST API? To make it simple, REST API defines a set of functions to which the developers can perform requests and receive responses. The interaction is performed via the HTTP protocol. An advantage of such an approach is the wide usage of HTTP. That is why REST API can be used practically for any programming language. Common characteristics of Yumpu REST API resources are as follows:
- You access the resource by sending an HTTP request to the API server. The server replies with a response that contains either the data you requested, or the status indicator, or even both.
- All resources are located at https://api.yumpu.com/2.0.
- All resources may return different HTTP status codes (e.g., HTTP Status Code 200 for success response or HTTP Status Code 400 for the bad request).
- You request a particular resource by adding a particular path to the base URL that specifies the resource.
The REST API supports the response in two formats, which are JSON or XML.
HTTP verbs are used to manage the state of resources. In REST API, there are four verbs used to manage resources: GET, POST, PUT and DELETE. You can get the contents of the data using HTTP GET, delete the data using HTTP DELETE, and create or update the data using POST/PUT.
All URLs in REST API have the following base URL: https://api.yumpu.com/2.0.
All methods require authentication. Your access token must be sent in the HTTP header as X-ACCESS-TOKEN: ACCESS_TOKEN.