EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

KB485076: Troubleshoot object migration RESTful API issues


Ling Jing

Product Owner, Principal • MicroStrategy


This article addresses errors encountered when creating or importing a migration package. This article also discusses possible causes and solutions to address these errors.

Error: End user sends REST requests to create package and receives REST response: HTTP Code: 400


{
    "code": "ERR002",
    "iServerCode": -2147205207,
    "message": "(Invalid REST request.)",
    "ticketId": "b129c9455c2d491eb0c38ff906560afb"
}

Possible Cause 1

You are creating a "project package" with configuration objects
For example, if you are creating "project package" with a project session ("Project ID" is specified in the request header), please check whether the request body contains any configuration-level object like "Security Role" (44), as shown below.


{
 "type": "project",
 "settings": {
  "aclOnReplacingObjects": "use_existing",
  "aclOnNewObjects": ["keep_acl_as_source_object"],
  "defaultAction": "force_replace"
 },
 "content": [
  {
   "id": "CCC8F238462EC1D212607BA3D20894FB",
   "name": "Analyst",
   "type": 44,
   "action": "use_newer",
   "includeDependents": false
  }
 ]
}

Solution

Remove the configuration object from the object list and re-create the project package. 
 

Possible Cause 2


You are creating a "configuration package" with project objects. 
For example, if you are creating a "configuration package" with a configuration session ("Project ID" is not specified in the request header), please check whether the request body contains any project-level object. For example, in the request below, it creates a configuration package with an object of type "Attribute" (12). 


{
 "type": "configuration",
 "settings": {
  "aclOnReplacingObjects": "use_existing",
  "aclOnNewObjects": ["keep_acl_as_source_object"],
  "defaultAction": "force_replace"
 },
 "content": [
  {
   "id": "8D679D3711D3E4981000E787EC6DE8A4",
   "name": "Category",
   "type": 12,
   "action": "use_newer",
   "includeDependents": false
  }
 ]
}

Solution 


Remove the project object from the object list and re-create the configuration package. 

Possible Cause 3


You are using one authentication token to create a project package, and then a configuration package again. 
For example, if you are creating a "project package" with a new authentication token ("Project ID" is specified in the request header), and then re-use this authentication token again to create a "configuration package" ("Project ID" is not specified in the request header), the error is returned. 

Solution 


Recreate a new authentication token to create this "configuration package."
Note: It is recommended that you use a brand new authentication token when creating a "configuration package," so that you can work around the current limitation in Strategy 2021 Update 2. This issue is being investigated and addressed in a future release. 

Error: End-user sends REST requests to import "configuration" package and REST response: HTTP Code: 400


{
    "code": "ERR002",
    "iServerCode": -2147212331,
    "message": "(Cannot import a package from a configuration source into a project source.)",
    "ticketId": "5d8bb68a297d41288f396d3cf968c3c2"
}

 

Possible Cause 1


You are importing a "configuration package" with project ID in the header. 
For example, if you are importing a "configuration package" with a project session ("Project ID" is specified in the request header), the error is returned. 

Solution 


Remove the project ID from the request header and re-import the configuration package. 

Possible Cause 2


You are using one authentication token to do "project package" related operations, and then importing a configuration package. 
For example, if you are importing a "project package" with a new authentication token ("Project ID" is specified in the request header), and then re-use this authentication token again to import a "configuration package" ("Project ID" is not specified in the request header), the error is returned. 

Solution 


Recreate a new authentication token to reimport this "configuration package."
Note: It is recommended that you use a brand new authentication token when creating a "configuration package," so that you can work around the current limitation in Strategy 2021 Update 2. This issue is being investigated and addressed in a future release. 


Comment

0 comments

Details

Knowledge Article

Published:

June 29, 2021

Last Updated:

June 30, 2021