{"id":18532,"date":"2020-06-25T15:14:22","date_gmt":"2020-06-25T22:14:22","guid":{"rendered":"https:\/\/careerkarma.com\/blog\/?p=18532"},"modified":"2023-12-01T03:34:36","modified_gmt":"2023-12-01T11:34:36","slug":"restful-api","status":"publish","type":"post","link":"https:\/\/careerkarma.com\/blog\/restful-api\/","title":{"rendered":"What is a RESTful API?"},"content":{"rendered":"\n<p>At some point in your career as a developer, you\u2019ve likely encountered RESTful APIs. But, do you know what they are? How do they work?<br><\/p>\n\n\n\n<p>In this guide, we discuss the essentials of REST APIs, covering everything you need to know to query a REST API.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is a RESTful API?<\/h2>\n\n\n\n<p>RESTful APIs allow you to retrieve data. For example, you can use a REST API to retrieve data about your favorite movies from a movie API, or your fitness data from the Fitbit API.<br><\/p>\n\n\n\n<p>API stands for \u201cApplication Programming Interface.\u201d It is a program that allows websites and servers to talk to each other. An API is hosted on a server with its own database; websites and programs can retrieve data from the API.<br><\/p>\n\n\n\n<p>REST, which stands for \u201cREpresentational State Transfer,\u201d is a set of guidelines determining how a web API should be structured.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">REST Request Example<\/h2>\n\n\n\n<p>To work with an API using the REST architectural style, you need to make a request. The data that you receive after you make a request is called the response.<br><\/p>\n\n\n\n<p>Let\u2019s start by discussing endpoints. When you\u2019re making a request, you need to query an endpoint. This is the URL from which you want to get data.&nbsp;<br><\/p>\n\n\n\n<p>Suppose you want to retrieve data from the Hacker News API. This API allows us to retrieve data on posts from the Y Combinator Hacker News platform.<br><\/p>\n\n\n\n<p>To make your request, you need to read through the API documentation. In this case, the Hacker News API says that we can use the following URL to retrieve a story:<\/p>\n\n\n\nhttps:\/\/hacker-news.firebaseio.com\/v0\/item\/:postid.json?print=pretty\n\n\n\n<p><\/p>\n\n\n\n<p>In this example, :postid is the post that we want to retrieve. Generally speaking, when you see colons in API documentation, you should insert a variable. In this case, suppose we want to get the post with the ID 23460066. We could do so using this URL:<\/p>\n\n\n\nhttps:\/\/hacker-news.firebaseio.com\/v0\/item\/23460066.json?print=pretty\n\n\n\n<p><\/p>\n\n\n\n<p>Now that we have a REST request ready, we can make our request to the API.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Making a REST Request<\/h2>\n\n\n\n<p>Most programming languages have their own modules to allow web requests. Python offers the Python requests package. JavaScript offers the Fetch API and isomorphic-fetch. For this tutorial, we\u2019re going to use a command line program called cURL. This allows you to make web requests from your command line.<br><\/p>\n\n\n\n<p>To make a request, all we have to do is use the curl command, followed by the REST URL that we want to query. In the example of the Hacker News API above, we\u2019d use the following command:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>curl https:\/\/hacker-news.firebaseio.com\/v0\/item\/23460066.json?print=pretty<\/pre><\/div>\n\n\n\n<p>Our code returns:<br><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh6.googleusercontent.com\/03bQRkPAtNZ8wuHC188FNBlfr5llERRqHzV4lVh2g7Xdxb2KVK2Kn2g4CcrO137020AWciMN3ovJf-cbGg9kgK5-FDRzRVoKiaTTpkvQhR6h76ekEDW_uAGyBcP_Ql-W37uR78Ci\" alt=\"\"\/><\/figure>\n\n\n\n<p>As you can see, the API has returned the data for the post with the ID 23460066. We can see the post\u2019s author, comment \u201ckids,\u201d title, and more. If we want to get another post, all we have to do is change the post ID.<br><\/p>\n\n\n\n<p>The data returned by a request is usually structured in the JSON format. JSON stands for JavaScript Notation, and is a standard way of expressing data.<br><\/p>\n\n\n\n<p>In JSON data, keys are stored on the left-hand side of a colon. The key is the label that is assigned to a value. Values are stored on the right-hand side of a colon. Here\u2019s an example key-value pair from the above response:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>\"by\": \"arkadiyt\"<\/pre><\/div>\n\n\n\n<p>The key in this case is \u201cby\u201d and the value is \u201carkadiyt\u201d. These values are separated with a colon.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How do REST Requests Work?<\/h2>\n\n\n\n<p>There are four parts to a REST request:<br><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>An endpoint URL<\/li>\n\n\n\n<li>A HTTP method<\/li>\n\n\n\n<li>Body (data)<\/li>\n\n\n\n<li>HTTP headers<\/li>\n<\/ul>\n\n\n\n<p>An endpoint is the URL that you query when making a REST request. In the example above, we queried a URL on the Hacker News API, which allowed us to get data about a certain post.<br><\/p>\n\n\n\n<p>Let\u2019s discuss the other parts of a REST request.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">HTTP Method<\/h3>\n\n\n\n<p>HTTP offers several methods to interact with a REST API. These methods allow you to create, read, update, and delete (CRUD) data on an API.<br><\/p>\n\n\n\n<p>The four main types of requests you\u2019ll encounter are the following:<br><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>GET<\/strong>: This request allows you to retrieve data from a server.<\/li>\n\n\n\n<li><strong>POST<\/strong>: This allows you to create new data on a server.<\/li>\n\n\n\n<li><strong>PUT<\/strong>: Allows you to update a record on a server.<\/li>\n\n\n\n<li><strong>DELETE<\/strong>: This allows you to delete information on a server.<\/li>\n<\/ul>\n\n\n\n<p>To specify the method used with an API request, you can use the -X flag in curl. Here\u2019s an example of a command that allows you to run a POST request on an API:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>curl -X POST https:\/\/yourapihere.com\/api_endpoint<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Body<\/h3>\n\n\n\n<p>The body of your request (also known as the data) is the information that you want to send to a server. You can only specify a request body with a POST, PUT or DELETE request.<br><\/p>\n\n\n\n<p>You can use the -d flag to send data using cURL. To do so, you should specify the property name of the data you want to send followed by an equals sign and the value of that property name. Here\u2019s an example of a cURL request that sends data to a server:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>curl -X POST [URL] -d propertyName=value<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">HTTP Headers<\/h3>\n\n\n\n<p>Response headers provide additional information to a client and a server. These headers are often used to specify the type of content being sent to an API, or the authentication credentials you\u2019ll use to sign in to an API. HTTP headers are structured as follows:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>\"Authentication: Bearer your_token\"<\/pre><\/div>\n\n\n\n<p>On the left side of the colon, you should specify the name of the property you want to set. In this case, we are setting a property for the attribute \u201cAuthentication.\u201d On the right side of the colon, you should specify the value of the attribute you have set.<br><\/p>\n\n\n\n<p>Here\u2019s an example of a cURL request with a header attached:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>curl -X POST -H \"Authentication: Bearer your_token\" [URL]<\/pre><\/div>\n\n\n\n<p>This request will send the header \u201cAuthentication: Bearer your_token\u201d to the API URL that we specify.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Authentication with REST<\/h3>\n\n\n\n<p>Before you start working with REST APIs, you need to know about authentication. Authentication ensures that only you can access data associated with your account.<br><\/p>\n\n\n\n<p>Most POST, PATCH and DELETE requests will require an authentication key. This is because they allow you to modify data on a server. You may also be asked to specify an authentication key with a GET request if you are accessing non-public information.<br><\/p>\n\n\n\n<p>In our Hacker News example from earlier, we didn\u2019t need to specify any authentication credentials because the Hacker News API is publicly available. However, if we need to, there are several ways to authenticate ourselves using an API:<br><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Basic authentication: This involves specifying a user\u2019s username and password to authenticate with an API.<\/li>\n\n\n\n<li>OAuth: OAuth is a protocol for authentication that can be sent with each API request to authenticate a user, until the OAuth key expires.<\/li>\n\n\n\n<li>API keys: API keys give you specific access rights when querying an API. These keys will be associated with your account on a web service.<\/li>\n<\/ul>\n\n\n\n<p>The way in which you query an API depends on what method of authentication you are using. Usually, you\u2019ll find instructions on how to authenticate with an API in the API\u2019s documentation.<br><\/p>\n\n\n\n<p>Suppose we want to query the Airtable API. To do so, we need an authentication key. We can retrieve this by following the instructions from the <a href=\"https:\/\/airtable.com\/api\" target=\"_blank\" rel=\"noopener\" rel=\"nofollow\">Airtable API documentation<\/a>.<br><\/p>\n\n\n\n<p>Here\u2019s an example request that allows me to retrieve records in an Airtable base following the API documentation:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>curl https:\/\/api.airtable.com\/v0\/appiTz7oLBs9hDIFg\/Tracker -H \"Authorization: Bearer YOUR_API_KEY\"<\/pre><\/div>\n\n\n\n<p>When I run this query with my private API key in place of \u201cYOUR_API_KEY,\u201d the following response is returned:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>{\n  \"records\": [\n\t{\n  \t\"id\": \"rec3fxfwVYvORk2E5\",\n  \t\"fields\": {\n    \t\"Drink\": \"Black Decaf Tea\",\n    \t\"Date\": \"2020-05-30T14:04:22.000Z\"\n  \t},\n  \t\"createdTime\": \"2020-05-30T14:04:22.000Z\"\n\t}\n  ]\n}<\/pre><\/div>\n\n\n\n<p>As you can see, the API has returned a record from my database. But, if I hadn\u2019t specified an authorization header, the following would have been returned:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>{\"error\":{\"type\":\"AUTHENTICATION_REQUIRED\",\"message\":\"Authentication required\"}}<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">HTTP Error Messages<\/h3>\n\n\n\n<p>When interacting with an API, you may encounter a few different error messages. These may appear for different reasons. For example, you may have specified the wrong authentication key, or you may be making a HTTP request to an endpoint that does not exist.<br><\/p>\n\n\n\n<p>Here are the main codes you can expect to see in your response to an API:<br><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>2xx means a request has succeeded<\/li>\n\n\n\n<li>3xx means a request has been redirected<\/li>\n\n\n\n<li>4xx means a client-side error has occurred<\/li>\n\n\n\n<li>5xx means a server-side error has been returned<\/li>\n<\/ul>\n\n\n\n<p>We can see these codes by specifying the -I flag, which allows us to see the HTTP status code sent by a request. Suppose we tried to query the Airtable API without an API key. We could do so using this command:&nbsp;<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>curl https:\/\/api.airtable.com\/v0\/appiTz7oLBs9hDIFg\/Tracker -I<\/pre><\/div>\n\n\n\n<p>When we run this command, the following is returned:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>HTTP\/1.1 401 Unauthorized\nContent-Type: application\/json; charset=utf-8\nDate: Tue, 09 Jun 2020 08:26:32 GMT\nETag: W\/\"50-8xYAvLBWleFLl\/buYhG+M42uVZo\"\n\u2026<\/pre><\/div>\n\n\n\n<p>As you can see, a 401 request was returned. This is because we didn\u2019t specify a valid API key.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Your Next Steps<\/h2>\n\n\n\n<p>REST APIs are a useful tool to interact with RESTful web services. REST principles are the structure used to make a web request to an API.<br><\/p>\n\n\n\n<p>If you\u2019re looking to get started working with a REST API, a few tools can help you, including:<br><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.postman.com\/\" target=\"_blank\" rel=\"noopener\" rel=\"nofollow\">Postman<\/a>: A tool to help you test REST APIs<\/li>\n\n\n\n<li><a href=\"http:\/\/insomnia.rest\" target=\"_blank\" rel=\"noopener\" rel=\"nofollow\">Insomnia<\/a>: Allows you to explore and test GraphQL and REST APIs<\/li>\n\n\n\n<li><a href=\"https:\/\/swagger.io\/\" target=\"_blank\" rel=\"noopener\" rel=\"nofollow\">Swagger<\/a>: A range of tools to assist with REST API design and testing.<\/li>\n<\/ul>\n\n\n\n<p>In this article, we used two APIs: the Hacker News API and the Airtable API. But there are many others you can play around with.<br><\/p>\n\n\n\n<p>Many of the web services you interact with on a daily basis have an API. Twitter, Spotify, GitHub, and CircleCI all have APIs that you can use. There\u2019s also a great list of public APIs that you can use for free in the \u201c<a href=\"https:\/\/github.com\/public-apis\/public-apis\" target=\"_blank\" rel=\"noopener\" rel=\"nofollow\">public-apis<\/a>\u201d repository on GitHub.<br><\/p>\n\n\n\n<p>The best way to enhance your understanding of REST APIs is to work with them. Pick an API that interests you and make a few requests!<\/p>\n","protected":false},"excerpt":{"rendered":"At some point in your career as a developer, you\u2019ve likely encountered RESTful APIs. But, do you know what they are? How do they work? In this guide, we discuss the essentials of REST APIs, covering everything you need to know to query a REST API. What is a RESTful API? RESTful APIs allow you&hellip;","protected":false},"author":240,"featured_media":18090,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[18070],"tags":[],"class_list":{"0":"post-18532","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-software-engineering-skills"},"acf":{"post_sub_title":"","sprint_id":"","query_class":"What is a {technical term}","school_sft":"","parent_sft":"","school_privacy_policy":"","has_review":"","is_sponser_post":"","is_guest_post":""},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.4 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>What is a RESTful API?: A Complete Guide | Career Karma<\/title>\n<meta name=\"description\" content=\"REST refers to the set of rules used to build web services and APIs. On Career Karma, learn about REST and how to work with RESTful APIs.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/careerkarma.com\/blog\/restful-api\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What is a RESTful API?\" \/>\n<meta property=\"og:description\" content=\"REST refers to the set of rules used to build web services and APIs. On Career Karma, learn about REST and how to work with RESTful APIs.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/careerkarma.com\/blog\/restful-api\/\" \/>\n<meta property=\"og:site_name\" content=\"Career Karma\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/facebook.com\/careerkarmaapp\" \/>\n<meta property=\"article:published_time\" content=\"2020-06-25T22:14:22+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-01T11:34:36+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/07\/kelly-sikkema-YK0HPwWDJ1I-unsplash.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1020\" \/>\n\t<meta property=\"og:image:height\" content=\"680\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"James Gallagher\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@career_karma\" \/>\n<meta name=\"twitter:site\" content=\"@career_karma\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"James Gallagher\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/restful-api\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/restful-api\\\/\"},\"author\":{\"name\":\"James Gallagher\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#\\\/schema\\\/person\\\/e79364792443fbff794a144c67ec8e94\"},\"headline\":\"What is a RESTful API?\",\"datePublished\":\"2020-06-25T22:14:22+00:00\",\"dateModified\":\"2023-12-01T11:34:36+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/restful-api\\\/\"},\"wordCount\":1631,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/restful-api\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/07\\\/kelly-sikkema-YK0HPwWDJ1I-unsplash.jpg\",\"articleSection\":[\"Software Engineering\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/careerkarma.com\\\/blog\\\/restful-api\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/restful-api\\\/\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/restful-api\\\/\",\"name\":\"What is a RESTful API?: A Complete Guide | Career Karma\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/restful-api\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/restful-api\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/07\\\/kelly-sikkema-YK0HPwWDJ1I-unsplash.jpg\",\"datePublished\":\"2020-06-25T22:14:22+00:00\",\"dateModified\":\"2023-12-01T11:34:36+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#\\\/schema\\\/person\\\/e79364792443fbff794a144c67ec8e94\"},\"description\":\"REST refers to the set of rules used to build web services and APIs. On Career Karma, learn about REST and how to work with RESTful APIs.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/restful-api\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/careerkarma.com\\\/blog\\\/restful-api\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/restful-api\\\/#primaryimage\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/07\\\/kelly-sikkema-YK0HPwWDJ1I-unsplash.jpg\",\"contentUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/07\\\/kelly-sikkema-YK0HPwWDJ1I-unsplash.jpg\",\"width\":1020,\"height\":680,\"caption\":\"Woman wearing black shirt sitting at desk, working on computer\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/restful-api\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Software Engineering\",\"item\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/software-engineering-skills\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"What is a RESTful API?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/\",\"name\":\"Career Karma\",\"description\":\"Latest Coding Bootcamp News &amp; Career Hacks from Industry Insiders\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#\\\/schema\\\/person\\\/e79364792443fbff794a144c67ec8e94\",\"name\":\"James Gallagher\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/james-gallagher-150x150.jpg\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/james-gallagher-150x150.jpg\",\"contentUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/james-gallagher-150x150.jpg\",\"caption\":\"James Gallagher\"},\"description\":\"James Gallagher is a self-taught programmer and the technical content manager at Career Karma. He has experience in range of programming languages and extensive expertise in Python, HTML, CSS, and JavaScript. James has written hundreds of programming tutorials, and he frequently contributes to publications like Codecademy, Treehouse, Repl.it, Afrotech, and others.\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/author\\\/jamesgallagher\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"What is a RESTful API?: A Complete Guide | Career Karma","description":"REST refers to the set of rules used to build web services and APIs. On Career Karma, learn about REST and how to work with RESTful APIs.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/careerkarma.com\/blog\/restful-api\/","og_locale":"en_US","og_type":"article","og_title":"What is a RESTful API?","og_description":"REST refers to the set of rules used to build web services and APIs. On Career Karma, learn about REST and how to work with RESTful APIs.","og_url":"https:\/\/careerkarma.com\/blog\/restful-api\/","og_site_name":"Career Karma","article_publisher":"http:\/\/facebook.com\/careerkarmaapp","article_published_time":"2020-06-25T22:14:22+00:00","article_modified_time":"2023-12-01T11:34:36+00:00","og_image":[{"width":1020,"height":680,"url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/07\/kelly-sikkema-YK0HPwWDJ1I-unsplash.jpg","type":"image\/jpeg"}],"author":"James Gallagher","twitter_card":"summary_large_image","twitter_creator":"@career_karma","twitter_site":"@career_karma","twitter_misc":{"Written by":"James Gallagher","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/careerkarma.com\/blog\/restful-api\/#article","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/restful-api\/"},"author":{"name":"James Gallagher","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"headline":"What is a RESTful API?","datePublished":"2020-06-25T22:14:22+00:00","dateModified":"2023-12-01T11:34:36+00:00","mainEntityOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/restful-api\/"},"wordCount":1631,"commentCount":0,"image":{"@id":"https:\/\/careerkarma.com\/blog\/restful-api\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/07\/kelly-sikkema-YK0HPwWDJ1I-unsplash.jpg","articleSection":["Software Engineering"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/careerkarma.com\/blog\/restful-api\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/careerkarma.com\/blog\/restful-api\/","url":"https:\/\/careerkarma.com\/blog\/restful-api\/","name":"What is a RESTful API?: A Complete Guide | Career Karma","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/restful-api\/#primaryimage"},"image":{"@id":"https:\/\/careerkarma.com\/blog\/restful-api\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/07\/kelly-sikkema-YK0HPwWDJ1I-unsplash.jpg","datePublished":"2020-06-25T22:14:22+00:00","dateModified":"2023-12-01T11:34:36+00:00","author":{"@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"description":"REST refers to the set of rules used to build web services and APIs. On Career Karma, learn about REST and how to work with RESTful APIs.","breadcrumb":{"@id":"https:\/\/careerkarma.com\/blog\/restful-api\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/careerkarma.com\/blog\/restful-api\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/restful-api\/#primaryimage","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/07\/kelly-sikkema-YK0HPwWDJ1I-unsplash.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/07\/kelly-sikkema-YK0HPwWDJ1I-unsplash.jpg","width":1020,"height":680,"caption":"Woman wearing black shirt sitting at desk, working on computer"},{"@type":"BreadcrumbList","@id":"https:\/\/careerkarma.com\/blog\/restful-api\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/careerkarma.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Software Engineering","item":"https:\/\/careerkarma.com\/blog\/software-engineering-skills\/"},{"@type":"ListItem","position":3,"name":"What is a RESTful API?"}]},{"@type":"WebSite","@id":"https:\/\/careerkarma.com\/blog\/#website","url":"https:\/\/careerkarma.com\/blog\/","name":"Career Karma","description":"Latest Coding Bootcamp News &amp; Career Hacks from Industry Insiders","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/careerkarma.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94","name":"James Gallagher","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg","caption":"James Gallagher"},"description":"James Gallagher is a self-taught programmer and the technical content manager at Career Karma. He has experience in range of programming languages and extensive expertise in Python, HTML, CSS, and JavaScript. James has written hundreds of programming tutorials, and he frequently contributes to publications like Codecademy, Treehouse, Repl.it, Afrotech, and others.","url":"https:\/\/careerkarma.com\/blog\/author\/jamesgallagher\/"}]}},"_links":{"self":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/18532","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/users\/240"}],"replies":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/comments?post=18532"}],"version-history":[{"count":0,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/18532\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media\/18090"}],"wp:attachment":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media?parent=18532"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/categories?post=18532"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/tags?post=18532"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}