Examples
Query examplesLink copied!
Getting an Asset by the IDLink copied!
In the query below, we are querying for the createdDate
and label
of three specific assets using each of their ids.
This query gives us the following response:
Getting the Asset RepositoriesLink copied!
If you would like to access the asset repositories for the current user or API client, you would use the following query:
Getting the Asset FoldersLink copied!
To get the asset repositories and asset folders for the current user or api client, you would use the following query:
Getting the Media Hub IDLink copied!
If you would like to obtain the mediaHubId
that is needed for the createTransformationTemplate mutation
you would use the following query:
Getting the Organization idLink copied!
To get the organization id that is needed for the removeBackgroundFromImage
mutation you can use the following query:
Mutation examplesLink copied!
deleteAssetsLink copied!
The following mutation query example details how you would delete assets by ID:
updateAssetsLink copied!
The following mutation query example details how you would update assets by specific id:
updateAssetMetadataLink copied!
The following mutation query example details how you would update the metadata of your assets by a specific id, with the inclusion of what you would like the existing meta data to be replaced by:
createAsset - videoLink copied!
The following mutation query example details how you would create video assets. The src URL can be any valid video URL.
If you use the GraphQL Asset Management API to upload videos they will not be automatically transcoded. Instead, you must transcode video files manually. See Uploading video to Content Hub.
createAsset - imageLink copied!
The following mutation query example details how you would create image assets. The src URL can be any valid image URL.
Personal access token examplesLink copied!
Personal access tokens (PATs) can be used to authorize access to the GraphQL Asset Management API and Dynamic Content Management API. Access tokens are associated with users within an organization.
Creating an access tokenLink copied!
To create a PAT use the createPersonalAccessToken
mutation and send the organizationId and a name as input.
Listing your access tokensLink copied!
This query will list all tokens assigned to the user.
Deleting an access tokenLink copied!
Use thedeletePersonalAccessToken
mutation to delete a token. The token will be revoked and can no longer be used for authentication.