Pular para o conteúdo principal
POST
/
cases
Create case
curl --request POST \
  --url https://nvidia.casebender.com/api/v1/cases \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "title": "<string>",
  "severity": 2.5,
  "description": "<string>",
  "tlp": 2,
  "pap": 2,
  "statusValue": "<string>",
  "typeValue": "<string>",
  "assigneeId": "<string>",
  "clientId": "<string>",
  "source": "<string>",
  "sourceRef": "<string>",
  "tags": [
    {}
  ],
  "teams": [
    {}
  ],
  "organizations": [
    "<string>"
  ],
  "customFields": {}
}
'
import requests

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

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

fetch('https://nvidia.casebender.com/api/v1/cases', 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/cases",
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,
'description' => '<string>',
'tlp' => 2,
'pap' => 2,
'statusValue' => '<string>',
'typeValue' => '<string>',
'assigneeId' => '<string>',
'clientId' => '<string>',
'source' => '<string>',
'sourceRef' => '<string>',
'tags' => [
[

]
],
'teams' => [
[

]
],
'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/cases"

payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"severity\": 2.5,\n \"description\": \"<string>\",\n \"tlp\": 2,\n \"pap\": 2,\n \"statusValue\": \"<string>\",\n \"typeValue\": \"<string>\",\n \"assigneeId\": \"<string>\",\n \"clientId\": \"<string>\",\n \"source\": \"<string>\",\n \"sourceRef\": \"<string>\",\n \"tags\": [\n {}\n ],\n \"teams\": [\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/cases")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"severity\": 2.5,\n \"description\": \"<string>\",\n \"tlp\": 2,\n \"pap\": 2,\n \"statusValue\": \"<string>\",\n \"typeValue\": \"<string>\",\n \"assigneeId\": \"<string>\",\n \"clientId\": \"<string>\",\n \"source\": \"<string>\",\n \"sourceRef\": \"<string>\",\n \"tags\": [\n {}\n ],\n \"teams\": [\n {}\n ],\n \"organizations\": [\n \"<string>\"\n ],\n \"customFields\": {}\n}")
.asString();
require 'uri'
require 'net/http'

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

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 \"description\": \"<string>\",\n \"tlp\": 2,\n \"pap\": 2,\n \"statusValue\": \"<string>\",\n \"typeValue\": \"<string>\",\n \"assigneeId\": \"<string>\",\n \"clientId\": \"<string>\",\n \"source\": \"<string>\",\n \"sourceRef\": \"<string>\",\n \"tags\": [\n {}\n ],\n \"teams\": [\n {}\n ],\n \"organizations\": [\n \"<string>\"\n ],\n \"customFields\": {}\n}"

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

Autorizações

Authorization
string
header
obrigatório

API key authentication. Use format: Bearer cbr_live_your_key

Corpo

application/json
title
string
obrigatório
Required string length: 1 - 500
severity
number
obrigatório
Intervalo obrigatório: 1 <= x <= 4
description
string
tlp
number
padrão:2
Intervalo obrigatório: 0 <= x <= 4
pap
number
padrão:2
Intervalo obrigatório: 0 <= x <= 3
statusValue
string
typeValue
string
assigneeId
string
clientId
string
source
string
sourceRef
string
tags
object[]
teams
object[]
organizations
string[]
customFields
object

Resposta

200

Default Response