You can use the REST API catalog service to get information about a specific catalog item if desired.

REST API Catalog Service

The REST API supports OData filtering. For more information about supported OData filters, refer to the vRealize Automation API Reference, particularly the REST API Tips page located at https://$host/component-registry/services/docs/odata.html.

For specific information about catalog service filters, see the "Important Notes About catalog-service and OData Queries" topic located at https://$host/catalog-service/api/docs/index.html.

Input

Use the supported input parameters to control the command output.

Parameter

Description

URL

https://$host/catalog-service/api/consumer/catalogItems

$host

Specifies the host name and fully qualified domain name or IP address of the vRealize Automation identity server.

$token

Specifies a valid HTTP bearer token with necessary credentials.

page number

The page number. Default is 1.

limit

The number of entries per page. The default is 20.

$orderby

Multiple comma-separated properties sorted in ascending or descending order. Valid OData properties include the following:

  • name - filter based on catalog item name.

  • status - filter based on catalog item status.

  • service/id - filter based on catalog item service id.

  • service/name - filter based on catalog item service name.

  • organization/subTenant/id - filter based on catalog item business group ID, which you can find in the catalogItem payload under organization > subtenantRef

  • organization/subTenant/name - filter based on catalog item business group name, which you can find in catalogItem payload under organization >subtenantLabel

  • outputResourceType/id - filter based on catalog item output resource type ID, for example : Infrastructure.Virtual

  • outputResourceType/name - Filter based on catalog item output resource type name, for example: "VirtualMavhine".

  • catalogItemType/id - filter based on catalog item type ID, for example: "Infrastructure.Virtual".

  • catalogItemType/name - filter based on catalog item type name, for example: "VirtualMachine".

  • icon/id - filter based on catalog item icon ID.

$top

Sets the number of returned entries from the top of the response

$skip

Sets the number of entries to skip.

$filter

Boolean expression for whether a particular entry should be included in the response. Valid OData properties include the following:

  • name - filter based on catalog item name.

  • status - filter based on catalog item status.

  • service/id - filter based on catalog item service id.

  • service/name - filter based on catalog item service name.

  • organization/subTenant/id - filter based on catalog item business group ID, which you can find in the catalogItem payload under organization > subtenantRef

  • organization/subTenant/name - filter based on catalog item business group name, which you can find in catalogItem payload under organization >subtenantLabel

  • outputResourceType/id - filter based on catalog item output resource type ID, for example : Infrastructure.Virtual

  • outputResourceType/name - Filter based on catalog item output resource type name, for example: "VirtualMavhine".

  • catalogItemType/id - filter based on catalog item type ID, for example: "Infrastructure.Virtual".

  • catalogItemType/name - filter based on catalog item type name, for example: "VirtualMachine".

  • icon/id - filter based on catalog item icon ID.

serviceId

(Optional) Query parameter to filter the returned catalog items by one specific service.

onBehalfOf

(Optional) Query parameter that provides the value of the user ID when making a request on behalf of another user.

Output

The command output contains property names and values based on the command input parameters.

Property

Description

outputResourceTypeRef

Specifies the type of the resource that results from requesting the catalog item.

catalogItemId

Specifies the catalog item identifier.

name

Specifies the user friendly name of the catalog item. Specifies the property type is string.

description

Specifies a short description of the catalog item. Specifies the property type is string.

catalogItemTypeRef

Specifies the type of the catalog item.

serviceRef

Specifies the catalog service that contains the catalog item.

iconId

Specifies the associated icon representing this item.

isNoteworthy

Specifies if the catalog item should be highlighted to users for a period of time.

dateCreated

Specifies the date that this item was created in the catalog.

lastUpdatedDate

Specifies the date that this item was last updated in the catalog.

entitledOrganizations

The list of organizations in which the current user can consume the catalog item.

Example Curl Command

The following example command retrieves information about all the available shared catalog items of the type ConsumerEntitledCatalogItemView.

curl --insecure -H "Content-Type: application/json" 
-H "Authorization: Bearer $token”  https://$host/catalog-service/api/consumer/entitledCatalogItemViews

JSON Output

The following JSON output is returned based on the command input.

{
    "links": [],
    "content": [
        {
            "@type": "ConsumerEntitledCatalogItemView",
            "links": [
                {
                    "@type": "link",
                    "rel": "GET: Request Template",
                    "href": "https://$host/catalog-service/api/consumer/entitledCatalogItems/7c8275d6-1bd6-452a-97c4-d6c053e4baa4/requests/template"
                },
                {
                    "@type": "link",
                    "rel": "POST: Submit Request",
                    "href": "https://$host/catalog-service/api/consumer/entitledCatalogItems/7c8275d6-1bd6-452a-97c4-d6c053e4baa4/requests"
                }
            ],
            "entitledOrganizations": [
                {
                    "tenantRef": "mycompany",
                    "tenantLabel": "mycompany",
                    "subtenantRef": "c0683388-6db2-4cb5-9033-b24d15ad3766",
                    "subtenantLabel": "Demo Group"
                }
            ],
            "catalogItemId": "7c8275d6-1bd6-452a-97c4-d6c053e4baa4",
            "name": "Linux",
            "description": "Linux blueprint for API demo",
            "isNoteworthy": false,
            "dateCreated": "2015-07-29T03:54:28.141Z",
            "lastUpdatedDate": "2015-07-29T12:46:56.405Z",
            "iconId": "cafe_default_icon_genericCatalogItem",
            "catalogItemTypeRef": {
                "id": "com.vmware.csp.component.cafe.composition.blueprint",
                "label": "Composite Blueprint"
            },
            "serviceRef": {
                "id": "057d4095-95f1-47da-b14b-641ac9010c97",
                "label": "Infrastructure Services"
            },
            "outputResourceTypeRef": {
                "id": "composition.resource.type.deployment",
                "label": "Deployment"
            }
        }
    ],
    "metadata": {
        "size": 20,
        "totalElements": 1,
        "totalPages": 1,
        "number": 1,
        "offset": 0
    }
}