cURL
curl -X POST "https://app.cotool.ai/api/detection-library/:slug/add" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"import requests
url = "https://app.cotool.ai/api/detection-library/{slug}/add"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.cotool.ai/api/detection-library/{slug}/add', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://app.cotool.ai/api/detection-library/{slug}/add")
.header("Authorization", "Bearer <token>")
.asString();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.cotool.ai/api/detection-library/{slug}/add"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"chatId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"revision": "<string>",
"name": "<string>",
"summary": "<string>",
"howItWorks": "<string>",
"toolNames": [
"<string>"
],
"mitreTechniqueIds": [
"<string>"
],
"metadataStatus": "pending",
"librarySlug": "<string>",
"outputKind": "alerts",
"executionMode": "batch",
"managed": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"publishedVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"recentHits": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"executionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"entity": "<string>",
"entityType": "<string>",
"severity": "low",
"headline": "<string>",
"summary": "<string>",
"evidence": {},
"closedAt": "2023-11-07T05:31:56Z",
"lastSeenAt": "2023-11-07T05:31:56Z",
"lastSeenExecutionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"seenCount": 123,
"linkedAlert": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"displayId": "<string>",
"status": "open",
"derivedDisposition": "true_positive",
"assignedAgent": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"feedback": {
"detectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"windowDays": 123,
"dispositions": {
"truePositive": 1,
"falsePositive": 1,
"benign": 1
},
"statuses": {
"open": 1,
"inProgress": 1,
"escalated": 1,
"duplicate": 1,
"dismissed": 1,
"expired": 1
},
"precision": {
"value": 0.5,
"numerator": 1,
"denominator": 1
},
"versions": [
{
"versionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": 123,
"dispositions": {
"truePositive": 1,
"falsePositive": 1,
"benign": 1
},
"precision": {
"value": 0.5,
"numerator": 1,
"denominator": 1
}
}
],
"currentVersion": {
"versionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": 123,
"dispositions": {
"truePositive": 1,
"falsePositive": 1,
"benign": 1
}
},
"falsePositiveEntities": [
{
"entity": "<string>",
"entityType": "<string>",
"count": 123
}
],
"actorSplit": {
"human": {
"truePositive": 1,
"falsePositive": 1,
"benign": 1
},
"agent": {
"truePositive": 1,
"falsePositive": 1,
"benign": 1
}
},
"scheduledExecutions": {
"total": 1,
"succeeded": 1,
"failed": 1,
"interrupted": 1,
"running": 1,
"successRate": 0.5,
"averageRuntimeMs": 1,
"errorCount": 1,
"recentErrors": [
{
"message": "<string>",
"count": 123,
"lastOccurredAt": "2023-11-07T05:31:56Z"
}
],
"lastScheduledRunAt": "2023-11-07T05:31:56Z",
"lastFinishedStatus": "succeeded"
},
"volume": {
"hits": 1,
"alerts": 1,
"lastResultAt": "2023-11-07T05:31:56Z",
"lastAlertAt": "2023-11-07T05:31:56Z"
},
"everEscalated": 1,
"meanTimeToDispositionSeconds": 1
},
"calibration": {
"state": "calibrating",
"attempt": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"detectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reason": "library_add",
"startedAt": "2023-11-07T05:31:56Z",
"deadlineAt": "2023-11-07T05:31:56Z",
"endedAt": "2023-11-07T05:31:56Z",
"outcome": "live",
"pauseReason": "still_noisy",
"evidenceSince": "2023-11-07T05:31:56Z",
"latestEvaluation": {
"versionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"result": "passing",
"usableCoverageHours": 1,
"backtestCoverageHours": 1,
"latestDailyFindings": 1,
"maxDailyFindings": 1,
"source": "backtest",
"evaluatedAt": "2023-11-07T05:31:56Z"
},
"activeRunId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lastRunId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agentRunsUsed": 1,
"deepRunAt": "2023-11-07T05:31:56Z",
"correctionRequestedAt": "2023-11-07T05:31:56Z",
"lastCorrectionRunAt": "2023-11-07T05:31:56Z",
"backtestSupported": true,
"retryNumber": 1,
"retryAt": "2023-11-07T05:31:56Z",
"drift": {
"recentAlerts": 1,
"usualMaxDailyAlerts": 1
}
},
"step": {
"kind": "promote"
},
"currentVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"pendingProposalId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"retirement": {
"retiredAt": "2023-11-07T05:31:56Z",
"reason": "<string>",
"supersededBy": [
{
"slug": "<string>",
"name": "<string>",
"detectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
}{
"error": "<string>",
"issues": [
{}
]
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"missingPerms": [
"<string>"
]
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}Detections
Add a detection library entry
Creates an org-owned detection from the entry, publishes its notebook as version 1, and enables the entry’s default schedule.
POST
/
api
/
detection-library
/
{slug}
/
add
cURL
curl -X POST "https://app.cotool.ai/api/detection-library/:slug/add" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"import requests
url = "https://app.cotool.ai/api/detection-library/{slug}/add"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.cotool.ai/api/detection-library/{slug}/add', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://app.cotool.ai/api/detection-library/{slug}/add")
.header("Authorization", "Bearer <token>")
.asString();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.cotool.ai/api/detection-library/{slug}/add"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"chatId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"revision": "<string>",
"name": "<string>",
"summary": "<string>",
"howItWorks": "<string>",
"toolNames": [
"<string>"
],
"mitreTechniqueIds": [
"<string>"
],
"metadataStatus": "pending",
"librarySlug": "<string>",
"outputKind": "alerts",
"executionMode": "batch",
"managed": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"publishedVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"recentHits": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"executionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"entity": "<string>",
"entityType": "<string>",
"severity": "low",
"headline": "<string>",
"summary": "<string>",
"evidence": {},
"closedAt": "2023-11-07T05:31:56Z",
"lastSeenAt": "2023-11-07T05:31:56Z",
"lastSeenExecutionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"seenCount": 123,
"linkedAlert": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"displayId": "<string>",
"status": "open",
"derivedDisposition": "true_positive",
"assignedAgent": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"feedback": {
"detectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"windowDays": 123,
"dispositions": {
"truePositive": 1,
"falsePositive": 1,
"benign": 1
},
"statuses": {
"open": 1,
"inProgress": 1,
"escalated": 1,
"duplicate": 1,
"dismissed": 1,
"expired": 1
},
"precision": {
"value": 0.5,
"numerator": 1,
"denominator": 1
},
"versions": [
{
"versionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": 123,
"dispositions": {
"truePositive": 1,
"falsePositive": 1,
"benign": 1
},
"precision": {
"value": 0.5,
"numerator": 1,
"denominator": 1
}
}
],
"currentVersion": {
"versionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": 123,
"dispositions": {
"truePositive": 1,
"falsePositive": 1,
"benign": 1
}
},
"falsePositiveEntities": [
{
"entity": "<string>",
"entityType": "<string>",
"count": 123
}
],
"actorSplit": {
"human": {
"truePositive": 1,
"falsePositive": 1,
"benign": 1
},
"agent": {
"truePositive": 1,
"falsePositive": 1,
"benign": 1
}
},
"scheduledExecutions": {
"total": 1,
"succeeded": 1,
"failed": 1,
"interrupted": 1,
"running": 1,
"successRate": 0.5,
"averageRuntimeMs": 1,
"errorCount": 1,
"recentErrors": [
{
"message": "<string>",
"count": 123,
"lastOccurredAt": "2023-11-07T05:31:56Z"
}
],
"lastScheduledRunAt": "2023-11-07T05:31:56Z",
"lastFinishedStatus": "succeeded"
},
"volume": {
"hits": 1,
"alerts": 1,
"lastResultAt": "2023-11-07T05:31:56Z",
"lastAlertAt": "2023-11-07T05:31:56Z"
},
"everEscalated": 1,
"meanTimeToDispositionSeconds": 1
},
"calibration": {
"state": "calibrating",
"attempt": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"detectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reason": "library_add",
"startedAt": "2023-11-07T05:31:56Z",
"deadlineAt": "2023-11-07T05:31:56Z",
"endedAt": "2023-11-07T05:31:56Z",
"outcome": "live",
"pauseReason": "still_noisy",
"evidenceSince": "2023-11-07T05:31:56Z",
"latestEvaluation": {
"versionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"result": "passing",
"usableCoverageHours": 1,
"backtestCoverageHours": 1,
"latestDailyFindings": 1,
"maxDailyFindings": 1,
"source": "backtest",
"evaluatedAt": "2023-11-07T05:31:56Z"
},
"activeRunId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lastRunId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agentRunsUsed": 1,
"deepRunAt": "2023-11-07T05:31:56Z",
"correctionRequestedAt": "2023-11-07T05:31:56Z",
"lastCorrectionRunAt": "2023-11-07T05:31:56Z",
"backtestSupported": true,
"retryNumber": 1,
"retryAt": "2023-11-07T05:31:56Z",
"drift": {
"recentAlerts": 1,
"usualMaxDailyAlerts": 1
}
},
"step": {
"kind": "promote"
},
"currentVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"pendingProposalId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"retirement": {
"retiredAt": "2023-11-07T05:31:56Z",
"reason": "<string>",
"supersededBy": [
{
"slug": "<string>",
"name": "<string>",
"detectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
}{
"error": "<string>",
"issues": [
{}
]
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"missingPerms": [
"<string>"
]
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}Authorizations
Response
Successful response
Was this page helpful?
⌘I