Skip to main content
Participant
October 18, 2021
Question

Enrolling user in a learning object instance returns OBJECT_DOESNT_EXIST response

  • October 18, 2021
  • 1 reply
  • 277 views

I am attempting to add an internal user I created via the API to a specific learning object instance of a course. The user exists, the learning object exists, and the learning object instance exists (see below for verification and steps taken, I obfuscated a few things not used for testing, but the relevant data is there) the urls seem to be correctly formed/generated. I cannot figure out why it wont let me enroll the user, what am I missing? Thanks!

 

I am working within the API v2 docs and using the "Try it out!" button. As per the APIv2 documentation, I am making the request with the auto-generated url in the following format:

 

https://captivateprime.adobe.com/primeapi/v2/users/14442625/enrollments?loId=course%3A1609174&loInstanceId=course%3A1609174_1789114

 

But I receive this as the response:

 

{
"status": "BAD_REQUEST",
"code": "OBJECT_DOESNT_EXIST",
"title": "Object doesn't exist",
"source": {
    "info": "course:1609174_3323201_14442625" } 
}

 

I can make a get request at the "/users/{id}" endpoint to find the user with id number 14442625, and that returns the user correctly.

{
  "links": {
    "self": "https://captivateprime.adobe.com/primeapi/v2/users/14442625"
  },
  "data": {
    "id": "14442625",
    "type": "user",
    "attributes": {
      "avatarUrl": avatarurl",
      "binUserId": "bin user id",
      "email": "username@gmail.com",
      "enrollOnClick": false,
      "gamificationEnabled": false,
      "name": "Users Name",
      "pointsEarned": 0,
      "pointsRedeemed": 0,
      "profile": "Employee",
      "roles": [
        "Learner"
      ],
      "state": "ACTIVE",
      "userType": "Internal"
    },
    "relationships": {
      "account": {
        "data": {
          "id": "56121",
          "type": "account"
        }
      },
      "manager": {
        "data": {
          "id": "9999999",
          "type": "user"
        }
      }
    }
  }
}

I can also make a get request for the learning object and it returns correctly:

 

{
  "links": {
    "self": "https://captivateprime.adobe.com/primeapi/v2/learningObjects/course:1609174"
  },
  "data": {
    "id": "course:1609174",
    "type": "learningObject",
    "attributes": {
      "authorNames": [
        "authors name"
      ],
      "dateCreated": "2020-03-30T19:23:31.000Z",
      "datePublished": "2020-03-30T19:40:43.000Z",
      "dateUpdated": "2020-12-09T19:40:26.000Z",
      "duration": 20258,
      "effectiveModifiedDate": "2020-12-09T19:40:26.000Z",
      "effectivenessIndex": 0,
      "enrollmentType": "Self Enroll",
      "hasOptionalLoResources": false,
      "imageUrl": "imageurl",
      "isExternal": false,
      "isMqaEnabled": false,
      "isPrerequisiteEnforced": false,
      "isSubLoOrderEnforced": true,
      "loFormat": "Self Paced",
      "loType": "course",
      "moduleResetEnabled": false,
      "state": "Published",
      "unenrollmentAllowed": false,
      "localizedMetadata": [
        {
          "description": "the course description ",
          "locale": "en-US",
          "name": "the course name",
          "overview": "the overview"
        }
      ],
      "rating": {
        "averageRating": 0,
        "ratingsCount": 0
      }
    },
    "relationships": {
      "authors": {
        "data": [
          {
            "id": "authors id",
            "type": "user"
          }
        ]
      },
      "instances": {
        "data": [
          {
            "id": "course:1609174_3323201",
            "type": "learningObjectInstance"
          }
        ]
      },
      "skills": {
        "data": [
          {
            "id": "course:1609174_76584",
            "type": "learningObjectSkill"
          }
        ]
      }
    }
  }
}

 

I can do the same for the learning object instance and also get the correct result:

{
  "links": {
    "self": "https://captivateprime.adobe.com/primeapi/v2/learningObjects/course:1609174/instances/course:1609174_3323201/summary"
  },
  "data": {
    "id": "course:1609174_3323201_summary",
    "type": "loInstanceSummary",
    "attributes": {
      "asOf": "2021-10-18T18:40:01.206Z",
      "completionCount": 0,
      "enrollmentCount": 0
    }
  }
}

 

This topic has been closed for replies.

1 reply

Adobe Employee
October 18, 2021

Hi @Phil6700,

 

Thank you for contacting Adobe Captivate Prime Team. 

 

I tried the steps that you have mentioend in one of our test account and it seems to be working as expected.

Kindly follow the recording attached for details.

 

I request you to reach our support team using the channels in the link below in case any further help is required.

https://helpx.adobe.com/contact/enterprise-support.other.html#captivate-prime

 

Hope to hear from you soon.

 

Regards,

Debiprasad Maharana
Adobe Inc.