Skip to content

Extend jobsub_api for getting completed job information via lens/landscape #643

@marcmengel

Description

@marcmengel

@retzkek mentioned:

One can query the landscape job API (what’s used to populate job status and information in a number of fifemon dashboards), e.g:

>> requests.post(LENS_URL,json={'query':'query{submission(id:"78637685.0@jobsub01.fnal.gov"){id idle running completed}}'}).json()
{'data': {'submission': {'id': '78637685@jobsub01.fnal.gov', 'idle': 874, 'running': 581, 'completed': 3194}}}>

the API docs are in the GraphQL playground (button in the upper-left corner), which is also useful for coming up with your query. In GraphQL you explicitly request the data you want it to return.
caveats: updates can be delayed by a few minutes, and support is best-effort only.

We might consider adding a "lens()" call to the SubmittedJob objects to get data that way... it could update the job data and return a dictionary very much like q_long().

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions