Solver jobs¶
Operations on solver jobs. Available on the client as client.solver_jobs.
solver_jobs.submit¶
async def submit(jobs: list[PostSolverJobExt]) -> list[SolverJob]
Submit one or more solver jobs for execution.
REST operation: POST /sense-api/ext/solver/jobs
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
jobs |
list of PostSolverJobExt |
yes | Jobs to submit. |
Returns: list of SolverJob
async with AsyncSympheny(username, password) as client:
submitted = await client.solver_jobs.submit(jobs)
with Sympheny(username, password) as client:
submitted = client.solver_jobs.submit(jobs)
solver_jobs.list_for_scenarios¶
async def list_for_scenarios(
scenario_guids: list[str],
*,
limit: int = 200,
status: JobStatus | None = None,
) -> list[SolverJob]
List solver jobs for the given scenarios, optionally filtered by status.
REST operation: POST /sense-api/ext/solver/jobs/get-scenarios
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
scenario_guids |
list of str |
yes | GUIDs of the scenarios to list jobs for. |
limit |
int |
no | Maximum number of jobs to return. Defaults to 200. |
status |
JobStatus, optional |
no | Return only jobs with this status (filtered client-side). |
Returns: list of SolverJob
async with AsyncSympheny(username, password) as client:
jobs = await client.solver_jobs.list_for_scenarios(scenario_guids)
with Sympheny(username, password) as client:
jobs = client.solver_jobs.list_for_scenarios(scenario_guids)
solver_jobs.usage¶
async def usage() -> GetUsageExt
Get solver usage of the current subscription and user.
REST operation: GET /sense-api/ext/solver/jobs/usage
Returns: GetUsageExt
async with AsyncSympheny(username, password) as client:
usage = await client.solver_jobs.usage()
with Sympheny(username, password) as client:
usage = client.solver_jobs.usage()
solver_jobs.get¶
async def get(job_id: str | UUID) -> GetSolverJobExt
Get a solver job by id.
REST operation: GET /sense-api/ext/solver/jobs/{id}
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
job_id |
str or UUID |
yes | Solver job id. |
Returns: GetSolverJobExt
async with AsyncSympheny(username, password) as client:
job = await client.solver_jobs.get(job_id)
with Sympheny(username, password) as client:
job = client.solver_jobs.get(job_id)
solver_jobs.delete¶
async def delete(job_id: str | UUID) -> str
Delete a solver job.
REST operation: DELETE /sense-api/ext/solver/jobs/{id}
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
job_id |
str or UUID |
yes | Solver job id. |
Returns: str
async with AsyncSympheny(username, password) as client:
result = await client.solver_jobs.delete(job_id)
with Sympheny(username, password) as client:
result = client.solver_jobs.delete(job_id)
solver_jobs.stop¶
async def stop(job_id: str | UUID) -> str
Stop a running solver job.
REST operation: PUT /sense-api/ext/solver/jobs/{id}/stop
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
job_id |
str or UUID |
yes | Solver job id. |
Returns: str
async with AsyncSympheny(username, password) as client:
result = await client.solver_jobs.stop(job_id)
with Sympheny(username, password) as client:
result = client.solver_jobs.stop(job_id)