Skip to main content
Question

Hello! Having a little trouble with a Postman runner - trying to bulk update courses

  • January 14, 2025
  • 2 replies
  • 100 views

lrodman
Guide II
Forum|alt.badge.img+6

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": [
{
"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:

 

2 replies

lrodman
Guide II
Forum|alt.badge.img+6
  • Author
  • Guide II
  • January 14, 2025

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

 

Example:

Before: "id": {{id}}

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


dwilburn
Guide III
Forum|alt.badge.img+4
  • Guide III
  • January 15, 2025

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