UserCertificates
Returns certificates that the user has earned or been granted. The results of this query can be affected by providing an authToken header to set a user for the operation.
UserCertificates(
query: String
includeExpiredCertificates: Boolean
): [Certificate]
Directives
authAccess
This requires the current user to be in
STUDENT
role.
Arguments
UserCertificates.query
● String
scalar
UserCertificates.includeExpiredCertificates
● Boolean
scalar
Type
Certificate
object
Examples
Query:
UserCertificates(
$query: String,
$includeExpiredCertificates: Boolean
) {
UserCertificates(
query: $query,
includeExpiredCertificates: $includeExpiredCertificates
) {
id
certificateTemplate {
...CertificateTemplateFragment
}
user {
...UserFragment
}
issuedAt
url
pdfAsset
resource {
... on Course {
...CourseFragment
}
... on LearningPath {
...LearningPathFragment
}
}
resourceType
resourceTypeLabel
resourceId
progressWasReset
expirationDate
didExpire
deleted
recertificationDate
isExpired
source
contentItem {
...ContentFragment
}
isExternal
externalResourceTitle
identifier
}
}
Variables:
{
"query": "xyz789",
"includeExpiredCertificates": false
}
Response:
{
"data": {
"UserCertificates": [
{
"id": "58ccb96c-8e90-4464-86e0-f284442981df",
"certificateTemplate": "CertificateTemplate",
"user": "User",
"issuedAt": "2024-06-20T16:58:58.782Z",
"url": "AbsoluteOrRelativeURL",
"pdfAsset": "AbsoluteOrRelativeURL",
"resource": "Course",
"resourceType": "course",
"resourceTypeLabel": "xyz789",
"resourceId": "58ccb96c-8e90-4464-86e0-f284442981df",
"progressWasReset": true,
"expirationDate": "2024-06-20T16:58:58.782Z",
"didExpire": true,
"deleted": false,
"recertificationDate": "2024-06-20T16:58:58.782Z",
"isExpired": true,
"source": "abc123",
"contentItem": "Content",
"isExternal": true,
"externalResourceTitle": "abc123",
"identifier": "abc123"
}
]
}
}