Skip to main content
PUT
/
api
/
v2
/
clients
/
update
Update Client Values
curl --request PUT \
  --url https://your-tenant.bloodhoundenterprise.io/api/v2/clients/update \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "address": "<string>",
  "hostname": "<string>",
  "username": "<string>",
  "version": "<string>",
  "usersid": "<string>"
}
'
import requests

url = "https://your-tenant.bloodhoundenterprise.io/api/v2/clients/update"

payload = {
"address": "<string>",
"hostname": "<string>",
"username": "<string>",
"version": "<string>",
"usersid": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

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

print(response.text)
const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
address: '<string>',
hostname: '<string>',
username: '<string>',
version: '<string>',
usersid: '<string>'
})
};

fetch('https://your-tenant.bloodhoundenterprise.io/api/v2/clients/update', 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/clients/update",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'address' => '<string>',
'hostname' => '<string>',
'username' => '<string>',
'version' => '<string>',
'usersid' => '<string>'
]),
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/clients/update"

payload := strings.NewReader("{\n \"address\": \"<string>\",\n \"hostname\": \"<string>\",\n \"username\": \"<string>\",\n \"version\": \"<string>\",\n \"usersid\": \"<string>\"\n}")

req, _ := http.NewRequest("PUT", 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.put("https://your-tenant.bloodhoundenterprise.io/api/v2/clients/update")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"address\": \"<string>\",\n \"hostname\": \"<string>\",\n \"username\": \"<string>\",\n \"version\": \"<string>\",\n \"usersid\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://your-tenant.bloodhoundenterprise.io/api/v2/clients/update")

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

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"address\": \"<string>\",\n \"hostname\": \"<string>\",\n \"username\": \"<string>\",\n \"version\": \"<string>\",\n \"usersid\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "deleted_at": {
      "time": "2023-11-07T05:31:56Z",
      "valid": true
    },
    "name": "<string>",
    "ip_address": "127.0.0.1",
    "hostname": "<string>",
    "configured_user": "<string>",
    "last_checkin": "2023-11-07T05:31:56Z",
    "events": [
      {
        "id": 123,
        "created_at": "2023-11-07T05:31:56Z",
        "updated_at": "2023-11-07T05:31:56Z",
        "deleted_at": {
          "time": "2023-11-07T05:31:56Z",
          "valid": true
        },
        "client_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "rrule": "<string>",
        "session_collection": true,
        "local_group_collection": true,
        "ad_structure_collection": true,
        "cert_services_collection": true,
        "ca_registry_collection": true,
        "dc_registry_collection": true,
        "all_trusted_domains": true,
        "next_scheduled_at": "2023-11-07T05:31:56Z",
        "ous": [
          "<string>"
        ],
        "domains": [
          "<string>"
        ]
      }
    ],
    "token": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "deleted_at": {
        "time": "2023-11-07T05:31:56Z",
        "valid": true
      },
      "user_id": {
        "uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "valid": true
      },
      "name": {
        "string": "<string>",
        "valid": true
      },
      "key": "<string>",
      "hmac_method": "<string>",
      "last_access": "2023-11-07T05:31:56Z"
    },
    "current_job_id": {
      "int64": 123,
      "valid": true
    },
    "current_job": {
      "id": 123,
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "deleted_at": {
        "time": "2023-11-07T05:31:56Z",
        "valid": true
      },
      "client_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "client_name": "<string>",
      "event_id": {
        "int32": 123,
        "valid": true
      },
      "statusMessage": "<string>",
      "start_time": "2023-11-07T05:31:56Z",
      "end_time": "2023-11-07T05:31:56Z",
      "log_path": {
        "string": "<string>",
        "valid": true
      },
      "session_collection": true,
      "local_group_collection": true,
      "ad_structure_collection": true,
      "cert_services_collection": true,
      "ca_registry_collection": true,
      "dc_registry_collection": true,
      "all_trusted_domains": true,
      "domain_controller": {
        "string": "<string>",
        "valid": true
      },
      "event_title": "<string>",
      "last_ingest": "2023-11-07T05:31:56Z",
      "ous": [
        "<string>"
      ],
      "domains": [
        "<string>"
      ],
      "domain_results": [
        {
          "id": 123,
          "created_at": "2023-11-07T05:31:56Z",
          "updated_at": "2023-11-07T05:31:56Z",
          "deleted_at": {
            "time": "2023-11-07T05:31:56Z",
            "valid": true
          },
          "job_id": 123,
          "domain_name": "<string>",
          "success": true,
          "message": "<string>",
          "user_count": 123,
          "group_count": 123,
          "computer_count": 123,
          "gpo_count": 123,
          "ou_count": 123,
          "container_count": 123,
          "aiaca_count": 123,
          "rootca_count": 123,
          "enterpriseca_count": 123,
          "ntauthstore_count": 123,
          "certtemplate_count": 123,
          "deleted_count": 123
        }
      ]
    },
    "completed_job_count": 123,
    "domain_controller": {
      "string": "<string>",
      "valid": true
    },
    "version": "<string>",
    "user_sid": {
      "string": "<string>",
      "valid": true
    }
  }
}
{
"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": 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 only

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]+)$

Body

application/json

The request body for updating a client

address
string
hostname
string
username
string
version
string
usersid
string

Response

OK

data
object