Skip to content

Package Installations API

This document describes the REST endpoint that returns the packages installed in the current environment, along with information about available marketplace updates.

Core Resource Path

api/v2/packages/installations

  • Method: GET
  • Authorization: Admin only
  • Environment scope: Derived from the environment-id header
  • Sorting: By packageLabel ascending

Required Headers

-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "environment-id: ENV_ID"

or in JavaScript:

const headers = {
  Accept: 'application/json',
  Authorization: `Bearer ${authToken.accessToken}`,
  'environment-id': serverDocument._environmentId,
};

Response Shape

Each item in the response represents an installed package version in the environment.

  • packageId (string): The package identifier
  • packageVersionId (string): The installed package version identifier
  • packageName (string): The human-readable package name
  • packageLabel (string): The label used to display the package
  • packageShortDescription (string): The short package description
  • versionNumber (string): The installed version number
  • latestVersionNumber (string): The latest version available on the marketplace (only includes versions marked as availableOnMarketplace: true)

Example Request (curl)

curl -X GET "[Main API Domain]/api/v2/packages/installations" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "environment-id: ENV_ID"

Example Request (JavaScript)

const endpoint = 'api/v2/packages/installations';
const method = 'GET';
const headers = {
  Accept: 'application/json',
  Authorization: `Bearer ${authToken.accessToken}`,
  'environment-id': serverDocument._environmentId,
};
const body = null;

const result = REST.call(endpoint, method, headers, body);
console.log(result);

Example Response (200 OK)

{
  "status": "ok",
  "data": [
    {
      "packageId": "package_A",
      "packageVersionId": "package_A_version_A",
      "packageName": "Package-sample-A",
      "packageLabel": "Package-sample-A",
      "packageShortDescription": "Short description",
      "versionNumber": "1.0.0",
      "latestVersionNumber": "1.0.2"
    }
  ]
}

Errors

  • 401 Unauthorized: Missing or invalid token, or user is not an administrator in the selected environment
  • 400 Bad Request: Missing environment-id header