Atualiza memória associada ao número de telefone.
curl --request PUT \
--url https://services.pref.rio/rmi/v1/memory/{phone_number} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "<string>",
"memory_name": "<string>",
"value": "<string>",
"created_at": "<string>",
"memory_id": "<string>",
"updated_at": "<string>"
}
'import requests
url = "https://services.pref.rio/rmi/v1/memory/{phone_number}"
payload = {
"description": "<string>",
"memory_name": "<string>",
"value": "<string>",
"created_at": "<string>",
"memory_id": "<string>",
"updated_at": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
description: '<string>',
memory_name: '<string>',
value: '<string>',
created_at: '<string>',
memory_id: '<string>',
updated_at: '<string>'
})
};
fetch('https://services.pref.rio/rmi/v1/memory/{phone_number}', 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/rmi/v1/memory/{phone_number}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'description' => '<string>',
'memory_name' => '<string>',
'value' => '<string>',
'created_at' => '<string>',
'memory_id' => '<string>',
'updated_at' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://services.pref.rio/rmi/v1/memory/{phone_number}"
payload := strings.NewReader("{\n \"description\": \"<string>\",\n \"memory_name\": \"<string>\",\n \"value\": \"<string>\",\n \"created_at\": \"<string>\",\n \"memory_id\": \"<string>\",\n \"updated_at\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://services.pref.rio/rmi/v1/memory/{phone_number}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"<string>\",\n \"memory_name\": \"<string>\",\n \"value\": \"<string>\",\n \"created_at\": \"<string>\",\n \"memory_id\": \"<string>\",\n \"updated_at\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://services.pref.rio/rmi/v1/memory/{phone_number}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"<string>\",\n \"memory_name\": \"<string>\",\n \"value\": \"<string>\",\n \"created_at\": \"<string>\",\n \"memory_id\": \"<string>\",\n \"updated_at\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}memory
Atualiza memória associada ao número de telefone.
Atualiza uma única memória associada ao telefone do cidadão.
PUT
/
memory
/
{phone_number}
Atualiza memória associada ao número de telefone.
curl --request PUT \
--url https://services.pref.rio/rmi/v1/memory/{phone_number} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "<string>",
"memory_name": "<string>",
"value": "<string>",
"created_at": "<string>",
"memory_id": "<string>",
"updated_at": "<string>"
}
'import requests
url = "https://services.pref.rio/rmi/v1/memory/{phone_number}"
payload = {
"description": "<string>",
"memory_name": "<string>",
"value": "<string>",
"created_at": "<string>",
"memory_id": "<string>",
"updated_at": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
description: '<string>',
memory_name: '<string>',
value: '<string>',
created_at: '<string>',
memory_id: '<string>',
updated_at: '<string>'
})
};
fetch('https://services.pref.rio/rmi/v1/memory/{phone_number}', 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/rmi/v1/memory/{phone_number}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'description' => '<string>',
'memory_name' => '<string>',
'value' => '<string>',
'created_at' => '<string>',
'memory_id' => '<string>',
'updated_at' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://services.pref.rio/rmi/v1/memory/{phone_number}"
payload := strings.NewReader("{\n \"description\": \"<string>\",\n \"memory_name\": \"<string>\",\n \"value\": \"<string>\",\n \"created_at\": \"<string>\",\n \"memory_id\": \"<string>\",\n \"updated_at\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://services.pref.rio/rmi/v1/memory/{phone_number}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"<string>\",\n \"memory_name\": \"<string>\",\n \"value\": \"<string>\",\n \"created_at\": \"<string>\",\n \"memory_id\": \"<string>\",\n \"updated_at\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://services.pref.rio/rmi/v1/memory/{phone_number}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"<string>\",\n \"memory_name\": \"<string>\",\n \"value\": \"<string>\",\n \"created_at\": \"<string>\",\n \"memory_id\": \"<string>\",\n \"updated_at\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Número do telefone
Body
application/json
Dados da memória a ser atualizada (memory_name identifica qual memória atualizar)
Response
Memória atualizada com sucesso
⌘I
