Read access policies
curl --request GET \
--url https://api.airshipci.com/api/v1/access-control \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.airshipci.com/api/v1/access-control"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.airshipci.com/api/v1/access-control', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.airshipci.com/api/v1/access-control"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"access_yml": {
"access_control": [
{
"policies": [
"<string>"
],
"resource": "<string>"
}
],
"policies": [
{
"id": "<string>",
"repo": "<string>",
"pull_request": true,
"roles": [
"<string>"
],
"teams": [
"<string>"
],
"users": [
"<string>"
]
}
],
"version": 123
},
"found": true
}{
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Read access policies
GET
/
api
/
v1
/
access-control
Read access policies
curl --request GET \
--url https://api.airshipci.com/api/v1/access-control \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.airshipci.com/api/v1/access-control"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.airshipci.com/api/v1/access-control', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.airshipci.com/api/v1/access-control"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"access_yml": {
"access_control": [
{
"policies": [
"<string>"
],
"resource": "<string>"
}
],
"policies": [
{
"id": "<string>",
"repo": "<string>",
"pull_request": true,
"roles": [
"<string>"
],
"teams": [
"<string>"
],
"users": [
"<string>"
]
}
],
"version": 123
},
"found": true
}{
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}