Workers
Worker join
Registers a new security assessment worker node to the distributed processing cluster.
POST
/
api
/
workers
/
join
Worker join
curl --request POST \
--url https://{baseUrl}/api/v1/api/workers/join \
--header 'Content-Type: application/json' \
--data '
{
"apiKey": "<string>"
}
'import requests
url = "https://{baseUrl}/api/v1/api/workers/join"
payload = { "apiKey": "<string>" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({apiKey: '<string>'})
};
fetch('https://{baseUrl}/api/v1/api/workers/join', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{baseUrl}/api/v1/api/workers/join"
payload := strings.NewReader("{\n \"apiKey\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}{
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"lastSeenAt": "2023-11-07T05:31:56Z",
"token": "<string>",
"currentJobsCount": 123,
"type": "built_in",
"scope": "cloud",
"tool": {
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"description": "<string>",
"command": "<string>",
"category": "subdomains",
"version": "<string>",
"isBuiltIn": true,
"isInstalled": true,
"isOfficialSupport": true,
"type": "built_in",
"providerId": "<string>",
"logoUrl": "<string>",
"availableWorkersCount": 123
},
"internalNetworkId": "<string>",
"tools": [
{
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"description": "<string>",
"command": "<string>",
"category": "subdomains",
"version": "<string>",
"isBuiltIn": true,
"isInstalled": true,
"isOfficialSupport": true,
"type": "built_in",
"providerId": "<string>",
"logoUrl": "<string>",
"availableWorkersCount": 123
}
],
"name": "<string>",
"os": "<string>",
"ipAddress": "<string>",
"enabledAgentMode": true,
"isOnline": true
}Body
application/json
Response
200 - application/json
Available options:
built_in, provider Available options:
cloud, workspace Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I
Worker join
curl --request POST \
--url https://{baseUrl}/api/v1/api/workers/join \
--header 'Content-Type: application/json' \
--data '
{
"apiKey": "<string>"
}
'import requests
url = "https://{baseUrl}/api/v1/api/workers/join"
payload = { "apiKey": "<string>" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({apiKey: '<string>'})
};
fetch('https://{baseUrl}/api/v1/api/workers/join', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{baseUrl}/api/v1/api/workers/join"
payload := strings.NewReader("{\n \"apiKey\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}{
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"lastSeenAt": "2023-11-07T05:31:56Z",
"token": "<string>",
"currentJobsCount": 123,
"type": "built_in",
"scope": "cloud",
"tool": {
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"description": "<string>",
"command": "<string>",
"category": "subdomains",
"version": "<string>",
"isBuiltIn": true,
"isInstalled": true,
"isOfficialSupport": true,
"type": "built_in",
"providerId": "<string>",
"logoUrl": "<string>",
"availableWorkersCount": 123
},
"internalNetworkId": "<string>",
"tools": [
{
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"description": "<string>",
"command": "<string>",
"category": "subdomains",
"version": "<string>",
"isBuiltIn": true,
"isInstalled": true,
"isOfficialSupport": true,
"type": "built_in",
"providerId": "<string>",
"logoUrl": "<string>",
"availableWorkersCount": 123
}
],
"name": "<string>",
"os": "<string>",
"ipAddress": "<string>",
"enabledAgentMode": true,
"isOnline": true
}