curl --request POST \
--url https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/integrations/{integrationID}/github-setup \
--header 'Content-Type: application/json' \
--header 'X-Omnara-Csrf: <api-key>' \
--cookie __Host-omnara_session= \
--data '
{
"expected_setup_revision": 2,
"app_name": "<string>",
"organization": "<string>"
}
'import requests
url = "https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/integrations/{integrationID}/github-setup"
payload = {
"expected_setup_revision": 2,
"app_name": "<string>",
"organization": "<string>"
}
headers = {
"cookie": "__Host-omnara_session=",
"X-Omnara-Csrf": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
cookie: '__Host-omnara_session=',
'X-Omnara-Csrf': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({expected_setup_revision: 2, app_name: '<string>', organization: '<string>'})
};
fetch('https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/integrations/{integrationID}/github-setup', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/integrations/{integrationID}/github-setup",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'expected_setup_revision' => 2,
'app_name' => '<string>',
'organization' => '<string>'
]),
CURLOPT_COOKIE => "__Host-omnara_session=",
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Omnara-Csrf: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/integrations/{integrationID}/github-setup"
payload := strings.NewReader("{\n \"expected_setup_revision\": 2,\n \"app_name\": \"<string>\",\n \"organization\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "__Host-omnara_session=")
req.Header.Add("X-Omnara-Csrf", "<api-key>")
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))
}HttpResponse<String> response = Unirest.post("https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/integrations/{integrationID}/github-setup")
.header("cookie", "__Host-omnara_session=")
.header("X-Omnara-Csrf", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"expected_setup_revision\": 2,\n \"app_name\": \"<string>\",\n \"organization\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/integrations/{integrationID}/github-setup")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = '__Host-omnara_session='
request["X-Omnara-Csrf"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"expected_setup_revision\": 2,\n \"app_name\": \"<string>\",\n \"organization\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"integration_id": "<string>",
"setup_revision": 2,
"registration_url": "<string>",
"manifest": {},
"expires_at": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Start registration of a customer-owned GitHub App
Starts guided registration on github.com for a never-connected GitHub integration. Requires a browser session and project management access. Submit manifest as a JSON-encoded form field to registration_url. The callback saves a project credential secret and redirects to the canonical integration page with github_setup=credentials_saved and credential_secret_id (a public secret ID). It does not connect an installation or change launcher settings.
curl --request POST \
--url https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/integrations/{integrationID}/github-setup \
--header 'Content-Type: application/json' \
--header 'X-Omnara-Csrf: <api-key>' \
--cookie __Host-omnara_session= \
--data '
{
"expected_setup_revision": 2,
"app_name": "<string>",
"organization": "<string>"
}
'import requests
url = "https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/integrations/{integrationID}/github-setup"
payload = {
"expected_setup_revision": 2,
"app_name": "<string>",
"organization": "<string>"
}
headers = {
"cookie": "__Host-omnara_session=",
"X-Omnara-Csrf": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
cookie: '__Host-omnara_session=',
'X-Omnara-Csrf': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({expected_setup_revision: 2, app_name: '<string>', organization: '<string>'})
};
fetch('https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/integrations/{integrationID}/github-setup', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/integrations/{integrationID}/github-setup",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'expected_setup_revision' => 2,
'app_name' => '<string>',
'organization' => '<string>'
]),
CURLOPT_COOKIE => "__Host-omnara_session=",
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Omnara-Csrf: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/integrations/{integrationID}/github-setup"
payload := strings.NewReader("{\n \"expected_setup_revision\": 2,\n \"app_name\": \"<string>\",\n \"organization\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "__Host-omnara_session=")
req.Header.Add("X-Omnara-Csrf", "<api-key>")
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))
}HttpResponse<String> response = Unirest.post("https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/integrations/{integrationID}/github-setup")
.header("cookie", "__Host-omnara_session=")
.header("X-Omnara-Csrf", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"expected_setup_revision\": 2,\n \"app_name\": \"<string>\",\n \"organization\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/integrations/{integrationID}/github-setup")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = '__Host-omnara_session='
request["X-Omnara-Csrf"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"expected_setup_revision\": 2,\n \"app_name\": \"<string>\",\n \"organization\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"integration_id": "<string>",
"setup_revision": 2,
"registration_url": "<string>",
"manifest": {},
"expires_at": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Authorizations
Browser session cookie. HTTPS deployments use __Host-omnara_session; local HTTP development uses omnara_session.
CSRF token header required for browser-session mutations. The value must match the session's CSRF cookie.
Path Parameters
^org_[a-z2-7]{26}$^proj_[a-z2-7]{26}$^itg_[a-z2-7]{26}$Body
x >= 1Optional initial GitHub App name suggestion. When omitted, the user chooses a name on GitHub during registration.
1 - 34GitHub organization login. Omit to register under a personal account.
1 - 39^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$Response
GitHub setup information verified.
^itg_[a-z2-7]{26}$x >= 1Server-authored GitHub App manifest. Serialize this object to the manifest form field when posting to registration_url.