Revoke a Group's access to datasets
curl --request DELETE \
--url https://api.honeycomb.io/2/teams/{teamSlug}/groups/{ID}/relationships/datasets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/vnd.api+json' \
--data '
{
"data": [
{
"type": "datasets",
"id": "hcxds_01jbr4k2m7n8p9q0r1s2t3v4wx"
},
{
"type": "datasets",
"id": "hcxds_01jbr4m9q2r3s4t5v6w7x8y9za"
}
]
}
'import requests
url = "https://api.honeycomb.io/2/teams/{teamSlug}/groups/{ID}/relationships/datasets"
payload = { "data": [
{
"type": "datasets",
"id": "hcxds_01jbr4k2m7n8p9q0r1s2t3v4wx"
},
{
"type": "datasets",
"id": "hcxds_01jbr4m9q2r3s4t5v6w7x8y9za"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/vnd.api+json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/vnd.api+json'},
body: JSON.stringify({
data: [
{type: 'datasets', id: 'hcxds_01jbr4k2m7n8p9q0r1s2t3v4wx'},
{type: 'datasets', id: 'hcxds_01jbr4m9q2r3s4t5v6w7x8y9za'}
]
})
};
fetch('https://api.honeycomb.io/2/teams/{teamSlug}/groups/{ID}/relationships/datasets', 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/2/teams/{teamSlug}/groups/{ID}/relationships/datasets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
[
'type' => 'datasets',
'id' => 'hcxds_01jbr4k2m7n8p9q0r1s2t3v4wx'
],
[
'type' => 'datasets',
'id' => 'hcxds_01jbr4m9q2r3s4t5v6w7x8y9za'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/vnd.api+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://api.honeycomb.io/2/teams/{teamSlug}/groups/{ID}/relationships/datasets"
payload := strings.NewReader("{\n \"data\": [\n {\n \"type\": \"datasets\",\n \"id\": \"hcxds_01jbr4k2m7n8p9q0r1s2t3v4wx\"\n },\n {\n \"type\": \"datasets\",\n \"id\": \"hcxds_01jbr4m9q2r3s4t5v6w7x8y9za\"\n }\n ]\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/vnd.api+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.honeycomb.io/2/teams/{teamSlug}/groups/{ID}/relationships/datasets")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/vnd.api+json")
.body("{\n \"data\": [\n {\n \"type\": \"datasets\",\n \"id\": \"hcxds_01jbr4k2m7n8p9q0r1s2t3v4wx\"\n },\n {\n \"type\": \"datasets\",\n \"id\": \"hcxds_01jbr4m9q2r3s4t5v6w7x8y9za\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.honeycomb.io/2/teams/{teamSlug}/groups/{ID}/relationships/datasets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/vnd.api+json'
request.body = "{\n \"data\": [\n {\n \"type\": \"datasets\",\n \"id\": \"hcxds_01jbr4k2m7n8p9q0r1s2t3v4wx\"\n },\n {\n \"type\": \"datasets\",\n \"id\": \"hcxds_01jbr4m9q2r3s4t5v6w7x8y9za\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": 400,
"type": "https://api.honeycomb.io/problems/unparseable",
"title": "The request body could not be parsed.",
"error": "invalid gzip data"
}{
"error": "unknown API key - check your credentials"
}{
"error": "Your team has been denied access to Management APIs, please contact support to be unblocked."
}{
"error": "dataset not found"
}{
"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"
}{
"errors": [
{
"id": "<string>",
"code": "<string>",
"status": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"header": "<string>",
"parameter": "<string>"
}
}
]
}{
"status": 422,
"type": "https://api.honeycomb.io/problems/validation-failed",
"error": "The provided input is invalid.",
"title": "The provided input is invalid",
"type_detail": [
{
"field": "type",
"code": "invalid",
"description": "type: must be a valid value"
}
]
}{
"error": "Rate Limited"
}{
"error": "something went wrong!",
"status": 123,
"type": "<string>",
"title": "<string>",
"detail": "<string>",
"instance": "<string>"
}Revoke a Group's access to datasets
Revokes a Group’s dataset grants. Datasets the Group has no grant for are ignored. Members can still read a dataset if another of their Groups grants it.
DELETE
/
2
/
teams
/
{teamSlug}
/
groups
/
{ID}
/
relationships
/
datasets
Revoke a Group's access to datasets
curl --request DELETE \
--url https://api.honeycomb.io/2/teams/{teamSlug}/groups/{ID}/relationships/datasets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/vnd.api+json' \
--data '
{
"data": [
{
"type": "datasets",
"id": "hcxds_01jbr4k2m7n8p9q0r1s2t3v4wx"
},
{
"type": "datasets",
"id": "hcxds_01jbr4m9q2r3s4t5v6w7x8y9za"
}
]
}
'import requests
url = "https://api.honeycomb.io/2/teams/{teamSlug}/groups/{ID}/relationships/datasets"
payload = { "data": [
{
"type": "datasets",
"id": "hcxds_01jbr4k2m7n8p9q0r1s2t3v4wx"
},
{
"type": "datasets",
"id": "hcxds_01jbr4m9q2r3s4t5v6w7x8y9za"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/vnd.api+json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/vnd.api+json'},
body: JSON.stringify({
data: [
{type: 'datasets', id: 'hcxds_01jbr4k2m7n8p9q0r1s2t3v4wx'},
{type: 'datasets', id: 'hcxds_01jbr4m9q2r3s4t5v6w7x8y9za'}
]
})
};
fetch('https://api.honeycomb.io/2/teams/{teamSlug}/groups/{ID}/relationships/datasets', 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/2/teams/{teamSlug}/groups/{ID}/relationships/datasets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
[
'type' => 'datasets',
'id' => 'hcxds_01jbr4k2m7n8p9q0r1s2t3v4wx'
],
[
'type' => 'datasets',
'id' => 'hcxds_01jbr4m9q2r3s4t5v6w7x8y9za'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/vnd.api+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://api.honeycomb.io/2/teams/{teamSlug}/groups/{ID}/relationships/datasets"
payload := strings.NewReader("{\n \"data\": [\n {\n \"type\": \"datasets\",\n \"id\": \"hcxds_01jbr4k2m7n8p9q0r1s2t3v4wx\"\n },\n {\n \"type\": \"datasets\",\n \"id\": \"hcxds_01jbr4m9q2r3s4t5v6w7x8y9za\"\n }\n ]\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/vnd.api+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.honeycomb.io/2/teams/{teamSlug}/groups/{ID}/relationships/datasets")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/vnd.api+json")
.body("{\n \"data\": [\n {\n \"type\": \"datasets\",\n \"id\": \"hcxds_01jbr4k2m7n8p9q0r1s2t3v4wx\"\n },\n {\n \"type\": \"datasets\",\n \"id\": \"hcxds_01jbr4m9q2r3s4t5v6w7x8y9za\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.honeycomb.io/2/teams/{teamSlug}/groups/{ID}/relationships/datasets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/vnd.api+json'
request.body = "{\n \"data\": [\n {\n \"type\": \"datasets\",\n \"id\": \"hcxds_01jbr4k2m7n8p9q0r1s2t3v4wx\"\n },\n {\n \"type\": \"datasets\",\n \"id\": \"hcxds_01jbr4m9q2r3s4t5v6w7x8y9za\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": 400,
"type": "https://api.honeycomb.io/problems/unparseable",
"title": "The request body could not be parsed.",
"error": "invalid gzip data"
}{
"error": "unknown API key - check your credentials"
}{
"error": "Your team has been denied access to Management APIs, please contact support to be unblocked."
}{
"error": "dataset not found"
}{
"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"
}{
"errors": [
{
"id": "<string>",
"code": "<string>",
"status": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"header": "<string>",
"parameter": "<string>"
}
}
]
}{
"status": 422,
"type": "https://api.honeycomb.io/problems/validation-failed",
"error": "The provided input is invalid.",
"title": "The provided input is invalid",
"type_detail": [
{
"field": "type",
"code": "invalid",
"description": "type: must be a valid value"
}
]
}{
"error": "Rate Limited"
}{
"error": "something went wrong!",
"status": 123,
"type": "<string>",
"title": "<string>",
"detail": "<string>",
"instance": "<string>"
}Authorizations
Authenticate using a Honeycomb Management Key.
Pass the Management Key as a Bearer token in the Authorization header:
Authorization: Bearer hcxmk_12345678901234567890123456:12345678901234567890123456789012
Construct the key value by joining the Key ID and Secret with a colon (:).
To learn how to create a Management Key, visit Manage Team API Keys. To learn more about authenticating requests, visit API Authentication.
Body
application/vnd.api+json
Response
No Content