Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions nomad/api/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,22 @@ def __getitem__(self, item):
except nomad.api.exceptions.URLNotFoundNomadException:
raise KeyError

def get_job(self, id):
def get_job(self, id, namespace=None):
""" Query a single job for its specification and status.

https://www.nomadproject.io/docs/http/job.html

arguments:
- id
- namespace :(str) optional, specifies the target namespace. Specifying * would return all jobs.
This is specified as a querystring parameter.
returns: dict
raises:
- nomad.api.exceptions.BaseNomadException
- nomad.api.exceptions.URLNotFoundNomadException
"""
return self.request(id, method="get").json()
params = {"namespace": namespace}
return self.request(id, method="get", params=params).json()

def get_versions(self, id):
""" This endpoint reads information about all versions of a job.
Expand Down