Create a new immutable agent version from an agent card
curl --request PUT \
--url https://api.dev.swarmd.ai/registry/v1/agents/{agentId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agentCardUrl": "<string>",
"healthCheckUrl": "<string>",
"registryVersion": "<string>",
"reason": "<string>",
"authConfig": {
"header": "<string>",
"apiKey": {
"apiKeyValue": "<string>",
"apiKeyHeader": "<string>",
"header": "<string>",
"value": "<string>"
},
"apiKeyValue": "<string>",
"apiKeyHeader": "<string>"
}
}
'import requests
url = "https://api.dev.swarmd.ai/registry/v1/agents/{agentId}"
payload = {
"agentCardUrl": "<string>",
"healthCheckUrl": "<string>",
"registryVersion": "<string>",
"reason": "<string>",
"authConfig": {
"header": "<string>",
"apiKey": {
"apiKeyValue": "<string>",
"apiKeyHeader": "<string>",
"header": "<string>",
"value": "<string>"
},
"apiKeyValue": "<string>",
"apiKeyHeader": "<string>"
}
}
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({
agentCardUrl: '<string>',
healthCheckUrl: '<string>',
registryVersion: '<string>',
reason: '<string>',
authConfig: {
header: '<string>',
apiKey: {
apiKeyValue: '<string>',
apiKeyHeader: '<string>',
header: '<string>',
value: '<string>'
},
apiKeyValue: '<string>',
apiKeyHeader: '<string>'
}
})
};
fetch('https://api.dev.swarmd.ai/registry/v1/agents/{agentId}', 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.dev.swarmd.ai/registry/v1/agents/{agentId}",
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([
'agentCardUrl' => '<string>',
'healthCheckUrl' => '<string>',
'registryVersion' => '<string>',
'reason' => '<string>',
'authConfig' => [
'header' => '<string>',
'apiKey' => [
'apiKeyValue' => '<string>',
'apiKeyHeader' => '<string>',
'header' => '<string>',
'value' => '<string>'
],
'apiKeyValue' => '<string>',
'apiKeyHeader' => '<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.dev.swarmd.ai/registry/v1/agents/{agentId}"
payload := strings.NewReader("{\n \"agentCardUrl\": \"<string>\",\n \"healthCheckUrl\": \"<string>\",\n \"registryVersion\": \"<string>\",\n \"reason\": \"<string>\",\n \"authConfig\": {\n \"header\": \"<string>\",\n \"apiKey\": {\n \"apiKeyValue\": \"<string>\",\n \"apiKeyHeader\": \"<string>\",\n \"header\": \"<string>\",\n \"value\": \"<string>\"\n },\n \"apiKeyValue\": \"<string>\",\n \"apiKeyHeader\": \"<string>\"\n }\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://api.dev.swarmd.ai/registry/v1/agents/{agentId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"agentCardUrl\": \"<string>\",\n \"healthCheckUrl\": \"<string>\",\n \"registryVersion\": \"<string>\",\n \"reason\": \"<string>\",\n \"authConfig\": {\n \"header\": \"<string>\",\n \"apiKey\": {\n \"apiKeyValue\": \"<string>\",\n \"apiKeyHeader\": \"<string>\",\n \"header\": \"<string>\",\n \"value\": \"<string>\"\n },\n \"apiKeyValue\": \"<string>\",\n \"apiKeyHeader\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dev.swarmd.ai/registry/v1/agents/{agentId}")
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 \"agentCardUrl\": \"<string>\",\n \"healthCheckUrl\": \"<string>\",\n \"registryVersion\": \"<string>\",\n \"reason\": \"<string>\",\n \"authConfig\": {\n \"header\": \"<string>\",\n \"apiKey\": {\n \"apiKeyValue\": \"<string>\",\n \"apiKeyHeader\": \"<string>\",\n \"header\": \"<string>\",\n \"value\": \"<string>\"\n },\n \"apiKeyValue\": \"<string>\",\n \"apiKeyHeader\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"agentCardUrl": "<string>",
"originalCardUrl": "<string>",
"registryVersion": "<string>",
"cardVersion": "<string>",
"status": "<string>",
"statusReason": "<string>",
"healthStatus": "<string>",
"visibility": "PUBLIC",
"subscriptionCount": 123,
"metrics": {
"requestCount": 123,
"errorPercentage": 123,
"avgLatencyMs": 123
},
"uptimePercentage": 123,
"tenantDetails": {
"tenantName": "<string>",
"publicContactEmail": "<string>"
},
"authType": "NONE",
"cardName": "<string>",
"cardDescription": "<string>",
"protocolVersion": "<string>"
}Agents
Create a new immutable agent version from an agent card
Security Requirements
| Auth Types | Entities | Permissions | Required Roles |
|---|---|---|---|
| USER | REGISTRY | WRITE | REGISTRY:WRITE |
PUT
/
registry
/
v1
/
agents
/
{agentId}
Create a new immutable agent version from an agent card
curl --request PUT \
--url https://api.dev.swarmd.ai/registry/v1/agents/{agentId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agentCardUrl": "<string>",
"healthCheckUrl": "<string>",
"registryVersion": "<string>",
"reason": "<string>",
"authConfig": {
"header": "<string>",
"apiKey": {
"apiKeyValue": "<string>",
"apiKeyHeader": "<string>",
"header": "<string>",
"value": "<string>"
},
"apiKeyValue": "<string>",
"apiKeyHeader": "<string>"
}
}
'import requests
url = "https://api.dev.swarmd.ai/registry/v1/agents/{agentId}"
payload = {
"agentCardUrl": "<string>",
"healthCheckUrl": "<string>",
"registryVersion": "<string>",
"reason": "<string>",
"authConfig": {
"header": "<string>",
"apiKey": {
"apiKeyValue": "<string>",
"apiKeyHeader": "<string>",
"header": "<string>",
"value": "<string>"
},
"apiKeyValue": "<string>",
"apiKeyHeader": "<string>"
}
}
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({
agentCardUrl: '<string>',
healthCheckUrl: '<string>',
registryVersion: '<string>',
reason: '<string>',
authConfig: {
header: '<string>',
apiKey: {
apiKeyValue: '<string>',
apiKeyHeader: '<string>',
header: '<string>',
value: '<string>'
},
apiKeyValue: '<string>',
apiKeyHeader: '<string>'
}
})
};
fetch('https://api.dev.swarmd.ai/registry/v1/agents/{agentId}', 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.dev.swarmd.ai/registry/v1/agents/{agentId}",
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([
'agentCardUrl' => '<string>',
'healthCheckUrl' => '<string>',
'registryVersion' => '<string>',
'reason' => '<string>',
'authConfig' => [
'header' => '<string>',
'apiKey' => [
'apiKeyValue' => '<string>',
'apiKeyHeader' => '<string>',
'header' => '<string>',
'value' => '<string>'
],
'apiKeyValue' => '<string>',
'apiKeyHeader' => '<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.dev.swarmd.ai/registry/v1/agents/{agentId}"
payload := strings.NewReader("{\n \"agentCardUrl\": \"<string>\",\n \"healthCheckUrl\": \"<string>\",\n \"registryVersion\": \"<string>\",\n \"reason\": \"<string>\",\n \"authConfig\": {\n \"header\": \"<string>\",\n \"apiKey\": {\n \"apiKeyValue\": \"<string>\",\n \"apiKeyHeader\": \"<string>\",\n \"header\": \"<string>\",\n \"value\": \"<string>\"\n },\n \"apiKeyValue\": \"<string>\",\n \"apiKeyHeader\": \"<string>\"\n }\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://api.dev.swarmd.ai/registry/v1/agents/{agentId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"agentCardUrl\": \"<string>\",\n \"healthCheckUrl\": \"<string>\",\n \"registryVersion\": \"<string>\",\n \"reason\": \"<string>\",\n \"authConfig\": {\n \"header\": \"<string>\",\n \"apiKey\": {\n \"apiKeyValue\": \"<string>\",\n \"apiKeyHeader\": \"<string>\",\n \"header\": \"<string>\",\n \"value\": \"<string>\"\n },\n \"apiKeyValue\": \"<string>\",\n \"apiKeyHeader\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dev.swarmd.ai/registry/v1/agents/{agentId}")
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 \"agentCardUrl\": \"<string>\",\n \"healthCheckUrl\": \"<string>\",\n \"registryVersion\": \"<string>\",\n \"reason\": \"<string>\",\n \"authConfig\": {\n \"header\": \"<string>\",\n \"apiKey\": {\n \"apiKeyValue\": \"<string>\",\n \"apiKeyHeader\": \"<string>\",\n \"header\": \"<string>\",\n \"value\": \"<string>\"\n },\n \"apiKeyValue\": \"<string>\",\n \"apiKeyHeader\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"agentCardUrl": "<string>",
"originalCardUrl": "<string>",
"registryVersion": "<string>",
"cardVersion": "<string>",
"status": "<string>",
"statusReason": "<string>",
"healthStatus": "<string>",
"visibility": "PUBLIC",
"subscriptionCount": 123,
"metrics": {
"requestCount": 123,
"errorPercentage": 123,
"avgLatencyMs": 123
},
"uptimePercentage": 123,
"tenantDetails": {
"tenantName": "<string>",
"publicContactEmail": "<string>"
},
"authType": "NONE",
"cardName": "<string>",
"cardDescription": "<string>",
"protocolVersion": "<string>"
}Authorizations
JWT token (USER, AGENT, or SERVICE auth)
Path Parameters
Body
application/json
Available options:
PUBLIC, INTERNAL, PRIVATE Resolved auth credentials for a subscription. Secret values are encrypted at rest.
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
Show child attributes
Show child attributes
Response
200 - */*
OK
Available options:
PUBLIC, INTERNAL, PRIVATE Show child attributes
Show child attributes
Show child attributes
Show child attributes
Available options:
NONE, OAUTH2, API_KEY, BEARER, QUERY_PARAM 