Movatterモバイル変換


[0]ホーム

URL:


PPTX, PDF11 views

Understanding APIs.pptx introduction chk

The document discusses APIs and RESTful APIs. It defines an API as an interface that allows computers to communicate with each other, and compares it to a waiter relaying orders between the kitchen and customers. RESTful APIs use HTTP requests like GET, POST, PUT, and DELETE to perform CRUD (create, read, update, delete) operations on resources identified by URLs. Most APIs use API keys for authentication and return responses in JSON or XML format along with HTTP status codes.

Embed presentation

Download to read offline
UnderstandingAPIsHow APIs andRESTful APIs workbehind the scenes
What is an API?
1ApplicationProgrammingInterfaceBut not a “visual” interface like what wesee in this presentation
1It’s how one computercan talk to anothercomputer.It doesn’t matter what programminglanguage you’re using. JavaScript,Python, PHP, Java, C and every othermodern language supports RESTful APIs.More on this in a bit...
There are many typesof APIs.But RESTful APIs are mostcommonly talked about these days.
RESTful APIs arewhat we’re talkingabout today, too.
Think of anAPI as awaiter as arestaurant.Art by iconicbestiary at https://www.freepik.com/iconicbestiary
Art by iconicbestiary at https://www.freepik.com/iconicbestiaryWhat can I getfor you?
Art by iconicbestiary at https://www.freepik.com/iconicbestiaryYour finestpizza!
The waiterrelays themessage tothe kitchen.Art by iconicbestiary at https://www.freepik.com/iconicbestiary
Where thechef makesthe food.Art by freepik at https://www.freepik.com/freepik
Then thewaiterbrings yourfood to you.Art by iconicbestiary at https://www.freepik.com/iconicbestiary
It’s that simple!Just always keep this metaphor in mind.Remember the restaurant.
RESTful APIs are meantto be simple.
Let’s look at a real lifeexample with actualcomputers.
This is a site that uses anAPI to collect flight pricesfrom other websites.
These areairlineservices.They holdall thedata.
Skyscannerwill askeach onefor flightdata.
Now youcan see allthe flightprices fromotherwebsites
Computers use APIs totalk to each other overthe internet.
What programminglanguages can weuse?Art by artmonkey at https://www.freepik.com/artmonkey
What programminglanguages can weuse?Art by artmonkey at https://www.freepik.com/artmonkey
We can use anymodern languagethat you’d use for awebsite.● Python● JavaScript● PHP● Java● C● Ruby● Etc
What areRESTful APIs?REST is a type of APIArt by freepik at https://www.freepik.com/freepik
REpresentationalStateTransfer
Simply put:● Client computer asks anothercomputer for data, or to take anaction
SWAPIThe Star Wars APIhttps://swapi.co/
JavaScript Demofetch('https://swapi.co/api/people/').then(res => res.json()).then(response => console.log(response))
Hello, JSON
Hello, JSONJavaScript Object Notation
Most languages have a data structurethat looks like a JavaScript Object.One day, someone decided it shouldbe a standard.Then it became the standard.
Request Methods:● HTTP GET● HTTP POST● HTTP PUT● HTTP DELETE● HTTP PATCH
The first method:● HTTP GET● HTTP POST● HTTP PUT● HTTP DELETE● HTTP PATCH
GETRequestsHow do the work?
GET Requests● When you load a website.That’s a GET request● It’s a request to get data fromanother computer● You’re simply asking for dataand you’re not asking toperform a task● You’re not creating, updating ordeleting data● Most common request type
HTTP Methods for RESTful RequestsHTTPMethodCRUD Operation Example URL(s)GET ReadHTTP GET http://website.com/api/users/HTTP GET http://website.com/api/users/1/
POSTRequestsHow do the work?
POST Requests● Do not go through the standardURL, but use a URL as theendpoint● Ask another computer to createa new resource● Returns data about the newlycreated resource
HTTP Methods for RESTful RequestsHTTPMethodCRUD Operation Example URL(s)GET ReadHTTP GET http://website.com/api/users/HTTP GET http://website.com/api/users/1/POST Create HTTP POST http://website.com/api/users/
DELETERequestsHow do the work?
DELETE Requests● Do not go through the standardURL, but use a URL as theendpoint● Ask another computer to deletea single resource or a list ofresources● Use with caution
HTTP Methods for RESTful RequestsHTTPMethodCRUD Operation Example URL(s)GET ReadHTTP GET http://website.com/api/users/HTTP GET http://website.com/api/users/1/POST Create HTTP POST http://website.com/api/users/DELETE Delete HTTP DELETE http://website.com/api/user/1/
PUT/PATCHRequestsHow do the work?
PATCH Requests● Do not go through the standardURL, but use a URL as theendpoint● Ask another computer toupdate a piece of a resource● Are not fully supported by allbrowsers or frameworks, so wetypically fall back on PUTrequests● Example: Updating a users firstname
PUT Requests● Do not go through the standardURL, but use a URL as theendpoint● Ask another computer toupdate an entire resource● If the resource doesn’t exist,the API might decide toCREATE (CRUD) the resource
HTTP Methods for RESTful RequestsHTTPMethodCRUD Operation Example URL(s)GET ReadHTTP GET http://website.com/api/users/HTTP GET http://website.com/api/users/1/POST Create HTTP POST http://website.com/api/users/DELETE Delete HTTP DELETE http://website.com/api/user/1/PUT Update/Replace HTTP PUT http://website.com/api/user/1/PATCH Partial Update/Modify HTTP PATCH http://website.com/api/user/1/More details at https://restfulapi.net/http-methods/
ConsumingAPIsArt by iconicbestiary at https://www.freepik.com/iconicbestiary
APIs can be written in almostany server-side language.Art by starline at https://www.freepik.com/starline
APIs will generally returnone of two types datastructures:JSON or XMLArt by starline at https://www.freepik.com/starline
JSON Example{"key_val_example": "value","array_example": ['array item 1','array item 2',],"object_example": {"key1": "value1","key2": "value2"}}Art by starline at https://www.freepik.com/starlineXML Example<example><field>Value</field><secondField>Value</secondField><nestedExample><nestedField>Value</nestedField><nestedSecondField>Value</nestedSecondField></nestedExample></example>
APIs can be consumed inalmost any language.Art by starline at https://www.freepik.com/starline
Browsers use JavaScript fortheir API requests.Servers use any language thatruns on that computer.Art by starline at https://www.freepik.com/starline
Common APIResponsesWhat are they?
Requests andResponsesWhen you request data from aserver using GET, POST, PUT,PATCH or DELETE… that’s arequest.When the server returns yourdata… that’s a response
Requests andResponsesResponses will always comewith an HTTP Status Code.And these “status codes” tell youwhat’s wrong (or right) withoutneeding to give you text back toread.
Common HTTPStatus CodesHealthy Responses (2--)● 200 — OK.Request accepted.● 201 — Created.POST requests often return 201s when a resource is created.● 202 — Accepted.When a request is accepted but its not done processing.Maybe the task goes into a queue.
Common HTTPStatus CodesRedirect Responses (3--)● 301 — Moved Permanently.When the endpoint has permanently changed. Update yourendpoint.● 302 — Found.The endpoint you’re accessing is temporarily moved tosomewhere else.
Common HTTPStatus CodesClient Responses (4--)● 400 — Bad Request.Server cannot or will not process your request. Often this isdue to malformed API keys or an invalid payload.● 401 — Unauthorized.You’re not allowed here. Usually this is because you’remissing authentication credentials (API keys)● 403 — Forbidden.The servers understands your request but won’t execute it.Your API keys might not have the right permissions or yourtrying to use an endpoint that you don’t have access to.● 404 — Not Found.There’s nothing here. Move along, move along.● 405 — Method Not Allowed.You’re using the wrong HTTP Method. The endpoint mightonly accept GET requests and you might be POSTing to it,for example.
Common HTTPStatus Codes Server Responses (5--)● 500 — Internal Server Error.The server had a problem and couldn’t process the request.This is the only time you are out of control.
Just For Fun Find outwhat a 418response is
API SecurityArt by freepik at https://www.freepik.com/freepik
API Keys● API keys are “passwords” toaccess an API. These are yourauthentication credentials.● Almost every website requiresAPI keys to perform some action.● Facebook's Graph API is a goodexamplegraph.facebook.com/codingforeverybody
Access tokenrequired.Access tokens areusually generatedwith an API key.Matching 400 statuscode.“Bad Request”.Something is missing.
Access tokenrequired.Access tokens areusually generatedwith an API key.Other services mightthrow you a 403 or405 status.
Art by Sapann Design at https://www.freepik.com/sapann-designSummary
Think of anAPI as awaiter as arestaurant.Art by iconicbestiary at https://www.freepik.com/iconicbestiary
HTTP Methods for RESTful RequestsHTTPMethodCRUD Operation Example URL(s)GET ReadHTTP GET http://website.com/api/users/HTTP GET http://website.com/api/users/1/POST Create HTTP POST http://website.com/api/users/DELETE Delete HTTP DELETE http://website.com/api/user/1/PUT Update/Replace HTTP PUT http://website.com/api/user/1/PATCH Partial Update/Modify HTTP PATCH http://website.com/api/user/1/
Most APIs are secured with API keysArt by freepik at https://www.freepik.com/freepik
Free Resources● https://restfulapi.net/http-methods/● https://httpstatuses.com/● https://swapi.co/Art by rawpixel.com at https://www.freepik.com/rawpixel-com
Questions?

