Bind a runtime to a GitHub repository branch
const url = 'https://api.runta.me/v2/github/runtime-bindings';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"runtime_id":"example","repository_id":1,"branch":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.runta.me/v2/github/runtime-bindings \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "runtime_id": "example", "repository_id": 1, "branch": "example" }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
Examplegenerated
{ "runtime_id": "example", "repository_id": 1, "branch": "example"}Responses
Section titled “Responses”Response envelope.
object
object
Examplegenerated
{ "data": { "id": "example", "tenant_id": "example", "runtime_id": "example", "repository_id": 1, "branch": "example", "sort_order": 1 }}Missing, malformed, or rejected bearer token
object
object
UUID v7 correlation ID shared with the X-Request-Id response header.
Example
{ "error": { "code": "already_exists" }}The bearer token is not allowed to perform this action
object
object
UUID v7 correlation ID shared with the X-Request-Id response header.
Example
{ "error": { "code": "already_exists" }}The requested resource was not found
object
object
UUID v7 correlation ID shared with the X-Request-Id response header.
Example
{ "error": { "code": "already_exists" }}The request conflicts with current resource state
object
object
UUID v7 correlation ID shared with the X-Request-Id response header.
Example
{ "error": { "code": "already_exists" }}Validation or application error
object
object
UUID v7 correlation ID shared with the X-Request-Id response header.
Example
{ "error": { "code": "already_exists" }}Rate limit exceeded
object
object
UUID v7 correlation ID shared with the X-Request-Id response header.
Example
{ "error": { "code": "already_exists" }}Operation is not implemented
object
object
UUID v7 correlation ID shared with the X-Request-Id response header.
Example
{ "error": { "code": "already_exists" }}Upstream service is unavailable
object
object
UUID v7 correlation ID shared with the X-Request-Id response header.
Example
{ "error": { "code": "already_exists" }}Upstream request timed out
object
object
UUID v7 correlation ID shared with the X-Request-Id response header.
Example
{ "error": { "code": "already_exists" }}default
Section titled “default”Error response
object
object
UUID v7 correlation ID shared with the X-Request-Id response header.
Example
{ "error": { "code": "already_exists" }}