Courses
Batch Upsert Course
Common Guides
API Reference
- Courses
- Users
- Content
- Completions
- Categories
- Skills
- Assignments
- Collections
Courses
Batch Upsert Course
POST
/
unified
/
lms
/
courses
/
batch
curl --request POST \
--url https://api.stackone.com/unified/lms/courses/batch \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--header 'x-account-id: <x-account-id>' \
--data '{
"items": [
{
"unified_custom_fields": {
"my_project_custom_field_1": "REF-1236",
"my_project_custom_field_2": "some other value"
},
"external_reference": "SOFTWARE-ENG-LV1-TRAINING-VIDEO-1",
"title": "Software Engineer Lv 1",
"description": "This course acts as learning content for software engineers.",
"languages": [
{
"value": "en_GB",
"source_value": "<string>"
}
],
"cover_url": "https://www.googledrive.com/?v=16873",
"url": "https://www.linkedinlearning.com/?v=16873",
"active": true,
"duration": "P3Y6M4DT12H30M5S",
"categories": [
{
"id": "16873-IT345",
"unified_custom_fields": {
"my_project_custom_field_1": "REF-1236",
"my_project_custom_field_2": "some other value"
},
"name": "Information-Technology",
"hierarchy": {
"value": "primary",
"source_value": "<string>"
},
"level": {
"value": "primary",
"source_value": "<string>"
},
"language": {
"value": "en_GB",
"source_value": "<string>"
}
}
],
"skills": [
{
"id": "16873-IT345",
"name": "Information-Technology",
"hierarchy": {
"value": "primary",
"source_value": "<string>"
},
"language": {
"value": "en_GB",
"source_value": "<string>"
},
"level": {
"value": "primary",
"source_value": "<string>"
}
}
],
"content": [
{
"external_reference": "SOFTWARE-ENG-LV1-TRAINING-VIDEO-1",
"title": "Software Engineer Lv 1",
"description": "This video acts as learning content for software engineers.",
"content_url": "https://www.youtube.com/watch?v=16873",
"mobile_launch_content_url": "https://www.mobile.youtube.com/watch?v=16873",
"order": 1
}
],
"localizations": [
{
"title": "Software Engineer Lv 1",
"description": "This course acts as learning resource for software engineers.",
"languages": {
"value": "en-GB",
"source_value": "string"
}
},
{
"title": "Software Engineer: A comprehensive guide",
"description": "This course acts as learning resource for software engineers.",
"languages": {
"value": "en-US",
"source_value": "string"
}
}
]
}
]
}'
{
"statusCode": 202,
"message": "Batch operation accepted",
"timestamp": "2021-01-01T01:01:01.000Z",
"errors": [
[
"Missing field: name"
],
[],
[]
]
}
Authorizations
Basic authentication header of the form Basic <encoded-value>
, where <encoded-value>
is the base64-encoded string username:password
.
Headers
The account identifier
Body
application/json
Response
202
application/json
Batch operation accepted
The response is of type object
.
Was this page helpful?
curl --request POST \
--url https://api.stackone.com/unified/lms/courses/batch \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--header 'x-account-id: <x-account-id>' \
--data '{
"items": [
{
"unified_custom_fields": {
"my_project_custom_field_1": "REF-1236",
"my_project_custom_field_2": "some other value"
},
"external_reference": "SOFTWARE-ENG-LV1-TRAINING-VIDEO-1",
"title": "Software Engineer Lv 1",
"description": "This course acts as learning content for software engineers.",
"languages": [
{
"value": "en_GB",
"source_value": "<string>"
}
],
"cover_url": "https://www.googledrive.com/?v=16873",
"url": "https://www.linkedinlearning.com/?v=16873",
"active": true,
"duration": "P3Y6M4DT12H30M5S",
"categories": [
{
"id": "16873-IT345",
"unified_custom_fields": {
"my_project_custom_field_1": "REF-1236",
"my_project_custom_field_2": "some other value"
},
"name": "Information-Technology",
"hierarchy": {
"value": "primary",
"source_value": "<string>"
},
"level": {
"value": "primary",
"source_value": "<string>"
},
"language": {
"value": "en_GB",
"source_value": "<string>"
}
}
],
"skills": [
{
"id": "16873-IT345",
"name": "Information-Technology",
"hierarchy": {
"value": "primary",
"source_value": "<string>"
},
"language": {
"value": "en_GB",
"source_value": "<string>"
},
"level": {
"value": "primary",
"source_value": "<string>"
}
}
],
"content": [
{
"external_reference": "SOFTWARE-ENG-LV1-TRAINING-VIDEO-1",
"title": "Software Engineer Lv 1",
"description": "This video acts as learning content for software engineers.",
"content_url": "https://www.youtube.com/watch?v=16873",
"mobile_launch_content_url": "https://www.mobile.youtube.com/watch?v=16873",
"order": 1
}
],
"localizations": [
{
"title": "Software Engineer Lv 1",
"description": "This course acts as learning resource for software engineers.",
"languages": {
"value": "en-GB",
"source_value": "string"
}
},
{
"title": "Software Engineer: A comprehensive guide",
"description": "This course acts as learning resource for software engineers.",
"languages": {
"value": "en-US",
"source_value": "string"
}
}
]
}
]
}'
{
"statusCode": 202,
"message": "Batch operation accepted",
"timestamp": "2021-01-01T01:01:01.000Z",
"errors": [
[
"Missing field: name"
],
[],
[]
]
}