Recommended

PDF
REST API Basics
PDF
Rest API Interview Questions PDF By ScholarHat
PPTX
rest-api-basics.pptx
PDF
Introduction to REST - REST Basics - JSON
PDF
REST APIs, Girls Who Code
PPTX
Standards of rest api
PDF
API Basics
PPTX
A Deep Dive into RESTful API Design Part 2
PPTX
Understanding APIs: API types and custom Endpoint creation
PPTX
Apitesting.pptx
PPTX
API Design Antipatterns - APICon SF
PPTX
REST-API introduction for developers
PDF
Facebook & Twitter API
PDF
REST APIS web development for backend familiarity
PPTX
Pragmatic REST APIs
PPTX
rest-api-basics.pptx
PPTX
Building-Robust-APIs-ASPNET-Web-API-and-RESTful-Patterns.pptx
PPTX
Understanding-Backend-Architecture-and-APIs-Today-and-Beyond-2026.pptx
PPTX
Rest Webservice
PPTX
Http and REST APIs.
PPTX
Tutorial_Rest_API_For_Beginners_125.pptx
PPTX
Rest WebAPI with OData
PPTX
RESTful Services
ODP
NEPHP '13: Pragmatic API Development
PPTX
REST library.pptx
PPTX
Rest APIs Training
PPTX
RESTful APIs in .NET
PDF
Demystifying APIs_ Exploring the Various Types of APIs to Power Your Digital ...
PPTX
ic3-internetand computingA1-moduleA.pptx
PDF
Abridged version tafseer of surah fajr!

