Scale

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/12

encourage image

There's no tags or description

Looks like no tags are added yet.

13 Terms

1
New cards

What is an API

Application Programming Interface - A defined way for different software systems to communicate between each other

2
New cards

What is REST

Rest is a defined set of rules/conventions that is commonly used with APIs

3
New cards

What are the main HTTP methods and what do they do

GET - retrieve data

POST - Add a new entry to the data
PUT - update and replace existing data

PATCH - update existing data, but only specific fields
DELETE - delete an entry from the Data

4
New cards

What are the three main categories of Status Codes and what do they mean

2XX - some type of success

4XX - some type of user-related failure

5XX - some type of server-related failure

5
New cards

What is an API Endpoint

We have a server that the API is hosted on. The endpoint is the specific path on that server which contains whatever data it is you’re looking for

6
New cards

What does Uniform Interface mean for REST

All the different methods and way to access the resources are organized and predictable

7
New cards

What does client-server separation mean for REST

The server and client don’t need to have any sort of communication. As long as the API handshake is established these two components can be scaled and changed as two seperate entities

8
New cards

State in REST

Requests have no state and must be self-contained/sufficient

9
New cards

What is a gateway

A gateway is used whenever you have microservices. When you want to use one API, but execute its functionality across multiple servers a gateway is used to route.

10
New cards

4 Authentication methods for APIs and how they work

HTTP Basic - send the username and password within the request. Not often used

Bearer Tokens - have the user login within the application, or do something else to gain authorization. They now have a token, normally with some type of limited lifespan. This token is attached to their requests

API Keys - Unlike a token, these are normally going to be tied to an application. These are also normally longer lived, and track things like usage which helps enforce limits

OAuth2.0 - Instead of having the user login and the backend provide a token, allow the user to log into a third party system, which will provide the token instead.

11
New cards

What does CORS do

CORS allows a backend to enforce what different origins are allowed to read its responses. This is done out of security

12
New cards

Elements of an HTTP request

Method, endpoint, request version, host

13
New cards

Elements of an HTTP response

request version, status code, metadata (like content type), the actual data