First Steps with the REST API

Before using the REST API or EA Jenkins Plugin make sure that the Micro Focus Enterprise Analyzer Web Service is running with the Logon User set to your Windows user.

To make a GET request, you can use any browser like Chrome, Firefox or Internet Explorer. For the other HTTP requests such as PUT, POST or DELETE you can use any tool like Postman or Fiddler.

To register a new workspace, use either the REST API or Enterprise Analyzer Administration > Administer > Configure Web Service.

If you want to use the REST API, you need to make a POST request with the name of the workspace and the Path of the workspace as a parameter: http://localhost:1248/api/workspaces/NewWorkspace?Path=C:\MicroFocus\Workspaces

{
  "status": "success",
  "message": "Workspace 'NewWorkspace' is registered successfully!"
}

Next you can list all registered workspaces: http://localhost:1248/api/workspaces

[
  {
    "name": "NewWorkspace",
    "directory": "D:\\MicroFocus\\Workspaces",
    "default": true,
    "url": "http://localhost:1248/api/workspaces/NewWorkspace"
  }
]

Then you can list all available APIs for the selected workspace: http://localhost:1248/api/workspaces/NewWorkspace

[
  {
    "url": "http://localhost:1248/api/workspaces/NewWorkspace/Projects",
    "description": "List all available projects for the workspace"
  },
  {
    "url": "http://localhost:1248/api/workspaces/NewWorkspace/Inventory",
    "description": "The report shows high-level statistics for source file types in the current workspace",
    "parameters": [
      {
        "name": "Format",
        "description": "Report formats: json(default), html, htm, xls, rtf, doc, txt, csv",
        "required": false,
        "example": "format=txt"
      }
    ]
  },
…
]

In the list of available APIs you will find the full details needed to use each API. Descriptions, parameters, supported formats, etc. are all shown.