GraphQL API
List SaaS Applications
Retrieve applications from your Viio workspace with pagination and portfolio details.
Last updated
Use the applications query to build an application inventory, populate a dashboard, or synchronize Viio portfolio data with another system.
Request
query ListApplications($first: Int!, $after: String) {
applications(first: $first, after: $after) {
nodes {
id
state
portfolioType
lastUsed
application {
id
name
vendorName
category {
name
}
}
owner {
id
name
}
userCountStat {
all
last30Days
}
}
pageInfo {
hasNextPage
endCursor
}
totalCount
}
}
Send the first request with these variables:
{
"first": 50,
"after": null
}
Paginate through the result
When pageInfo.hasNextPage is true, send the same query again with pageInfo.endCursor as after. Continue until hasNextPage is false.
Use a stable page size and process each page before requesting the next one. This bounds memory usage when a workspace contains many applications.
Filter the inventory
The optional where argument accepts an ApplicationDiscoveryFilterInput. For example, request sanctioned applications only:
query ListSanctionedApplications {
applications(first: 50, where: { state: { eq: SANCTIONED } }) {
nodes {
id
state
application {
name
vendorName
}
}
}
}