Replaces the fields sent and keeps the others: {"text": "…"} leaves the title as it is, {"title": null} removes it.
Reference
POST https://YOUR-NETWORK-DOMAIN/rest-api/system-users/{userId}/notes/{noteId}.do
Replaces the fields sent and keeps the others: {"text": "…"} leaves the title as it is, {"title": null} removes it. Limits as on add. The user keeps seeing the date the note was written; updatedAt and updatedBy record the change for the operator. A change of the title or the text makes the note unread again (readAt null), so the user sees it anew; a save that changes neither keeps it read. Requires the right to edit the user: a role the caller may create users in (the bar the console's user page uses).
Path Params
userIdintegerrequired
Numeric id of the user, as /rest-api/system-users/search.do reports it
42
noteIdintegerrequired
Numeric id of the note, as the list of the user's notes reports it
7
Body
A JSON body. An example, built from the field definitions:
{
"title": "Payment schedule",
"text": "Payments go out on the 15th of each month."
}
Responses
200
{success, note, ignoredFields}
400
Invalid body, each problem named in errors by field
401
Unauthorized — authentication error
403
The caller may not edit users of the target's role
404
No user with this id, or no note with this id for that user
curl --request POST \
--url 'https://YOUR-NETWORK-DOMAIN/rest-api/system-users/42/notes/7.do' \
--header 'X-Api-Key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"title": "Payment schedule",
"text": "Payments go out on the 15th of each month."
}'
Python Request
import requests
response = requests.request("POST", "https://YOUR-NETWORK-DOMAIN/rest-api/system-users/42/notes/7.do", headers={"X-Api-Key": "YOUR_API_KEY"}, json={
"title": "Payment schedule",
"text": "Payments go out on the 15th of each month."
})
print(response.json())
Node Request
const response = await fetch('https://YOUR-NETWORK-DOMAIN/rest-api/system-users/42/notes/7.do', {
method: 'POST',
headers: { 'X-Api-Key': 'YOUR_API_KEY', 'Content-Type': 'application/json' },
body: JSON.stringify({
"title": "Payment schedule",
"text": "Payments go out on the 15th of each month."
}),
});
console.log(await response.json());
Java Request
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://YOUR-NETWORK-DOMAIN/rest-api/system-users/42/notes/7.do"))
.header("X-Api-Key", "YOUR_API_KEY")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\"title\":\"Payment schedule\",\"text\":\"Payments go out on the 15th of each month.\"}"))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
C# Request
using var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://YOUR-NETWORK-DOMAIN/rest-api/system-users/42/notes/7.do");
request.Headers.Add("X-Api-Key", "YOUR_API_KEY");
request.Content = new StringContent("{\"title\":\"Payment schedule\",\"text\":\"Payments go out on the 15th of each month.\"}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
Go Request
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
req, _ := http.NewRequest("POST", "https://YOUR-NETWORK-DOMAIN/rest-api/system-users/42/notes/7.do", strings.NewReader(`{"title":"Payment schedule","text":"Payments go out on the 15th of each month."}`))
req.Header.Set("X-Api-Key", "YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(string(out))
}
PHP Request
<?php
$ch = curl_init("https://YOUR-NETWORK-DOMAIN/rest-api/system-users/42/notes/7.do");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["X-Api-Key: YOUR_API_KEY", "Content-Type: application/json"]);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"title":"Payment schedule","text":"Payments go out on the 15th of each month."}');
echo curl_exec($ch);
curl_close($ch);
Ruby Request
require 'net/http'
require 'json'
uri = URI("https://YOUR-NETWORK-DOMAIN/rest-api/system-users/42/notes/7.do")
request = Net::HTTP::Post.new(uri)
request['X-Api-Key'] = 'YOUR_API_KEY'
request['Content-Type'] = 'application/json'
request.body = "{\"title\":\"Payment schedule\",\"text\":\"Payments go out on the 15th of each month.\"}"
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
puts response.body
Please disable Adblock
Are you using adblock? Disable it and reload the page to proceed to the destination page.
A registration has already been submitted from this page. Please try again in 10 minutes.