How-to Guide - Rest API - Export
Introduction
The purpose of this guide is to provide an understanding of the REST Configuration Export API provided by Enactor. Note that the final URL used to access the service will be determined based on how the Enactor REST API is deployed.
Configuration Export API
Export
This section provides an outline into the REST APIs pertaining to the Export of Enactor configurations.
This API provides the facility to export Enactor configurations via REST API. This will return a zip file as a byte stream. Since the zip file can be large, it provides the facility of streaming the response. It will also make sure that the configuration file size is not more than 100 MB.
Note: If the exported configuration file size exceeds 100 MB, the request will fail.
Request
Request Service URL
POST /configuration/export
Request Tokens
There are no request tokens.
Request Parameters
There are no request parameters.
Request Body
Element | Required / Optional | Description |
---|---|---|
entityQNames | Required | This will be an entity qName array including localPart and
namespaceURI. The localPart is the name of the entity that will be exported. The namespaceURI is the namespace for the entity. |
startDate | Optional | The date since when the entities have been changed. |
endDate | Optional | The entities that have been created to date. |
Request Headers
Parameter | Accepted values | Description |
---|---|---|
Authorization | String | Base64 encoded userName:password with “Basic”. Ex: Basic aW5zdGFsbDppbnN0YWxs |
Content-Type | application/json | Sending the request body as JSON. |
Accept | application/octet-stream | The media types that the server can produce. Optional and able to use the default value. |
Response
The response will be the byte stream of the zip file containing all the configuration files as per the given request.
Response Headers
Parameter | Accepted values | Description |
---|---|---|
Content-Type | application/zip | The content type of the zip file. |
Content-Length | Number | The size of the zip file in bytes. |
Content-MD5 | String | MD5 checksum value of the zip file. |
x-enactor-entity-count | Number | The total entity counts that is included in the zip file. |
Sample Requests
Single Entity Export with Filter Request
Following is a request to export the “user” entity of all users that start with the value of “000101”:
POST http://[SWARM_LEADER_IP]/WebRestApi/rest/configuration/export
{
"entityQNames": ["user"],
"criteria": {
"filters": [
{
"@type": "TextValueFilter",
"id": "UserId",
"comparisonOperator": "STARTS_WITH",
"supportValues": [
{
"value": "000101"
}
]
}
]
}
}
Single Entity Export without Filter Request
Following is a request to export the “user” entity of all users in the system:
POST http://[SWARM_LEADER_IP]/WebRestApi/rest/configuration/export
{ "entityQNames": ["user"] }
Multiple Entities Export
Request Following is a request to export the “user”, “location”, “device” and “posTerminal” entities:
POST http://[SWARM_LEADER_IP]/WebRestApi/rest/configuration/export
{
"entityQNames": ["user", "location", "device", "posTerminal"]
}
Note: The entityQNames to be used here are case-sensitive.
Following is a list of entityQNames of entities that are commonly used for configuration exports:
-
acquirer
-
acquirerConnection
-
airport
-
airportTerminalBuilding
-
atpView
-
authorisationServer
-
authorisationServerConfig
-
avsConfiguration
-
cardScheme
-
cardType
-
clientConfigurationSet
-
cmSessionOwner
-
communicationScript
-
company
-
contactType
-
countryCode
-
creditNoteType
-
currency
-
customerKeyDateType
-
dccConfiguration
-
deliveryCharge
-
deliveryType
-
device
-
deviceType
-
diaryEntry
-
diaryEntryCategory
-
documentPrinterMapping
-
eftMerchantId
-
eftTerminalId
-
emailAccountSettings
-
employee
-
employeeAccount
-
employeeCard
-
employeeEmployeeGroup
-
employeeGrade
-
employeeGradeMMGDiscount
-
employeeGradeProductDiscount
-
entityDistributionDetail
-
exchangeRate
-
fieldRule
-
fieldValidatorDefinition
-
fieldValidatorSet
-
flight
-
flightZone
-
giftCardType
-
group
-
iccReaderConfiguration
-
iccReaderType
-
iinRange
-
image
-
imageCategory
-
inventoryType
-
licence
-
listData
-
locale
-
location
-
locationAreaAssignment
-
locationEmailConfiguration
-
locationOrdering
-
locationPrinter
-
locationTemplate
-
measureSystem
-
measureSystemUnitConversion
-
menu
-
menuSet
-
messageResource
-
optionSet
-
pageDefinition
-
pageDefinitionDetail
-
pageDefinitionType
-
period
-
posTerminal
-
posTerminalTemplate
-
predefinedBroadcast
-
predefinedExport
-
priceType
-
privilege
-
processConnections
-
processConnectionsType
-
productList
-
productSearchCategoryMapping
-
productStatus
-
productType
-
promotion
-
reason
-
reasonType
-
reportDefinition
-
role
-
styleSheet
-
taxGroup
-
taxGroupTaxMethod
-
taxRate
-
taxRefundIINRange
-
taxScheme
-
tender
-
theme
-
transformDetail
-
user
-
userPreference
-
userTemplate
-
voucherType