Attach one bounded content-free GPU profile capture to the active revision
POST
/
api
/
v1
/
deployments
/
{name}
/
gpu-profiles
Attach one bounded content-free GPU profile capture to the active revision
curl --request POST \
--url http://127.0.0.1:18000/api/v1/deployments/{name}/gpu-profiles \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"capture": {
"accelerator": "<string>",
"content_recorded": false,
"ended_at": "2023-11-07T05:31:56Z",
"evidence_class": "measured",
"gpus": 512,
"started_at": "2023-11-07T05:31:56Z",
"tool": "<string>",
"tool_version": "<string>"
},
"frames": [
{
"name": "<string>",
"file": "<string>",
"line": 2
}
],
"stacks": [
{
"frames": [
1
],
"gpu_ns": 2
}
],
"timeline": {
"bucket_seconds": 1800,
"buckets": [
{
"gpu_seconds": 1,
"start": "2023-11-07T05:31:56Z"
}
]
},
"unavailable_layers": []
}
'import requests
url = "http://127.0.0.1:18000/api/v1/deployments/{name}/gpu-profiles"
payload = {
"capture": {
"accelerator": "<string>",
"content_recorded": False,
"ended_at": "2023-11-07T05:31:56Z",
"evidence_class": "measured",
"gpus": 512,
"started_at": "2023-11-07T05:31:56Z",
"tool": "<string>",
"tool_version": "<string>"
},
"frames": [
{
"name": "<string>",
"file": "<string>",
"line": 2
}
],
"stacks": [
{
"frames": [1],
"gpu_ns": 2
}
],
"timeline": {
"bucket_seconds": 1800,
"buckets": [
{
"gpu_seconds": 1,
"start": "2023-11-07T05:31:56Z"
}
]
},
"unavailable_layers": []
}
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({
capture: {
accelerator: '<string>',
content_recorded: false,
ended_at: '2023-11-07T05:31:56Z',
evidence_class: 'measured',
gpus: 512,
started_at: '2023-11-07T05:31:56Z',
tool: '<string>',
tool_version: '<string>'
},
frames: [{name: '<string>', file: '<string>', line: 2}],
stacks: [{frames: [1], gpu_ns: 2}],
timeline: {
bucket_seconds: 1800,
buckets: [{gpu_seconds: 1, start: '2023-11-07T05:31:56Z'}]
},
unavailable_layers: []
})
};
fetch('http://127.0.0.1:18000/api/v1/deployments/{name}/gpu-profiles', 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 := "http://127.0.0.1:18000/api/v1/deployments/{name}/gpu-profiles"
payload := strings.NewReader("{\n \"capture\": {\n \"accelerator\": \"<string>\",\n \"content_recorded\": false,\n \"ended_at\": \"2023-11-07T05:31:56Z\",\n \"evidence_class\": \"measured\",\n \"gpus\": 512,\n \"started_at\": \"2023-11-07T05:31:56Z\",\n \"tool\": \"<string>\",\n \"tool_version\": \"<string>\"\n },\n \"frames\": [\n {\n \"name\": \"<string>\",\n \"file\": \"<string>\",\n \"line\": 2\n }\n ],\n \"stacks\": [\n {\n \"frames\": [\n 1\n ],\n \"gpu_ns\": 2\n }\n ],\n \"timeline\": {\n \"bucket_seconds\": 1800,\n \"buckets\": [\n {\n \"gpu_seconds\": 1,\n \"start\": \"2023-11-07T05:31:56Z\"\n }\n ]\n },\n \"unavailable_layers\": []\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))
}{
"deployment": "<string>",
"ended_at": "2023-11-07T05:31:56Z",
"frames": 2,
"id": "<string>",
"recorded_at": "2023-11-07T05:31:56Z",
"revision": 2,
"stacks": 2,
"started_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "<string>",
"message": "<string>",
"category": "<string>",
"remediation": "<string>",
"request_id": "<string>",
"retryable": true
}
}Authorizations
Body
application/json
One content-free GPU profile capture: sampled GPU time attributed to root-first stacks of interned frames.
Response
Created
⌘I
Attach one bounded content-free GPU profile capture to the active revision
curl --request POST \
--url http://127.0.0.1:18000/api/v1/deployments/{name}/gpu-profiles \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"capture": {
"accelerator": "<string>",
"content_recorded": false,
"ended_at": "2023-11-07T05:31:56Z",
"evidence_class": "measured",
"gpus": 512,
"started_at": "2023-11-07T05:31:56Z",
"tool": "<string>",
"tool_version": "<string>"
},
"frames": [
{
"name": "<string>",
"file": "<string>",
"line": 2
}
],
"stacks": [
{
"frames": [
1
],
"gpu_ns": 2
}
],
"timeline": {
"bucket_seconds": 1800,
"buckets": [
{
"gpu_seconds": 1,
"start": "2023-11-07T05:31:56Z"
}
]
},
"unavailable_layers": []
}
'import requests
url = "http://127.0.0.1:18000/api/v1/deployments/{name}/gpu-profiles"
payload = {
"capture": {
"accelerator": "<string>",
"content_recorded": False,
"ended_at": "2023-11-07T05:31:56Z",
"evidence_class": "measured",
"gpus": 512,
"started_at": "2023-11-07T05:31:56Z",
"tool": "<string>",
"tool_version": "<string>"
},
"frames": [
{
"name": "<string>",
"file": "<string>",
"line": 2
}
],
"stacks": [
{
"frames": [1],
"gpu_ns": 2
}
],
"timeline": {
"bucket_seconds": 1800,
"buckets": [
{
"gpu_seconds": 1,
"start": "2023-11-07T05:31:56Z"
}
]
},
"unavailable_layers": []
}
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({
capture: {
accelerator: '<string>',
content_recorded: false,
ended_at: '2023-11-07T05:31:56Z',
evidence_class: 'measured',
gpus: 512,
started_at: '2023-11-07T05:31:56Z',
tool: '<string>',
tool_version: '<string>'
},
frames: [{name: '<string>', file: '<string>', line: 2}],
stacks: [{frames: [1], gpu_ns: 2}],
timeline: {
bucket_seconds: 1800,
buckets: [{gpu_seconds: 1, start: '2023-11-07T05:31:56Z'}]
},
unavailable_layers: []
})
};
fetch('http://127.0.0.1:18000/api/v1/deployments/{name}/gpu-profiles', 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 := "http://127.0.0.1:18000/api/v1/deployments/{name}/gpu-profiles"
payload := strings.NewReader("{\n \"capture\": {\n \"accelerator\": \"<string>\",\n \"content_recorded\": false,\n \"ended_at\": \"2023-11-07T05:31:56Z\",\n \"evidence_class\": \"measured\",\n \"gpus\": 512,\n \"started_at\": \"2023-11-07T05:31:56Z\",\n \"tool\": \"<string>\",\n \"tool_version\": \"<string>\"\n },\n \"frames\": [\n {\n \"name\": \"<string>\",\n \"file\": \"<string>\",\n \"line\": 2\n }\n ],\n \"stacks\": [\n {\n \"frames\": [\n 1\n ],\n \"gpu_ns\": 2\n }\n ],\n \"timeline\": {\n \"bucket_seconds\": 1800,\n \"buckets\": [\n {\n \"gpu_seconds\": 1,\n \"start\": \"2023-11-07T05:31:56Z\"\n }\n ]\n },\n \"unavailable_layers\": []\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))
}{
"deployment": "<string>",
"ended_at": "2023-11-07T05:31:56Z",
"frames": 2,
"id": "<string>",
"recorded_at": "2023-11-07T05:31:56Z",
"revision": 2,
"stacks": 2,
"started_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "<string>",
"message": "<string>",
"category": "<string>",
"remediation": "<string>",
"request_id": "<string>",
"retryable": true
}
}