Skip to main content

CreateCertificateFromUpload

Creates a certificate from the uploaded image. The results of this mutation can be affected by providing an authToken header to set a user for the operation.

CreateCertificateFromUpload(
asset: URL!
certificateUploadFields: [CertificateUploadField!]
): Certificate!

Directives

authAccess

This requires the current user to be in STUDENT role.

Arguments

CreateCertificateFromUpload.asset ● URL! non-null scalar

CreateCertificateFromUpload.certificateUploadFields ● [CertificateUploadField!] list input

Type

Certificate object

Examples

Run in Postman

Query:

CreateCertificateFromUpload(
$asset: URL!,
$certificateUploadFields: [CertificateUploadField!]
) {
CreateCertificateFromUpload(
asset: $asset,
certificateUploadFields: $certificateUploadFields
) {
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:

{
"asset": "URL",
"certificateUploadFields": [
"CertificateUploadField"
]
}

Response:

{
"data": {
"CreateCertificateFromUpload": {
"id": "58ccb96c-8e90-4464-86e0-f284442981df",
"certificateTemplate": "CertificateTemplate",
"user": "User",
"issuedAt": "2023-12-20T16:58:58.782Z",
"url": "AbsoluteOrRelativeURL",
"pdfAsset": "AbsoluteOrRelativeURL",
"resource": "Course",
"resourceType": "course",
"resourceTypeLabel": "abc123",
"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": false,
"source": "abc123",
"contentItem": "Content",
"isExternal": true,
"externalResourceTitle": "xyz789",
"identifier": "xyz789"
}
}
}