Update a workload identity issuer
curl --request PATCH \
--url https://api.onkernel.com/org/workload_identity_issuers/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expected_version": 2,
"description": "",
"enabled": false,
"issuer_url": "<string>",
"name": "<string>",
"token_validation": {
"max_lifetime_seconds": 43200
}
}
'import requests
url = "https://api.onkernel.com/org/workload_identity_issuers/{id}"
payload = {
"expected_version": 2,
"description": "",
"enabled": False,
"issuer_url": "<string>",
"name": "<string>",
"token_validation": { "max_lifetime_seconds": 43200 }
}
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,
issuer_url: '<string>',
name: '<string>',
token_validation: {max_lifetime_seconds: 43200}
})
};
fetch('https://api.onkernel.com/org/workload_identity_issuers/{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_issuers/{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,
'issuer_url' => '<string>',
'name' => '<string>',
'token_validation' => [
'max_lifetime_seconds' => 43200
]
]),
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_issuers/{id}"
payload := strings.NewReader("{\n \"expected_version\": 2,\n \"description\": \"\",\n \"enabled\": false,\n \"issuer_url\": \"<string>\",\n \"name\": \"<string>\",\n \"token_validation\": {\n \"max_lifetime_seconds\": 43200\n }\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_issuers/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"expected_version\": 2,\n \"description\": \"\",\n \"enabled\": false,\n \"issuer_url\": \"<string>\",\n \"name\": \"<string>\",\n \"token_validation\": {\n \"max_lifetime_seconds\": 43200\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.onkernel.com/org/workload_identity_issuers/{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 \"issuer_url\": \"<string>\",\n \"name\": \"<string>\",\n \"token_validation\": {\n \"max_lifetime_seconds\": 43200\n }\n}"
response = http.request(request)
puts response.read_body{
"archived_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"created_by_user_id": "<string>",
"description": "",
"enabled": false,
"id": "<string>",
"issuer_url": "<string>",
"jwks": {
"type": "discovery",
"ca_cert_pem": "<string>",
"discovery_base_url": "<string>",
"keys": [
{}
],
"url": "<string>"
},
"name": "<string>",
"org_id": "<string>",
"preset_type": "github_actions",
"security_version": 2,
"token_validation": {
"max_lifetime_seconds": 43200,
"replay_protection": "single_use"
},
"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 issuer
PATCH
/
org
/
workload_identity_issuers
/
{id}
Update a workload identity issuer
curl --request PATCH \
--url https://api.onkernel.com/org/workload_identity_issuers/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expected_version": 2,
"description": "",
"enabled": false,
"issuer_url": "<string>",
"name": "<string>",
"token_validation": {
"max_lifetime_seconds": 43200
}
}
'import requests
url = "https://api.onkernel.com/org/workload_identity_issuers/{id}"
payload = {
"expected_version": 2,
"description": "",
"enabled": False,
"issuer_url": "<string>",
"name": "<string>",
"token_validation": { "max_lifetime_seconds": 43200 }
}
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,
issuer_url: '<string>',
name: '<string>',
token_validation: {max_lifetime_seconds: 43200}
})
};
fetch('https://api.onkernel.com/org/workload_identity_issuers/{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_issuers/{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,
'issuer_url' => '<string>',
'name' => '<string>',
'token_validation' => [
'max_lifetime_seconds' => 43200
]
]),
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_issuers/{id}"
payload := strings.NewReader("{\n \"expected_version\": 2,\n \"description\": \"\",\n \"enabled\": false,\n \"issuer_url\": \"<string>\",\n \"name\": \"<string>\",\n \"token_validation\": {\n \"max_lifetime_seconds\": 43200\n }\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_issuers/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"expected_version\": 2,\n \"description\": \"\",\n \"enabled\": false,\n \"issuer_url\": \"<string>\",\n \"name\": \"<string>\",\n \"token_validation\": {\n \"max_lifetime_seconds\": 43200\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.onkernel.com/org/workload_identity_issuers/{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 \"issuer_url\": \"<string>\",\n \"name\": \"<string>\",\n \"token_validation\": {\n \"max_lifetime_seconds\": 43200\n }\n}"
response = http.request(request)
puts response.read_body{
"archived_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"created_by_user_id": "<string>",
"description": "",
"enabled": false,
"id": "<string>",
"issuer_url": "<string>",
"jwks": {
"type": "discovery",
"ca_cert_pem": "<string>",
"discovery_base_url": "<string>",
"keys": [
{}
],
"url": "<string>"
},
"name": "<string>",
"org_id": "<string>",
"preset_type": "github_actions",
"security_version": 2,
"token_validation": {
"max_lifetime_seconds": 43200,
"replay_protection": "single_use"
},
"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
The kind of identity provider. GitHub Actions, Google Cloud and Microsoft Entra issuers are recognized by their issuer URL and must use their own type. Defaults to the type the issuer URL belongs to, or custom_oidc.
Available options:
github_actions, aws, google_cloud, microsoft_entra, kubernetes, custom_oidc Response
Updated record
The kind of identity provider. GitHub Actions, Google Cloud and Microsoft Entra issuers are recognized by their issuer URL and must use their own type. Defaults to the type the issuer URL belongs to, or custom_oidc.
Available options:
github_actions, aws, google_cloud, microsoft_entra, kubernetes, custom_oidc