curl --request POST \
--url https://api.honeycomb.io/1/signals/recipient_assignments \
--header 'Content-Type: application/json' \
--header 'X-Honeycomb-Team: <api-key>' \
--data '
{
"selector": {
"signal_ids": [
"hcaip_01jak3ymk8s5cpc2xz3q7d8v9r"
]
},
"recipients": [
{
"id": "hcar_01jak3ymk8s5cpc2xz3q7d8v9r",
"details": {
"pagerduty_severity": "critical",
"muted": false
}
}
]
}
'import requests
url = "https://api.honeycomb.io/1/signals/recipient_assignments"
payload = {
"selector": { "signal_ids": ["hcaip_01jak3ymk8s5cpc2xz3q7d8v9r"] },
"recipients": [
{
"id": "hcar_01jak3ymk8s5cpc2xz3q7d8v9r",
"details": {
"pagerduty_severity": "critical",
"muted": False
}
}
]
}
headers = {
"X-Honeycomb-Team": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Honeycomb-Team': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
selector: {signal_ids: ['hcaip_01jak3ymk8s5cpc2xz3q7d8v9r']},
recipients: [
{
id: 'hcar_01jak3ymk8s5cpc2xz3q7d8v9r',
details: {pagerduty_severity: 'critical', muted: false}
}
]
})
};
fetch('https://api.honeycomb.io/1/signals/recipient_assignments', 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://api.honeycomb.io/1/signals/recipient_assignments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'selector' => [
'signal_ids' => [
'hcaip_01jak3ymk8s5cpc2xz3q7d8v9r'
]
],
'recipients' => [
[
'id' => 'hcar_01jak3ymk8s5cpc2xz3q7d8v9r',
'details' => [
'pagerduty_severity' => 'critical',
'muted' => false
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Honeycomb-Team: <api-key>"
],
]);
$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://api.honeycomb.io/1/signals/recipient_assignments"
payload := strings.NewReader("{\n \"selector\": {\n \"signal_ids\": [\n \"hcaip_01jak3ymk8s5cpc2xz3q7d8v9r\"\n ]\n },\n \"recipients\": [\n {\n \"id\": \"hcar_01jak3ymk8s5cpc2xz3q7d8v9r\",\n \"details\": {\n \"pagerduty_severity\": \"critical\",\n \"muted\": false\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Honeycomb-Team", "<api-key>")
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.post("https://api.honeycomb.io/1/signals/recipient_assignments")
.header("X-Honeycomb-Team", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"selector\": {\n \"signal_ids\": [\n \"hcaip_01jak3ymk8s5cpc2xz3q7d8v9r\"\n ]\n },\n \"recipients\": [\n {\n \"id\": \"hcar_01jak3ymk8s5cpc2xz3q7d8v9r\",\n \"details\": {\n \"pagerduty_severity\": \"critical\",\n \"muted\": false\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.honeycomb.io/1/signals/recipient_assignments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Honeycomb-Team"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"selector\": {\n \"signal_ids\": [\n \"hcaip_01jak3ymk8s5cpc2xz3q7d8v9r\"\n ]\n },\n \"recipients\": [\n {\n \"id\": \"hcar_01jak3ymk8s5cpc2xz3q7d8v9r\",\n \"details\": {\n \"pagerduty_severity\": \"critical\",\n \"muted\": false\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"succeeded": [
"hcaip_01jak3ymk8s5cpc2xz3q7d8v9r"
],
"unchanged": [
"hcaip_01jak3ymk8s5cpc2xz3q7d8v9r"
],
"failed": [
{
"signal_id": "hcaip_01jak3ymk8s5cpc2xz3q7d8v9r",
"code": "not_found",
"detail": "Signal not found"
}
]
}{
"status": 400,
"type": "https://api.honeycomb.io/problems/unparseable",
"title": "The request body could not be parsed.",
"error": "invalid gzip data"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"status": 413,
"type": "https://api.honeycomb.io/problems/payload-too-large",
"title": "Request body is too large.",
"error": "Body size is larger than maximum size of 100000 bytes"
}{
"error": "something went wrong!",
"status": 422,
"type": "https://api.honeycomb.io/problems/validation-failed",
"title": "The provided input is invalid.",
"detail": "<string>",
"instance": "<string>",
"type_detail": [
{
"field": "<string>",
"code": "invalid",
"description": "<string>"
}
]
}{
"error": "Rate Limited"
}{
"error": "<string>"
}Assign Recipients in Bulk
Use this endpoint to bulk add Recipients to many Signals in one call, rather than updating each Signal individually.
Requires the Manage Recipients permission in addition to Manage Signals.
curl --request POST \
--url https://api.honeycomb.io/1/signals/recipient_assignments \
--header 'Content-Type: application/json' \
--header 'X-Honeycomb-Team: <api-key>' \
--data '
{
"selector": {
"signal_ids": [
"hcaip_01jak3ymk8s5cpc2xz3q7d8v9r"
]
},
"recipients": [
{
"id": "hcar_01jak3ymk8s5cpc2xz3q7d8v9r",
"details": {
"pagerduty_severity": "critical",
"muted": false
}
}
]
}
'import requests
url = "https://api.honeycomb.io/1/signals/recipient_assignments"
payload = {
"selector": { "signal_ids": ["hcaip_01jak3ymk8s5cpc2xz3q7d8v9r"] },
"recipients": [
{
"id": "hcar_01jak3ymk8s5cpc2xz3q7d8v9r",
"details": {
"pagerduty_severity": "critical",
"muted": False
}
}
]
}
headers = {
"X-Honeycomb-Team": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Honeycomb-Team': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
selector: {signal_ids: ['hcaip_01jak3ymk8s5cpc2xz3q7d8v9r']},
recipients: [
{
id: 'hcar_01jak3ymk8s5cpc2xz3q7d8v9r',
details: {pagerduty_severity: 'critical', muted: false}
}
]
})
};
fetch('https://api.honeycomb.io/1/signals/recipient_assignments', 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://api.honeycomb.io/1/signals/recipient_assignments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'selector' => [
'signal_ids' => [
'hcaip_01jak3ymk8s5cpc2xz3q7d8v9r'
]
],
'recipients' => [
[
'id' => 'hcar_01jak3ymk8s5cpc2xz3q7d8v9r',
'details' => [
'pagerduty_severity' => 'critical',
'muted' => false
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Honeycomb-Team: <api-key>"
],
]);
$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://api.honeycomb.io/1/signals/recipient_assignments"
payload := strings.NewReader("{\n \"selector\": {\n \"signal_ids\": [\n \"hcaip_01jak3ymk8s5cpc2xz3q7d8v9r\"\n ]\n },\n \"recipients\": [\n {\n \"id\": \"hcar_01jak3ymk8s5cpc2xz3q7d8v9r\",\n \"details\": {\n \"pagerduty_severity\": \"critical\",\n \"muted\": false\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Honeycomb-Team", "<api-key>")
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.post("https://api.honeycomb.io/1/signals/recipient_assignments")
.header("X-Honeycomb-Team", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"selector\": {\n \"signal_ids\": [\n \"hcaip_01jak3ymk8s5cpc2xz3q7d8v9r\"\n ]\n },\n \"recipients\": [\n {\n \"id\": \"hcar_01jak3ymk8s5cpc2xz3q7d8v9r\",\n \"details\": {\n \"pagerduty_severity\": \"critical\",\n \"muted\": false\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.honeycomb.io/1/signals/recipient_assignments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Honeycomb-Team"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"selector\": {\n \"signal_ids\": [\n \"hcaip_01jak3ymk8s5cpc2xz3q7d8v9r\"\n ]\n },\n \"recipients\": [\n {\n \"id\": \"hcar_01jak3ymk8s5cpc2xz3q7d8v9r\",\n \"details\": {\n \"pagerduty_severity\": \"critical\",\n \"muted\": false\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"succeeded": [
"hcaip_01jak3ymk8s5cpc2xz3q7d8v9r"
],
"unchanged": [
"hcaip_01jak3ymk8s5cpc2xz3q7d8v9r"
],
"failed": [
{
"signal_id": "hcaip_01jak3ymk8s5cpc2xz3q7d8v9r",
"code": "not_found",
"detail": "Signal not found"
}
]
}{
"status": 400,
"type": "https://api.honeycomb.io/problems/unparseable",
"title": "The request body could not be parsed.",
"error": "invalid gzip data"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"status": 413,
"type": "https://api.honeycomb.io/problems/payload-too-large",
"title": "Request body is too large.",
"error": "Body size is larger than maximum size of 100000 bytes"
}{
"error": "something went wrong!",
"status": 422,
"type": "https://api.honeycomb.io/problems/validation-failed",
"title": "The provided input is invalid.",
"detail": "<string>",
"instance": "<string>",
"type_detail": [
{
"field": "<string>",
"code": "invalid",
"description": "<string>"
}
]
}{
"error": "Rate Limited"
}{
"error": "<string>"
}Authorizations
Authenticate using a Honeycomb Configuration Key.
Pass the Token in the X-Honeycomb-Team header:
X-Honeycomb-Team: 1234567890123456789012
If you created your key using the API, use data.attributes.secret; this is the same value as the Token in the UI.
To learn how to create a Configuration Key, visit Manage Environment API Keys. To learn more about authenticating requests, visit API Authentication.
Body
The Signals to update and the Recipients to assign to them.
Select the Signals with selector.signal_ids, using IDs from List All Signals.
- Problems with the
recipientslist will reject the whole request before anything is written. - One bad Signal ID does not discard the batch.
- Recipients are added to each Signal's existing set. A Recipient the Signal already has is skipped, and left untouched.
Chooses which Signals to act on.
Show child attributes
Show child attributes
The Recipients to assign to every selected Signal. Each must be referenced by its id from the Recipients API.
1 - 10 elementsShow child attributes
Show child attributes
Response
The batch was processed. Every requested Signal appears in exactly one of succeeded, unchanged, or failed.
The per-Signal outcome of a bulk Recipient assignment.
The Signals whose Recipient set was updated.
["hcaip_01jak3ymk8s5cpc2xz3q7d8v9r"]
The Signals that already had every requested Recipient.
["hcaip_01jak3ymk8s5cpc2xz3q7d8v9r"]
The Signals that were not updated, each with the reason.
Show child attributes
Show child attributes