Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejs
themeRDark
[
    {
        "name": "Sales",
        "records": 0,
        "transactions": 0
    },
    {
        "name": "Products",
        "records": 32,
        "transactions": 32,
        "latestTransactionTime": "2015-11-12T20:13:13.737Z",
        "latestTransactionNum": "5644f2d997cc11144081d14f"
    }
]

List Scopes

List all available scopes for a given Storage Unit.

Request

The list scopes GET request receives the Storage Unit name

Code Block
languagetext
themeRDark
GET admin/listScopes/<storage-unit-name>

Response

A 200 response code with the list of scopes for the Storage Unit is returned.

Code Block
languagejs
themeRDark
[
  "connector",
  "index"
]

Get Storage Unit Statistics

Gets the statistics for a storage unit.

Request

The get storage unit statistics GET/POST request requires the name of the storage unit.

Code Block
languagejs
themeRDark
GET admin/getStatistics/<storage-unit-name>

Response

If the storage unit exists, a 200 response code and a JSON with the storage unit statistics is returned.

...

Dumps all transactions and content records of a storage unit. Dump is a two step process: create the dump file and download the dump file.

Create Dump

Request

The create dump GET request requires the name of the storage unit to dump.

Code Block
languagetext
themeRDark
GET admin/createDump/<storage-unit-name>

Response

If the storage unit exists, a 200 response code and a fileId to call the download dump request.

...

Code Block
languagejs
themeRDark
 {"message": "STORAGE_UNIT_DOESNT_EXIST"}

Download Dump

Request

The download dump GET request requires the fileId returned by the create dump request.

Code Block
languagetext
themeRDark
GET admin/downloadDump/<file-id>

Response

If the file id exists, but the dump file is in process of being created, a 200 response code with an IN_PROGRESS message is returned.

 

Code Block
languagejs
themeRDark
 {"message": "IN_PROGRESS"}

If the file id exists and the dump file is ready, a 200 response code and the file are returned.

 

If the file id doesn't exist, a 400 response code with an INVALID_DUMP_FILE_ID message is returned.

Code Block
languagejs
themeRDark
 {"message": "INVALID_DUMP_FILE_ID"}

 

Anchor
Configure Storage Unit
Configure Storage Unit
Configure Storage Unit

...

This configuration defines a content processing pipeline for three different scopes of the storage unit: connector (AspireFieldMapping → ESPublisher), index (FieldMapping → ESPublisher) and research (NormalizeCategory).

Request

The storage unit PUT/POST set content processing modules request requires the name of the storage unit in the URL and receives a JSON in the body with the content processing modules configuration.

...

Code Block
languagejs
themeRDark
POST admin/setContentProcessingModules/<storage-unit-name>
{
    "modules" : {
        "connector": [ 
            {
                "module" : "FieldMapping"
            },
            {
                "settings" : {
                    "elasticsearch-index" : "aspiredocs",
                    "elasticsearch-type" : "aspiredoc"
                },
                "module" : "ESPublisher"
            }
        ], 
        ...
    },
    "settings" : {
        "elasticsearch-port" : 9200,
        "elasticsearch-server" : "localhost"
    }
}

 

Response

If the operation is successful, a 200 response code and an OK message are returned.

...

Enables or disables content processing for a storage unit.

Request

The storage unit PUT/GET/POST enable content processing request requires the name of the storage unit and a boolean value to indicate whether to enable (true) or disable (false) content processing. When a storage unit is created, content processing is enabled by default.

...

Code Block
languagetext
themeRDark
PUT admin/enableContentProcessing/<storage-unit-name>/false

Response

If the operation is successful, a 200 response code and an OK message are returned.

...

Enables or disables content encryption for a storage unit. When enabled, the JSON documents are encrypted, with the configured key manager, before being stored in the database.

Request

The storage unit PUT/GET/POST enable content encryption request requires the name of the storage unit and a boolean value to indicate whether to enable (true) or disable (false) content encryption. By default encryption is enabled.

...

Code Block
languagejs
themeRDark
PUT admin/enableContentEncryption/<storage-unit-name>/false

Response

If the operation is successful, a 200 response code and an OK message are returned.

...

Enables or disables content compression for a storage unit. When enabled, the JSON documents are compressed before encryption happens for storage.

Request

The storage unit PUT/GET/POST enable content compression request requires the name of the storage unit and a boolean value to indicate whether to enable (true) or disable (false) content compression. By default compression is disabled.

...

Code Block
languagejs
themeRDark
PUT admin/enableContentCompression/<storage-unit-name>/false

Response

If the operation is successful, a 200 response code and an OK message are returned.

...

Enables or disables the background reprocessing queue of a storage unit. When enabled, automatic and manual reprocess requests will execute the Process document events configured for documents being reprocessed.

Request

The storage unit PUT/GET/POST enable reprocessing queue request requires the name of the storage unit and a boolean value to indicate whether to enable (true) or disable (false) the reprocessing queue execution. By default the reprocessing queue is enabled.

...

Code Block
languagetext
themeRDark
PUT admin/enableReprocessingQueue/<storage-unit-name>/false

Response

If the operation is successful, a 200 response code and an OK message are returned.

...

Get the current storage unit configuration. This includes the content processing modules (settings field) and the configuration flags for encryption, compression, content processing and reprocessing queue.

Request

The storage unit GET get configuration request requires the name of the storage unit in the URL.

Code Block
languagetext
themeRDark
 GET admin/getConfiguration/<storage-unit-name>

Response

If the operation is successful, a 200 response code and the storage unit JSON configuration.

...