API

App

An app hosted by Composal: list, create, read, change, activate, archive or delete one.

Operations

Every route this entity exposes. Each route links to its own reference on this page.

Method Route SDK operation Returns
POST /api/v1/hosting/apps/{id}/activate create Success
POST /api/v1/hosting/apps/{id}/archive create Success
POST /api/v1/hosting/apps create Hosted app created
GET /api/v1/hosting/apps list Hosted apps visible to the current user
GET /api/v1/hosting/apps/{id} load Success
GET /api/v1/hosting/apps/{app_id}/catalog load Hosted app configuration catalog
PATCH /api/v1/hosting/apps/{id} patch Hosted app updated
DELETE /api/v1/hosting/apps/{id} remove Success
PUT /api/v1/hosting/apps/{id} update Hosted app updated

Examples

One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.

Golang

Construct client as shown in the Golang setup, then call the operations:

apps, err := client.App(nil).List(nil, nil)
if err != nil {
    panic(err)
}
fmt.Println(apps)
app, err := client.App(nil).Load(map[string]any{"id": "example_id"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(app)
created, err := client.App(nil).Create(map[string]any{"name": "example", "organization_id": "example", "repository_id": "example", "root_path": "example", "slug": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(created)
updated, err := client.App(nil).Update(map[string]any{"id": "example_id", "description": "example", "framework": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(updated)
patched, err := client.App(nil).Patch(map[string]any{"id": "example_id", "description": "example", "framework": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(patched)
removed, err := client.App(nil).Remove(map[string]any{"id": "example_id"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(removed)

Lua

Construct client as shown in the Lua setup, then call the operations:

local apps, err = client:App():list()
local app, err = client:App():load({ id = "example_id" })
local created, err = client:App():create({ name = "example", organization_id = "example", repository_id = "example", root_path = "example", slug = "example" })
local updated, err = client:App():update({ id = "example_id", description = "example", framework = "example" })
local patched, err = client:App():patch({ id = "example_id", description = "example", framework = "example" })
local removed, err = client:App():remove({ id = "example_id" })

PHP

Construct client as shown in the PHP setup, then call the operations:

$apps = $client->App()->list();
$app = $client->App()->load(["id" => "example_id"]);
$created = $client->App()->create(["name" => "example", "organization_id" => "example", "repository_id" => "example", "root_path" => "example", "slug" => "example"]);
$updated = $client->App()->update(["id" => "example_id", "description" => "example", "framework" => "example"]);
$patched = $client->App()->patch(["id" => "example_id", "description" => "example", "framework" => "example"]);
$client->App()->remove(["id" => "example_id"]);

Python

Construct client as shown in the Python setup, then call the operations:

apps = client.App().list()
app = client.App().load({"id": "example_id"})
created = client.App().create({ "name": "example", "organization_id": "example", "repository_id": "example", "root_path": "example", "slug": "example" })
updated = client.App().update({"id": "example_id", "description": "example", "framework": "example"})
patched = client.App().patch({"id": "example_id", "description": "example", "framework": "example"})
client.App().remove({"id": "example_id"})

Ruby

Construct client as shown in the Ruby setup, then call the operations:

apps = client.App.list()
app = client.App.load({ "id" => "example_id" })
created = client.App.create({ "name" => "example", "organization_id" => "example", "repository_id" => "example", "root_path" => "example", "slug" => "example" })
updated = client.App.update({ "id" => "example_id", "description" => "example", "framework" => "example" })
patched = client.App.patch({ "id" => "example_id", "description" => "example", "framework" => "example" })
client.App.remove({ "id" => "example_id" })

TypeScript

Construct client as shown in the TypeScript setup, then call the operations:

const apps = await client.App().list()
const app = await client.App().load({ id: "example_id" })
const created = await client.App().create({ name: "example", organization_id: "example", repository_id: "example", root_path: "example", slug: "example" })
const updated = await client.App().update({ id: "example_id", description: "example", framework: "example" })
const patched = await client.App().patch({ id: "example_id", description: "example", framework: "example" })
await client.App().remove({ id: "example_id" })

Fields

Field Type Required Description
created_at string Yes Created At
created_at_label one,string,null Yes Created At Label
description one,string,null Yes Description
framework one,string,null Yes Framework
id string Yes Id
name string Yes Name
organization_id string Yes Organization Id
repository_id string Yes Repository Id
repository_kind one,string,null Yes Repository Kind
root_path string Yes Root Path
root_path_display string Yes Root Path Display
slug string Yes Slug
status string Yes Status
updated_at string Yes Updated At
updated_at_label one,string,null Yes Updated At Label

create

POST /api/v1/hosting/apps/{id}/activate

Operation ID: activate_api_v1_app.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
id path string Yes

Request body

application/json

The request body is object.

Responses

200: Success

application/json

The response is object.

401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

POST /api/v1/hosting/apps/{id}/archive

Operation ID: archive_api_v1_app.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
id path string Yes

Request body

application/json

The request body is object.

Responses

200: Success

application/json

The response is object.

401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

POST /api/v1/hosting/apps

Operation ID: post_api_v1_hosting_apps.

Authentication: bearer token (bearerAuth).

Request body

application/json

Property Type Required Description
description string No
framework string No
name string Yes
organization_id string Yes
repository_id string Yes
root_path string Yes
slug string Yes
status enum: draft, active, archived No

Responses

200: Hosted app created

application/json

Property Type Required Description
app object Yes
app.created_at string (date-time) Yes
app.created_at_label string Yes
app.description string Yes
app.framework string Yes
app.id string Yes
app.name string Yes
app.organization_id string Yes
app.repository_id string Yes
app.repository_kind string Yes
app.root_path string Yes
app.root_path_display string Yes
app.slug string Yes
app.status enum: draft, active, archived Yes
app.updated_at string (date-time) Yes
app.updated_at_label string Yes
201: Hosted app created

application/json

Property Type Required Description
app object Yes
app.created_at string (date-time) Yes
app.created_at_label string Yes
app.description string Yes
app.framework string Yes
app.id string Yes
app.name string Yes
app.organization_id string Yes
app.repository_id string Yes
app.repository_kind string Yes
app.root_path string Yes
app.root_path_display string Yes
app.slug string Yes
app.status enum: draft, active, archived Yes
app.updated_at string (date-time) Yes
app.updated_at_label string Yes
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

list

GET /api/v1/hosting/apps

Operation ID: api_v1_apps.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
organization_id query string No

Responses

200: Hosted apps visible to the current user

application/json

Property Type Required Description
apps array of object Yes
apps[].created_at string (date-time) Yes
apps[].created_at_label string Yes
apps[].description string Yes
apps[].framework string Yes
apps[].id string Yes
apps[].name string Yes
apps[].organization_id string Yes
apps[].repository_id string Yes
apps[].repository_kind string Yes
apps[].root_path string Yes
apps[].root_path_display string Yes
apps[].slug string Yes
apps[].status enum: draft, active, archived Yes
apps[].updated_at string (date-time) Yes
apps[].updated_at_label string Yes
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

load

GET /api/v1/hosting/apps/{id}

Operation ID: api_v1_app.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
id path string Yes

Responses

200: Success

application/json

The response is object.

401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

GET /api/v1/hosting/apps/{app_id}/catalog

Operation ID: api_v1_app_catalog.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
app_id path string Yes

Responses

200: Hosted app configuration catalog

application/json

Property Type Required Description
app object and object Yes
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

patch

PATCH /api/v1/hosting/apps/{id}

Operation ID: patch_api_v1_hosting_apps_id_.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
id path string Yes

Request body

application/json

Property Type Required Description
description string No
framework string No
name string No
organization_id string No
repository_id string No
root_path string No
slug string No
status enum: draft, active, archived No

Responses

200: Hosted app updated

application/json

Property Type Required Description
app object Yes
app.created_at string (date-time) Yes
app.created_at_label string Yes
app.description string Yes
app.framework string Yes
app.id string Yes
app.name string Yes
app.organization_id string Yes
app.repository_id string Yes
app.repository_kind string Yes
app.root_path string Yes
app.root_path_display string Yes
app.slug string Yes
app.status enum: draft, active, archived Yes
app.updated_at string (date-time) Yes
app.updated_at_label string Yes
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

remove

DELETE /api/v1/hosting/apps/{id}

Operation ID: delete_api_v1_hosting_apps_id_.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
id path string Yes

Responses

200: Success

application/json

The response is object.

401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

update

PUT /api/v1/hosting/apps/{id}

Operation ID: put_api_v1_hosting_apps_id_.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
id path string Yes

Request body

application/json

Property Type Required Description
description string No
framework string No
name string No
organization_id string No
repository_id string No
root_path string No
slug string No
status enum: draft, active, archived No

Responses

200: Hosted app updated

application/json

Property Type Required Description
app object Yes
app.created_at string (date-time) Yes
app.created_at_label string Yes
app.description string Yes
app.framework string Yes
app.id string Yes
app.name string Yes
app.organization_id string Yes
app.repository_id string Yes
app.repository_kind string Yes
app.root_path string Yes
app.root_path_display string Yes
app.slug string Yes
app.status enum: draft, active, archived Yes
app.updated_at string (date-time) Yes
app.updated_at_label string Yes
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway