/
saveImportRule

saveImportRule

Inserts/updates a import rule document.

HTTP POST /ctreplay/:domain?/saveImportRule

Path variables:

Name

Mandatory

Type

Description

Name

Mandatory

Type

Description

domain

NO

STRING

Unique domain identifier

Authorization: BEARER

Request body:

Name

Mandatory

Type

Description

Name

Mandatory

Type

Description

document

YES

OBJECT

import rule object to be saved/updated. (if id property is present the profile will be updated, otherwise a new profile will be inserted)

Response:

Type: JSON

Name

Type

Description

Name

Type

Description

result

BOOLEAN

If true, the service response was performed correctly

error

NULL / STRING

Contains the error description if an error has occurred in the request

id

STRING

document id. (only if new document is created, otherwise empty string)

Example:

Request:

http://<hostname>:<port>/ctreplay/default/saveImportRule

Request Body:

{ "document":{ "id":"5eecbd51f84f6a3a544a2eda", "tagName":"agent", "type":"regex", "value":"X-REC_AGENT: (.*)", "replace":{ "searchValue":"", "newValue":"" } } }

Response:

{ "result": true, "id": "", "error": null }