curl --request POST \
--url https://api.airshipci.com/api/v1/cloud-connect \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"credentials": {}
}
'import requests
url = "https://api.airshipci.com/api/v1/cloud-connect"
payload = { "credentials": {} }
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({credentials: {}})
};
fetch('https://api.airshipci.com/api/v1/cloud-connect', 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/cloud-connect"
payload := strings.NewReader("{\n \"credentials\": {}\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))
}{
"accountId": "<string>",
"cloud": "aws",
"connectedAt": "2023-11-07T05:31:56Z",
"defaultRegion": "<string>",
"error": "<string>",
"identity": "<string>",
"principal": "<string>",
"status": "ok",
"updatedAt": "2023-11-07T05:31:56Z",
"verifiedAt": "2023-11-07T05:31:56Z"
}{
"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"
}Connect a cloud
curl --request POST \
--url https://api.airshipci.com/api/v1/cloud-connect \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"credentials": {}
}
'import requests
url = "https://api.airshipci.com/api/v1/cloud-connect"
payload = { "credentials": {} }
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({credentials: {}})
};
fetch('https://api.airshipci.com/api/v1/cloud-connect', 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/cloud-connect"
payload := strings.NewReader("{\n \"credentials\": {}\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))
}{
"accountId": "<string>",
"cloud": "aws",
"connectedAt": "2023-11-07T05:31:56Z",
"defaultRegion": "<string>",
"error": "<string>",
"identity": "<string>",
"principal": "<string>",
"status": "ok",
"updatedAt": "2023-11-07T05:31:56Z",
"verifiedAt": "2023-11-07T05:31:56Z"
}{
"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
Cloud name
aws, gcp, azure The cloud's credentials. For aws: access_key, secret_key and optionally region. For gcp: the fields of the service account key file, and optionally region (a zone or a region). For azure: subscription_id, tenant_id, client_id, client_secret and optionally region.
Show child attributes
Show child attributes
Response
OK
The cloud's own account identifier: an AWS account ID, a Google Cloud project ID or an Azure subscription ID
Cloud name
aws, gcp, azure When it was connected
The region runners launch in when a runner definition names none; on Google Cloud, a zone or a region
Why the credential stopped working
The public half of the credential: an AWS access key ID, a Google Cloud service account email or an Azure application ID
Who the credential is, such as an IAM user's ARN
Whether the credential works
ok, invalid When it was last changed
When it was last verified with the cloud