Report K8S environment
curl --request PUT \
--url https://app.kosli.com/api/v2/environments/{org}/{env_name}/report/K8S \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"artifacts": [
{
"podName": "<string>",
"namespace": "<string>",
"digests": {},
"creationTimestamp": 123,
"owners": [
{
"apiVersion": "<string>",
"kind": "<string>",
"name": "<string>",
"uid": "<string>",
"controller": true,
"blockOwnerDeletion": true
}
]
}
],
"type": "K8S"
}
'import requests
url = "https://app.kosli.com/api/v2/environments/{org}/{env_name}/report/K8S"
payload = {
"artifacts": [
{
"podName": "<string>",
"namespace": "<string>",
"digests": {},
"creationTimestamp": 123,
"owners": [
{
"apiVersion": "<string>",
"kind": "<string>",
"name": "<string>",
"uid": "<string>",
"controller": True,
"blockOwnerDeletion": True
}
]
}
],
"type": "K8S"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
artifacts: [
{
podName: '<string>',
namespace: '<string>',
digests: {},
creationTimestamp: 123,
owners: [
{
apiVersion: '<string>',
kind: '<string>',
name: '<string>',
uid: '<string>',
controller: true,
blockOwnerDeletion: true
}
]
}
],
type: 'K8S'
})
};
fetch('https://app.kosli.com/api/v2/environments/{org}/{env_name}/report/K8S', 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://app.kosli.com/api/v2/environments/{org}/{env_name}/report/K8S",
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([
'artifacts' => [
[
'podName' => '<string>',
'namespace' => '<string>',
'digests' => [
],
'creationTimestamp' => 123,
'owners' => [
[
'apiVersion' => '<string>',
'kind' => '<string>',
'name' => '<string>',
'uid' => '<string>',
'controller' => true,
'blockOwnerDeletion' => true
]
]
]
],
'type' => 'K8S'
]),
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://app.kosli.com/api/v2/environments/{org}/{env_name}/report/K8S"
payload := strings.NewReader("{\n \"artifacts\": [\n {\n \"podName\": \"<string>\",\n \"namespace\": \"<string>\",\n \"digests\": {},\n \"creationTimestamp\": 123,\n \"owners\": [\n {\n \"apiVersion\": \"<string>\",\n \"kind\": \"<string>\",\n \"name\": \"<string>\",\n \"uid\": \"<string>\",\n \"controller\": true,\n \"blockOwnerDeletion\": true\n }\n ]\n }\n ],\n \"type\": \"K8S\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://app.kosli.com/api/v2/environments/{org}/{env_name}/report/K8S")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"artifacts\": [\n {\n \"podName\": \"<string>\",\n \"namespace\": \"<string>\",\n \"digests\": {},\n \"creationTimestamp\": 123,\n \"owners\": [\n {\n \"apiVersion\": \"<string>\",\n \"kind\": \"<string>\",\n \"name\": \"<string>\",\n \"uid\": \"<string>\",\n \"controller\": true,\n \"blockOwnerDeletion\": true\n }\n ]\n }\n ],\n \"type\": \"K8S\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.kosli.com/api/v2/environments/{org}/{env_name}/report/K8S")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"artifacts\": [\n {\n \"podName\": \"<string>\",\n \"namespace\": \"<string>\",\n \"digests\": {},\n \"creationTimestamp\": 123,\n \"owners\": [\n {\n \"apiVersion\": \"<string>\",\n \"kind\": \"<string>\",\n \"name\": \"<string>\",\n \"uid\": \"<string>\",\n \"controller\": true,\n \"blockOwnerDeletion\": true\n }\n ]\n }\n ],\n \"type\": \"K8S\"\n}"
response = http.request(request)
puts response.read_body"<string>""<string>"{
"message": "<string>",
"errors": {}
}{
"message": "<string>",
"errors": {}
}Report K8S environment
Process a report for a K8S environment.
PUT
/
environments
/
{org}
/
{env_name}
/
report
/
K8S
Report K8S environment
curl --request PUT \
--url https://app.kosli.com/api/v2/environments/{org}/{env_name}/report/K8S \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"artifacts": [
{
"podName": "<string>",
"namespace": "<string>",
"digests": {},
"creationTimestamp": 123,
"owners": [
{
"apiVersion": "<string>",
"kind": "<string>",
"name": "<string>",
"uid": "<string>",
"controller": true,
"blockOwnerDeletion": true
}
]
}
],
"type": "K8S"
}
'import requests
url = "https://app.kosli.com/api/v2/environments/{org}/{env_name}/report/K8S"
payload = {
"artifacts": [
{
"podName": "<string>",
"namespace": "<string>",
"digests": {},
"creationTimestamp": 123,
"owners": [
{
"apiVersion": "<string>",
"kind": "<string>",
"name": "<string>",
"uid": "<string>",
"controller": True,
"blockOwnerDeletion": True
}
]
}
],
"type": "K8S"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
artifacts: [
{
podName: '<string>',
namespace: '<string>',
digests: {},
creationTimestamp: 123,
owners: [
{
apiVersion: '<string>',
kind: '<string>',
name: '<string>',
uid: '<string>',
controller: true,
blockOwnerDeletion: true
}
]
}
],
type: 'K8S'
})
};
fetch('https://app.kosli.com/api/v2/environments/{org}/{env_name}/report/K8S', 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://app.kosli.com/api/v2/environments/{org}/{env_name}/report/K8S",
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([
'artifacts' => [
[
'podName' => '<string>',
'namespace' => '<string>',
'digests' => [
],
'creationTimestamp' => 123,
'owners' => [
[
'apiVersion' => '<string>',
'kind' => '<string>',
'name' => '<string>',
'uid' => '<string>',
'controller' => true,
'blockOwnerDeletion' => true
]
]
]
],
'type' => 'K8S'
]),
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://app.kosli.com/api/v2/environments/{org}/{env_name}/report/K8S"
payload := strings.NewReader("{\n \"artifacts\": [\n {\n \"podName\": \"<string>\",\n \"namespace\": \"<string>\",\n \"digests\": {},\n \"creationTimestamp\": 123,\n \"owners\": [\n {\n \"apiVersion\": \"<string>\",\n \"kind\": \"<string>\",\n \"name\": \"<string>\",\n \"uid\": \"<string>\",\n \"controller\": true,\n \"blockOwnerDeletion\": true\n }\n ]\n }\n ],\n \"type\": \"K8S\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://app.kosli.com/api/v2/environments/{org}/{env_name}/report/K8S")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"artifacts\": [\n {\n \"podName\": \"<string>\",\n \"namespace\": \"<string>\",\n \"digests\": {},\n \"creationTimestamp\": 123,\n \"owners\": [\n {\n \"apiVersion\": \"<string>\",\n \"kind\": \"<string>\",\n \"name\": \"<string>\",\n \"uid\": \"<string>\",\n \"controller\": true,\n \"blockOwnerDeletion\": true\n }\n ]\n }\n ],\n \"type\": \"K8S\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.kosli.com/api/v2/environments/{org}/{env_name}/report/K8S")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"artifacts\": [\n {\n \"podName\": \"<string>\",\n \"namespace\": \"<string>\",\n \"digests\": {},\n \"creationTimestamp\": 123,\n \"owners\": [\n {\n \"apiVersion\": \"<string>\",\n \"kind\": \"<string>\",\n \"name\": \"<string>\",\n \"uid\": \"<string>\",\n \"controller\": true,\n \"blockOwnerDeletion\": true\n }\n ]\n }\n ],\n \"type\": \"K8S\"\n}"
response = http.request(request)
puts response.read_body"<string>""<string>"{
"message": "<string>",
"errors": {}
}{
"message": "<string>",
"errors": {}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
Report processed successfully, no new snapshots to create
The response is of type string.
Last modified on June 18, 2026
⌘I