Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Error Messages in Adobe Captivate API call

Community Beginner ,
Sep 09, 2018 Sep 09, 2018

I am using Adobe Captivate Prime as Integration Admin.  I'm trying to POST to

https://captivateprime.adobe.com/primeapi/v2/users

and I keep getting the error: "{"status":"BAD_REQUEST","title":"Model path doesn't exist","source":{"info":""}}"

What does this mean?  Is there a reference for all error messages?

My angular post is:

$http({

                            url: "https://captivateprime.adobe.com/primeapi/v2/users",

                            method: "POST",

                            data: JSON.stringify(myData),

                            headers: {

                                "Accept": "application/vnd.api+json",

                                "Authorization":"oauth [my token]"

                            }

.....

and myData is a JSON object with all three required parameters listed under the attributes node.

Can anyone help?

TOPICS
Completion criteria , Course module
1.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Beginner , Sep 09, 2018 Sep 09, 2018

i have run your code in w3schools try out and i found it working.

Also i suspect your 'json post body' to be incorrect for the given api endpoint.

please look at the below code sample.

<!DOCTYPE html>

<html>

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>

<body>

<div ng-app="myApp" ng-controller="myCtrl">

<p>Today's welcome message is:</p>

<h1>{{myWelcome}}</h1>

</div>

<p>The $http service requests a page on the server, and the response is set as the value of th

...
Translate
Community Beginner ,
Sep 09, 2018 Sep 09, 2018

i have run your code in w3schools try out and i found it working.

Also i suspect your 'json post body' to be incorrect for the given api endpoint.

please look at the below code sample.

<!DOCTYPE html>

<html>

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>

<body>

<div ng-app="myApp" ng-controller="myCtrl">

<p>Today's welcome message is:</p>

<h1>{{myWelcome}}</h1>

</div>

<p>The $http service requests a page on the server, and the response is set as the value of the "myWelcome" variable.</p>

<script>

var app = angular.module('myApp', []);

var body = `{

  "data": {

       "type": "user",

       "attributes": {

       "email": "abc-2@xyz.com",

       "name": "abc-2",

       "userType":"INTERNAL"

      }

   }

}`;

app.controller('myCtrl', function($scope, $http) {

  $http({

    method : "POST",

    url : "https://captivateprime.adobe.com/primeapi/v2/users",

    data: body,

    headers: {

        'Authorization': 'oauth 9918beb92dd4be59b7e9c11ewq123res',

        'Accept': 'application/vnd.api+json'

    }

  }).then(function mySuccess(response) {

      $scope.myWelcome = response.data;

    }, function myError(response) {

      $scope.myWelcome = response.statusText;

  });

});

</script>

</body>

</html>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 10, 2018 Sep 10, 2018
LATEST

I marked it correct and it is working now.  The only change I can see is maybe that you have "type" set to "user".  But it's nice to know

you don't have to JSON strigify the JSON object, nor do you need to include all possible fields.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Help resources