Busca uma versão específica de um serviço
curl --request GET \
--url https://services.pref.rio/app-busca-search/api/v1/admin/services/{id}/versions/{version} \
--header 'Authorization: Bearer <token>'import requests
url = "https://services.pref.rio/app-busca-search/api/v1/admin/services/{id}/versions/{version}"
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/admin/services/{id}/versions/{version}', 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/admin/services/{id}/versions/{version}",
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/admin/services/{id}/versions/{version}"
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/admin/services/{id}/versions/{version}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://services.pref.rio/app-busca-search/api/v1/admin/services/{id}/versions/{version}")
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{
"change_type": "create",
"created_by": "<string>",
"created_by_cpf": "<string>",
"service_id": "<string>",
"version_number": 123,
"autor": "<string>",
"awaiting_approval": true,
"canais_digitais": [
"<string>"
],
"canais_presenciais": [
"<string>"
],
"change_reason": "<string>",
"changed_fields_json": "<string>",
"created_at": 123,
"custo_servico": "<string>",
"descricao_completa": "<string>",
"documentos_necessarios": [
"<string>"
],
"embedding_hash": "<string>",
"fixar_destaque": true,
"id": "<string>",
"instrucoes_solicitante": "<string>",
"is_free": true,
"is_rollback": true,
"legislacao_relacionada": [
"<string>"
],
"nome_servico": "<string>",
"orgao_gestor": [
"<string>"
],
"previous_version": 123,
"publico_especifico": [
"<string>"
],
"published_at": 123,
"resultado_solicitacao": "<string>",
"resumo": "<string>",
"rollback_to_version": 123,
"search_content": "<string>",
"servico_nao_cobre": "<string>",
"status": 123,
"tema_geral": "<string>",
"tempo_atendimento": "<string>"
}{}{}{}{}versions
Busca uma versão específica de um serviço
Retorna os detalhes de uma versão específica
GET
/
api
/
v1
/
admin
/
services
/
{id}
/
versions
/
{version}
Busca uma versão específica de um serviço
curl --request GET \
--url https://services.pref.rio/app-busca-search/api/v1/admin/services/{id}/versions/{version} \
--header 'Authorization: Bearer <token>'import requests
url = "https://services.pref.rio/app-busca-search/api/v1/admin/services/{id}/versions/{version}"
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/admin/services/{id}/versions/{version}', 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/admin/services/{id}/versions/{version}",
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/admin/services/{id}/versions/{version}"
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/admin/services/{id}/versions/{version}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://services.pref.rio/app-busca-search/api/v1/admin/services/{id}/versions/{version}")
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{
"change_type": "create",
"created_by": "<string>",
"created_by_cpf": "<string>",
"service_id": "<string>",
"version_number": 123,
"autor": "<string>",
"awaiting_approval": true,
"canais_digitais": [
"<string>"
],
"canais_presenciais": [
"<string>"
],
"change_reason": "<string>",
"changed_fields_json": "<string>",
"created_at": 123,
"custo_servico": "<string>",
"descricao_completa": "<string>",
"documentos_necessarios": [
"<string>"
],
"embedding_hash": "<string>",
"fixar_destaque": true,
"id": "<string>",
"instrucoes_solicitante": "<string>",
"is_free": true,
"is_rollback": true,
"legislacao_relacionada": [
"<string>"
],
"nome_servico": "<string>",
"orgao_gestor": [
"<string>"
],
"previous_version": 123,
"publico_especifico": [
"<string>"
],
"published_at": 123,
"resultado_solicitacao": "<string>",
"resumo": "<string>",
"rollback_to_version": 123,
"search_content": "<string>",
"servico_nao_cobre": "<string>",
"status": 123,
"tema_geral": "<string>",
"tempo_atendimento": "<string>"
}{}{}{}{}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Response
OK
Available options:
create, update, publish, unpublish, delete, rollback Maximum string length:
20000Maximum string length:
20000Maximum string length:
20000Maximum string length:
20000Maximum string length:
20000Campos de mudança (armazenados como JSON string no Typesense)
Maximum string length:
20000Maximum string length:
20000Maximum string length:
20000Hash do embedding para verificação (não armazenamos o embedding completo)
Maximum string length:
20000Maximum string length:
20000Snapshot completo do serviço (sem embedding para economizar espaço)
Maximum string length:
20000Maximum string length:
20000Maximum string length:
20000Maximum string length:
20000Maximum string length:
20000Maximum string length:
20000Maximum string length:
20000