IntermediateTopic 56 of 104Software & Computing

APIs and REST

Define how clients use services over HTTP with resources and verbs.

In depth

APIs define how software components interact. REST uses HTTP verbs (GET, POST, PUT, DELETE), resource URLs, status codes and JSON; GraphQL and gRPC are alternatives. Good APIs are consistent, versioned, documented (OpenAPI), secured and idempotent where appropriate.

Key points

  • Statelessness
  • Pagination
  • Rate limiting
Example

GET /users/42 returns the user resource as JSON.

Why it matters

REST APIs define how clients use a service through resources and standard methods, which is how most web and app systems talk to each other.

Where this is used

  • Creating an endpoint that returns the list of devices in a plant.
  • Updating a configuration with a PUT request.
  • Letting a mobile app fetch a user profile over HTTP.

Frequently asked questions

What is APIs and REST?

Define how clients use services over HTTP with resources and verbs.

Why is it important to understand APIs and REST?

REST APIs define how clients use a service through resources and standard methods, which is how most web and app systems talk to each other.

What do GET, POST, PUT and DELETE mean?

GET reads a resource, POST creates one, PUT replaces or updates one, and DELETE removes it.

What do status codes tell a client?

They show whether the request succeeded, such as 200 for success, 404 for not found and 500 for a server error.

How is APIs and REST used in practice?

Typical applications include creating an endpoint that returns the list of devices in a plant, updating a configuration with a PUT request and letting a mobile app fetch a user profile over HTTP.

What should I learn before APIs and REST?

Study "Microservices" first (topic 55 of 104 in Software & Computing). It covers the groundwork this topic builds on.

What are the key points of APIs and REST?

Statelessness. Pagination. Rate limiting.

Can you give an example of APIs and REST?

GET /users/42 returns the user resource as JSON.

What comes after APIs and REST?

The next topic is "Computer organisation", which builds directly on this one.

How difficult is APIs and REST?

It is classed as Intermediate in Software & Computing (topic 56 of 104). It is an intermediate topic. Work through the beginner topics in Software & Computing first.

Learning path

Want to practise? Open the interactive course for quick checks, quizzes, simulations and progress tracking.

Related topics