Examples
This is not comprehensive documention for the API, but is a list of useful examples to get you started.
For complete structure check out the full schema documentation.
Queries
channels
REQUEST
Copy
query {
channels {
nodes {
id
name
description
privacyLevel
imageUrls
objective
orgDiscoverable
analyticsEnabled
createdOn
archivedOn
planId
members {
userId
}
content {
id
}
}
}
}
RESPONSE
{
"data": {
"nodes": [
{
"id": "channel-id",
"name": "My Channel",
"description":, "Channel description goes here",
"privacyLevel": "private",
"imageUrls": [
"https://image.url.com/3223"
],
"objective": null,
"orgDiscoverable": false,
"analyticsEnabled": false,
"createdOn": "2020-02-20T23:23:26.481Z",
"archivedOn": "2020-02-20T23:23:26.481Z",
"planId": "my-plan",
"members": [
{
"userId": "31784e54-979f-4b14-813e-4e8f12f1390d"
}
],
"content": [
{
"id": "54824e54-979f-4b14-813e-4e8f12f1845c"
}
]
}, ...
]
}
}
skillIqs
REQUEST
Copy
query {
skillIqs {
nodes {
id
userId
planId
email
firstName
lastName
approximateLevel
assessmentId
measurementType
skillName
skillShortName
totalInteractions
createdOn
startedOn
completedOn
runNumber
isCurrentScore
}
}
}
RESPONSE
{
"data": {
"skillIqs": {
"nodes": [
{
"id": "e0a360ba-f146-4a90-8cca-e496b904bf7b",
"userId": "80a87ebe-68b0-4683-ba93-dfb3b2f78792",
"planId": "got-plan",
"email": "[email protected]",
"firstName": "Jon",
"lastName": "Snow",
"approximateLevel": "Proficient",
"measurementType": "full run",
"skillName": "C#",
"skillShortName": "C#",
"totalInteractions": 10,
"createdOn": "2020-01-09T17:27:40.605Z"
"startedOn": "2020-01-09T17:27:40.605Z"
"completedOn": "2020-01-09T17:27:40.605Z",
"runNumber": 1,
"isCurrentScore": true,
}, ...
]
}
}
}
roleIqCatalog
REQUEST
Copy
query {
roleIqCatalog {
nodes {
id
name
createdByUser
roleIcon
status
createdOn
updatedOn
}
}
}
RESPONSE
{
"data": {
"roleIqCatalog": {
"nodes": [
{
"id": "2db5e38e-19b6-40e0-b366-c4555467c945",
"name": "Python Data Scientist",
"createdByUser": "Grace Hopper",
"roleIcon": "https://s2.pluralsight.com/roleiq/imgs/badge_tableau_analyst.svg",
"status": "live",
"createdOn": "2018-11-13T04:41:36.351Z",
"updatedOn": "2018-11-13T04:46:49.929Z"
},...
]
}
}
}
courseProgress
REQUEST
Copy
query {
courseProgress {
nodes {
userId
courseId
courseIdNum
percentComplete
isCourseCompleted
completedOn
courseSeconds
totalWatchedSeconds
totalClipsWatched
firstViewedClipOn
lastViewedClipOn
planId
}
}
}
RESPONSE
{
"data": {
"courseProgress": {
"nodes": [
{
"userId": "4469333c-5e90-42Bc-9938-dbc4343e5d1",
"courseId": "042a30dd-be2f-4c11-b44d-49a44cd2a267",
"courseIdNum": 932040365,
"percentComplete": 0.604699,
"isCourseCompleted": false,
"completedOn": null,
"courseSeconds": 11576,
"totalWatchedSeconds": 70,
"totalClipsWatched": 1,
"firstViewedClipOn": "2018-02-15T23:51:45.620Z",
"lastViewedClipOn": "2018-02-15T23:51:45.620Z",
"planId": "got-plan"
},...
]
}
}
}
users
REQUEST
Copy
query {
users {
totalCount
nodes {
id
email
firstName
startedOn
}
}
}
RESPONSE
{
"data": {
"users": {
"nodes": [
{
"id": "faaa75f3-5555-47b5-b9cb-d409f338fcad",
"email": "[email protected]",
"firstName": "Obidiah Dogberry",
"startedOn": "2017-08-29T20:11:01.750Z"
}
]
}
}
}
Mutations
addChannel
REQUEST
Copy
mutation {
addChannel(input: {
createdByUserHandle: "dse84kfi-ace3-4c87-9608-2346957839c2"
description: "My New Channel"
planId: "got-plan"
privacyLevel: "private"
}) {
channel {
id
privacyLevel
archivedDate
description
imageUrls
objective
orgDiscoverable
analyticsEnabled
createdDate
content {
channelId
}
}
}
}
RESPONSE
{
"data": {
"addChannel": {
"channel": {
"id": "0175eeb5-a7ae-46a5-912d-24ba9b9be188",
"privacyLevel": "private",
"archivedDate": null,
"description": "My New Channel",
"imageUrls": [],
"objective": null,
"orgDiscoverable": false,
"analyticsEnabled": false,
"createdDate": "2019-06-18T22:52:29.805Z",
"content": []
}
}
}
}
addTeam
REQUEST
Copy
mutation {
addTeam(input: {
name: "My New Team"
description: "team description"
}) {
id
name
description
groupId
}
}
RESPONSE
{
"data": {
"addTeam": {
"id": "83852b29-3443-4061-81bb-a51c5bcde91e",
"name": "My New Team",
"description": "team description",
"groupId": null
}
}
}