Instance API

Automating app releases with UI Bakery Instance API

Enabling the Instance API

To enable the Instance API, you will need to provide an authentication token via an environment variable:

UI_BAKERY_INSTANCE_API_TOKEN=YOUR_TOKEN

Making Requests to the UI Bakery SCIM API

The UI Bakery Instance API available on the following URL, where UI_BAKERY_INSTANCE is your domain.

http(s)://UI_BAKERY_INSTANCE/api/instance/**

To authenticate your requests, include the Authorization: Bearer TOKEN header with the value provided in the UI_BAKERY_INSTANCE_API_TOKEN environment variable

Reference

App methods:

Pull branch in app

POST https://UI_BAKERY_INSTANCE/api/instance/app/{app_id}/pull

Pull latest commits for specified app/branch

Path Parameters

Name
Type
Description

appId*

String

UI Bakery app id

Query Parameters

Name
Type
Description

uib_branch*

String

Branch name

{
    "status": "OK",
    "message": "Branch pulled",
    "result": {
        "lastCommit": {
            "hash": "359ad61432a481497b96c3c8hb4ad751f68bfd19",
            "message": "feat(home): update user table"
        }
    }
}

Relese app

POST https://UI_BAKERY_INSTANCE/api/instance/app/{app_id}/release

Releasing the app to specified environments: If both "prod" and "staging" are false, the release becomes a "Draft"; if no "branch" parameter is provided, the main branch is used by default.

If version is not specified, the last valid version will be patched.

Path Parameters

Name
Type
Description

appId*

String

UI Bakery app id

Request Body

Name
Type
Description

version

String

Release version

description

String

Release description

prod*

Boolean

Should release be created for Prod environment

staging*

Boolean

Should release be created for Staging environment

branch

String

From what branch release should be created

{
    "status": "CREATED",
    "message": "App released",
    "result": {
        "releases": [
            {
                "id": "4UMYn3VOnm",
                "version": "0.11.1",
                "description": "",
                "createdBy": "Organization Admin",
                "createdAt": "2024-01-01T15:07:50.000+00:00",
                "prod": true,
                "staging": false,
                "dev": null,
                "branch": "main",
                "commitHash": "363ae61431a481497v96c3c87b4ad751f68bfd19",
                "commitMessage": "Update main.yml"
          }
        ]
}     

Example integrations

Automate GitHub releasesAutomate GitLab releasesAutomate Bitbucket releases

Last updated

© 2024 UI Bakery