Syntax for Getting Information for a Catalog Item
GET /api/consumer/entitledCatalogItemViews/{id} gets information about a specific catalog item.
REST API Catalog Service
The REST API supports OData filtering. For more information about supported OData filters, see the Important Notes About catalog-service and OData Queries section located on the Overview page of the Catalog Service API.
Input
Use the supported input parameters to control the command output.
Parameter | Description |
---|---|
URL | https://$vRA/catalog-service/api/consumer/entitledCatalogItemViews/{id} |
$vRA |
Specifies the appliance name and fully qualified domain name, or IP address of the vRealize Automation 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:
|
$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:
|
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. |
curl Command to Get Information for a Catalog Item
$filter=name+eq+%27$catalogItemName%27
.
curl --insecure -H "Content-Type: application/json" -H "Authorization: Bearer $token” https://$vRA/catalog-service/api/consumer/entitledCatalogItemViews?$filter=name+eq+%27$catalogItemName%27
The following JSON output is returned based on the command input.
{ "links": [], "content": [ { "@type": "ConsumerEntitledCatalogItemView", "links": [ { "@type": "link", "rel": "GET: Request Template", "href": "https://$vRA/catalog-service/api/consumer/entitledCatalogItems/7c8275d6-1bd6-452a-97c4-d6c053e4baa4/requests/template" }, { "@type": "link", "rel": "POST: Submit Request", "href": "https://$vRA/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 } }