POST https://YOUR-NETWORK-DOMAIN/rest-api/system-users/{userId}/notes.do
Leaves a note the user reads on their Notes tab. The body is a JSON object: text (required, plain text, up to 5000 characters; line breaks are kept, blank lines around it are not) and title (optional, up to 200 characters). Invalid values come back per field in errors; fields that were sent but not applied are listed in 'ignoredFields'. The note is dated now and signed with the caller's username, which the user does not see. 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
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
curl --request POST \
--url 'https://YOUR-NETWORK-DOMAIN/rest-api/system-users/42/notes.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.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.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.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.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.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.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.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.