GET /.well-known/agent-card.json
Agent card whose URL matches the issuer claimed by the OIDC and OAuth discovery docs. The three sibling .well-known documents agree on a single authority.
expect: 200 OK with a well-formed agent card. The agent's URL matches the issuer claimed by the OIDC and OAuth siblings.
curl -is https://not.catastrophic.io/.well-known/agent-card.json | grep -i 'X-Chaos-Claims-Url\|"url"'
import json, urllib.request
data = json.loads(urllib.request.urlopen(
"https://not.catastrophic.io/.well-known/agent-card.json").read())
print(data["url"])
const data = await (await fetch(
"https://not.catastrophic.io/.well-known/agent-card.json")).json();
console.log(data.url);
package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
)
func main() {
resp, _ := http.Get("https://not.catastrophic.io/.well-known/agent-card.json")
defer resp.Body.Close()
raw, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(raw, &data)
fmt.Println(data["url"])
}
// Cargo.toml: reqwest = { version = "0.12", features = ["blocking", "json"] }
// serde_json = "1"
fn main() -> Result<(), Box> {
let data: serde_json::Value = reqwest::blocking::get(
"https://not.catastrophic.io/.well-known/agent-card.json")?.json()?;
println!("{}", data["url"]);
Ok(())
}
// Requires Jackson
import com.fasterxml.jackson.databind.ObjectMapper;
import java.net.URI;
import java.net.http.*;
public class AgentCard {
public static void main(String[] args) throws Exception {
var client = HttpClient.newHttpClient();
var req = HttpRequest.newBuilder(URI.create(
"https://not.catastrophic.io/.well-known/agent-card.json")).build();
var resp = client.send(req, HttpResponse.BodyHandlers.ofString());
System.out.println(new ObjectMapper().readTree(resp.body()).path("url").asText());
}
}
using System.Text.Json;
using var client = new HttpClient();
var raw = await client.GetStringAsync("https://not.catastrophic.io/.well-known/agent-card.json");
Console.WriteLine(JsonDocument.Parse(raw).RootElement.GetProperty("url"));
require "net/http"
require "json"
data = JSON.parse(Net::HTTP.get(URI("https://not.catastrophic.io/.well-known/agent-card.json")))
puts data["url"]
$r = Invoke-WebRequest 'https://not.catastrophic.io/.well-known/agent-card.json'
($r.Content | ConvertFrom-Json).url
headers
body