curl --request POST \
--url https://api.example.com/api/registry/versions/{version_id}/reject \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"reason": ""
}'import requests
url = "https://api.example.com/api/registry/versions/{version_id}/reject"
payload = { "reason": "" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({reason: ''})
};
fetch('https://api.example.com/api/registry/versions/{version_id}/reject', 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/api/registry/versions/{version_id}/reject",
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([
'reason' => ''
]),
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.example.com/api/registry/versions/{version_id}/reject"
payload := strings.NewReader("{\n \"reason\": \"\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.example.com/api/registry/versions/{version_id}/reject")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reason\": \"\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/registry/versions/{version_id}/reject")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"reason\": \"\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "agent",
"scope": "personal",
"name": "<string>",
"display_name": "<string>",
"description": "<string>",
"owner_id": "<string>",
"is_system": true,
"updated_at": "2023-11-07T05:31:56Z",
"versions": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"artifact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": "<string>",
"status": "draft",
"spec": {},
"changelog": "<string>",
"created_by": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"submitted_by": "<string>",
"submitted_at": "2023-11-07T05:31:56Z",
"reviewed_by": "<string>",
"reviewed_at": "2023-11-07T05:31:56Z",
"review_reason": "<string>",
"deprecated_at": "2023-11-07T05:31:56Z",
"withdrawn_at": "2023-11-07T05:31:56Z",
"withdrawn_reason": "<string>",
"promoted_from_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"used_in_templates": 0
}
],
"parent_artifact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"promoted_from_artifact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"latest_version": "<string>",
"latest_status": "draft",
"latest_approved_version": "<string>",
"has_draft": false,
"used_in_templates": 0,
"used_in_agents": 123,
"write": true,
"needs_sign_off": true,
"sensitivity": "<string>",
"health": "ok",
"can_use": true
}{
"error": "<string>",
"code": 500
}{
"error": "<string>",
"code": 500
}{
"error": "<string>",
"code": 500
}{
"error": "<string>",
"code": 500
}Reject a version
Registry admins: reject a submitted Global version. A reason is required and is shown to the author.
curl --request POST \
--url https://api.example.com/api/registry/versions/{version_id}/reject \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"reason": ""
}'import requests
url = "https://api.example.com/api/registry/versions/{version_id}/reject"
payload = { "reason": "" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({reason: ''})
};
fetch('https://api.example.com/api/registry/versions/{version_id}/reject', 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/api/registry/versions/{version_id}/reject",
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([
'reason' => ''
]),
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.example.com/api/registry/versions/{version_id}/reject"
payload := strings.NewReader("{\n \"reason\": \"\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.example.com/api/registry/versions/{version_id}/reject")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reason\": \"\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/registry/versions/{version_id}/reject")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"reason\": \"\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "agent",
"scope": "personal",
"name": "<string>",
"display_name": "<string>",
"description": "<string>",
"owner_id": "<string>",
"is_system": true,
"updated_at": "2023-11-07T05:31:56Z",
"versions": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"artifact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": "<string>",
"status": "draft",
"spec": {},
"changelog": "<string>",
"created_by": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"submitted_by": "<string>",
"submitted_at": "2023-11-07T05:31:56Z",
"reviewed_by": "<string>",
"reviewed_at": "2023-11-07T05:31:56Z",
"review_reason": "<string>",
"deprecated_at": "2023-11-07T05:31:56Z",
"withdrawn_at": "2023-11-07T05:31:56Z",
"withdrawn_reason": "<string>",
"promoted_from_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"used_in_templates": 0
}
],
"parent_artifact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"promoted_from_artifact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"latest_version": "<string>",
"latest_status": "draft",
"latest_approved_version": "<string>",
"has_draft": false,
"used_in_templates": 0,
"used_in_agents": 123,
"write": true,
"needs_sign_off": true,
"sensitivity": "<string>",
"health": "ok",
"can_use": true
}{
"error": "<string>",
"code": 500
}{
"error": "<string>",
"code": 500
}{
"error": "<string>",
"code": 500
}{
"error": "<string>",
"code": 500
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Path Parameters
The version's ID.
Body
A reason, required to reject and to withdraw.
2000Response
Successful Response
An artifact with all its versions.
What an artifact is.
agent, skill, mcp_server, tool, context_pack, ontology, prompt, workflow, brand, code_repo Who an artifact is for. tenant is shown as "Global".
personal, tenant Show child attributes
Show child attributes
Newest version of any status.
Lifecycle of one version.
draft, submitted, approved, rejected, deprecated, withdrawn Context packs only: visible agents whose newest version loads it.
Tools only: effective write flag.
Tools only: a write tool not yet signed off.
Context packs only: the newest approved version's effective sensitivity.
Context packs only: whether its items resolve.
ok, stale, broken False: you are limited and it is given to you to view only.
Was this page helpful?

