Skip to main content

Hello!

I’m trying to batch update course categories using the following endpoint:

https://{{subdomain}}.docebosaas.com/course/v1/courses/batch

I’m doing the following code as a runner:

{
"name": "Elite_Bulk Category Changes",
"endpoint": "/course/v1/catalog/items/batch",
"method": "PUT",
"chunk_size": 100,
"type": "importer",
"items": s
{
"id": {{id}},
"code": {{code}},
/*"title": "string",
"description": "string",
"language": "string",
"course_status": "published",
"category_id": 0,*/
"category_code": {{category_code}}/*,
"thumbnail_id": 0,
"batch_item_id": "string"*/
}
]
}

I’m doing the runner option in Postman with a data file csv, here’s my example data:

id code category_code
25 in_test1 category_test2
26 in_test1b category_test2

 

I did try rewriting my code and running it as “not a runner” and it executed fine:

{
"name": "Elite_Bulk Category Changes",
"endpoint": "/course/v1/catalog/items/batch",
"method": "PUT",
"chunk_size": 100,
"type": "importer",
"items": /
{
"id": "25",
"code": "in_test1",
/*"title": "string",
"description": "string",
"language": "string",
"course_status": "published",
"category_id": 0,*/
"category_code": "category_test2"/*,
"thumbnail_id": 0,
"batch_item_id": "string"*/
}
]
}

The error I’m getting in Postman is a 400 on the PUT calls:

 

Figured it out! The issue was I didn’t have quotes around my double brackets

 

Example:

Before: "id": {{id}}

After: "id": “{{id}}”


Awesome job ​@lrodman , it is the little things that get you. Way to stick with it.


Reply