Enqueue a collector job
curl --request POST \
--url https://your-tenant.bloodhoundenterprise.io/api/v2/collie-job-queue \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"job_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"priority": 0
}
'import requests
url = "https://your-tenant.bloodhoundenterprise.io/api/v2/collie-job-queue"
payload = {
"job_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"priority": 0
}
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({job_profile_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', priority: 0})
};
fetch('https://your-tenant.bloodhoundenterprise.io/api/v2/collie-job-queue', 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/collie-job-queue",
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([
'job_profile_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'priority' => 0
]),
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/collie-job-queue"
payload := strings.NewReader("{\n \"job_profile_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"priority\": 0\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/collie-job-queue")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"job_profile_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"priority\": 0\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-tenant.bloodhoundenterprise.io/api/v2/collie-job-queue")
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 \"job_profile_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"priority\": 0\n}"
response = http.request(request)
puts response.read_body{
"data": {
"job": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"job_schedule_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"job_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"job_type_id": 123,
"job_key": "<string>",
"version": "<string>",
"params": {},
"scope_client_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_secret_key_id": "<string>",
"secret_key_id": "<string>",
"priority": 123,
"status": "ready",
"run_at": "2023-11-07T05:31:56Z",
"unclaimed_deadline_at": "2023-11-07T05:31:56Z",
"attempts": 1,
"max_attempts": 2,
"last_failure": "<string>",
"claimed_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"claimed_at": "2023-11-07T05:31:56Z",
"claim_expires_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}
}{
"http_status": 350,
"timestamp": "2023-11-07T05:31:56Z",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"errors": [
{
"context": "<string>",
"message": "<string>"
}
]
}{
"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": 350,
"timestamp": "2023-11-07T05:31:56Z",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"errors": [
{
"context": "<string>",
"message": "<string>"
}
]
}{
"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."
}
]
}Collector Jobs (Experimental)
Enqueue a collector job
Enqueues immediately due work from either an existing profile or schema-validated inline parameters.
POST
/
api
/
v2
/
collie-job-queue
Enqueue a collector job
curl --request POST \
--url https://your-tenant.bloodhoundenterprise.io/api/v2/collie-job-queue \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"job_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"priority": 0
}
'import requests
url = "https://your-tenant.bloodhoundenterprise.io/api/v2/collie-job-queue"
payload = {
"job_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"priority": 0
}
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({job_profile_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', priority: 0})
};
fetch('https://your-tenant.bloodhoundenterprise.io/api/v2/collie-job-queue', 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/collie-job-queue",
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([
'job_profile_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'priority' => 0
]),
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/collie-job-queue"
payload := strings.NewReader("{\n \"job_profile_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"priority\": 0\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/collie-job-queue")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"job_profile_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"priority\": 0\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-tenant.bloodhoundenterprise.io/api/v2/collie-job-queue")
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 \"job_profile_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"priority\": 0\n}"
response = http.request(request)
puts response.read_body{
"data": {
"job": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"job_schedule_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"job_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"job_type_id": 123,
"job_key": "<string>",
"version": "<string>",
"params": {},
"scope_client_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_secret_key_id": "<string>",
"secret_key_id": "<string>",
"priority": 123,
"status": "ready",
"run_at": "2023-11-07T05:31:56Z",
"unclaimed_deadline_at": "2023-11-07T05:31:56Z",
"attempts": 1,
"max_attempts": 2,
"last_failure": "<string>",
"claimed_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"claimed_at": "2023-11-07T05:31:56Z",
"claim_expires_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}
}{
"http_status": 350,
"timestamp": "2023-11-07T05:31:56Z",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"errors": [
{
"context": "<string>",
"message": "<string>"
}
]
}{
"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": 350,
"timestamp": "2023-11-07T05:31:56Z",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"errors": [
{
"context": "<string>",
"message": "<string>"
}
]
}{
"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."
}
]
}Authorizations
JWTBearerTokenSignedRequest & RequestDate & HMACSignature
Headers
Body
application/json