Objectivity REST : Administrative Tool Resources : POST /v1/tool
POST /v1/tool
POST /v1/tool
Executes a tool to perform an administrative task.
Headers 
 
Response Format
Accept:application/json
Body format
Content-Type:application/json
URL Parameters 
fdAlias
Provides the alias of a federated database that is included in the REST server’s configuration file; see Configuring the REST Server in Objectivity/DB Administration.
Discussion 
This resource provides access to a subset of Objectivity/DB administrative tools that are relevant and accessible via the REST server.
Sample Body 
The following requests information about the software license in use by the federated database.
{
  "tool": "License",
  "flags": {
    "bootFile": "rentalFleet.boot"
  }
}
Curl Example 
curl -X POST -H "Content-Type:application/json,Accept:application/json" -d "{\"tool\":\"License\", \"flags\": {\"bootFile\": \"rentalFleet.boot\"}}" localhost:8185/v1/tool 
Response 
The response provides information about the current license.
Status: 200 OK
{
  "returnCode": 0,
  "toolOutput": "Federation contains a license with id:##### ...
  License expires (month/day/year): ...", ...
  "toolError": ""
}
Sample Body 
Creates a copy of the federated database one directory above its current location.
{
  "tool": "CopyFd",
  "flags": {
    "dirPath": ".."
  }
}
Curl Example 
curl -X POST -H "Content-Type:application/json,Accept:application/json" -d "{\"tool\":\"CopyFd\",\"flags\":{\"dirPath\":\"..\"}}" localhost:8185/v1/tool
Response 
The response provides information about the operation and indicates success.
Status: 200OK
{
  "returnCode": 0,
  "toolOutput": "Copying the following Federated Database files to the   destination directory: /home/project/test.fdb ...
  Creating new Name Service values... Federated Database Copy complete.",
  "toolError": ""
}
See also 
Tools for Administration Tasks in Objectivity/DB Administration provides detailed descriptions of tools and their options. This book documents administrative tools run on the command line and not via the REST interface, but descriptions for the tools and options are the same.