Redirects the user to GitHub's OAuth authorization page
| redirect_uri | string Example: redirect_uri=https://app-dev.builtiful.io The full URI to redirect user back to once the OAuth flow completes. This is usually the frontend URI. |
{- "message": "Something went wrong during request processing, this issue has been logged and reported to our team"
}Logs out the user by clearing their session and optionally redirects to a specified URI
| redirect_uri | string <uri> Example: redirect_uri=https://app-dev.builtiful.io Full URI to redirect to after successful logout |
{- "message": "Successfully logged out"
}{- "user": {
- "id": "01234567-89ab-7cde-ef01-234567890abc",
- "email": "user@example.com",
- "github_id": 12345678,
- "github_login": "username",
- "github_name": "Example User",
- "created_at": {
- "nanos_since_epoch": 782944000,
- "secs_since_epoch": 1730738711
}, - "updated_at": {
- "nanos_since_epoch": 782944000,
- "secs_since_epoch": 1730738711
}
}
}Returns a list of all tenants and their GitHub installation details accessible by the logged in user.
{- "tenants": [
- {
- "id": "01234567-89ab-7cde-ef01-234567890abc",
- "email": "org@example.com",
- "github_id": 12345678,
- "github_installation_id": 98765432,
- "github_installation_suspended": false,
- "github_login": "ExampleOrg"
}
], - "total_count": 1
}Returns a paginated list of jobs associated with the specified tenant, with most recent ones first.
To implement pagination, one will use the limit and one of starting_after or ending_before.
For "Next Page", the starting_after parameter will be used with the UUID of the last item of the current page.
For "Prev Page", the ending_before parameter will be used with the UUID of the first item of the current page.
To detect if more item is available, one can fetch 1 item more than the display page size from the API. For example, if the page size is 10, set limit = 11 (but only display first 10) and if the API returned 11 items, that means more items are available and the UUID of the 10th item will be used as the cursor value for fetching the next page.
| tenant_id required | string <uuid> Example: 01234567-89ab-7cde-ef01-234567890abc UUID of the tenant |
| limit | integer [ 1 .. 100 ] Default: 10 Example: limit=10 This specifies a limit on the number of objects to return. |
| starting_after | string <uuid> Example: starting_after=01234567-89ab-7cde-ef01-234567890abc A cursor to use in pagination. |
| ending_before | string <uuid> Example: ending_before=01234567-89ab-7cde-ef01-234567890abc A cursor to use in pagination. |
{- "jobs": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "tenant_id": "34f5c98e-f430-457b-a812-92637d0c6fd0",
- "workflow_job_id": 0,
- "repository": "string",
- "initiator": "string",
- "initiator_github_id": 0,
- "cpu_architecture": "Amd64",
- "os": "Ubuntu2404",
- "label": "string",
- "vcpus": 0,
- "max_run_time": 0,
- "billable_duration": 0,
- "duration": 0,
- "failure_reason": "InvalidVcpus",
- "status": "Queued",
- "created_at": {
- "nanos_since_epoch": 782944000,
- "secs_since_epoch": 1730738711
}, - "updated_at": {
- "nanos_since_epoch": 782944000,
- "secs_since_epoch": 1730738711
}, - "completed_at": {
- "nanos_since_epoch": 782944000,
- "secs_since_epoch": 1730738711
}, - "started_at": {
- "nanos_since_epoch": 782944000,
- "secs_since_epoch": 1730738711
}, - "provisioner_picked_up_at": {
- "nanos_since_epoch": 782944000,
- "secs_since_epoch": 1730738711
}, - "workflow_job": { }
}
], - "total_count": 1
}Initiates the email update process for a tenant. Sends a verification email to the new address with a link to confirm the change.
| tenant_id required | string <uuid> Example: 01234567-89ab-7cde-ef01-234567890abc UUID of the tenant |
| email required | string <email> |
{- "email": "new-email@example.com"
}{- "message": "Something went wrong during request processing, this issue has been logged and reported to our team"
}Confirms the email update for a tenant using a JWT token provided in the verification email
| tenant_id required | string <uuid> Example: 01234567-89ab-7cde-ef01-234567890abc UUID of the tenant |
| jwt required | string JWT token received in the verification email |
{- "message": "Something went wrong during request processing, this issue has been logged and reported to our team"
}Handles the OAuth callback from GitHub, sets session cookie for authenticated user
| code required | string OAuth authorization code from GitHub |
| state | string State parameter for CSRF protection. This will be checked against the |
{- "message": "Something went wrong during request processing, this issue has been logged and reported to our team"
}Handles the OAuth setup callback from GitHub. This usually occurs when user manuallly installs the App via GitHub marketplace.
Technically this will get passed the installation ID and we could redirect the user into the newly installed org directly, but this haven't been implemented.
Returns zero or one job that can be run on the provisioner based on available resources
| available_vcpus required | integer >= 1 Example: available_vcpus=16 Number of vCPUs currently available on the provisioner. API will not return jobs that require more CPUs to run than |
| cpu_architecture required | string Enum: "Amd64" "Arm64" CPU architecture of the host, API will only return jobs that are same architecture as |
| host required | string Example: host=amd64-01.hel.hetzner.farm.builtiful.net Hostname of the provisioner |
{- "new_job": {
- "id": "019307ba-97dd-7330-9f43-1de4e3c413a3",
- "github_installation_id": 56430448,
- "repository": "test-ci",
- "tenant_id": "0192b9e5-0f91-7933-9d2b-2ba702610e46",
- "vcpus": 2,
- "max_run_time": 21600,
- "jit_config": "eyIucnVubmVyIjoiZXlKQloyVnVkRWxrSWpvaU1UTTVJaXdpUV...",
- "cpu_architecture": "Amd64",
- "os": "Ubuntu2404",
- "organization": "Builtiful",
- "label": "builtiful(ubuntu)"
}
}