Addon Provider API
  • Addon provisioning
  • Plan modification
  • Addon deprovisioning
RESOURCES
  • App Addon API
    • Authentication
    • Get applications which are using the addon
    • Get a precise application which has provisioned the addon
    • Update app configuration
  • Addon definition manifest
LINKS
  • Database API
  • One-click Deployment API
  • API V1
  • scalingo.json Schema
  • Main site
  • Dashboard

App Addon API

This API is available for addon providers to get information about the apps which have provisioned their addon.

All the rules which apply to the global API are also existing for these endpoints, except the authentication.

Authentication

To authenticate your request, you need to use HTTP basic auth with the user and password defined in your addon manifest.

Example: https://user:password@$SCALINGO_API_URL/v1/provider/apps

Get applications which are using the addon

GET https://$SCALINGO_API_URL/v1/provider/apps

This endpoint supports pagination.

Example request:

curl -H "Accept: application/json" -H "Content-Type: application/json" -u $USER:$PASSWORD \
  -X GET https://$SCALINGO_API_URL/v1/provider/apps
{
  "apps": [
    {
      "addon_provider_id": "1234567890abcdef",
      "app_id": "app-id-1",
      "plan": "test"
    }, {
      "addon_provider_id": "1234567890abcdef",
      "app_id": "app456@heroku.com",
      "plan": "premium" }
  ]
}

Get a precise application which has provisioned the addon

GET https://$SCALINGO_API_URL/v1/provider/apps/[:id]

Example request:

curl -H "Accept: application/json" -H "Content-Type: application/json" -u $USER:$PASSWORD \
  -X GET https://$SCALINGO_API_URL/v1/provider/apps/app-id-1
{
  "app": {
    "addon_provider_id": "1234567890abcdef",
    "id": "app-id-2",
    "name": "example-app",
    "owner_email": "user@example.com",
    "plan": "premium",
    "config": {"VARIABLE_NAME": "VALUE"}
  }
}

Update app configuration

PATCH https://$SCALINGO_API_URL/v1/provider/apps/[:id]

Parameters:

  • config: object - hash of the variables to modify

You can only update the variables defined in your manifest obviously, the application will be restarted after the modification.

Example request:

curl -H "Accept: application/json" -H "Content-Type: application/json" -u $USER:$PASSWORD \
  -X PATCH https://$SCALINGO_API_URL/v1/provider/apps/app-id-1 -d \
  '{
    "config": {
      "VARIABLE_NAME": "NEW_VALUE"
    }
  }'

Returns 200 OK

{
  "app": {
    "addon_provider_id": "1234567890abcdef",
    "id": "app-id-1",
    "name": "example-app",
    "owner_email": "user@example.com",
    "plan": "premium",
    "config": {"VARIABLE_NAME": "NEW_VALUE"}
  }
}