Link a GitHub App installation to this organization
curl --request POST \
--url https://app.trustivan.com/api/v1/code-integrations/github/installations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"installation_id": 123
}
'import requests
url = "https://app.trustivan.com/api/v1/code-integrations/github/installations"
payload = { "installation_id": 123 }
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({installation_id: 123})
};
fetch('https://app.trustivan.com/api/v1/code-integrations/github/installations', 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://app.trustivan.com/api/v1/code-integrations/github/installations"
payload := strings.NewReader("{\n \"installation_id\": 123\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))
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}Link a GitHub App installation to this organization
Requires credentials:manage and a person (not an API key). The
installation is linked only if GitHub’s GET /user/installations,
called with that person’s stored token, lists it, so an organization
cannot claim an installation it does not control. 403 when GitHub
refuses that token, as in the listing. An installation can belong to
one organization only.
POST
/
code-integrations
/
github
/
installations
Link a GitHub App installation to this organization
curl --request POST \
--url https://app.trustivan.com/api/v1/code-integrations/github/installations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"installation_id": 123
}
'import requests
url = "https://app.trustivan.com/api/v1/code-integrations/github/installations"
payload = { "installation_id": 123 }
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({installation_id: 123})
};
fetch('https://app.trustivan.com/api/v1/code-integrations/github/installations', 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://app.trustivan.com/api/v1/code-integrations/github/installations"
payload := strings.NewReader("{\n \"installation_id\": 123\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))
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}Authorizations
Response
{installation: {...}}.