Import or rollback a package
patch
/AgentWeb/api/elementmanager/import/EMPackages
Imports or rollbacks an Element Manager package
Request
Header Parameters
-
API_VERSION: string
API VERSION for the headerDefault Value:
1
Allowed Values:[ "1" ]
-
USERSESSION(required): string
Authentication token for the header
Specify the action and id
Root Schema : EMImportPatchInfo
Type:
Show Source
object
-
action(required):
string
Allowed Values:
[ "import", "rollback", "resume" ]
-
enabledBusinessRules:
array enabledBusinessRules
If the attribute is present, only the business rules with the specified element ids will be enabled in edit mode after import. If not present, package defaults shall be applied.
-
excludedItems:
array excludedItems
-
id(required):
string
-
isExcludeItemsRequest:
boolean
Set this to true if some items are to be removed. If set to true, specify the items to be excluded under excludedItems parameter
-
overrideLock:
boolean
Set this to true if lock has to be overridden by default for items involving editor locks, if the lock has been acquired by another user
-
permissions:
array permissions
Permission values for items
-
skipCustomObjectDeployment:
boolean
Set this to true if deployment of custom objects is to be skipped (applicable only if all objects/attributes pre-exists in target)
Example:
{
"action":"import/rollback",
"id":"import-id",
"permissions":[
{
"elementIds":[
"576"
],
"profilePermissions":[
{
"profileIds":[
"205"
],
"interfaceIds":[
"1",
"2"
]
}
]
},
{
"elementIds":[
"577",
"450"
],
"profilePermissions":[
{
"profileIds":[
"205",
"206"
],
"permission":"edit"
}
]
},
{
"elementIds":[
"578"
],
"interfacePermission":[
"1",
"2"
]
}
],
"enabledBusinessRules":[
"100003",
"100004"
]
}
Nested Schema : enabledBusinessRules
Type:
array
If the attribute is present, only the business rules with the specified element ids will be enabled in edit mode after import. If not present, package defaults shall be applied.
Show Source
Nested Schema : ExcludedItem
Type:
Show Source
object
-
id(required):
integer(int64)
Id of the item to be removed, obtained from the GET package status API
-
key:
string
-
type(required):
string
Allowed Values:
[ "Report", "Workspace", "DesktopAddIn", "BrowserExtension", "NavigationSet", "CustomObject", "SystemAttribute", "StandardText", "Variable", "ObjectEventHandler", "ConfigurationSetting", "MessageBase", "BusinessRule", "BusinessRuleVariable", "WorkspaceScript", "ExternalObject", "Image", "WorkflowImage", "CustomScript" ]
Nested Schema : EMPermission
Type:
Show Source
object
-
permission:
string
Allowed Values:
[ "open", "edit" ]
Response
Supported Media Types
- application/json
200 Response
Status of import
Nested Schema : EMPackageStatus
Type:
Show Source
object
-
code(required):
integer
-
description(required):
string
-
errorCode(required):
string
Error details of the item
Examples
The following example shows how to import a package.
cURL Command Example
curl -X PATCH https://mysite.example.com/AgentWeb/api/elementmanager/import/EMPackages -H "USERSESSION: feihg98GnT7i" -H "API_VERSION: 1" -H "Content-Type: application/json" -d "{ \"action\": \"import\", \"id\": \"100015\" }"
Request Body Example
The following shows an example of the request body in JSON format.
{ "action": "import", "id": "100015" }
Response Body Example
The following shows an example of the response body in JSON format.
{ "description": "Import the package", "id": 100015, "name": "incident update", "href": "http://mysite.example.com/AgentWeb/api/elementmanager/import/EMPackages/100015" }