Skip to main content
POST
/
api
/
v2
/
asset-group-tags
/
{asset_group_tag_id}
/
selectors
Create Asset Group Tag Selector
curl --request POST \
  --url https://your-tenant.bloodhoundenterprise.io/api/v2/asset-group-tags/{asset_group_tag_id}/selectors \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "seeds": [
    {
      "value": "<string>"
    }
  ],
  "id": 123,
  "asset_group_tag_id": 123,
  "created_at": "2023-11-07T05:31:56Z",
  "created_by": "<string>",
  "updated_at": "2023-11-07T05:31:56Z",
  "updated_by": "<string>",
  "disabled_at": "2023-11-07T05:31:56Z",
  "disabled_by": "<string>",
  "description": "<string>",
  "is_default": true,
  "allow_disable": true,
  "disabled": true
}
'
import requests

url = "https://your-tenant.bloodhoundenterprise.io/api/v2/asset-group-tags/{asset_group_tag_id}/selectors"

payload = {
"name": "<string>",
"seeds": [{ "value": "<string>" }],
"id": 123,
"asset_group_tag_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"updated_by": "<string>",
"disabled_at": "2023-11-07T05:31:56Z",
"disabled_by": "<string>",
"description": "<string>",
"is_default": True,
"allow_disable": True,
"disabled": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
seeds: [{value: '<string>'}],
id: 123,
asset_group_tag_id: 123,
created_at: '2023-11-07T05:31:56Z',
created_by: '<string>',
updated_at: '2023-11-07T05:31:56Z',
updated_by: '<string>',
disabled_at: '2023-11-07T05:31:56Z',
disabled_by: '<string>',
description: '<string>',
is_default: true,
allow_disable: true,
disabled: true
})
};

fetch('https://your-tenant.bloodhoundenterprise.io/api/v2/asset-group-tags/{asset_group_tag_id}/selectors', 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://your-tenant.bloodhoundenterprise.io/api/v2/asset-group-tags/{asset_group_tag_id}/selectors",
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([
'name' => '<string>',
'seeds' => [
[
'value' => '<string>'
]
],
'id' => 123,
'asset_group_tag_id' => 123,
'created_at' => '2023-11-07T05:31:56Z',
'created_by' => '<string>',
'updated_at' => '2023-11-07T05:31:56Z',
'updated_by' => '<string>',
'disabled_at' => '2023-11-07T05:31:56Z',
'disabled_by' => '<string>',
'description' => '<string>',
'is_default' => true,
'allow_disable' => true,
'disabled' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/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://your-tenant.bloodhoundenterprise.io/api/v2/asset-group-tags/{asset_group_tag_id}/selectors"

payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"seeds\": [\n {\n \"value\": \"<string>\"\n }\n ],\n \"id\": 123,\n \"asset_group_tag_id\": 123,\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"created_by\": \"<string>\",\n \"updated_at\": \"2023-11-07T05:31:56Z\",\n \"updated_by\": \"<string>\",\n \"disabled_at\": \"2023-11-07T05:31:56Z\",\n \"disabled_by\": \"<string>\",\n \"description\": \"<string>\",\n \"is_default\": true,\n \"allow_disable\": true,\n \"disabled\": true\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
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://your-tenant.bloodhoundenterprise.io/api/v2/asset-group-tags/{asset_group_tag_id}/selectors")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"seeds\": [\n {\n \"value\": \"<string>\"\n }\n ],\n \"id\": 123,\n \"asset_group_tag_id\": 123,\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"created_by\": \"<string>\",\n \"updated_at\": \"2023-11-07T05:31:56Z\",\n \"updated_by\": \"<string>\",\n \"disabled_at\": \"2023-11-07T05:31:56Z\",\n \"disabled_by\": \"<string>\",\n \"description\": \"<string>\",\n \"is_default\": true,\n \"allow_disable\": true,\n \"disabled\": true\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://your-tenant.bloodhoundenterprise.io/api/v2/asset-group-tags/{asset_group_tag_id}/selectors")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"seeds\": [\n {\n \"value\": \"<string>\"\n }\n ],\n \"id\": 123,\n \"asset_group_tag_id\": 123,\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"created_by\": \"<string>\",\n \"updated_at\": \"2023-11-07T05:31:56Z\",\n \"updated_by\": \"<string>\",\n \"disabled_at\": \"2023-11-07T05:31:56Z\",\n \"disabled_by\": \"<string>\",\n \"description\": \"<string>\",\n \"is_default\": true,\n \"allow_disable\": true,\n \"disabled\": true\n}"

response = http.request(request)
puts response.read_body
{
  "data": {
    "id": 123,
    "asset_group_tag_id": 123,
    "created_at": "2023-11-07T05:31:56Z",
    "created_by": "<string>",
    "updated_at": "2023-11-07T05:31:56Z",
    "updated_by": "<string>",
    "disabled_at": "2023-11-07T05:31:56Z",
    "disabled_by": "<string>",
    "name": "<string>",
    "description": "<string>",
    "is_default": true,
    "allow_disable": true,
    "seeds": [
      {
        "value": "<string>"
      }
    ]
  }
}
{
"http_status": 400,
"timestamp": "2024-02-19T19:27:43.866Z",
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"errors": [
{
"context": "clients",
"message": "The JSON payload could not be unmarshalled."
}
]
}
{
"http_status": 401,
"timestamp": "2024-02-19T19:27:43.866Z",
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"errors": [
{
"context": "login",
"message": "Unauthorized"
}
]
}
{
"http_status": 403,
"timestamp": "2024-02-19T19:27:43.866Z",
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"errors": [
{
"context": "clients",
"message": "You do not have permission to access this resource"
}
]
}
{
"http_status": 404,
"timestamp": "2024-02-19T19:27:43.866Z",
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"errors": [
{
"context": "clients",
"message": "The requested client could not be found."
}
]
}
{
"http_status": 429,
"timestamp": "2024-02-19T19:27:43.866Z",
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"errors": [
{
"context": "middleware",
"message": "Too many requests. Please try again later."
}
]
}
{
"http_status": 500,
"timestamp": "2024-02-19T19:27:43.866Z",
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"errors": [
{
"context": "clients",
"message": "The request could not be handled due to an unexpected database error."
}
]
}
Applies to BloodHound Enterprise and CE

Authorizations

Authorization
string
header
required

Authorization: Bearer $JWT_TOKEN

Headers

Prefer
string
default:wait=30

Prefer header, used to specify a custom timeout in seconds using the wait parameter as per RFC7240. Passing in wait=-1 bypasses all timeout limits when the feature is enabled.

Pattern: ^wait=(-1|[0-9]+)$

Path Parameters

asset_group_tag_id
integer<int32>
required

ID of the asset_group_tag to create a selector

Body

application/json

The request body for creating an asset group tag selector. Only the name and seeds fields are required.

name
string
required
seeds
object[]
required
id
integer
asset_group_tag_id
integer
created_at
string<date-time>
created_by
string
updated_at
string<date-time>
updated_by
string
disabled_at
string<date-time> | null

An RFC-3339 formatted string

disabled_by
string | null
description
string
auto_certify
enum<integer>

auto_certify must be an input value of 0 (Disabled), 1 (AllMembers), or 2 (SeedsOnly)

Available options:
0,
1,
2
is_default
boolean
allow_disable
boolean
disabled
boolean

Response

Created

data
object