Returns all configured labels in the system as a JSON array.
Reference
GET https://YOUR-NETWORK-DOMAIN/rest-api/labels.do
Returns all configured labels in the system as a JSON array. Each label object contains an 'id' and a 'value' field. This endpoint is deprecated — use GET /rest-api/label/list.do and the other /rest-api/label/ endpoints instead. Requires authentication but does not enforce additional permission checks.
using var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://YOUR-NETWORK-DOMAIN/rest-api/labels.do");
request.Headers.Add("X-Api-Key", "YOUR_API_KEY");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());