I need to read asset objects with user attributes in a background job (think a long-running job triggered via the queue). I’m doing something like:
api.asApp().requestJira(route`/jsm/assets/workspace/${workspaceId}/v1/object/aql?startAt=0&maxResults=2&includeAttributes=true`, {...})
I noticed that all the user attributes are always returned as unknown user, like this:
{
"workspaceId": "deadbeef",
"globalId": "deadbeef:2686",
"id": "2686",
"objectTypeAttributeId": "2686",
"objectAttributeValues": [
{
"displayValue": "Unknown user",
"referencedType": false,
"user": {
"avatarUrl": "https://api.atlassian.com/jsm/assets/workspace/deadbeef/v1/avatar/unknown-avatar.png",
"displayName": "Unknown user",
"isDeleted": true
}
}
],
"objectId": "2884721"
}
My app has all the appropriate scopes to see the asset schema. It can run the queries and see all the other attributes.
It also doesn’t have any problems seeing the users in Jira itself. It’s just the assets.
Is this a known restriction on the assets API? Am I missing something? How can I get all this data in a background job in Forge?