Skip to main content

Query feed resources

Important

The GraphQL Search API for feed queries is currently in Early Availability status for customers on the AWS-US cluster. For more information, see GraphQL API policy.

Use the feedResources query to retrieve a list of the resources that have been most recently updated, and their associated attributes. Each user can retrieve only those feed resources they are authorized to view. The results are sorted in order of those most recently updated.

To manage queries that return multiple results, you can use pagination arguments to specify the number of items to be returned. See Pagination for more information.

To make this call, you must supply a user ID and account (company) ID. If you do not have these uuid values, you can retrieve them by using either REST APIs or GraphAPIs, as set out in the table below:

APIs to retrieve uuid values:

Required request parameterREST endpoint
for retrieval
GraphQL API
userId—the user's UUIDList all usersusers
accountId—the account's (company's) UUIDRead user membershipsUser.currentMembership

You can apply filters within the query to select results based on attributes of the resources, as shown in the Variables example below.

Query

query feedResources($first: Int, $after: String, $last: Int, $before: String, $filter: FeedResourcesFilter) {
accountMembership(userId: userId, accountId: accountId) {
feedResources(
first: $first after: $after last: $last before: $before filter: $filter
) {
nodes {
contentType
contents {
mimeType
previewUrl
thumbnailUrl
title
url
}
createdOn
description
fields {
display
label
name
value
}
htmlUrl
imageUrl
key {
instance
resourceId
source
}
lastUpdated
title
}
totalCount
pageInfo {
endCursor
hasNextPage
hasPreviousPage
startCursor
}
}
}
}

Variables

{
"first": 2,
"after": "b2Zmc2V0PTE=",
"filter": {
"sources": "mycompany",
"contentTypes": "contacts",
"searchTermsCombined": ["John"]
}
}

Response

{
"data": {
"accountMembership": {
"feedResources": {
"nodes": [
{
"contentType": "contact",
"contents": null,
"createdOn": 1628286199000,
"description": "Fred Jones from MyCompany",
"htmlUrl": "https://myserver.mycompany.com/profile#75c15582-4ab1-42bf-be19-04fb39c533dd",
"imageUrl": null,
"key": {
"instance": "www-MYCOMPANY@c6280b7c-b13a-442e-b70c-e15b8bc5c5ed",
"resourceId": "75c15582-4ab1-42bf-be19-04fb39c533dd@c6280b7c-b13a-442e-b70c-e15b8bc5c5ed",
"source": "mycompany"
},
"lastUpdated": 1628286199000,
"title": "Fred Jones"
},
{
...second node...
}
],
"totalCount": 55,
"pageInfo": {
"endCursor": "b2Zmc2V0PTM=",
"hasNextPage": true,
"hasPreviousPage": true,
"startCursor": "b2Zmc2V0PTI="
}
}
}
}
}

Was this page helpful?