POST Enroll a user returning "message": "No parameters given"

Jump to solution
Flib
Community Explorer

Hi, I'm new at API was able to implement some calls put I'm having a problem with this the Enroll a user.

I'm receiving   "message": "No parameters given"

This is my POSTn to that I'm using SIS ids....

{
    "uri""https://-----.instructure.com/api/v1/courses/sis_course_id:51/enrollments",
    "method""POST",
    "headers": {
        "Authorization""-------",
        "Accept""*/*",
        "Host""-----.instructure.com",
        "Accept-Encoding""gzip, deflate, br",
        "Connection""keep-alive"
    },
    "body": {
        "enrollment": {
            "sis_user_id""1",
            "enrollment_state""active",
            "notify"false,
            "limit_privileges_to_course_section"true,
            "role_id"3,
            "created_at""2021-11-04T15:57:07.0300054Z",
            "start_at""2021-11-04",
            "end_at""2021-11-18"
        }
    }
}

 

I appreciate any help.

Labels (3)
0 Likes
1 Solution
Flib
Community Explorer
Author

Solved:

This is the correct way to inform sis_user_id in the Body:

"user_id""sis_user_id:1"
 
It's wrong on the API Test page. Should be fixed

View solution in original post

0 Likes