Vai al contenuto principale
POST
/
alerts
Create alert
curl --request POST \
  --url https://nvidia.casebender.com/api/v1/alerts \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "title": "<string>",
  "severity": 2.5,
  "statusValue": "<string>",
  "description": "<string>",
  "tlp": 2,
  "pap": 2,
  "type": "<string>",
  "source": "<string>",
  "sourceRef": "<string>",
  "externalLink": "<string>",
  "count": 1,
  "clientId": "<string>",
  "clientName": "<string>",
  "tags": [
    {
      "id": "<string>"
    }
  ],
  "teams": [
    {
      "id": "<string>"
    }
  ],
  "organizations": [
    "<string>"
  ],
  "customFields": {}
}
'
import requests

url = "https://nvidia.casebender.com/api/v1/alerts"

payload = {
"title": "<string>",
"severity": 2.5,
"statusValue": "<string>",
"description": "<string>",
"tlp": 2,
"pap": 2,
"type": "<string>",
"source": "<string>",
"sourceRef": "<string>",
"externalLink": "<string>",
"count": 1,
"clientId": "<string>",
"clientName": "<string>",
"tags": [{ "id": "<string>" }],
"teams": [{ "id": "<string>" }],
"organizations": ["<string>"],
"customFields": {}
}
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({
title: '<string>',
severity: 2.5,
statusValue: '<string>',
description: '<string>',
tlp: 2,
pap: 2,
type: '<string>',
source: '<string>',
sourceRef: '<string>',
externalLink: '<string>',
count: 1,
clientId: '<string>',
clientName: '<string>',
tags: [{id: '<string>'}],
teams: [{id: '<string>'}],
organizations: ['<string>'],
customFields: {}
})
};

fetch('https://nvidia.casebender.com/api/v1/alerts', 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://nvidia.casebender.com/api/v1/alerts",
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([
'title' => '<string>',
'severity' => 2.5,
'statusValue' => '<string>',
'description' => '<string>',
'tlp' => 2,
'pap' => 2,
'type' => '<string>',
'source' => '<string>',
'sourceRef' => '<string>',
'externalLink' => '<string>',
'count' => 1,
'clientId' => '<string>',
'clientName' => '<string>',
'tags' => [
[
'id' => '<string>'
]
],
'teams' => [
[
'id' => '<string>'
]
],
'organizations' => [
'<string>'
],
'customFields' => [

]
]),
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://nvidia.casebender.com/api/v1/alerts"

payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"severity\": 2.5,\n \"statusValue\": \"<string>\",\n \"description\": \"<string>\",\n \"tlp\": 2,\n \"pap\": 2,\n \"type\": \"<string>\",\n \"source\": \"<string>\",\n \"sourceRef\": \"<string>\",\n \"externalLink\": \"<string>\",\n \"count\": 1,\n \"clientId\": \"<string>\",\n \"clientName\": \"<string>\",\n \"tags\": [\n {\n \"id\": \"<string>\"\n }\n ],\n \"teams\": [\n {\n \"id\": \"<string>\"\n }\n ],\n \"organizations\": [\n \"<string>\"\n ],\n \"customFields\": {}\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://nvidia.casebender.com/api/v1/alerts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"severity\": 2.5,\n \"statusValue\": \"<string>\",\n \"description\": \"<string>\",\n \"tlp\": 2,\n \"pap\": 2,\n \"type\": \"<string>\",\n \"source\": \"<string>\",\n \"sourceRef\": \"<string>\",\n \"externalLink\": \"<string>\",\n \"count\": 1,\n \"clientId\": \"<string>\",\n \"clientName\": \"<string>\",\n \"tags\": [\n {\n \"id\": \"<string>\"\n }\n ],\n \"teams\": [\n {\n \"id\": \"<string>\"\n }\n ],\n \"organizations\": [\n \"<string>\"\n ],\n \"customFields\": {}\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://nvidia.casebender.com/api/v1/alerts")

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 \"title\": \"<string>\",\n \"severity\": 2.5,\n \"statusValue\": \"<string>\",\n \"description\": \"<string>\",\n \"tlp\": 2,\n \"pap\": 2,\n \"type\": \"<string>\",\n \"source\": \"<string>\",\n \"sourceRef\": \"<string>\",\n \"externalLink\": \"<string>\",\n \"count\": 1,\n \"clientId\": \"<string>\",\n \"clientName\": \"<string>\",\n \"tags\": [\n {\n \"id\": \"<string>\"\n }\n ],\n \"teams\": [\n {\n \"id\": \"<string>\"\n }\n ],\n \"organizations\": [\n \"<string>\"\n ],\n \"customFields\": {}\n}"

response = http.request(request)
puts response.read_body

Autorizzazioni

Authorization
string
header
obbligatorio

API key authentication. Use format: Bearer cbr_live_your_key

Corpo

application/json
title
string
obbligatorio
Required string length: 1 - 500
severity
number
obbligatorio
Intervallo richiesto: 1 <= x <= 4
statusValue
string
obbligatorio
description
string
tlp
number
predefinito:2
Intervallo richiesto: 0 <= x <= 4
pap
number
predefinito:2
Intervallo richiesto: 0 <= x <= 3
type
string
source
string
sourceRef
string
count
number
predefinito:1
clientId
string
clientName
string
tags
object[]
teams
object[]
organizations
string[]
customFields
object

Risposta

200

Default Response