Provides the functionality to manage the staging repository storage units (create, edit, delete, report, etc).
Create Storage Unit
Creates a new storage unit in the staging repository. A storage unit
Request
The create storage unit GET/PUT/POST request requires the storage unit name.
Code Block |
---|
|
PUT admin/create/<storage-unit-name> |
Response
If the storage unit was created successfully, a 200 response code with an OK message is returned.
...
Code Block |
---|
|
{"message": "STORAGE_UNIT_EXISTS"} |
Drop Storage Unit
Deletes a storage unit from the staging repository server. All content and transactions for the storage unit are deleted.
Request
The drop storage unit GET/DELETE/POST request requires the name of the storage unit to delete.
Code Block |
---|
|
DELETE admin/drop/<storage-unit-name> |
Response
If the storage unit was deleted successfully, a 200 response code with an OK message is returned.
...
Code Block |
---|
|
{"message": "STORAGE_UNIT_DOESNT_EXIST"} |
List Storage Units
Lists all available storage units with the option of returning content and transaction statistics.
Request
The list storage units GET/POST request can receive a withStats parameter to return content and transaction statistics for each storage unit.
Code Block |
---|
|
GET admin/list?withStats |
Response
A 200 response code with the list of storage unit names is returned.
...
Code Block |
---|
|
[
{
"name": "Sales",
"records": 0,
"transactions": 0
},
{
"name": "Products",
"records": 32,
"transactions": 32,
"latestTransactionTime": "2015-11-12T20:13:13.737Z",
"latestTransactionNum": "5644f2d997cc11144081d14f"
}
] |
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 |
---|
|
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.
...
Code Block |
---|
|
{"message": "STORAGE_UNIT_DOESNT_EXIST"} |
Dump Storage Unit
Dumps and returns the content and transaction collections of a storage unit in a zip file.
Request
The dump storage unit GET/POST request requires the name of the storage unit to dump.
Code Block |
---|
|
GET admin/dump/<storage-unit-name> |
Response
If the storage unit exists, a 200 response code and a zip file are returned.
...
Code Block |
---|
|
{"message": "STORAGE_UNIT_DOESNT_EXIST"} |
A storage unit has a set of events that are triggered during different actions performed on the storage unit. There are two different types of events: per document events and general events.
...
Code Block |
---|
|
{
"modules" : {
"connector": [
{
"module" : "AspireFieldMapping"
},
{
"settings" : {
"elasticsearch-index" : "aspiredocs",
"elasticsearch-type" : "aspiredoc"
},
"module" : "ESPublisher"
}
],
"index" : [
{
"module" : "FieldMapping"
},
{
"settings" : {
"elasticsearch-index" : "researchdocs",
"elasticsearch-type" : "researchdoc"
},
"module" : "ESPublisher"
}
],
"research" : [
{
"module" : "NormalizeCategory"
}
]
},
"settings" : {
"elasticsearch-port" : 9200,
"elasticsearch-server" : "localhost"
}
} |
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. This will replace any previous stored configuration for the storage unit.
...
Code Block |
---|
|
{
"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.
Code Block |
---|
|
{"message":"OK"} |
Enable Content Processing
Enables or disables content processing for a storage unit.
Request
The storage unit 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.
Enable
Code Block |
---|
|
POST admin/enableContentProcessing/<storage-unit-name>/true |
Disable
Code Block |
---|
|
POST admin/enableContentProcessing/<storage-unit-name>/false |
Response
If the operation is successful, a 200 response code and an OK message are returned.
Code Block |
---|
|
{"message":"OK"} |
Enable Content Compression
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 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 processing. By default compression is disabled.
Enable
Code Block |
---|
|
POST admin/enableContentCompression/<storage-unit-name>/true |
Disable
Code Block |
---|
|
POST admin/enableContentCompression/<storage-unit-name>/false |
Response
If the operation is successful, a 200 response code and an OK message are returned.
Code Block |
---|
|
{"message":"OK"} |
Enable Reprocessing Queue
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 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) content processing. By default the reprocessing queue is enabled.
Enable
Code Block |
---|
|
POST admin/enableContentCompression/<storage-unit-name>/true |
Disable
Code Block |
---|
|
POST admin/enableContentCompression/<storage-unit-name>/false |
Response
If the operation is successful, a 200 response code and an OK message are returned.
Code Block |
---|
|
{"message":"OK"} |
Get Configuration
Get the current storage unit configuration (content processing).
Request
The storage unit GET/POST get configuration request requires the name of the storage unit in the URL.
Code Block |
---|
|
POST admin/getConfiguration/<storage-unit-name> |
Response
If the operation is successful, a 200 response code and the storage unit JSON configuration.
...