I can't figure out how to get the API call for entitledCatalogItems to return more then 20 items
(powershell)
$vRAURI = "https://vcac"
$login=""|Select username, password, tenant
$login.username = "login"
$login.password = "passwd"
$login.tenant = "tenant"
#auth
if(!$ApiToken) { $ApiToken = Invoke-RestMethod -Method Post -uri "$($vRAURI)/identity/api/tokens" -Body (ConvertTo-Json $login) -ContentType "application/json"}
#List Shared and Private Catalog Items
$entitledCatalogItems = Invoke-RestMethod -Method Get -uri "$($vRAURI)/catalog-service/api/consumer/entitledCatalogItems" -Headers @{"Authorization"="Bearer $($ApiToken.id)"} -ContentType "application/json"
$entitledCatalogItems.metadata
size : 20
totalElements : 22
totalPages : 2
number : 1
offset : 0
From the API doc from the URL above, it's not showing any parameters to pass to query the next page
Input | |
---|---|
https://$host/catalog-service/api/consumer/catalogItems | |
Specifies the host name and fully qualified domain name or IP address of the vRealize Automation identity server. | |
Specifies a valid HTTP bearer token with necessary credentials. |
nevermind I found my answer in the downloadable zip for the API programming
add ?limit=xxxx to uri
$entitledCatalogItems = Invoke-RestMethod -Method Get -uri "$($vRAURI)/catalog-service/api/consumer/entitledCatalogItems?limit=9999" -Headers @{"Authorization"="Bearer $($ApiToken.id)"} -ContentType "application/json"
$entitledCatalogItems.content.count
22
Per API doc in zip file
name | description | type | default |
---|---|---|---|
page | Page Number | query | 1 |
limit | Number of entries per page | query | 20 |
$orderby | Multiple comma-separated properties sorted in ascending or descending order | query | |
$top | Sets the number of returned entries from the top of the response (total number per page in relation to skip) | query | |
$skip | Sets how many entries you would like to skip | query | |
$filter | Boolean expression for whether a particular entry should be included in the response | query |