Create an import package
post
/AgentWeb/api/elementmanager/import/EMPackages
Creates an Element Manger import package
Request
Header Parameters
-
API_VERSION: string
API VERSION for the headerDefault Value:
1Allowed Values:[ "1" ] -
USERSESSION(required): string
Authentication token for the header
Specify the name and base64 encoded string of the zip file to be imported
Root Schema : EMImportInfo
Type:
Show Source
object-
attributes:
object attributes
-
importType:
string
Allowed Values:
[ "PackageImport", "CustomImport" ]Default value, if not provided, will be PackageImport -
name(required):
string
-
packageContent(required):
string
For CustomImport of ObjectEventHandler, packageContent must be base64 encoded version of the required PHP file.
Example:
{
"name":"<import-name>",
"packageContent":"<zip-content-utf8>"
}Nested Schema : EMCustomImportAttributes
Type:
Show Source
object-
addInAttributes:
object EMAddInAttributes
-
customScriptAttributes:
object EMCustomScriptAttributes
-
extensionAttributes:
object EMExtensionAttributes
-
folderPath:
string
-
itemName:
string
-
itemType(required):
string
Allowed Values:
[ "BrowserExtension", "DesktopAddIn", "ObjectEventHandler", "CustomScript", "Report" ]
Nested Schema : EMCustomScriptAttributes
Type:
Show Source
object-
phpVersion:
string
The PHP version to which the file is to be imported
-
subFolderPath:
string
The folder path within custom folder, to which the file is to be imported.
Nested Schema : EMExtensionAttributes
Type:
Show Source
object-
extensionConfigFile:
string
-
extensionInitFile(required):
string
-
extensionSchemaFiles:
array extensionSchemaFiles
-
extensionType(required):
string
Allowed Values:
[ "Analytics", "Workspace", "Library", "Console" ] -
notes:
string
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 initiate an import.
cURL Command Example
curl -X POST https://mysite.example.com/AgentWeb/api/elementmanager/import/EMPackages -H "USERSESSION: feihg98GnT7i" -H "API_VERSION: 1" -H "Content-Type: application/json" -d "{ \"name\": \"incident update\", \"packageContent\": \"package_converted_using_base64_encoder_tool\"}"
Request Body Example
The following shows an example of the request body in JSON format.
{
"name": "incident update",
"packageContent": "package_converted_using_base64_encoder_tool"
}
Response Body Example
The following shows an example of the response body in JSON format.
{
"description": "Prepare package for import",
"id": 100015,
"href": "http://mysite.example.com/AgentWeb/api/elementmanager/import/EMPackages/100015"
}