organization_jobs_api module#

class edgeimpulse_api.api.organization_jobs_api.OrganizationJobsApi(api_client=None)[source]#

Bases: object

cancel_organization_job(
organization_id: StrictInt[StrictInt],
job_id: StrictInt[StrictInt],
force_cancel: StrictStr | None[StrictStr | None] = None,
**kwargs,
) GenericApiResponse[source]#

Cancel job

Cancel a running job.

Parameters:
  • organization_id (int) – Organization ID (required)

  • job_id (int) – Job ID (required)

  • force_cancel (str) – If set to ‘true’, we won’t wait for the job cluster to cancel the job, and will mark the job as finished.

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

GenericApiResponse

download_organization_jobs_logs(
organization_id: StrictInt[StrictInt],
job_id: StrictInt[StrictInt],
limit: StrictInt | None[StrictInt | None] = None,
log_level: StrictStr | None[StrictStr | None] = None,
**kwargs,
) str[source]#

Download logs

Download the logs for a job (as a text file).

Parameters:
  • organization_id (int) – Organization ID (required)

  • job_id (int) – Job ID (required)

  • limit (int) – Maximum number of results

  • log_level (str) – Log level (error, warn, info, debug)

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

str

get_organization_job_status(
organization_id: StrictInt[StrictInt],
job_id: StrictInt[StrictInt],
**kwargs,
) GetJobResponse[source]#

Get job status

Get the status for a job.

Parameters:
  • organization_id (int) – Organization ID (required)

  • job_id (int) – Job ID (required)

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

GetJobResponse

get_organization_jobs_logs(
organization_id: StrictInt[StrictInt],
job_id: StrictInt[StrictInt],
limit: StrictInt | None[StrictInt | None] = None,
log_level: StrictStr | None[StrictStr | None] = None,
**kwargs,
) LogStdoutResponse[source]#

Get logs

Get the logs for a job.

Parameters:
  • organization_id (int) – Organization ID (required)

  • job_id (int) – Job ID (required)

  • limit (int) – Maximum number of results

  • log_level (str) – Log level (error, warn, info, debug)

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

LogStdoutResponse

get_organization_socket_token(
organization_id: StrictInt[StrictInt],
**kwargs,
) SocketTokenResponse[source]#

Get socket token for an organization

Get a token to authenticate with the web socket interface.

Parameters:
  • organization_id (int) – Organization ID (required)

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

SocketTokenResponse

list_active_organization_jobs(
organization_id: StrictInt[StrictInt],
root_only: StrictBool | None[StrictBool | None] = None,
**kwargs,
) ListJobsResponse[source]#

List active jobs

Get all active jobs for this organization

Parameters:
  • organization_id (int) – Organization ID (required)

  • root_only (bool) – Whether to exclude jobs with a parent ID (so jobs started as part of another job)

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

ListJobsResponse

list_all_organization_jobs(
organization_id: StrictInt[StrictInt],
start_date: datetime | None[datetime | None] = None,
end_date: datetime | None[datetime | None] = None,
limit: StrictInt | None[StrictInt | None] = None,
offset: StrictInt | None[StrictInt | None] = None,
exclude_pipeline_transform_jobs: StrictBool | None[StrictBool | None] = None,
root_only: StrictBool | None[StrictBool | None] = None,
**kwargs,
) ListJobsResponse[source]#

List all jobs

Get all jobs for this organization

Parameters:
  • organization_id (int) – Organization ID (required)

  • start_date (datetime) – Start date

  • end_date (datetime) – End date

  • limit (int) – Maximum number of results

  • offset (int) – Offset in results, can be used in conjunction with LimitResultsParameter to implement paging.

  • exclude_pipeline_transform_jobs (bool) – Whether to exclude pipeline / transformation jobs

  • root_only (bool) – Whether to exclude jobs with a parent ID (so jobs started as part of another job)

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

ListJobsResponse

list_finished_organization_jobs(
organization_id: StrictInt[StrictInt],
start_date: datetime | None[datetime | None] = None,
end_date: datetime | None[datetime | None] = None,
limit: StrictInt | None[StrictInt | None] = None,
offset: StrictInt | None[StrictInt | None] = None,
root_only: StrictBool | None[StrictBool | None] = None,
**kwargs,
) ListJobsResponse[source]#

List finished jobs

Get all finished jobs for this organization

Parameters:
  • organization_id (int) – Organization ID (required)

  • start_date (datetime) – Start date

  • end_date (datetime) – End date

  • limit (int) – Maximum number of results

  • offset (int) – Offset in results, can be used in conjunction with LimitResultsParameter to implement paging.

  • root_only (bool) – Whether to exclude jobs with a parent ID (so jobs started as part of another job)

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

ListJobsResponse