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-idheader - Sorting: By
packageLabelascending
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 identifierpackageVersionId(string): The installed package version identifierpackageName(string): The human-readable package namepackageLabel(string): The label used to display the packagepackageShortDescription(string): The short package descriptionversionNumber(string): The installed version numberlatestVersionNumber(string): The latest version available on the marketplace (only includes versions marked asavailableOnMarketplace: 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 environment400 Bad Request: Missingenvironment-idheader