More Related Content

PDF
REST API Basics
PDF
Rest API Interview Questions PDF By ScholarHat
PPTX
rest-api-basics.pptx
PDF
Introduction to REST - REST Basics - JSON
PDF
REST APIs, Girls Who Code
PPTX
Standards of rest api
PDF
API Basics
PPTX
A Deep Dive into RESTful API Design Part 2
REST API Basics
Rest API Interview Questions PDF By ScholarHat
rest-api-basics.pptx
Introduction to REST - REST Basics - JSON
REST APIs, Girls Who Code
Standards of rest api
API Basics
A Deep Dive into RESTful API Design Part 2

Similar to Understanding APIs.pptx introduction chk

PPTX
Understanding APIs: API types and custom Endpoint creation
PPTX
Apitesting.pptx
PPTX
API Design Antipatterns - APICon SF
PPTX
REST-API introduction for developers
PDF
Facebook & Twitter API
PDF
REST APIS web development for backend familiarity
PPTX
Pragmatic REST APIs
PPTX
rest-api-basics.pptx
PPTX
Building-Robust-APIs-ASPNET-Web-API-and-RESTful-Patterns.pptx
PPTX
Understanding-Backend-Architecture-and-APIs-Today-and-Beyond-2026.pptx
PPTX
Rest Webservice
PPTX
Http and REST APIs.
PPTX
Tutorial_Rest_API_For_Beginners_125.pptx
PPTX
Rest WebAPI with OData
PPTX
RESTful Services
ODP
NEPHP '13: Pragmatic API Development
PPTX
REST library.pptx
PPTX
Rest APIs Training
PPTX
RESTful APIs in .NET
PDF
Demystifying APIs_ Exploring the Various Types of APIs to Power Your Digital ...
Understanding APIs: API types and custom Endpoint creation
Apitesting.pptx
API Design Antipatterns - APICon SF
REST-API introduction for developers
Facebook & Twitter API
REST APIS web development for backend familiarity
Pragmatic REST APIs
rest-api-basics.pptx
Building-Robust-APIs-ASPNET-Web-API-and-RESTful-Patterns.pptx
Understanding-Backend-Architecture-and-APIs-Today-and-Beyond-2026.pptx
Rest Webservice
Http and REST APIs.
Tutorial_Rest_API_For_Beginners_125.pptx
Rest WebAPI with OData
RESTful Services
NEPHP '13: Pragmatic API Development
REST library.pptx
Rest APIs Training
RESTful APIs in .NET
Demystifying APIs_ Exploring the Various Types of APIs to Power Your Digital ...

