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:

  • rel: Specifies the name of the link.

    • Self refers to the object that was returned or requested. This parameter does not appear when you query a single profile.

    • First, Previous, Next, and Last refer to corresponding pages of pageable lists.

    • Specifies the application or service that determines the other names.

  • href: Specifies the URL that produces the result.

Content

  • createdDate: The creation date of the content.

  • lastUpdated: The date on which the content was last updated.

  • version: The version identifier of the content.

  • id: Specifies the unique identifier for the content. This is also used as a folder name to group similar content artifacts.

  • contentId: The human readable immutable user or provider supplied content ID.

  • name: Specifies the name of a given content type provided in localized message key form.

  • description: Specifies additional information describing the package.

  • contentTypeId: The unique identifier of the contentType.

  • mimeType: The mime type file identifier.

  • tenantId: The ID of the tenant associated with the package. Used to enforce ownership.

  • subtenantId: (Optional) The ID of the sub tenant or business group associated with the package.

  • dependencies: These represent the content unit dependencies in the form of content IDs.

Metadata

Specifies the following paging-related data:

  • Size: Specifies the maximum number of rows per page.

  • totalElement: Specifies the number of rows returned. This parameter is not output when you query for a single profile.

  • totalPages: Specifies the total number of pages of data available.

  • Number: Specifies the current page number.

  • Offset: Specifies the number of rows skipped.

  • Size: Specifies the maximum number of rows per page.

  • totalElement: Specifies the number of rows returned. This parameter is not output when you query for a single profile.

  • totalPages: Specifies the total number of pages of data available.

  • Number: Specifies the current page number.

  • Offset: Specifies the number of rows skipped.