curl "https://app.runtm.com/api/agent-directives/dir_abc123/attachments" \
-H "Authorization: Bearer runtm_xxx" \
-H "X-Organization-Id: org_abc123"
import requests
response = requests.get(
"https://app.runtm.com/api/agent-directives/dir_abc123/attachments",
headers={
"Authorization": "Bearer runtm_xxx",
"X-Organization-Id": "org_abc123",
},
)
data = response.json()
for att in data["attachments"]:
if att["applies_to_all"]:
print(" Applies to all repos")
else:
print(f" {att['repo_full_name']}")
const response = await fetch(
"https://app.runtm.com/api/agent-directives/dir_abc123/attachments",
{
headers: {
"Authorization": "Bearer runtm_xxx",
"X-Organization-Id": "org_abc123",
},
}
);
const data = await response.json();
data.attachments.forEach((att) => {
if (att.applies_to_all) {
console.log(" Applies to all repos");
} else {
console.log(` ${att.repo_full_name}`);
}
});
{
"attachments": [
{
"id": "att_001",
"directive_id": "dir_abc123",
"directive_version": 2,
"repo_full_name": "acme/web-app",
"applies_to_all": false,
"position": 0,
"created_at": "2026-05-01T10:00:00Z"
},
{
"id": "att_002",
"directive_id": "dir_abc123",
"directive_version": 2,
"repo_full_name": "acme/api-service",
"applies_to_all": false,
"position": 1,
"created_at": "2026-05-01T10:00:00Z"
}
]
}
Skills
List Attachments
List the repository attachments for a directive
GET
/
api
/
agent-directives
/
{directive_id}
/
attachments
curl "https://app.runtm.com/api/agent-directives/dir_abc123/attachments" \
-H "Authorization: Bearer runtm_xxx" \
-H "X-Organization-Id: org_abc123"
import requests
response = requests.get(
"https://app.runtm.com/api/agent-directives/dir_abc123/attachments",
headers={
"Authorization": "Bearer runtm_xxx",
"X-Organization-Id": "org_abc123",
},
)
data = response.json()
for att in data["attachments"]:
if att["applies_to_all"]:
print(" Applies to all repos")
else:
print(f" {att['repo_full_name']}")
const response = await fetch(
"https://app.runtm.com/api/agent-directives/dir_abc123/attachments",
{
headers: {
"Authorization": "Bearer runtm_xxx",
"X-Organization-Id": "org_abc123",
},
}
);
const data = await response.json();
data.attachments.forEach((att) => {
if (att.applies_to_all) {
console.log(" Applies to all repos");
} else {
console.log(` ${att.repo_full_name}`);
}
});
{
"attachments": [
{
"id": "att_001",
"directive_id": "dir_abc123",
"directive_version": 2,
"repo_full_name": "acme/web-app",
"applies_to_all": false,
"position": 0,
"created_at": "2026-05-01T10:00:00Z"
},
{
"id": "att_002",
"directive_id": "dir_abc123",
"directive_version": 2,
"repo_full_name": "acme/api-service",
"applies_to_all": false,
"position": 1,
"created_at": "2026-05-01T10:00:00Z"
}
]
}
Returns the list of repository attachments for a directive. Attachments determine which repositories a published directive is active in.
Required scope:
context:read
Path Parameters
string
required
The directive ID (e.g.
dir_abc123).Headers
string
required
Bearer token. Example:
Bearer runtm_xxxstring
Scope to an organization.
Response
array
Array of attachment resources. Each contains
id, directive_id, directive_version, repo_full_name, applies_to_all, position, and created_at.curl "https://app.runtm.com/api/agent-directives/dir_abc123/attachments" \
-H "Authorization: Bearer runtm_xxx" \
-H "X-Organization-Id: org_abc123"
import requests
response = requests.get(
"https://app.runtm.com/api/agent-directives/dir_abc123/attachments",
headers={
"Authorization": "Bearer runtm_xxx",
"X-Organization-Id": "org_abc123",
},
)
data = response.json()
for att in data["attachments"]:
if att["applies_to_all"]:
print(" Applies to all repos")
else:
print(f" {att['repo_full_name']}")
const response = await fetch(
"https://app.runtm.com/api/agent-directives/dir_abc123/attachments",
{
headers: {
"Authorization": "Bearer runtm_xxx",
"X-Organization-Id": "org_abc123",
},
}
);
const data = await response.json();
data.attachments.forEach((att) => {
if (att.applies_to_all) {
console.log(" Applies to all repos");
} else {
console.log(` ${att.repo_full_name}`);
}
});
{
"attachments": [
{
"id": "att_001",
"directive_id": "dir_abc123",
"directive_version": 2,
"repo_full_name": "acme/web-app",
"applies_to_all": false,
"position": 0,
"created_at": "2026-05-01T10:00:00Z"
},
{
"id": "att_002",
"directive_id": "dir_abc123",
"directive_version": 2,
"repo_full_name": "acme/api-service",
"applies_to_all": false,
"position": 1,
"created_at": "2026-05-01T10:00:00Z"
}
]
}