For Developers
Create Activity
This is a proposed endpoint and is not yet available in production.
Creating an activity follows a slightly different pattern than other API endpoints when creating an activity that can be created in multiple secondary systems. Because of that, the activity endpoint will not return an activity model. Instead, it will return a list of associated jobs that are used to track the creation of the activity in the secondary systems.
POST https://ed.link/api/v2/graph/activities
Create a new activity Activities. It is suggested that you send an array of activities in the request body instead of making multiple requests with singular activities. Activities can only be created (and, in some instances, voided).
Sample Request
axios.post('https://ed.link/api/v2/graph/activities', {
headers: {
authorization: `Bearer ${integration_access_token}`
},
data: [
{
action: 'scored',
actor: {
type: 'person',
id: '00000000-0000-0000-0000-000000000000'
},
target: {
type: 'submission',
id: '00000000-0000-0000-0000-000000000000'
},
context: {
type: 'assignment',
id: '00000000-0000-0000-0000-000000000000'
},
result: {
type: 'score',
grade: 100,
comment: 'Nice job!'
}
}
]
});
Sample Response
The response contains a list of associated job ids.
{
"$request": "63740d90-463d-4be2-b5c4-577b34409c79",
"$jobs": [
"58760951-1d5d-43be-ae77-369ce3012dda"
],
"$warnings": []
}