cURL
curl --request POST \
--url https://api.example.com/v1/workloads/{name}/federation \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'idempotency-key: <idempotency-key>' \
--data '
{
"name": "<string>",
"cloud": "<string>",
"descriptor": {
"role_arn": "<string>",
"region": "<string>",
"project_id": "<string>",
"project_number": "<string>",
"pool_id": "<string>",
"provider_id": "<string>",
"service_account_email": "<string>",
"application_id": "<string>",
"entra_tenant_id": "<string>"
}
}
'import requests
url = "https://api.example.com/v1/workloads/{name}/federation"
payload = {
"name": "<string>",
"cloud": "<string>",
"descriptor": {
"role_arn": "<string>",
"region": "<string>",
"project_id": "<string>",
"project_number": "<string>",
"pool_id": "<string>",
"provider_id": "<string>",
"service_account_email": "<string>",
"application_id": "<string>",
"entra_tenant_id": "<string>"
}
}
headers = {
"idempotency-key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'idempotency-key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
cloud: '<string>',
descriptor: {
role_arn: '<string>',
region: '<string>',
project_id: '<string>',
project_number: '<string>',
pool_id: '<string>',
provider_id: '<string>',
service_account_email: '<string>',
application_id: '<string>',
entra_tenant_id: '<string>'
}
})
};
fetch('https://api.example.com/v1/workloads/{name}/federation', 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.example.com/v1/workloads/{name}/federation",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'cloud' => '<string>',
'descriptor' => [
'role_arn' => '<string>',
'region' => '<string>',
'project_id' => '<string>',
'project_number' => '<string>',
'pool_id' => '<string>',
'provider_id' => '<string>',
'service_account_email' => '<string>',
'application_id' => '<string>',
'entra_tenant_id' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"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.example.com/v1/workloads/{name}/federation"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"cloud\": \"<string>\",\n \"descriptor\": {\n \"role_arn\": \"<string>\",\n \"region\": \"<string>\",\n \"project_id\": \"<string>\",\n \"project_number\": \"<string>\",\n \"pool_id\": \"<string>\",\n \"provider_id\": \"<string>\",\n \"service_account_email\": \"<string>\",\n \"application_id\": \"<string>\",\n \"entra_tenant_id\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("idempotency-key", "<idempotency-key>")
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.post("https://api.example.com/v1/workloads/{name}/federation")
.header("idempotency-key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"cloud\": \"<string>\",\n \"descriptor\": {\n \"role_arn\": \"<string>\",\n \"region\": \"<string>\",\n \"project_id\": \"<string>\",\n \"project_number\": \"<string>\",\n \"pool_id\": \"<string>\",\n \"provider_id\": \"<string>\",\n \"service_account_email\": \"<string>\",\n \"application_id\": \"<string>\",\n \"entra_tenant_id\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/workloads/{name}/federation")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["idempotency-key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"cloud\": \"<string>\",\n \"descriptor\": {\n \"role_arn\": \"<string>\",\n \"region\": \"<string>\",\n \"project_id\": \"<string>\",\n \"project_number\": \"<string>\",\n \"pool_id\": \"<string>\",\n \"provider_id\": \"<string>\",\n \"service_account_email\": \"<string>\",\n \"application_id\": \"<string>\",\n \"entra_tenant_id\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"federation_config": {
"id": "<string>",
"workload_id": "<string>",
"cloud": "<string>",
"audience": "<string>",
"descriptor": {
"role_arn": "<string>",
"region": "<string>",
"project_id": "<string>",
"project_number": "<string>",
"pool_id": "<string>",
"provider_id": "<string>",
"service_account_email": "<string>",
"application_id": "<string>",
"entra_tenant_id": "<string>"
},
"created_by": "<string>",
"created_at": "<string>"
}
}{
"code": "<string>",
"message": "<string>",
"details": {
"quota": {
"metric": "<string>",
"limit": 123,
"current": 123,
"reserved": 123,
"retry_after_seconds": 123
}
},
"request_id": "<string>"
}{
"code": "<string>",
"message": "<string>",
"details": {
"quota": {
"metric": "<string>",
"limit": 123,
"current": 123,
"reserved": 123,
"retry_after_seconds": 123
}
},
"request_id": "<string>"
}WorkloadService
Post v1workloads federation
Add a cloud-federation registration. Requires an owner or admin and a non-empty
idempotency-key header. The server derives and stores the provider-canonical audience.
POST
/
v1
/
workloads
/
{name}
/
federation
cURL
curl --request POST \
--url https://api.example.com/v1/workloads/{name}/federation \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'idempotency-key: <idempotency-key>' \
--data '
{
"name": "<string>",
"cloud": "<string>",
"descriptor": {
"role_arn": "<string>",
"region": "<string>",
"project_id": "<string>",
"project_number": "<string>",
"pool_id": "<string>",
"provider_id": "<string>",
"service_account_email": "<string>",
"application_id": "<string>",
"entra_tenant_id": "<string>"
}
}
'import requests
url = "https://api.example.com/v1/workloads/{name}/federation"
payload = {
"name": "<string>",
"cloud": "<string>",
"descriptor": {
"role_arn": "<string>",
"region": "<string>",
"project_id": "<string>",
"project_number": "<string>",
"pool_id": "<string>",
"provider_id": "<string>",
"service_account_email": "<string>",
"application_id": "<string>",
"entra_tenant_id": "<string>"
}
}
headers = {
"idempotency-key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'idempotency-key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
cloud: '<string>',
descriptor: {
role_arn: '<string>',
region: '<string>',
project_id: '<string>',
project_number: '<string>',
pool_id: '<string>',
provider_id: '<string>',
service_account_email: '<string>',
application_id: '<string>',
entra_tenant_id: '<string>'
}
})
};
fetch('https://api.example.com/v1/workloads/{name}/federation', 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.example.com/v1/workloads/{name}/federation",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'cloud' => '<string>',
'descriptor' => [
'role_arn' => '<string>',
'region' => '<string>',
'project_id' => '<string>',
'project_number' => '<string>',
'pool_id' => '<string>',
'provider_id' => '<string>',
'service_account_email' => '<string>',
'application_id' => '<string>',
'entra_tenant_id' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"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.example.com/v1/workloads/{name}/federation"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"cloud\": \"<string>\",\n \"descriptor\": {\n \"role_arn\": \"<string>\",\n \"region\": \"<string>\",\n \"project_id\": \"<string>\",\n \"project_number\": \"<string>\",\n \"pool_id\": \"<string>\",\n \"provider_id\": \"<string>\",\n \"service_account_email\": \"<string>\",\n \"application_id\": \"<string>\",\n \"entra_tenant_id\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("idempotency-key", "<idempotency-key>")
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.post("https://api.example.com/v1/workloads/{name}/federation")
.header("idempotency-key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"cloud\": \"<string>\",\n \"descriptor\": {\n \"role_arn\": \"<string>\",\n \"region\": \"<string>\",\n \"project_id\": \"<string>\",\n \"project_number\": \"<string>\",\n \"pool_id\": \"<string>\",\n \"provider_id\": \"<string>\",\n \"service_account_email\": \"<string>\",\n \"application_id\": \"<string>\",\n \"entra_tenant_id\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/workloads/{name}/federation")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["idempotency-key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"cloud\": \"<string>\",\n \"descriptor\": {\n \"role_arn\": \"<string>\",\n \"region\": \"<string>\",\n \"project_id\": \"<string>\",\n \"project_number\": \"<string>\",\n \"pool_id\": \"<string>\",\n \"provider_id\": \"<string>\",\n \"service_account_email\": \"<string>\",\n \"application_id\": \"<string>\",\n \"entra_tenant_id\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"federation_config": {
"id": "<string>",
"workload_id": "<string>",
"cloud": "<string>",
"audience": "<string>",
"descriptor": {
"role_arn": "<string>",
"region": "<string>",
"project_id": "<string>",
"project_number": "<string>",
"pool_id": "<string>",
"provider_id": "<string>",
"service_account_email": "<string>",
"application_id": "<string>",
"entra_tenant_id": "<string>"
},
"created_by": "<string>",
"created_at": "<string>"
}
}{
"code": "<string>",
"message": "<string>",
"details": {
"quota": {
"metric": "<string>",
"limit": 123,
"current": 123,
"reserved": 123,
"retry_after_seconds": 123
}
},
"request_id": "<string>"
}{
"code": "<string>",
"message": "<string>",
"details": {
"quota": {
"metric": "<string>",
"limit": 123,
"current": 123,
"reserved": 123,
"retry_after_seconds": 123
}
},
"request_id": "<string>"
}Authorizations
Hiloop API key sent as an HTTP Bearer token.
Headers
Required idempotency key for this mutation. The server records the result from execution start. For at least 72 hours, reuse by the same organization and route replays the original status and body. A matching request still in flight or reuse for different input returns 409 idempotency_conflict. Keys are scoped by organization and route and contain 1-255 characters.
Required string length:
1 - 255Path Parameters
The registered workload name.
Body
application/json
Response
OK
The committed registration. A same-key, same-request retry returns this same row.
Show child attributes
Show child attributes
⌘I