List Packages in the Content Service Example
GET /api/packages lists the packages within the content service. Use this command to confirm the contents of a created package.
curl Command
The following command lists
the packages within the content service.
$curl --insecure -s -H"Content-Type: application/json" -H "Authorization: Bearer $token"https://$vRA/content-management-service/api/packages
JSON Output
The following output lists all
packages within the content service.
{ "links": [ ], "content": [ { "@type": "Package", "createdDate": "2015-08-04T22:22:53.490Z", "lastUpdated": "2015-08-04T22:22:53.490Z", "version": 0, "id": "54f627bb-2277-48af-9fa0-7d7366b498f3", "name": "Demo Package", "description": "Package for demo purposes", "contents": [ "9b348c29-88ff-4fa8-b93e-f80bc7c3e723" ], "tenantId": "qe", "subTenantId": null } ], "metadata": { "size": 20, "totalElements": 1, "totalPages": 1, "number": 1, "offset": 0 } }
Input
You must provide the appropriate request parameters to list packages within the content service.
Name | Description | Type |
---|---|---|
page | Page Number. Default is 1. | Query |
limit | Number of entries per page. Default is 20. | Query |
$orderby | Multiple comma-separated properties sorted in ascending or descending order. | Query |
$top | The number of returned entries from the top of the response (total number per page in relation to skip). | Query |
$skip | The number of entries to skip. | Query |
$filter | Boolean expression for whether a particular entry should be included in the response. | Query |
Output
The command output contains property names and values based on the command input parameters.
Parameter | Description |
---|---|
Links |
Specifies an array of link objects, each of which contains the following parts:
|
Content |
|
Metadata |
Specifies the
following paging-related data:
|