Application methods

GET /api/1/organizations/(orgId)/applications

Returns list of all applications in given organization.

Parameters:
  • orgId (uuid) – ID of the organization
Status Codes:

Response body:

[
  {
    "id" : "50dd88bee4b082b7a96d072e",
    "name" : "Corporate site"
  },
  ...
]

See also: How to find a particular application ID?

GET /api/1/applications/(appId)/revisions

Returns list of all named revisions for given application.

Parameters:
  • appId (uuid) – ID of the application
Status Codes:

Response body:

[
  {
    "id" : "50dd88bee4b082b7a96d072e",
    "name" : "1.0-stable",
  },
  ...
]
POST /api/1/organizations/(orgId)/applications

Creates a new application in the specified organization with the specified application name and the default no-op manifest.

Parameters:
  • orgId (uuid) – ID of the organization
Status Codes:

Request body:

{
  "name": (application-name)
}
  • name (string): name of the new application.

Response body:

{
  "id": (application-id)
}
  • id (uuid): ID of the created application.
PUT /api/1/applications/(appId)/manifest

Replaces a current application manifest with a new one but only if the former was uploaded from the form. Currently replacing manifests defined via HTTP URL is not supported.

Parameters:
  • appId (uuid) – ID of the application
Status Codes:
  • 200 OK – success
  • 400 Bad Request – incorrect content type or manifest is incorrect
  • 401 Unauthorized – the specified credentials are not valid or manifest had been loaded form an external source
  • 403 Forbidden – user is not authorized to access the application
  • 404 Not Found – specified application doesn’t exist

Request body: the new manifest. Must be application/x-yaml.

Response body:

{"version": (manifest-version)}
  • version (int): new application manifest version associated with the uploaded manifest.
POST /api/1/applications/(appId)/launch

Launches the specified application.

Parameters:
  • appId (uuid) – ID of the application
Status Codes:
  • 200 OK – success
  • 400 Bad Request – incorrect content type or json body is incorrect or requested version of the manifest is invalid
  • 401 Unauthorized – the specified credentials are not valid
  • 403 Forbidden – user is not authorized to launch the application (CreateInstance) or one of submodules in the application.
  • 404 Not Found – specified application doesn’t exist

Request body:

{
  "revisionId:" (revision-id),
  "version": (manifest-version),
  "environmentId": (environment-id),
  "destroyInterval": (destroy-interval),
  "instanceName": (instance-name),
  "parameters": (instance-parameters),
  "submodules": {
    (submodule-id): {
      "revisionId": (revision-id),
      "manifestVersion": (manifest-version),
      "parameters": {
        ...
      },
      "submodules": {
        ... // This section is recursive.
      }
    },
    ...
  }
}

request body (obsolete):

{
  "version": (manifest-version),
  "environmentId": (environment-id),
  "destroyInterval": (destroy-interval),
  "instanceName": (instance-name),
  (parameters) // Obsolete syntax.
}
  • revisionId (optional string): revision ID to be used for launch.

  • version (optional int): application manifest version to launch, if not specified, the most recent version is used.

    Note

    If both the revisionId and version options are specified in the request, then version will override the application manifest defined for the revision, although all other revision parameters and submodules’ manifest versions will be applied as usual.

  • environmentId (optional string): ID of the environment to use.

  • destroyInterval (optional long): timeout before the instance is destroyed in ms, 60*60,000 (1 hour) if not specified, never if -1.

  • instanceName (optional string): name of the new instance, will be generated if not specified.

  • parameters (optional): name/value pairs of the application input parameters.

    For a component application the parameter names should consist of the application interface and pin names, separated by dots. E.g., for the input interface defined as the following:

    application:
      interfaces:
        input:
          app-fork: ...
          app-branch: ...
    

    the corresponding parameters section in the request should look like:

    "parameters": {
      "input.app-fork": "qubell",
      "input.app-branch": "HEAD"
    }
    

    Warning

    The use of parameters intermixed with other settings is obsolete and support for such the way of passing parameters can be removed in future API versions.

  • submodules (optional): configuration and parameters for the application submodules.

    Here submodule-id stands for a particular submodule ID as it is defined in the application manifest. E.g., if there’s the db submodule defined in the manifest as the following:

    components:
      db:
        type: reference.Submodule
        ...
    

    then the submodules section for this submodule in the launch request should look like:

    "submodules": {
      "db": {
        // Submodule configuration and parameters
      }
    }
    

    Within this section the following options are available:

    • revisionId (optional string): revision ID of the submodule to launch.

    • manifestVersion (optional int): manifest version of the submodule to launch.

      Note

      This option’s name differs from the corresponding option for the root application, which is simply version, although they both means the same.

    • parameters (optional): name/value pairs of the submodule input parameters.

      As for component applications, parameter names here should consist of the submodule interface and pin names, separated by dots.

      Note

      It is not allowed to specify a submodule parameter directly, if it is mapped to some interface pin in the outer submodule. Specify the mapped parameter in the outer submodule instead.

    • submodules (optional): configuration and parameters for inner submodules.

      This section is similar to the root application’s submodules section.

Response body:

{
  "id": (instance-id)
}
  • id: id of the launched instance

See also: How to launch a particular application?