Skip to main content

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

ElementRequired / OptionalDescription
entityQNamesRequiredThis 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.
startDateOptionalThe date since when the entities have been changed.
endDateOptionalThe entities that have been created to date.

Request Headers

ParameterAccepted valuesDescription
AuthorizationStringBase64 encoded userName:password with “Basic”.
Ex: Basic aW5zdGFsbDppbnN0YWxs
Content-Typeapplication/jsonSending the request body as JSON.
Acceptapplication/octet-streamThe 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

ParameterAccepted valuesDescription
Content-Typeapplication/zipThe content type of the zip file.
Content-LengthNumberThe size of the zip file in bytes.
Content-MD5StringMD5 checksum value of the zip file.
x-enactor-entity-countNumberThe 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