Get records from lsb.acct files (POST)

Description

URL

scheme://domain:port/platform/explorer/api/{version}/bacct

Description

Gets records from lsb.acct files according to specified query options.

The system searches on Elasticsearch, which stores parsed lsb.acct log file data loaded by the LSF Explorer data collector.

HTTP Method POST
Parameters None

Request

Method POST
Request-URI

/platform/explorer/api/{version}/bacct

Request-Header Name Value
Accept application/json
Message-Body
{
    "options" : {
        "cluster" : "cluster_name",
        "scroll_id" : "scroll_id",
        "a" : true_or_false,
        "d" : true_or_false,
        "e" : true_or_false, 
        "app" : "application_profile_name",
        "C" : ["time0", "time1"],
        "D" : ["time0", "time1"],
        "G" :"user_group",
        "S" : ["time0", "time1"],
        "T" : ["time0", "time1"],
        "J" : "job_name",
        "Jd" : "job_description",
        "Lp" : "project_name",
        "m" : ["host1", "host2" ...],
        "P" : "project_name",
        "q" : "queue_name",
        "u" : "user_name" | "all",
        "job_ID" : ["id1", "id2[idx1]" ...]
    }
}
Note:
  1. The option key is the same as the LSF default command option without the "-" prefix except for "cluster", "scroll_id" and "job_ID".
  2. If "scroll_id" is specified, the query is regarded as subsequent queries for an Elasticsearch scroll search. Otherwise, the query will start an Elasticsearch scroll search. Refer to https://www.elastic.co/guide/en/elasticsearch/reference/5.4/search-request-scroll.html for more details.
  3. The time format of all time related options must be a 10-bit integer.

Response

Response Code
  • 200 Successful: Request was successful.
  • 500 Internal Server Error: Exception occurred.
Response-Header Name Value
Content-Type text/plain
Message Body Success Message

If successful, returns the list of log records in the following format:

	record_number=xxxxxxx
	...
	data line
	data line
	data line
	...
	scroll_id=xxxxxxx
Note:
  1. The data line format is the same as the lsb.acct contents.
  2. The first line is the returned record number of the current batch.
  3. The last line is the scroll ID for the next batch query.
  4. "/n" is used as the line break.
Failure Message

If not successful, returns an error message.