Activate or deactivate a repository
curl --request POST \
--url https://api.airshipci.com/api/v1/repo \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"active": true,
"repository": "<string>"
}
'import requests
url = "https://api.airshipci.com/api/v1/repo"
payload = {
"active": True,
"repository": "<string>"
}
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({active: true, repository: '<string>'})
};
fetch('https://api.airshipci.com/api/v1/repo', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.airshipci.com/api/v1/repo"
payload := strings.NewReader("{\n \"active\": true,\n \"repository\": \"<string>\"\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))
}{
"accessible": true,
"activated": true,
"activatedAt": "2023-11-07T05:31:56Z",
"allowPublic": true,
"defaultBranch": "<string>",
"fullName": "<string>",
"id": 123,
"private": true,
"config": {
"checkedAt": "2023-11-07T05:31:56Z",
"error": "<string>",
"sha": "<string>"
}
}{
"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"
}Activate or deactivate a repository
POST
/
api
/
v1
/
repo
Activate or deactivate a repository
curl --request POST \
--url https://api.airshipci.com/api/v1/repo \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"active": true,
"repository": "<string>"
}
'import requests
url = "https://api.airshipci.com/api/v1/repo"
payload = {
"active": True,
"repository": "<string>"
}
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({active: true, repository: '<string>'})
};
fetch('https://api.airshipci.com/api/v1/repo', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.airshipci.com/api/v1/repo"
payload := strings.NewReader("{\n \"active\": true,\n \"repository\": \"<string>\"\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))
}{
"accessible": true,
"activated": true,
"activatedAt": "2023-11-07T05:31:56Z",
"allowPublic": true,
"defaultBranch": "<string>",
"fullName": "<string>",
"id": 123,
"private": true,
"config": {
"checkedAt": "2023-11-07T05:31:56Z",
"error": "<string>",
"sha": "<string>"
}
}{
"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"
}Authorizations
Developer API token (asa_...), created by an organization owner in the dashboard.
Body
application/json
Response
OK
Whether the app can still access the repository
Whether its airship.yaml launches runners
When it was activated
Serve jobs while the repository is public
Branch idle runner config is read from
owner/name
GitHub repository ID
Whether the repository is private
The default branch's airship.yaml as last read; absent until activated
Show child attributes
Show child attributes