REST API basics

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

API's are formatted to take a certain set of requests and return

... data in a certain structure

What does API stand for?

Application program interface

What is an API?

Contract provided by one piece of software to another, usually consisting of a structured request and response. One software says 'give me this information formatted in this way' and a response is returned

What is the DELETE request?

DELETE: Deletes a specified resource on a server You have to specify to the server the resource you want to delete

What are some HTTP methods

GET, POST, PUT, DELETE (there are more but these are the most common) GET: retrieve data from a specified resource Your browser client makes browser requests every time you go to a website POST: Submit data to be processed to a specific resource Any time you are submitting data is a POST PUT: Update a specified resource Usually your specify some kind of ID for the resource you want to update--like a blog post or something DELETE: Deletes a specified resource on a server You have to specify to the server the resource you want to delete

What is the GET request?

GET: retrieve data from a specified resource Your browser client makes browser requests every time you go to a website

Everytime you are loading a webpage, you are making a _________ request on a server

HTTP

Relies on a stateless, client-server protocol. This is almost always...

HTTP

What is a common example of an API authentication?

OAUTH token

What is the POST request?

POST: Submit data to be processed to a specific resource Any time you are submitting data is a POST

What is the PUT request?

PUT: Update a specified resource Usually your specify some kind of ID for the resource you want to update--like a blog post or something

What is REST?

REST lets us use HTTP requests to format message requests and responses

What does REST stand for?

Representational State Transfer

T/F: Some API's require authentication to use their service (this could be free or paid)

T

What is an endpoint?

The URL where API can be accessed by a client application

What would this GET request likely do? https://mysite.com/api/users

This would typically return a list of users

Can you have two endpoints for two different requests

Yes. You could have a GET and a POST request for the url https://mysite.com/api/users that do two different things.

Treats server objects as resources that can be ________, ________, or ________

created, modified, or destoryed


Ensembles d'études connexes

Purdue CNIT 155 Midterm Exam (Python)

View Set

Chapter 2: Workforce Safety and Wellness

View Set

28. Examining the Cisco SD-Access Solution

View Set

Supply Chain Management Final Part 2

View Set

Blood Vessels and Circulation Chapter 19

View Set