Update a workload identity federation rule
curl --request PATCH \
--url https://api.onkernel.com/org/workload_identity_federation_rules/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expected_version": 2,
"description": "",
"enabled": false,
"expected_audience": "<string>",
"issuer_id": "<string>",
"name": "<string>"
}
'import requests
url = "https://api.onkernel.com/org/workload_identity_federation_rules/{id}"
payload = {
"expected_version": 2,
"description": "",
"enabled": False,
"expected_audience": "<string>",
"issuer_id": "<string>",
"name": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
expected_version: 2,
description: '',
enabled: false,
expected_audience: '<string>',
issuer_id: '<string>',
name: '<string>'
})
};
fetch('https://api.onkernel.com/org/workload_identity_federation_rules/{id}', 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.onkernel.com/org/workload_identity_federation_rules/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'expected_version' => 2,
'description' => '',
'enabled' => false,
'expected_audience' => '<string>',
'issuer_id' => '<string>',
'name' => '<string>'
]),
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://api.onkernel.com/org/workload_identity_federation_rules/{id}"
payload := strings.NewReader("{\n \"expected_version\": 2,\n \"description\": \"\",\n \"enabled\": false,\n \"expected_audience\": \"<string>\",\n \"issuer_id\": \"<string>\",\n \"name\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.onkernel.com/org/workload_identity_federation_rules/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"expected_version\": 2,\n \"description\": \"\",\n \"enabled\": false,\n \"expected_audience\": \"<string>\",\n \"issuer_id\": \"<string>\",\n \"name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.onkernel.com/org/workload_identity_federation_rules/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"expected_version\": 2,\n \"description\": \"\",\n \"enabled\": false,\n \"expected_audience\": \"<string>\",\n \"issuer_id\": \"<string>\",\n \"name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"archived_at": "2023-11-07T05:31:56Z",
"authorization": {
"policy": {
"statements": [
{
"action": "browsers:use",
"resource": "projects/proj_abc123/browsers/br_abc123"
}
]
},
"project_id": "<string>",
"token_audience": "<string>",
"max_token_ttl_seconds": 300
},
"created_at": "2023-11-07T05:31:56Z",
"created_by_user_id": "<string>",
"description": "",
"enabled": false,
"expected_audience": "<string>",
"id": "<string>",
"issuer_id": "<string>",
"last_exchange_at": "2023-11-07T05:31:56Z",
"match": {
"type": "github_actions",
"claims": {},
"environment": "<string>",
"event_names": [
"<string>"
],
"job_workflow_ref": "<string>",
"namespace": "<string>",
"ref": "<string>",
"repository": "<string>",
"repository_id": "<string>",
"repository_owner_id": "<string>",
"service_account": "<string>",
"subject": "<string>",
"subject_prefix": "<string>",
"workflow": "<string>",
"workflow_ref": "<string>"
},
"name": "<string>",
"org_id": "<string>",
"security_version": 2,
"target": {
"service_account_id": "<string>",
"type": "service_account"
},
"updated_at": "2023-11-07T05:31:56Z"
}{
"code": "bad_request",
"message": "Missing required field: app_name",
"details": [
{
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
],
"inner_error": {
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
}{
"code": "bad_request",
"message": "Missing required field: app_name",
"details": [
{
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
],
"inner_error": {
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
}{
"code": "bad_request",
"message": "Missing required field: app_name",
"details": [
{
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
],
"inner_error": {
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
}{
"code": "bad_request",
"message": "Missing required field: app_name",
"details": [
{
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
],
"inner_error": {
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
}{
"code": "bad_request",
"message": "Missing required field: app_name",
"details": [
{
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
],
"inner_error": {
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
}{
"code": "bad_request",
"message": "Missing required field: app_name",
"details": [
{
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
],
"inner_error": {
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
}{
"code": "bad_request",
"message": "Missing required field: app_name",
"details": [
{
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
],
"inner_error": {
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
}Workload Identity
Update a workload identity federation rule
PATCH
/
org
/
workload_identity_federation_rules
/
{id}
Update a workload identity federation rule
curl --request PATCH \
--url https://api.onkernel.com/org/workload_identity_federation_rules/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expected_version": 2,
"description": "",
"enabled": false,
"expected_audience": "<string>",
"issuer_id": "<string>",
"name": "<string>"
}
'import requests
url = "https://api.onkernel.com/org/workload_identity_federation_rules/{id}"
payload = {
"expected_version": 2,
"description": "",
"enabled": False,
"expected_audience": "<string>",
"issuer_id": "<string>",
"name": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
expected_version: 2,
description: '',
enabled: false,
expected_audience: '<string>',
issuer_id: '<string>',
name: '<string>'
})
};
fetch('https://api.onkernel.com/org/workload_identity_federation_rules/{id}', 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.onkernel.com/org/workload_identity_federation_rules/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'expected_version' => 2,
'description' => '',
'enabled' => false,
'expected_audience' => '<string>',
'issuer_id' => '<string>',
'name' => '<string>'
]),
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://api.onkernel.com/org/workload_identity_federation_rules/{id}"
payload := strings.NewReader("{\n \"expected_version\": 2,\n \"description\": \"\",\n \"enabled\": false,\n \"expected_audience\": \"<string>\",\n \"issuer_id\": \"<string>\",\n \"name\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.onkernel.com/org/workload_identity_federation_rules/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"expected_version\": 2,\n \"description\": \"\",\n \"enabled\": false,\n \"expected_audience\": \"<string>\",\n \"issuer_id\": \"<string>\",\n \"name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.onkernel.com/org/workload_identity_federation_rules/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"expected_version\": 2,\n \"description\": \"\",\n \"enabled\": false,\n \"expected_audience\": \"<string>\",\n \"issuer_id\": \"<string>\",\n \"name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"archived_at": "2023-11-07T05:31:56Z",
"authorization": {
"policy": {
"statements": [
{
"action": "browsers:use",
"resource": "projects/proj_abc123/browsers/br_abc123"
}
]
},
"project_id": "<string>",
"token_audience": "<string>",
"max_token_ttl_seconds": 300
},
"created_at": "2023-11-07T05:31:56Z",
"created_by_user_id": "<string>",
"description": "",
"enabled": false,
"expected_audience": "<string>",
"id": "<string>",
"issuer_id": "<string>",
"last_exchange_at": "2023-11-07T05:31:56Z",
"match": {
"type": "github_actions",
"claims": {},
"environment": "<string>",
"event_names": [
"<string>"
],
"job_workflow_ref": "<string>",
"namespace": "<string>",
"ref": "<string>",
"repository": "<string>",
"repository_id": "<string>",
"repository_owner_id": "<string>",
"service_account": "<string>",
"subject": "<string>",
"subject_prefix": "<string>",
"workflow": "<string>",
"workflow_ref": "<string>"
},
"name": "<string>",
"org_id": "<string>",
"security_version": 2,
"target": {
"service_account_id": "<string>",
"type": "service_account"
},
"updated_at": "2023-11-07T05:31:56Z"
}{
"code": "bad_request",
"message": "Missing required field: app_name",
"details": [
{
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
],
"inner_error": {
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
}{
"code": "bad_request",
"message": "Missing required field: app_name",
"details": [
{
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
],
"inner_error": {
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
}{
"code": "bad_request",
"message": "Missing required field: app_name",
"details": [
{
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
],
"inner_error": {
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
}{
"code": "bad_request",
"message": "Missing required field: app_name",
"details": [
{
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
],
"inner_error": {
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
}{
"code": "bad_request",
"message": "Missing required field: app_name",
"details": [
{
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
],
"inner_error": {
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
}{
"code": "bad_request",
"message": "Missing required field: app_name",
"details": [
{
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
],
"inner_error": {
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
}{
"code": "bad_request",
"message": "Missing required field: app_name",
"details": [
{
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
],
"inner_error": {
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
}Authorizations
Body
application/json
Response
Updated record