List GitHub Actions trust policies
import requests
url = "https://platform.ankra.app/api/v1/org/organisation/oidc-trust-policies"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/organisation/oidc-trust-policies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/org/organisation/oidc-trust-policies \
--header 'Authorization: Bearer <token>'{
"policies": [
{
"name": "<string>",
"repository_owner": "<string>",
"repository_name": "<string>",
"role_slug": "<string>",
"repository_id": 2,
"repository_owner_id": 2,
"ref": "<string>",
"environment": "<string>",
"job_workflow_ref": "<string>",
"allow_pull_request": false,
"scopes": [
"<string>"
],
"ttl_seconds": 900,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"service_account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}Organisation IAM
List GitHub Actions trust policies
Requires members.manage in the authenticated organisation; service accounts are refused. Creating a policy provisions its service account and refuses role escalation. Removing a policy revokes tokens issued by it. Browser mutations require the session CSRF token.
GET
/
api
/
v1
/
org
/
organisation
/
oidc-trust-policies
List GitHub Actions trust policies
import requests
url = "https://platform.ankra.app/api/v1/org/organisation/oidc-trust-policies"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/organisation/oidc-trust-policies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/org/organisation/oidc-trust-policies \
--header 'Authorization: Bearer <token>'{
"policies": [
{
"name": "<string>",
"repository_owner": "<string>",
"repository_name": "<string>",
"role_slug": "<string>",
"repository_id": 2,
"repository_owner_id": 2,
"ref": "<string>",
"environment": "<string>",
"job_workflow_ref": "<string>",
"allow_pull_request": false,
"scopes": [
"<string>"
],
"ttl_seconds": 900,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"service_account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}