All URIs are relative to https://dbos
Method | HTTP request | Description |
---|---|---|
create_job | POST /jobs | Creates a new asyncron Job (without starting it), and returns its ID for later use. |
delete_job | DELETE /jobs/{jobId} | Deletes this job and cleans all related data. |
get_job_definition | GET /jobs/{jobId} | Returns a job definition. |
get_jobs | GET /jobs | Returns all current job definitions. |
JobDefinition create_job(job_creation)
Creates a new asyncron Job (without starting it), and returns its ID for later use.
This API creates a new asyncron Job. The returned ID must be used for further requests like register events/submit/stop/delete the job.
from __future__ import print_function
import time
import optimserverclientpython
from optimserverclientpython.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = optimserverclientpython.JobApi()
job_creation = optimserverclientpython.JobCreation() # JobCreation |
try:
# Creates a new asyncron Job (without starting it), and returns its ID for later use.
api_response = api_instance.create_job(job_creation)
pprint(api_response)
except ApiException as e:
print("Exception when calling JobApi->create_job: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
job_creation | JobCreation |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
str delete_job(job_id)
Deletes this job and cleans all related data.
This API is to be called when your application is finished with this job. This will delete all related data like process, input data, response, etc.
from __future__ import print_function
import time
import optimserverclientpython
from optimserverclientpython.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = optimserverclientpython.JobApi()
job_id = 'job_id_example' # str |
try:
# Deletes this job and cleans all related data.
api_response = api_instance.delete_job(job_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling JobApi->delete_job: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
job_id | str |
str
[Back to top] [Back to API list] [Back to Model list] [Back to README]
JobDefinition get_job_definition(job_id)
Returns a job definition.
This API allows you to retrieve a job definition.
from __future__ import print_function
import time
import optimserverclientpython
from optimserverclientpython.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = optimserverclientpython.JobApi()
job_id = 'job_id_example' # str |
try:
# Returns a job definition.
api_response = api_instance.get_job_definition(job_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling JobApi->get_job_definition: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
job_id | str |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
list[JobDefinition] get_jobs()
Returns all current job definitions.
This API allows you to retrieve all current jobs from the system.
from __future__ import print_function
import time
import optimserverclientpython
from optimserverclientpython.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = optimserverclientpython.JobApi()
try:
# Returns all current job definitions.
api_response = api_instance.get_jobs()
pprint(api_response)
except ApiException as e:
print("Exception when calling JobApi->get_jobs: %s\n" % e)
This endpoint does not need any parameter.
[Back to top] [Back to API list] [Back to Model list] [Back to README]