optimserverclientpython.JobApi

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.

create_job

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.

Example

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)

Parameters

Name Type Description Notes
job_creation JobCreation

Return type

JobDefinition

HTTP request headers

  • Content-Type: application/json, application/xml
  • Accept: application/json, application/xml

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_job

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.

Example

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)

Parameters

Name Type Description Notes
job_id str

Return type

str

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/xml

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_job_definition

JobDefinition get_job_definition(job_id)

Returns a job definition.

This API allows you to retrieve a job definition.

Example

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)

Parameters

Name Type Description Notes
job_id str

Return type

JobDefinition

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/xml

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_jobs

list[JobDefinition] get_jobs()

Returns all current job definitions.

This API allows you to retrieve all current jobs from the system.

Example

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)

Parameters

This endpoint does not need any parameter.

Return type

list[JobDefinition]

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/xml

[Back to top] [Back to API list] [Back to Model list] [Back to README]