Upload admitted bytes using the same control credential for an active CI claim
curl --request PUT \
--url https://api.firedrill.run/v1/ci/suites/{ciSuiteId}/cases/{ciCaseId}/claims/{ciClaimId}/attachments/{attachmentId}/content \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/octet-stream' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '"<string>"'import requests
url = "https://api.firedrill.run/v1/ci/suites/{ciSuiteId}/cases/{ciCaseId}/claims/{ciClaimId}/attachments/{attachmentId}/content"
payload = "<string>"
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/octet-stream"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/octet-stream'
},
body: JSON.stringify('<string>')
};
fetch('https://api.firedrill.run/v1/ci/suites/{ciSuiteId}/cases/{ciCaseId}/claims/{ciClaimId}/attachments/{attachmentId}/content', 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://api.firedrill.run/v1/ci/suites/{ciSuiteId}/cases/{ciCaseId}/claims/{ciClaimId}/attachments/{attachmentId}/content",
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('<string>'),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/octet-stream",
"Idempotency-Key: <idempotency-key>"
],
]);
$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://api.firedrill.run/v1/ci/suites/{ciSuiteId}/cases/{ciCaseId}/claims/{ciClaimId}/attachments/{attachmentId}/content"
payload := strings.NewReader("\"<string>\"")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/octet-stream")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.firedrill.run/v1/ci/suites/{ciSuiteId}/cases/{ciCaseId}/claims/{ciClaimId}/attachments/{attachmentId}/content")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/octet-stream")
.body("\"<string>\"")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.firedrill.run/v1/ci/suites/{ciSuiteId}/cases/{ciCaseId}/claims/{ciClaimId}/attachments/{attachmentId}/content")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/octet-stream'
request.body = "\"<string>\""
response = http.request(request)
puts response.read_body{
"attachment": {
"attachmentId": "<string>",
"projectId": "<string>",
"hostedRunId": "<string>",
"interactionId": "<string>",
"expectedRevision": 4503599627370495,
"attachment": {
"schemaVersion": 1,
"kind": "file",
"id": "<string>",
"name": "<string>",
"mediaType": "<string>",
"bytes": 33554432,
"hash": "<string>",
"redaction": {
"status": "not_applied",
"note": null
}
},
"state": "awaiting_upload",
"expiresAtMs": 0,
"capture": {
"kind": "log",
"policy": "always"
}
},
"upload": {
"method": "PUT",
"uploadUrl": "<string>",
"headers": {},
"authentication": "control",
"expiresAtMs": 0
}
}{
"code": "<string>",
"message": "<string>",
"correlationId": "<string>",
"retryable": true,
"source": "platform",
"retryAfterMs": 123,
"operationId": "<string>",
"issues": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"details": {},
"evidence": {
"sessionId": "<string>",
"runId": "<string>",
"journalSeq": 4503599627370495,
"buildHash": "<string>"
}
}Upload admitted bytes using the same control credential for an active CI claim
Requires the exact active CI suite, case, claim, interaction and run revision. CI credentials never gain general project run or evidence access. Upload before completing the claim. Byte and checksum limits match native run attachments.
Upload admitted bytes using the same control credential for an active CI claim
curl --request PUT \
--url https://api.firedrill.run/v1/ci/suites/{ciSuiteId}/cases/{ciCaseId}/claims/{ciClaimId}/attachments/{attachmentId}/content \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/octet-stream' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '"<string>"'import requests
url = "https://api.firedrill.run/v1/ci/suites/{ciSuiteId}/cases/{ciCaseId}/claims/{ciClaimId}/attachments/{attachmentId}/content"
payload = "<string>"
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/octet-stream"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/octet-stream'
},
body: JSON.stringify('<string>')
};
fetch('https://api.firedrill.run/v1/ci/suites/{ciSuiteId}/cases/{ciCaseId}/claims/{ciClaimId}/attachments/{attachmentId}/content', 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://api.firedrill.run/v1/ci/suites/{ciSuiteId}/cases/{ciCaseId}/claims/{ciClaimId}/attachments/{attachmentId}/content",
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('<string>'),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/octet-stream",
"Idempotency-Key: <idempotency-key>"
],
]);
$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://api.firedrill.run/v1/ci/suites/{ciSuiteId}/cases/{ciCaseId}/claims/{ciClaimId}/attachments/{attachmentId}/content"
payload := strings.NewReader("\"<string>\"")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/octet-stream")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.firedrill.run/v1/ci/suites/{ciSuiteId}/cases/{ciCaseId}/claims/{ciClaimId}/attachments/{attachmentId}/content")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/octet-stream")
.body("\"<string>\"")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.firedrill.run/v1/ci/suites/{ciSuiteId}/cases/{ciCaseId}/claims/{ciClaimId}/attachments/{attachmentId}/content")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/octet-stream'
request.body = "\"<string>\""
response = http.request(request)
puts response.read_body{
"attachment": {
"attachmentId": "<string>",
"projectId": "<string>",
"hostedRunId": "<string>",
"interactionId": "<string>",
"expectedRevision": 4503599627370495,
"attachment": {
"schemaVersion": 1,
"kind": "file",
"id": "<string>",
"name": "<string>",
"mediaType": "<string>",
"bytes": 33554432,
"hash": "<string>",
"redaction": {
"status": "not_applied",
"note": null
}
},
"state": "awaiting_upload",
"expiresAtMs": 0,
"capture": {
"kind": "log",
"policy": "always"
}
},
"upload": {
"method": "PUT",
"uploadUrl": "<string>",
"headers": {},
"authentication": "control",
"expiresAtMs": 0
}
}{
"code": "<string>",
"message": "<string>",
"correlationId": "<string>",
"retryable": true,
"source": "platform",
"retryAfterMs": 123,
"operationId": "<string>",
"issues": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"details": {},
"evidence": {
"sessionId": "<string>",
"runId": "<string>",
"journalSeq": 4503599627370495,
"buildHash": "<string>"
}
}Authorizations
Opaque control credential
Headers
Required string length:
8 - 128Pattern:
^[A-Za-z0-9._:-]+$Path Parameters
Pattern:
^cisuite_[0-9a-z]{12,32}$Pattern:
^cicase_[0-9a-z]{12,32}$Pattern:
^ciclaim_[0-9a-z]{12,32}$Pattern:
^ratt_[a-f0-9]{32}$Body
application/octet-stream
The body is of type file.
Maximum string length:
67108864