{"id":4491,"date":"2019-10-15T08:00:35","date_gmt":"2019-10-15T11:00:35","guid":{"rendered":"http:\/\/www.rcodigital.com.br\/blog\/?p=4491"},"modified":"2020-11-19T13:25:25","modified_gmt":"2020-11-19T13:25:25","slug":"a-estrutura-de-uma-api-rest","status":"publish","type":"post","link":"https:\/\/www.intergate.net.br\/blog\/a-estrutura-de-uma-api-rest\/","title":{"rendered":"A estrutura de uma API REST"},"content":{"rendered":"\n<p>Nos dias de hoje, um bom programador deve conhecer nem que seja conceitos b\u00e1sicos e a estrutura  de uma <strong>API REST ful.  <\/strong><\/p>\n\n\n\n<p>E de acordo com uma pesquisa recente da Pusher<strong>, um desenvolvedor nos EUA usa em m\u00e9dia 18 APIs para construir sua aplica\u00e7\u00e3o<\/strong>. Da mesma forma, todo ano surgem <strong>2 mil novas APIs<\/strong>.<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>O mercado de APIs como servi\u00e7o espera ultrapassar U$1B at\u00e9 2020, com taxa de crescimento anual acima de 30% (Fonte Technavio).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">O<strong> que \u00e9 uma API&nbsp;RESTful?<\/strong><\/h2>\n\n\n\n<p>O que quer dizer <strong>API<\/strong> (<strong>Application Programming Interface)<\/strong> ? \u00c9 uma interface de comunica\u00e7\u00e3o entre desenvolvedores<strong>.<\/strong><\/p>\n\n\n\n<p>Em rela\u00e7\u00e3o ao <strong>REST (Representational State Transfer),<\/strong> ele \u00e9 um conjunto de regras e boas pr\u00e1ticas para o desenvolvimento dessas <a aria-label=\"APIs (opens in a new tab)\" href=\"http:\/\/www.intergate.net.br\/blog\/integracao-entre-sistemas-e-a-evolucao-das-apis\/\" target=\"_blank\" rel=\"noreferrer noopener\">APIs<\/a>.<\/p>\n\n\n\n<p>Vamos dizer que voc\u00ea tenha um sistema com banco de dados e ocorra a necessidade que outras  empresas e pessoas tenham acesso a suas informa\u00e7\u00f5es. <\/p>\n\n\n\n<p>Pronto, \u00e9 a\u00ed que entram as APIs. <\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"1024\" height=\"576\" src=\"http:\/\/intergate.net.br\/blog\/wp-content\/uploads\/2019\/10\/BLOG-2-1024x576.jpg\" alt=\"\" class=\"wp-image-5294\" srcset=\"https:\/\/www.intergate.net.br\/blog\/wp-content\/uploads\/2019\/10\/BLOG-2-1024x576.jpg 1024w, https:\/\/www.intergate.net.br\/blog\/wp-content\/uploads\/2019\/10\/BLOG-2-600x338.jpg 600w, https:\/\/www.intergate.net.br\/blog\/wp-content\/uploads\/2019\/10\/BLOG-2-300x169.jpg 300w, https:\/\/www.intergate.net.br\/blog\/wp-content\/uploads\/2019\/10\/BLOG-2-768x432.jpg 768w, https:\/\/www.intergate.net.br\/blog\/wp-content\/uploads\/2019\/10\/BLOG-2-1200x675.jpg 1200w, https:\/\/www.intergate.net.br\/blog\/wp-content\/uploads\/2019\/10\/BLOG-2.jpg 1280w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Agora vamos falar de como funciona uma API RESTful na pr\u00e1tica.<\/p>\n\n\n\n<p><strong>O primeiro ponto a esclarecer: quando falamos de APIs, toda a comunica\u00e7\u00e3o dessa interface \u00e9 feita via web.<\/strong> Quer dizer, tudo \u00e9 feito atrav\u00e9s de uma requisi\u00e7\u00e3o a uma URL, que por sua vez, traz uma resposta.<\/p>\n\n\n\n<p>Voltando ao exemplo anterior, pense que voc\u00ea \u00e9 um desenvolvedor e quer saber dos melhores vinhos da regi\u00e3o sul do Brasil. Nesse caso voc\u00ea faria uma requisi\u00e7\u00e3o dessa informa\u00e7\u00e3o para uma URL dessa <a href=\"http:\/\/www.intergate.net.br\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"API (opens in a new tab)\">API<\/a>, e ela te retornaria uma resposta. Simples, n\u00e3o?<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Entendendo uma requisi\u00e7\u00e3o<\/strong><\/h2>\n\n\n\n<p>A<strong> URL nada mais \u00e9,<\/strong> <strong> que o caminho para fazer a requisi\u00e7\u00e3o.<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Estrutura da URL &#8211; endpoint <\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Base URL<\/strong><\/li><\/ul>\n\n\n\n<p>\u00c9 o in\u00edcio da URL da requisi\u00e7\u00e3o. <strong>Aqui, voc\u00ea basicamente informa o dom\u00ednio que se repete em qualquer requisi\u00e7\u00e3o.<\/strong> <\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Resource ou Path<\/strong><\/li><\/ul>\n\n\n\n<p><strong>O resource<\/strong> (<strong>recurso) \u00e9 o tipo de informa\u00e7\u00e3o que voc\u00ea est\u00e1 buscando.<\/strong> Em primeiro lugar, eu simularei buscas de informa\u00e7\u00f5es sobre vinhos e  acrescentarei o resource vinhos:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Query String<\/strong><\/li><\/ul>\n\n\n\n<p><strong>A query string cont\u00e9m os par\u00e2metros da requisi\u00e7\u00e3o<\/strong>.<\/p>\n\n\n\n<p>No entanto, se eu quiser saber os melhores vinhos da regi\u00e3o sul do Brasil, eu incluirei os par\u00e2metros <strong>&nbsp;<\/strong>e nossa URL ficar\u00e1 assim: <\/p>\n\n\n\n<p class=\"has-black-color has-text-color has-background has-medium-font-size\" style=\"background-color:#61e6d9\">https:\/\/api.minhagastronomia.com\/vinhos?pais=brasil&#038;regiao=sul <\/p>\n\n\n\n<p>Como podem ver acima, por se tratar de par\u00e2metros da URL, voc\u00ea usa o (?) e caso queira utilizar mais de um par\u00e2metro voc\u00ea utiliza o (&amp;).<\/p>\n\n\n\n<p>OBS: N\u00e3o se utiliza a<strong> Query String  somente  para filtros. Ela \u00e9<\/strong> <strong>utilizada como par\u00e2metros de pagina\u00e7\u00e3o, versionamento, ordena\u00e7\u00e3o, e muito mais.<\/strong><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter is-resized\"><img decoding=\"async\" src=\"http:\/\/intergate.net.br\/blog\/wp-content\/uploads\/2019\/10\/api-management.png\" alt=\"\" class=\"wp-image-5297\" width=\"467\" height=\"319\" srcset=\"https:\/\/www.intergate.net.br\/blog\/wp-content\/uploads\/2019\/10\/api-management.png 365w, https:\/\/www.intergate.net.br\/blog\/wp-content\/uploads\/2019\/10\/api-management-300x205.png 300w\" sizes=\"(max-width: 467px) 100vw, 467px\" \/><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>O m\u00e9todo<\/strong><\/h2>\n\n\n\n<p><strong>O m\u00e9todo te ajuda a informar o tipo de a\u00e7\u00e3o que voc\u00ea est\u00e1 fazendo naquela requisi\u00e7\u00e3o.<\/strong><\/p>\n\n\n\n<p>Dentre os principais m\u00e9todos, temos:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Get (Buscar dados)<\/li><li>Post (Enviar dados)<\/li><li>Put e Patch (Atualizar dados)<\/li><li>Delete (Deletar dados)<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Headers<\/strong> (cabe\u00e7alhos)<\/h2>\n\n\n\n<p><strong>Headers ou cabe\u00e7alhos permitem que voc\u00ea envie informa\u00e7\u00f5es adicionais na requisi\u00e7\u00e3o.<\/strong> Voc\u00ea pode utiliz\u00e1-lo para in\u00fameras fun\u00e7\u00f5es, como: autentica\u00e7\u00e3o, formata\u00e7\u00e3o de objeto, e muito mais.<\/p>\n\n\n\n<p>N\u00e3o recomendasse que voc\u00ea crie headers customizados, e aqui voc\u00ea pode ver todos os&nbsp;padr\u00f5es de utiliza\u00e7\u00e3o.<\/p>\n\n\n\n<p>Para utiliz\u00e1-lo \u00e9 simples, em primeiro lugar voc\u00ea coloca a propriedade, seguido de dois pontos e depois o valor, tudo entre aspas, por exemplo:<\/p>\n\n\n\n<p class=\"has-black-color has-text-color has-background has-medium-font-size\" style=\"background-color:#61e6d9\">\u201cAuthorization: token123242343534\u201d.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Body<\/strong><\/h2>\n\n\n\n<p><strong>O body \u00e9 o corpo da mensagem que voc\u00ea quer enviar na requisi\u00e7\u00e3o<\/strong>.<\/p>\n\n\n\n<p>Ent\u00e3o, utilizarei o body somente nos m\u00e9todos de POST, PUT, PATCH, porque ele cont\u00e9m o dado a processar pela API, e por isso o body n\u00e3o \u00e9 necess\u00e1rio em m\u00e9todos de leitura de dados.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"http:\/\/www.intergate.net.br\/conector\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" width=\"1024\" height=\"254\" src=\"http:\/\/www.intergate.net.br\/blog\/wp-content\/uploads\/2020\/08\/chamada_conectorDesempenho-3-1024x254.png\" alt=\"\" class=\"wp-image-6661\" srcset=\"https:\/\/www.intergate.net.br\/blog\/wp-content\/uploads\/2020\/08\/chamada_conectorDesempenho-3-1024x254.png 1024w, https:\/\/www.intergate.net.br\/blog\/wp-content\/uploads\/2020\/08\/chamada_conectorDesempenho-3-300x74.png 300w, https:\/\/www.intergate.net.br\/blog\/wp-content\/uploads\/2020\/08\/chamada_conectorDesempenho-3-768x190.png 768w, https:\/\/www.intergate.net.br\/blog\/wp-content\/uploads\/2020\/08\/chamada_conectorDesempenho-3-1536x381.png 1536w, https:\/\/www.intergate.net.br\/blog\/wp-content\/uploads\/2020\/08\/chamada_conectorDesempenho-3.png 1565w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>HTTP Status&nbsp;Codes<\/strong><\/h2>\n\n\n\n<p><strong>Para facilitar o entendimento das respostas das APIs existem padr\u00f5es de c\u00f3digos de status (Http status codes)  que podem ser utilizados.<\/strong><\/p>\n\n\n\n<p>Os status codes mais utilizados para as respostas de uma requisi\u00e7\u00e3o s\u00e3o o&nbsp;<strong>200 (OK), o 201 (created), o 204 (no content), o 404 (not found), o 400 (bad request), e 500 (internal server error).<\/strong><\/p>\n\n\n\n<p>Como padr\u00e3o, os c\u00f3digos de sucesso tem o prefixo&nbsp;<strong>20x<\/strong>, os de redirecionamento&nbsp;<strong>30x<\/strong>, os de erro do cliente&nbsp;<strong>40x<\/strong>&nbsp;e os de erro de servidor&nbsp;<strong>50x<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"1280\" height=\"720\" src=\"https:\/\/i2.wp.com\/www.intergate.net.br\/blog\/wp-content\/uploads\/2019\/10\/blog2.jpg?fit=525%2C295\" alt=\"\" class=\"wp-image-5302\" srcset=\"https:\/\/www.intergate.net.br\/blog\/wp-content\/uploads\/2019\/10\/blog2.jpg 1280w, https:\/\/www.intergate.net.br\/blog\/wp-content\/uploads\/2019\/10\/blog2-600x338.jpg 600w, https:\/\/www.intergate.net.br\/blog\/wp-content\/uploads\/2019\/10\/blog2-300x169.jpg 300w, https:\/\/www.intergate.net.br\/blog\/wp-content\/uploads\/2019\/10\/blog2-1024x576.jpg 1024w, https:\/\/www.intergate.net.br\/blog\/wp-content\/uploads\/2019\/10\/blog2-768x432.jpg 768w, https:\/\/www.intergate.net.br\/blog\/wp-content\/uploads\/2019\/10\/blog2-1200x675.jpg 1200w\" sizes=\"(max-width: 1280px) 100vw, 1280px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Autentica\u00e7\u00e3o<\/strong><\/h2>\n\n\n\n<p>Acima de tudo, a autentica\u00e7\u00e3o \u00e9 uma seguran\u00e7a para nossas APIs, porque os dados da API s\u00e3o expostos na WEB.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Basic authentication<\/strong> (autentica\u00e7\u00e3o B\u00e1sica)<\/li><\/ul>\n\n\n\n<p>\u00c9 uma Autentica\u00e7\u00e3o baseada em usu\u00e1rio e senha codificados em Base64 e utilizado no header da requisi\u00e7\u00e3o.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Secret token<\/strong><\/li><\/ul>\n\n\n\n<p>\u00c9 o Token de acesso que se limita ao escopo, assim ser\u00e1 enviado na requisi\u00e7\u00e3o pelo Header ou pela Query String.<\/p>\n\n\n\n<p>Nesse caso temos padr\u00f5es famosos como oAuth e JWT.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"http:\/\/www.intergate.net.br\/conector\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" width=\"1024\" height=\"256\" src=\"http:\/\/www.intergate.net.br\/blog\/wp-content\/uploads\/2020\/08\/chamada_conectorPreco-2-1024x256.png\" alt=\"\" class=\"wp-image-6660\" srcset=\"https:\/\/www.intergate.net.br\/blog\/wp-content\/uploads\/2020\/08\/chamada_conectorPreco-2-1024x256.png 1024w, https:\/\/www.intergate.net.br\/blog\/wp-content\/uploads\/2020\/08\/chamada_conectorPreco-2-300x75.png 300w, https:\/\/www.intergate.net.br\/blog\/wp-content\/uploads\/2020\/08\/chamada_conectorPreco-2-768x192.png 768w, https:\/\/www.intergate.net.br\/blog\/wp-content\/uploads\/2020\/08\/chamada_conectorPreco-2-1536x384.png 1536w, https:\/\/www.intergate.net.br\/blog\/wp-content\/uploads\/2020\/08\/chamada_conectorPreco-2.png 1559w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p><strong>FONTE<\/strong>: Blog LinkApi Solutions<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A API restful da intergate integra seu ERP com outras aplica\u00e7\u00f5es <\/p>\n","protected":false},"author":5,"featured_media":5286,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"content-type":"","_themeisle_gutenberg_block_has_review":false,"footnotes":""},"categories":[7,10,13,14],"tags":[63,276,447,548],"class_list":["post-4491","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-integracao-de-sistemas","category-sap-business-one","category-categoria-tecnologia","category-totvs-protheus","tag-apis","tag-integracao-3","tag-sap-business-one","tag-totvsprotheus"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>A estrutura de uma API REST - Blog InterGATE<\/title>\n<meta name=\"description\" content=\"Nesse post voc\u00ea vai conhecer a estrutura de uma api rest, que \u00e9 uma interface de comunica\u00e7\u00e3o entre desenvolvedores\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.intergate.net.br\/blog\/a-estrutura-de-uma-api-rest\/\" \/>\n<meta property=\"og:locale\" content=\"pt_PT\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"A estrutura de uma API REST - Blog InterGATE\" \/>\n<meta property=\"og:description\" content=\"Nesse post voc\u00ea vai conhecer a estrutura de uma api rest, que \u00e9 uma interface de comunica\u00e7\u00e3o entre desenvolvedores\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.intergate.net.br\/blog\/a-estrutura-de-uma-api-rest\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog InterGATE\" \/>\n<meta property=\"article:published_time\" content=\"2019-10-15T11:00:35+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-11-19T13:25:25+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.intergate.net.br\/blog\/wp-content\/uploads\/2019\/06\/post-api-.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"660\" \/>\n\t<meta property=\"og:image:height\" content=\"371\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Monica Nietsche\" \/>\n<meta name=\"twitter:label1\" content=\"Escrito por\" \/>\n\t<meta name=\"twitter:data1\" content=\"Monica Nietsche\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tempo estimado de leitura\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.intergate.net.br\\\/blog\\\/a-estrutura-de-uma-api-rest\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.intergate.net.br\\\/blog\\\/a-estrutura-de-uma-api-rest\\\/\"},\"author\":{\"name\":\"Monica Nietsche\",\"@id\":\"https:\\\/\\\/www.intergate.net.br\\\/blog\\\/#\\\/schema\\\/person\\\/6b1a11e7323bddf910bfd7b20b262288\"},\"headline\":\"A estrutura de uma API REST\",\"datePublished\":\"2019-10-15T11:00:35+00:00\",\"dateModified\":\"2020-11-19T13:25:25+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.intergate.net.br\\\/blog\\\/a-estrutura-de-uma-api-rest\\\/\"},\"wordCount\":787,\"commentCount\":4,\"publisher\":{\"@id\":\"https:\\\/\\\/www.intergate.net.br\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.intergate.net.br\\\/blog\\\/a-estrutura-de-uma-api-rest\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.intergate.net.br\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/06\\\/post-api-.jpg\",\"keywords\":[\"APIs\",\"integracao\",\"SAP Business One\",\"TOTVSProtheus\"],\"articleSection\":[\"Integra\u00e7\u00e3o de Sistemas\",\"SAP Business One\",\"Tecnologias\",\"Totvs Protheus\"],\"inLanguage\":\"pt-PT\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.intergate.net.br\\\/blog\\\/a-estrutura-de-uma-api-rest\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.intergate.net.br\\\/blog\\\/a-estrutura-de-uma-api-rest\\\/\",\"url\":\"https:\\\/\\\/www.intergate.net.br\\\/blog\\\/a-estrutura-de-uma-api-rest\\\/\",\"name\":\"A estrutura de uma API REST - Blog InterGATE\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.intergate.net.br\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.intergate.net.br\\\/blog\\\/a-estrutura-de-uma-api-rest\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.intergate.net.br\\\/blog\\\/a-estrutura-de-uma-api-rest\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.intergate.net.br\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/06\\\/post-api-.jpg\",\"datePublished\":\"2019-10-15T11:00:35+00:00\",\"dateModified\":\"2020-11-19T13:25:25+00:00\",\"description\":\"Nesse post voc\u00ea vai conhecer a estrutura de uma api rest, que \u00e9 uma interface de comunica\u00e7\u00e3o entre desenvolvedores\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.intergate.net.br\\\/blog\\\/a-estrutura-de-uma-api-rest\\\/#breadcrumb\"},\"inLanguage\":\"pt-PT\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.intergate.net.br\\\/blog\\\/a-estrutura-de-uma-api-rest\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-PT\",\"@id\":\"https:\\\/\\\/www.intergate.net.br\\\/blog\\\/a-estrutura-de-uma-api-rest\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.intergate.net.br\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/06\\\/post-api-.jpg\",\"contentUrl\":\"https:\\\/\\\/www.intergate.net.br\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/06\\\/post-api-.jpg\",\"width\":660,\"height\":371,\"caption\":\"\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.intergate.net.br\\\/blog\\\/a-estrutura-de-uma-api-rest\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"In\u00edcio\",\"item\":\"https:\\\/\\\/www.intergate.net.br\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"A estrutura de uma API REST\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.intergate.net.br\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.intergate.net.br\\\/blog\\\/\",\"name\":\"Blog InterGATE\",\"description\":\"Integra\u00e7\u00e3o de Sistemas com os ERPs SAP Business One ou Totvs Protheus\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.intergate.net.br\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.intergate.net.br\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"pt-PT\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.intergate.net.br\\\/blog\\\/#organization\",\"name\":\"InterGATE Consultoria Digital\",\"url\":\"https:\\\/\\\/www.intergate.net.br\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-PT\",\"@id\":\"https:\\\/\\\/www.intergate.net.br\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.intergate.net.br\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/06\\\/intergateLogo_original.jpg\",\"contentUrl\":\"https:\\\/\\\/www.intergate.net.br\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/06\\\/intergateLogo_original.jpg\",\"width\":512,\"height\":512,\"caption\":\"InterGATE Consultoria Digital\"},\"image\":{\"@id\":\"https:\\\/\\\/www.intergate.net.br\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/company\\\/35540154\",\"https:\\\/\\\/www.youtube.com\\\/@intergateconsultoriadigita8503\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.intergate.net.br\\\/blog\\\/#\\\/schema\\\/person\\\/6b1a11e7323bddf910bfd7b20b262288\",\"name\":\"Monica Nietsche\",\"url\":\"https:\\\/\\\/www.intergate.net.br\\\/blog\\\/author\\\/monica\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"A estrutura de uma API REST - Blog InterGATE","description":"Nesse post voc\u00ea vai conhecer a estrutura de uma api rest, que \u00e9 uma interface de comunica\u00e7\u00e3o entre desenvolvedores","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:\/\/www.intergate.net.br\/blog\/a-estrutura-de-uma-api-rest\/","og_locale":"pt_PT","og_type":"article","og_title":"A estrutura de uma API REST - Blog InterGATE","og_description":"Nesse post voc\u00ea vai conhecer a estrutura de uma api rest, que \u00e9 uma interface de comunica\u00e7\u00e3o entre desenvolvedores","og_url":"https:\/\/www.intergate.net.br\/blog\/a-estrutura-de-uma-api-rest\/","og_site_name":"Blog InterGATE","article_published_time":"2019-10-15T11:00:35+00:00","article_modified_time":"2020-11-19T13:25:25+00:00","og_image":[{"width":660,"height":371,"url":"https:\/\/www.intergate.net.br\/blog\/wp-content\/uploads\/2019\/06\/post-api-.jpg","type":"image\/jpeg"}],"author":"Monica Nietsche","twitter_misc":{"Escrito por":"Monica Nietsche","Tempo estimado de leitura":"4 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.intergate.net.br\/blog\/a-estrutura-de-uma-api-rest\/#article","isPartOf":{"@id":"https:\/\/www.intergate.net.br\/blog\/a-estrutura-de-uma-api-rest\/"},"author":{"name":"Monica Nietsche","@id":"https:\/\/www.intergate.net.br\/blog\/#\/schema\/person\/6b1a11e7323bddf910bfd7b20b262288"},"headline":"A estrutura de uma API REST","datePublished":"2019-10-15T11:00:35+00:00","dateModified":"2020-11-19T13:25:25+00:00","mainEntityOfPage":{"@id":"https:\/\/www.intergate.net.br\/blog\/a-estrutura-de-uma-api-rest\/"},"wordCount":787,"commentCount":4,"publisher":{"@id":"https:\/\/www.intergate.net.br\/blog\/#organization"},"image":{"@id":"https:\/\/www.intergate.net.br\/blog\/a-estrutura-de-uma-api-rest\/#primaryimage"},"thumbnailUrl":"https:\/\/www.intergate.net.br\/blog\/wp-content\/uploads\/2019\/06\/post-api-.jpg","keywords":["APIs","integracao","SAP Business One","TOTVSProtheus"],"articleSection":["Integra\u00e7\u00e3o de Sistemas","SAP Business One","Tecnologias","Totvs Protheus"],"inLanguage":"pt-PT","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.intergate.net.br\/blog\/a-estrutura-de-uma-api-rest\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.intergate.net.br\/blog\/a-estrutura-de-uma-api-rest\/","url":"https:\/\/www.intergate.net.br\/blog\/a-estrutura-de-uma-api-rest\/","name":"A estrutura de uma API REST - Blog InterGATE","isPartOf":{"@id":"https:\/\/www.intergate.net.br\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.intergate.net.br\/blog\/a-estrutura-de-uma-api-rest\/#primaryimage"},"image":{"@id":"https:\/\/www.intergate.net.br\/blog\/a-estrutura-de-uma-api-rest\/#primaryimage"},"thumbnailUrl":"https:\/\/www.intergate.net.br\/blog\/wp-content\/uploads\/2019\/06\/post-api-.jpg","datePublished":"2019-10-15T11:00:35+00:00","dateModified":"2020-11-19T13:25:25+00:00","description":"Nesse post voc\u00ea vai conhecer a estrutura de uma api rest, que \u00e9 uma interface de comunica\u00e7\u00e3o entre desenvolvedores","breadcrumb":{"@id":"https:\/\/www.intergate.net.br\/blog\/a-estrutura-de-uma-api-rest\/#breadcrumb"},"inLanguage":"pt-PT","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.intergate.net.br\/blog\/a-estrutura-de-uma-api-rest\/"]}]},{"@type":"ImageObject","inLanguage":"pt-PT","@id":"https:\/\/www.intergate.net.br\/blog\/a-estrutura-de-uma-api-rest\/#primaryimage","url":"https:\/\/www.intergate.net.br\/blog\/wp-content\/uploads\/2019\/06\/post-api-.jpg","contentUrl":"https:\/\/www.intergate.net.br\/blog\/wp-content\/uploads\/2019\/06\/post-api-.jpg","width":660,"height":371,"caption":""},{"@type":"BreadcrumbList","@id":"https:\/\/www.intergate.net.br\/blog\/a-estrutura-de-uma-api-rest\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"In\u00edcio","item":"https:\/\/www.intergate.net.br\/blog\/"},{"@type":"ListItem","position":2,"name":"A estrutura de uma API REST"}]},{"@type":"WebSite","@id":"https:\/\/www.intergate.net.br\/blog\/#website","url":"https:\/\/www.intergate.net.br\/blog\/","name":"Blog InterGATE","description":"Integra\u00e7\u00e3o de Sistemas com os ERPs SAP Business One ou Totvs Protheus","publisher":{"@id":"https:\/\/www.intergate.net.br\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.intergate.net.br\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"pt-PT"},{"@type":"Organization","@id":"https:\/\/www.intergate.net.br\/blog\/#organization","name":"InterGATE Consultoria Digital","url":"https:\/\/www.intergate.net.br\/blog\/","logo":{"@type":"ImageObject","inLanguage":"pt-PT","@id":"https:\/\/www.intergate.net.br\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.intergate.net.br\/blog\/wp-content\/uploads\/2025\/06\/intergateLogo_original.jpg","contentUrl":"https:\/\/www.intergate.net.br\/blog\/wp-content\/uploads\/2025\/06\/intergateLogo_original.jpg","width":512,"height":512,"caption":"InterGATE Consultoria Digital"},"image":{"@id":"https:\/\/www.intergate.net.br\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.linkedin.com\/company\/35540154","https:\/\/www.youtube.com\/@intergateconsultoriadigita8503"]},{"@type":"Person","@id":"https:\/\/www.intergate.net.br\/blog\/#\/schema\/person\/6b1a11e7323bddf910bfd7b20b262288","name":"Monica Nietsche","url":"https:\/\/www.intergate.net.br\/blog\/author\/monica\/"}]}},"_links":{"self":[{"href":"https:\/\/www.intergate.net.br\/blog\/wp-json\/wp\/v2\/posts\/4491","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.intergate.net.br\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.intergate.net.br\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.intergate.net.br\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.intergate.net.br\/blog\/wp-json\/wp\/v2\/comments?post=4491"}],"version-history":[{"count":0,"href":"https:\/\/www.intergate.net.br\/blog\/wp-json\/wp\/v2\/posts\/4491\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.intergate.net.br\/blog\/wp-json\/wp\/v2\/media\/5286"}],"wp:attachment":[{"href":"https:\/\/www.intergate.net.br\/blog\/wp-json\/wp\/v2\/media?parent=4491"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.intergate.net.br\/blog\/wp-json\/wp\/v2\/categories?post=4491"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.intergate.net.br\/blog\/wp-json\/wp\/v2\/tags?post=4491"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}