curl --request POST \
--url https://aws-us-east-2.api.entire.io/api/v1/repos/{repo_id}/trails \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"branch_name": "<string>",
"title": "<string>",
"assignees": [
"<string>"
],
"base": "<string>",
"ready_for_review": true
}
'import requests
url = "https://aws-us-east-2.api.entire.io/api/v1/repos/{repo_id}/trails"
payload = {
"branch_name": "<string>",
"title": "<string>",
"assignees": ["<string>"],
"base": "<string>",
"ready_for_review": True
}
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({
branch_name: '<string>',
title: '<string>',
assignees: ['<string>'],
base: '<string>',
ready_for_review: true
})
};
fetch('https://aws-us-east-2.api.entire.io/api/v1/repos/{repo_id}/trails', 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://aws-us-east-2.api.entire.io/api/v1/repos/{repo_id}/trails",
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([
'branch_name' => '<string>',
'title' => '<string>',
'assignees' => [
'<string>'
],
'base' => '<string>',
'ready_for_review' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://aws-us-east-2.api.entire.io/api/v1/repos/{repo_id}/trails"
payload := strings.NewReader("{\n \"branch_name\": \"<string>\",\n \"title\": \"<string>\",\n \"assignees\": [\n \"<string>\"\n ],\n \"base\": \"<string>\",\n \"ready_for_review\": true\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))
}HttpResponse<String> response = Unirest.post("https://aws-us-east-2.api.entire.io/api/v1/repos/{repo_id}/trails")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"branch_name\": \"<string>\",\n \"title\": \"<string>\",\n \"assignees\": [\n \"<string>\"\n ],\n \"base\": \"<string>\",\n \"ready_for_review\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://aws-us-east-2.api.entire.io/api/v1/repos/{repo_id}/trails")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"branch_name\": \"<string>\",\n \"title\": \"<string>\",\n \"assignees\": [\n \"<string>\"\n ],\n \"base\": \"<string>\",\n \"ready_for_review\": true\n}"
response = http.request(request)
puts response.read_body{
"has_new_branch": true,
"trail": {
"assignee_identities": [
{
"identity": {
"account_id": "<string>",
"avatar_url": "<string>",
"display_name": "<string>",
"handles": [
{
"handle": "<string>",
"provider": "<string>",
"is_primary": true
}
],
"kind": "<string>",
"agent": {
"id": "<string>",
"name": "<string>"
},
"automation": {
"automation_id": "<string>",
"installation_id": "<string>",
"plugin": "<string>"
},
"run_id": "<string>",
"username": "<string>"
},
"login": "<string>"
}
],
"assignees": [
"<string>"
],
"author": {
"id": "<string>",
"identity": {
"account_id": "<string>",
"avatar_url": "<string>",
"display_name": "<string>",
"handles": [
{
"handle": "<string>",
"provider": "<string>",
"is_primary": true
}
],
"kind": "<string>",
"agent": {
"id": "<string>",
"name": "<string>"
},
"automation": {
"automation_id": "<string>",
"installation_id": "<string>",
"plugin": "<string>"
},
"run_id": "<string>",
"username": "<string>"
},
"login": "<string>"
},
"base": "<string>",
"body_document": {
"content_json": "<unknown>",
"document_key": "<string>",
"etag": "<string>",
"id": "<string>",
"schema_version": 123,
"text_snapshot": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"$schema": "/api/v1/schemas/TrailBodyDocumentJSON.json"
},
"branch": "<string>",
"checkpoint_count": 123,
"comment_count": 123,
"created_at": "2023-11-07T05:31:56Z",
"has_code_changes": true,
"id": "<string>",
"last_activity_at": "2023-11-07T05:31:56Z",
"merged_at": "2023-11-07T05:31:56Z",
"number": 123,
"original_branch": "<string>",
"ready_for_review": true,
"reviewers": [
{
"identity": {
"account_id": "<string>",
"avatar_url": "<string>",
"display_name": "<string>",
"handles": [
{
"handle": "<string>",
"provider": "<string>",
"is_primary": true
}
],
"kind": "<string>",
"agent": {
"id": "<string>",
"name": "<string>"
},
"automation": {
"automation_id": "<string>",
"installation_id": "<string>",
"plugin": "<string>"
},
"run_id": "<string>",
"username": "<string>"
},
"login": "<string>",
"status": "<string>",
"actor_account_id": "<string>",
"is_approval_stale": true
}
],
"status": "<string>",
"title": "<string>",
"unresolved_count": 123,
"updated_at": "2023-11-07T05:31:56Z",
"merged_base": "<string>",
"parent": {
"host": "gh",
"id": "<string>",
"jurisdiction": "<string>",
"number": 123,
"path": "<string>",
"primary_processing_cell": "<string>",
"project": "<string>",
"project_id": "<string>",
"url": "<string>"
},
"url": "<string>"
},
"$schema": "/api/v1/schemas/TrailCreateResponseBody.json"
}{
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"$schema": "/api/v1/schemas/ProblemDocument.json"
}{
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"$schema": "/api/v1/schemas/ProblemDocument.json"
}{
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"$schema": "/api/v1/schemas/ProblemDocument.json"
}{
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"$schema": "/api/v1/schemas/ProblemDocument.json"
}{
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"$schema": "/api/v1/schemas/ProblemDocument.json"
}{
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"$schema": "/api/v1/schemas/ProblemDocument.json"
}{
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"$schema": "/api/v1/schemas/ProblemDocument.json"
}{
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"$schema": "/api/v1/schemas/ProblemDocument.json"
}{
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"$schema": "/api/v1/schemas/ProblemDocument.json"
}Create a trail by repo id
Accepted credentials: User token.
Creates a trail via the opaque repo id path; behaviour matches the wire-parity create (including the same status policy), and the Location header points back into this addressing scheme.
Use an own-account bearer token (including supported service accounts). Plugin installation tokens are not accepted for this action. Plugin assertion JWTs and plugin OAuth user-delegation tokens are not accepted here.
Requires live repository push permission and an account subject; automation principals are rejected. Trails must be enabled. Send requests to the repository’s primary API region.
curl --request POST \
--url https://aws-us-east-2.api.entire.io/api/v1/repos/{repo_id}/trails \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"branch_name": "<string>",
"title": "<string>",
"assignees": [
"<string>"
],
"base": "<string>",
"ready_for_review": true
}
'import requests
url = "https://aws-us-east-2.api.entire.io/api/v1/repos/{repo_id}/trails"
payload = {
"branch_name": "<string>",
"title": "<string>",
"assignees": ["<string>"],
"base": "<string>",
"ready_for_review": True
}
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({
branch_name: '<string>',
title: '<string>',
assignees: ['<string>'],
base: '<string>',
ready_for_review: true
})
};
fetch('https://aws-us-east-2.api.entire.io/api/v1/repos/{repo_id}/trails', 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://aws-us-east-2.api.entire.io/api/v1/repos/{repo_id}/trails",
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([
'branch_name' => '<string>',
'title' => '<string>',
'assignees' => [
'<string>'
],
'base' => '<string>',
'ready_for_review' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://aws-us-east-2.api.entire.io/api/v1/repos/{repo_id}/trails"
payload := strings.NewReader("{\n \"branch_name\": \"<string>\",\n \"title\": \"<string>\",\n \"assignees\": [\n \"<string>\"\n ],\n \"base\": \"<string>\",\n \"ready_for_review\": true\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))
}HttpResponse<String> response = Unirest.post("https://aws-us-east-2.api.entire.io/api/v1/repos/{repo_id}/trails")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"branch_name\": \"<string>\",\n \"title\": \"<string>\",\n \"assignees\": [\n \"<string>\"\n ],\n \"base\": \"<string>\",\n \"ready_for_review\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://aws-us-east-2.api.entire.io/api/v1/repos/{repo_id}/trails")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"branch_name\": \"<string>\",\n \"title\": \"<string>\",\n \"assignees\": [\n \"<string>\"\n ],\n \"base\": \"<string>\",\n \"ready_for_review\": true\n}"
response = http.request(request)
puts response.read_body{
"has_new_branch": true,
"trail": {
"assignee_identities": [
{
"identity": {
"account_id": "<string>",
"avatar_url": "<string>",
"display_name": "<string>",
"handles": [
{
"handle": "<string>",
"provider": "<string>",
"is_primary": true
}
],
"kind": "<string>",
"agent": {
"id": "<string>",
"name": "<string>"
},
"automation": {
"automation_id": "<string>",
"installation_id": "<string>",
"plugin": "<string>"
},
"run_id": "<string>",
"username": "<string>"
},
"login": "<string>"
}
],
"assignees": [
"<string>"
],
"author": {
"id": "<string>",
"identity": {
"account_id": "<string>",
"avatar_url": "<string>",
"display_name": "<string>",
"handles": [
{
"handle": "<string>",
"provider": "<string>",
"is_primary": true
}
],
"kind": "<string>",
"agent": {
"id": "<string>",
"name": "<string>"
},
"automation": {
"automation_id": "<string>",
"installation_id": "<string>",
"plugin": "<string>"
},
"run_id": "<string>",
"username": "<string>"
},
"login": "<string>"
},
"base": "<string>",
"body_document": {
"content_json": "<unknown>",
"document_key": "<string>",
"etag": "<string>",
"id": "<string>",
"schema_version": 123,
"text_snapshot": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"$schema": "/api/v1/schemas/TrailBodyDocumentJSON.json"
},
"branch": "<string>",
"checkpoint_count": 123,
"comment_count": 123,
"created_at": "2023-11-07T05:31:56Z",
"has_code_changes": true,
"id": "<string>",
"last_activity_at": "2023-11-07T05:31:56Z",
"merged_at": "2023-11-07T05:31:56Z",
"number": 123,
"original_branch": "<string>",
"ready_for_review": true,
"reviewers": [
{
"identity": {
"account_id": "<string>",
"avatar_url": "<string>",
"display_name": "<string>",
"handles": [
{
"handle": "<string>",
"provider": "<string>",
"is_primary": true
}
],
"kind": "<string>",
"agent": {
"id": "<string>",
"name": "<string>"
},
"automation": {
"automation_id": "<string>",
"installation_id": "<string>",
"plugin": "<string>"
},
"run_id": "<string>",
"username": "<string>"
},
"login": "<string>",
"status": "<string>",
"actor_account_id": "<string>",
"is_approval_stale": true
}
],
"status": "<string>",
"title": "<string>",
"unresolved_count": 123,
"updated_at": "2023-11-07T05:31:56Z",
"merged_base": "<string>",
"parent": {
"host": "gh",
"id": "<string>",
"jurisdiction": "<string>",
"number": 123,
"path": "<string>",
"primary_processing_cell": "<string>",
"project": "<string>",
"project_id": "<string>",
"url": "<string>"
},
"url": "<string>"
},
"$schema": "/api/v1/schemas/TrailCreateResponseBody.json"
}{
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"$schema": "/api/v1/schemas/ProblemDocument.json"
}{
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"$schema": "/api/v1/schemas/ProblemDocument.json"
}{
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"$schema": "/api/v1/schemas/ProblemDocument.json"
}{
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"$schema": "/api/v1/schemas/ProblemDocument.json"
}{
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"$schema": "/api/v1/schemas/ProblemDocument.json"
}{
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"$schema": "/api/v1/schemas/ProblemDocument.json"
}{
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"$schema": "/api/v1/schemas/ProblemDocument.json"
}{
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"$schema": "/api/v1/schemas/ProblemDocument.json"
}{
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"$schema": "/api/v1/schemas/ProblemDocument.json"
}Authorizations
OAuth 2.0 authorization code flow.
Path Parameters
Repo id: placement ULID or public repo_
Body
11An actor reference: ulid: or @username. A bare string is a GitHub login (legacy).
1create, link open, closed Was this page helpful?