More from nooreen nayyar syeda

PPTX
ic3-internetand computingA1-moduleA.pptx
PDF
Abridged version tafseer of surah fajr!
PPTX
ASAD ppt.pptx please chk info fr Jee exam
PPTX
Duas_for_Stress_Relief_Presentation.pptx
PPTX
Birds in Quran.pptx check out diff birds
PDF
Applied_Data_Science__17203210230123.pdf
ic3-internetand computingA1-moduleA.pptx
Abridged version tafseer of surah fajr!
ASAD ppt.pptx please chk info fr Jee exam
Duas_for_Stress_Relief_Presentation.pptx
Birds in Quran.pptx check out diff birds
Applied_Data_Science__17203210230123.pdf

Recently uploaded

PPTX
Pig- piggy bank in Big Data Analytics.ppt.pptx
PDF
FAMILY ASSESSMENT FORMAT - CHN practical
DOCX
Mobile applications Devlopment ReTest year 2025-2026
PPTX
AI_in_Daily_Life_Presentation and more.pptx
PDF
NAVIGATE PHARMACY CAREER OPPORTUNITIES.pdf
PDF
BỘ TEST KIỂM TRA CUỐI HỌC KÌ 1 - TIẾNG ANH 6-7-8-9 GLOBAL SUCCESS - PHIÊN BẢN...
PPTX
Campfens "The Data Qualify Challenge: Publishers, institutions, and funders r...
PPTX
Semester 6 UNIT 2 Dislocation of hip.pptx
PDF
M.Sc. Nonchordates Complete Syllabus PPT | All Important Topics Covered
PDF
Analyzing the data of your initial survey
PDF
1ST APPLICATION FOR ANNULMENT (4)8787666.pdf
PDF
Projecte de la porta de primer B: L'antic Egipte
PDF
Projecte de la porta d'i5B: Els animals marins
PPTX
Details of Epithelial and Connective Tissue.pptx
PDF
IMANI Africa files RTI request seeking full disclosure on 2026 SIM registrati...
PPTX
How to Manage Package Reservation in Odoo 18 Inventory
PDF
Models of Teaching - TNTEU - B.Ed I Semester - Teaching and Learning - BD1TL ...
PPTX
10-12-2025 Francois Staring How can Researchers and Initial Teacher Educators...
PPTX
TAMIS & TEMS - HOW, WHY and THE STEPS IN PROCTOLOGY
PPTX
PURPOSIVE SAMPLING IN EDUCATIONAL RESEARCH RACHITHRA RK.pptx
Pig- piggy bank in Big Data Analytics.ppt.pptx
FAMILY ASSESSMENT FORMAT - CHN practical
Mobile applications Devlopment ReTest year 2025-2026
AI_in_Daily_Life_Presentation and more.pptx
NAVIGATE PHARMACY CAREER OPPORTUNITIES.pdf
BỘ TEST KIỂM TRA CUỐI HỌC KÌ 1 - TIẾNG ANH 6-7-8-9 GLOBAL SUCCESS - PHIÊN BẢN...
Campfens "The Data Qualify Challenge: Publishers, institutions, and funders r...
Semester 6 UNIT 2 Dislocation of hip.pptx
M.Sc. Nonchordates Complete Syllabus PPT | All Important Topics Covered
Analyzing the data of your initial survey
1ST APPLICATION FOR ANNULMENT (4)8787666.pdf
Projecte de la porta de primer B: L'antic Egipte
Projecte de la porta d'i5B: Els animals marins
Details of Epithelial and Connective Tissue.pptx
IMANI Africa files RTI request seeking full disclosure on 2026 SIM registrati...
How to Manage Package Reservation in Odoo 18 Inventory
Models of Teaching - TNTEU - B.Ed I Semester - Teaching and Learning - BD1TL ...
10-12-2025 Francois Staring How can Researchers and Initial Teacher Educators...
TAMIS & TEMS - HOW, WHY and THE STEPS IN PROCTOLOGY
PURPOSIVE SAMPLING IN EDUCATIONAL RESEARCH RACHITHRA RK.pptx

