Busca um serviço por slug SEO-friendly
curl --request GET \
--url https://services.pref.rio/app-busca-search/api/v1/services/{slug} \
--header 'Authorization: Bearer <token>'import requests
url = "https://services.pref.rio/app-busca-search/api/v1/services/{slug}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://services.pref.rio/app-busca-search/api/v1/services/{slug}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://services.pref.rio/app-busca-search/api/v1/services/{slug}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://services.pref.rio/app-busca-search/api/v1/services/{slug}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://services.pref.rio/app-busca-search/api/v1/services/{slug}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://services.pref.rio/app-busca-search/api/v1/services/{slug}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"autor": "<string>",
"custo_servico": "<string>",
"descricao_completa": "<string>",
"nome_servico": "<string>",
"orgao_gestor": [
"<string>"
],
"resultado_solicitacao": "<string>",
"resumo": "<string>",
"tema_geral": "<string>",
"tempo_atendimento": "<string>",
"agents": {
"exclusive_for_agents": true,
"tool_hint": "<string>"
},
"awaiting_approval": true,
"buttons": [
{
"descricao": "<string>",
"is_enabled": true,
"ordem": 123,
"titulo": "<string>",
"url_service": "<string>"
}
],
"canais_digitais": [
"<string>"
],
"canais_presenciais": [
"<string>"
],
"created_at": 123,
"documentos_necessarios": [
"<string>"
],
"embedding": [
123
],
"extra_fields": {},
"fixar_destaque": true,
"id": "<string>",
"instrucoes_solicitante": "<string>",
"is_free": true,
"last_update": 123,
"legislacao_relacionada": [
"<string>"
],
"publico_especifico": [
"<string>"
],
"published_at": 123,
"search_content": "<string>",
"servico_nao_cobre": "<string>",
"slug": "<string>",
"slug_history": [
"<string>"
],
"status": 0,
"sub_categoria": "<string>"
}{}{}{}services
Busca um serviço por slug SEO-friendly
Retorna os detalhes completos de um serviço através do slug. Se o slug for histórico (antigo), retorna 301 redirect para o slug atual.
GET
/
api
/
v1
/
services
/
{slug}
Busca um serviço por slug SEO-friendly
curl --request GET \
--url https://services.pref.rio/app-busca-search/api/v1/services/{slug} \
--header 'Authorization: Bearer <token>'import requests
url = "https://services.pref.rio/app-busca-search/api/v1/services/{slug}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://services.pref.rio/app-busca-search/api/v1/services/{slug}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://services.pref.rio/app-busca-search/api/v1/services/{slug}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://services.pref.rio/app-busca-search/api/v1/services/{slug}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://services.pref.rio/app-busca-search/api/v1/services/{slug}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://services.pref.rio/app-busca-search/api/v1/services/{slug}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"autor": "<string>",
"custo_servico": "<string>",
"descricao_completa": "<string>",
"nome_servico": "<string>",
"orgao_gestor": [
"<string>"
],
"resultado_solicitacao": "<string>",
"resumo": "<string>",
"tema_geral": "<string>",
"tempo_atendimento": "<string>",
"agents": {
"exclusive_for_agents": true,
"tool_hint": "<string>"
},
"awaiting_approval": true,
"buttons": [
{
"descricao": "<string>",
"is_enabled": true,
"ordem": 123,
"titulo": "<string>",
"url_service": "<string>"
}
],
"canais_digitais": [
"<string>"
],
"canais_presenciais": [
"<string>"
],
"created_at": 123,
"documentos_necessarios": [
"<string>"
],
"embedding": [
123
],
"extra_fields": {},
"fixar_destaque": true,
"id": "<string>",
"instrucoes_solicitante": "<string>",
"is_free": true,
"last_update": 123,
"legislacao_relacionada": [
"<string>"
],
"publico_especifico": [
"<string>"
],
"published_at": 123,
"search_content": "<string>",
"servico_nao_cobre": "<string>",
"slug": "<string>",
"slug_history": [
"<string>"
],
"status": 0,
"sub_categoria": "<string>"
}{}{}{}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Slug do serviço
Response
OK
Maximum string length:
20000Maximum string length:
20000Maximum string length:
20000Maximum string length:
20000Minimum array length:
1Maximum string length:
20000Maximum string length:
20000Maximum string length:
20000Maximum string length:
20000Show child attributes
Show child attributes
Show child attributes
Show child attributes
Maximum string length:
20000Maximum string length:
200000=Draft, 1=Published
Required range:
0 <= x <= 1