Forum Stats

  • 3,678,552 Users
  • 7,135 Discussions
  • 12,061 Comments

Discussions

Got bad request on productImportEndpoint and onCompletionCallbackEndpoint

Hi expert,

We had one cx app, it worked fine on i9 instance. Now we clone and install it on generic instance(OCI) but it not work. When AMS invoke service, we start to call productImportEndpoint  and onCompletionCallbackEndpoint but we got the bad request.

Here is invoke service data:

{

 instanceContext: {

   appId: '39963fa7-5a21-4450-afbf-7a52fe37b653',

   appVersion: null,

   installId: 'd61e0aa2-601c-4a04-b947-7aac2e45e5e4',

   instanceId: 'b8c8001b-7c26-4ad5-97c9-9f3da289eefa',

   serviceId: '287eaf9c-041c-4c53-8b3a-e705b760f79b',

   tenantId: '81586',

   productId: '6798e522-deb5-488f-bf22-c29e13254b8f',

   maxPushBatchSize: 10000,

   secret: '80ba5c02-024b-4dc1-bc84-292d01dbc73d-d5244469-2de7-4732-b0d5-3f15c5999e01',

   recordDefinition: { inputParameters: [Array], outputParameters: [Array] },

   maxBatchSize: 10000

 },

 dataSet: {

   id: '14d07c9b-3a25-4d34-be95-8f274160c524',

   rows: [ [Array] ],

   size: 1

 },

 productExportEndpoint: null,

 productImportEndpoint: {

   url: 'https://vjr1qya-api.responsys.ocs.oraclecloud.com/rest/appcloud/v1/tenants/81586/datasets/14d07c9b-3a25-4d34-be95-8f274160c524-20210928-3784',

   method: 'POST',

   headers: {}

 },

 onCompletionCallbackEndpoint: {

   url: 'https://vjr1qya-api.responsys.ocs.oraclecloud.com/rest/appcloud/v1/tenants/81586/executions/14d07c9b-3a25-4d34-be95-8f274160c524-20210928-3784',

   method: 'PATCH',

   headers: {}

 },

 maxPullPageSize: 10000,

 maxPushBatchSize: 10000

}


Here is bad request result when we call productImportEndpoint:

{

 status: 400,

 statusText: 'Bad Request',

 headers: {

   'content-type': 'application/json;charset=UTF-8',

   'max-forwards': '20',

   'x-correlationid': 'Id-f1795161900470a8e5ca86e2 0',

   'x-frame-options': 'SAMEORIGIN',

   'content-length': '50',

   expires: 'Mon, 27 Sep 2021 07:59:47 GMT',

   'cache-control': 'max-age=0, no-cache, no-store',

   pragma: 'no-cache',

   date: 'Mon, 27 Sep 2021 07:59:47 GMT',

   connection: 'close'

 },

 config: {

   url: 'https://vjr1qya-api.responsys.ocs.oraclecloud.com/rest/appcloud/v1/tenants/81586/datasets/14d07c9b-3a25-4d34-be95-8f274160c524-20210928-3784',

   method: 'post',

   data: '{"fieldDefinitions":[{"name":"appcloud_row_correlation_id","dataType":"Text","width":40,"unique":true,"required":true,"readOnly":null,"minimumValue":null,"maximumValue":null,"possibleValues":null,"format":null,"resources":null},{"name":"appcloud_row_status","dataType":"Text","width":10,"unique":null,"required":true,"readOnly":null,"minimumValue":null,"maximumValue":null,"possibleValues":["success","warning","failure"],"format":null,"resources":null},{"name":"appcloud_row_errormessage","dataType":"Text","width":5120,"unique":null,"required":null,"readOnly":null,"minimumValue":null,"maximumValue":null,"possibleValues":null,"format":null,"resources":null},{"name":"ZALO_ID","dataType":"Text","width":40,"unique":true,"required":true,"readOnly":null,"minimumValue":null,"maximumValue":null,"possibleValues":null,"format":null,"resources":null}],"dataSet":{"id":"14d07c9b-3a25-4d34-be95-8f274160c524","rows":[["1004;64;1632729582","COMPLETE","","1381040230336820623"]],"size":1}}',

   headers: {

     Accept: 'application/json, text/plain, */*',

     'Content-Type': 'application/json;charset=utf-8',

     Authorization: 'Bearer eyJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJiOGM4MDAxYi03YzI2LTRhZDUtOTdjOS05ZjNkYTI4OWVlZmEiLCJpc3MiOiI2Nzk4ZTUyMi1kZWI1LTQ4OGYtYmYyMi1jMjllMTMyNTRiOGYiLCJleHAiOjE2MzI3Mjk4ODQsImlhdCI6MTYzMjcyOTU4NCwiby5hLnAuY3RlbmFudElkIjoiODE1ODYifQ.L7Q76K7JJxEWbohfXdk_GVjE0Xhm5ssVS5O2RKNJ9NY',

     'omc-id': 'b8c8001b-7c26-4ad5-97c9-9f3da289eefa',

     'dataset-id': '14d07c9b-3a25-4d34-be95-8f274160c524',

     'invocation-id': '0.7269403720570269',

     'User-Agent': 'axios/0.21.4',

     'Content-Length': 982

   },

 },

 data: "This invocation doesn't exist or wasn't successful"

}


And here is not found results when we call onCompletionCallbackEndpoint:

{

 status: 404,

 statusText: 'Not Found',

 headers: {

   'content-type': 'application/json;charset=UTF-8',

   'max-forwards': '20',

   'x-correlationid': 'Id-f3795161f01608ff27c6ff1c 0',

   'x-frame-options': 'SAMEORIGIN',

   'content-length': '5',

   expires: 'Mon, 27 Sep 2021 07:59:48 GMT',

   'cache-control': 'max-age=0, no-cache, no-store',

   pragma: 'no-cache',

   date: 'Mon, 27 Sep 2021 07:59:48 GMT',

   connection: 'close'

 },

 config: {

   url: 'https://vjr1qya-api.responsys.ocs.oraclecloud.com/rest/appcloud/v1/tenants/81586/executions/14d07c9b-3a25-4d34-be95-8f274160c524-20210928-3784',

   method: 'patch',

   data: '{"status":"COMPLETED"}',

   headers: {

     Accept: 'application/json, text/plain, */*',

     'Content-Type': 'application/json;charset=utf-8',

     Authorization: 'Bearer eyJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJiOGM4MDAxYi03YzI2LTRhZDUtOTdjOS05ZjNkYTI4OWVlZmEiLCJpc3MiOiI2Nzk4ZTUyMi1kZWI1LTQ4OGYtYmYyMi1jMjllMTMyNTRiOGYiLCJleHAiOjE2MzI3Mjk4ODQsImlhdCI6MTYzMjcyOTU4NCwiby5hLnAuY3RlbmFudElkIjoiODE1ODYifQ.L7Q76K7JJxEWbohfXdk_GVjE0Xhm5ssVS5O2RKNJ9NY',

     'omc-id': 'b8c8001b-7c26-4ad5-97c9-9f3da289eefa',

     'dataset-id': '14d07c9b-3a25-4d34-be95-8f274160c524',

     'invocation-id': '0.7269403720570269',

     'User-Agent': 'axios/0.21.4',

     'Content-Length': 22

   }

 },

 data: false

}


Could you please take a look at on debug and let me know if we are missing any thing while post data to AMS?


Thank you so much,

Cuong Tran

Best Answers

Answers