Understanding APIs.pptx introduction chk

  • 1.
    UnderstandingAPIsHow APIs andRESTfulAPIs workbehind the scenes
  • 2.
  • 3.
    1ApplicationProgrammingInterfaceBut not a“visual” interface like what wesee in this presentation
  • 4.
    1It’s how onecomputercan talk to anothercomputer.It doesn’t matter what programminglanguage you’re using. JavaScript,Python, PHP, Java, C and every othermodern language supports RESTful APIs.More on this in a bit...
  • 5.
    There are manytypesof APIs.But RESTful APIs are mostcommonly talked about these days.
  • 6.
    RESTful APIs arewhatwe’re talkingabout today, too.
  • 7.
    Think of anAPIas awaiter as arestaurant.Art by iconicbestiary at https://www.freepik.com/iconicbestiary
  • 8.
    Art by iconicbestiaryat https://www.freepik.com/iconicbestiaryWhat can I getfor you?
  • 9.
    Art by iconicbestiaryat https://www.freepik.com/iconicbestiaryYour finestpizza!
  • 10.
    The waiterrelays themessagetothe kitchen.Art by iconicbestiary at https://www.freepik.com/iconicbestiary
  • 11.
    Where thechef makesthefood.Art by freepik at https://www.freepik.com/freepik
  • 12.
    Then thewaiterbrings yourfoodto you.Art by iconicbestiary at https://www.freepik.com/iconicbestiary
  • 13.
    It’s that simple!Justalways keep this metaphor in mind.Remember the restaurant.
  • 14.
    RESTful APIs aremeantto be simple.
  • 15.
    Let’s look ata real lifeexample with actualcomputers.
  • 16.
    This is asite that uses anAPI to collect flight pricesfrom other websites.
  • 17.
  • 18.
  • 19.
    Now youcan seeallthe flightprices fromotherwebsites
  • 20.
    Computers use APIstotalk to each other overthe internet.
  • 21.
    What programminglanguages canweuse?Art by artmonkey at https://www.freepik.com/artmonkey
  • 22.
    What programminglanguages canweuse?Art by artmonkey at https://www.freepik.com/artmonkey
  • 23.
    We can useanymodern languagethat you’d use for awebsite.● Python● JavaScript● PHP● Java● C● Ruby● Etc
  • 24.
    What areRESTful APIs?RESTis a type of APIArt by freepik at https://www.freepik.com/freepik
  • 25.
  • 26.
    Simply put:● Clientcomputer asks anothercomputer for data, or to take anaction
  • 27.
    SWAPIThe Star WarsAPIhttps://swapi.co/
  • 28.
    JavaScript Demofetch('https://swapi.co/api/people/').then(res =>res.json()).then(response => console.log(response))
  • 30.
  • 31.
  • 32.
    Most languages havea data structurethat looks like a JavaScript Object.One day, someone decided it shouldbe a standard.Then it became the standard.
  • 33.
    Request Methods:● HTTPGET● HTTP POST● HTTP PUT● HTTP DELETE● HTTP PATCH
  • 34.
    The first method:●HTTP GET● HTTP POST● HTTP PUT● HTTP DELETE● HTTP PATCH
  • 35.
  • 36.
    GET Requests● Whenyou load a website.That’s a GET request● It’s a request to get data fromanother computer● You’re simply asking for dataand you’re not asking toperform a task● You’re not creating, updating ordeleting data● Most common request type
  • 37.
    HTTP Methods forRESTful RequestsHTTPMethodCRUD Operation Example URL(s)GET ReadHTTP GET http://website.com/api/users/HTTP GET http://website.com/api/users/1/
  • 38.
  • 39.
    POST Requests● Donot go through the standardURL, but use a URL as theendpoint● Ask another computer to createa new resource● Returns data about the newlycreated resource
  • 40.
    HTTP Methods forRESTful RequestsHTTPMethodCRUD Operation Example URL(s)GET ReadHTTP GET http://website.com/api/users/HTTP GET http://website.com/api/users/1/POST Create HTTP POST http://website.com/api/users/
  • 41.
  • 42.
    DELETE Requests● Donot go through the standardURL, but use a URL as theendpoint● Ask another computer to deletea single resource or a list ofresources● Use with caution
  • 43.
    HTTP Methods forRESTful RequestsHTTPMethodCRUD Operation Example URL(s)GET ReadHTTP GET http://website.com/api/users/HTTP GET http://website.com/api/users/1/POST Create HTTP POST http://website.com/api/users/DELETE Delete HTTP DELETE http://website.com/api/user/1/
  • 44.
  • 45.
    PATCH Requests● Donot go through the standardURL, but use a URL as theendpoint● Ask another computer toupdate a piece of a resource● Are not fully supported by allbrowsers or frameworks, so wetypically fall back on PUTrequests● Example: Updating a users firstname
  • 46.
    PUT Requests● Donot go through the standardURL, but use a URL as theendpoint● Ask another computer toupdate an entire resource● If the resource doesn’t exist,the API might decide toCREATE (CRUD) the resource
  • 47.
    HTTP Methods forRESTful RequestsHTTPMethodCRUD Operation Example URL(s)GET ReadHTTP GET http://website.com/api/users/HTTP GET http://website.com/api/users/1/POST Create HTTP POST http://website.com/api/users/DELETE Delete HTTP DELETE http://website.com/api/user/1/PUT Update/Replace HTTP PUT http://website.com/api/user/1/PATCH Partial Update/Modify HTTP PATCH http://website.com/api/user/1/More details at https://restfulapi.net/http-methods/
  • 48.
    ConsumingAPIsArt by iconicbestiaryat https://www.freepik.com/iconicbestiary
  • 49.
    APIs can bewritten in almostany server-side language.Art by starline at https://www.freepik.com/starline
  • 50.
    APIs will generallyreturnone of two types datastructures:JSON or XMLArt by starline at https://www.freepik.com/starline
  • 51.
    JSON Example{"key_val_example": "value","array_example":['array item 1','array item 2',],"object_example": {"key1": "value1","key2": "value2"}}Art by starline at https://www.freepik.com/starlineXML Example<example><field>Value</field><secondField>Value</secondField><nestedExample><nestedField>Value</nestedField><nestedSecondField>Value</nestedSecondField></nestedExample></example>
  • 52.
    APIs can beconsumed inalmost any language.Art by starline at https://www.freepik.com/starline
  • 53.
    Browsers use JavaScriptfortheir API requests.Servers use any language thatruns on that computer.Art by starline at https://www.freepik.com/starline
  • 54.
  • 55.
    Requests andResponsesWhen yourequest data from aserver using GET, POST, PUT,PATCH or DELETE… that’s arequest.When the server returns yourdata… that’s a response
  • 56.
    Requests andResponsesResponses willalways comewith an HTTP Status Code.And these “status codes” tell youwhat’s wrong (or right) withoutneeding to give you text back toread.
  • 57.
    Common HTTPStatus CodesHealthyResponses (2--)● 200 — OK.Request accepted.● 201 — Created.POST requests often return 201s when a resource is created.● 202 — Accepted.When a request is accepted but its not done processing.Maybe the task goes into a queue.
  • 58.
    Common HTTPStatus CodesRedirectResponses (3--)● 301 — Moved Permanently.When the endpoint has permanently changed. Update yourendpoint.● 302 — Found.The endpoint you’re accessing is temporarily moved tosomewhere else.
  • 59.
    Common HTTPStatus CodesClientResponses (4--)● 400 — Bad Request.Server cannot or will not process your request. Often this isdue to malformed API keys or an invalid payload.● 401 — Unauthorized.You’re not allowed here. Usually this is because you’remissing authentication credentials (API keys)● 403 — Forbidden.The servers understands your request but won’t execute it.Your API keys might not have the right permissions or yourtrying to use an endpoint that you don’t have access to.● 404 — Not Found.There’s nothing here. Move along, move along.● 405 — Method Not Allowed.You’re using the wrong HTTP Method. The endpoint mightonly accept GET requests and you might be POSTing to it,for example.
  • 60.
    Common HTTPStatus CodesServer Responses (5--)● 500 — Internal Server Error.The server had a problem and couldn’t process the request.This is the only time you are out of control.
  • 61.
    Just For FunFind outwhat a 418response is
  • 62.
    API SecurityArt byfreepik at https://www.freepik.com/freepik
  • 63.
    API Keys● APIkeys are “passwords” toaccess an API. These are yourauthentication credentials.● Almost every website requiresAPI keys to perform some action.● Facebook's Graph API is a goodexamplegraph.facebook.com/codingforeverybody
  • 64.
    Access tokenrequired.Access tokensareusually generatedwith an API key.Matching 400 statuscode.“Bad Request”.Something is missing.
  • 65.
    Access tokenrequired.Access tokensareusually generatedwith an API key.Other services mightthrow you a 403 or405 status.
  • 66.
    Art by SapannDesign at https://www.freepik.com/sapann-designSummary
  • 67.
    Think of anAPIas awaiter as arestaurant.Art by iconicbestiary at https://www.freepik.com/iconicbestiary
  • 69.
    HTTP Methods forRESTful RequestsHTTPMethodCRUD Operation Example URL(s)GET ReadHTTP GET http://website.com/api/users/HTTP GET http://website.com/api/users/1/POST Create HTTP POST http://website.com/api/users/DELETE Delete HTTP DELETE http://website.com/api/user/1/PUT Update/Replace HTTP PUT http://website.com/api/user/1/PATCH Partial Update/Modify HTTP PATCH http://website.com/api/user/1/
  • 70.
    Most APIs aresecured with API keysArt by freepik at https://www.freepik.com/freepik
  • 71.
    Free Resources● https://restfulapi.net/http-methods/●https://httpstatuses.com/● https://swapi.co/Art by rawpixel.com at https://www.freepik.com/rawpixel-com
  • 73.

[8]ページ先頭

©2009-2025 Movatter.jp