graviti.openapi.action#

Interfaces about the actions.

Module Contents#

Functions#

create_action(access_key, url, workspace, dataset, *, name, payload)

Execute the OpenAPI POST /v2/datasets/{workspace}/{dataset}/actions.

list_actions(access_key, url, workspace, dataset, *, sort = None, offset = None, limit = None)

Execute the OpenAPI GET /v2/datasets/{workspace}/{dataset}/actions.

get_action(access_key, url, workspace, dataset, *, action)

Execute the OpenAPI GET /v2/datasets/{workspace}/{dataset}/actions/{action}.

update_action(access_key, url, workspace, dataset, *, action, name = None, state = None, payload = None)

Execute the OpenAPI PATCH /v2/datasets/{workspace}/{dataset}/actions/{action}.

delete_action(access_key, url, workspace, dataset, *, action)

Execute the OpenAPI DELETE /v2/datasets/{workspace}/{dataset}/actions/{action}.

create_action_run(access_key, url, workspace, dataset, *, action, arguments)

Execute the OpenAPI POST /v2/datasets/{workspace}/{dataset}/actions/{action}/runs.

list_action_runs(access_key, url, workspace, dataset, *, action, sort = None, offset = None, limit = None)

Execute the OpenAPI GET /v2/datasets/{workspace}/{dataset}/actions/{action}/runs.

get_action_run(access_key, url, workspace, dataset, *, action, run_number)

Execute the OpenAPI GET /v2/datasets/{workspace}/{dataset}/actions/{action}/runs /{run_number}.

cancel_action_run(access_key, url, workspace, dataset, *, action, run_number)

Execute the OpenAPI POST /v2/datasets/{workspace}/{dataset}/actions/{action}/runs /{run_number}/cancel.

get_action_run_node_log(access_key, url, workspace, dataset, *, action, run_number, node_id)

Execute the OpenAPI GET /v2/datasets/{workspace}/{dataset}/actions/{action}/runs /{run_number}/nodes/{node_id}/logs.

graviti.openapi.action.create_action(access_key, url, workspace, dataset, *, name, payload)[source]#

Execute the OpenAPI POST /v2/datasets/{workspace}/{dataset}/actions.

Parameters
  • access_key (str) – User’s access key.

  • url (str) – The URL of the graviti website.

  • workspace (str) – The workspace of the dataset.

  • dataset (str) – Name of the dataset, unique for a user.

  • name (str) – The name of the action.

  • payload (str) – The payload of the action.

Returns

The response of OpenAPI.

Return type

Dict[str, Any]

graviti.openapi.action.list_actions(access_key, url, workspace, dataset, *, sort=None, offset=None, limit=None)[source]#

Execute the OpenAPI GET /v2/datasets/{workspace}/{dataset}/actions.

Parameters
  • access_key (str) – User’s access key.

  • url (str) – The URL of the graviti website.

  • workspace (str) – The workspace of the dataset.

  • dataset (str) – Name of the dataset, unique for a user.

  • sort (graviti.utility.SortParam) – The column and the direction the list result sorted by.

  • offset (Optional[int]) – The offset of the page. The default value of this param in OpenAPIv2 is 0.

  • limit (Optional[int]) – The limit of the page. The default value of this param in OpenAPIv2 is 128.

Returns

The response of OpenAPI.

Return type

Dict[str, Any]

graviti.openapi.action.get_action(access_key, url, workspace, dataset, *, action)[source]#

Execute the OpenAPI GET /v2/datasets/{workspace}/{dataset}/actions/{action}.

Parameters
  • access_key (str) – User’s access key.

  • url (str) – The URL of the graviti website.

  • workspace (str) – The workspace of the dataset.

  • dataset (str) – Name of the dataset, unique for a user.

  • action (str) – The name of the aciton.

Returns

The response of OpenAPI.

Return type

Dict[str, Any]

graviti.openapi.action.update_action(access_key, url, workspace, dataset, *, action, name=None, state=None, payload=None)[source]#

Execute the OpenAPI PATCH /v2/datasets/{workspace}/{dataset}/actions/{action}.

Parameters
  • access_key (str) – User’s access key.

  • url (str) – The URL of the graviti website.

  • workspace (str) – The workspace of the dataset.

  • dataset (str) – Name of the dataset, unique for a user.

  • action (str) – The name of the aciton.

  • name (Optional[str]) – The new name of the action.

  • state (Optional[str]) – The new state of the action.

  • payload (Optional[str]) – The new payload of the action.

Returns

The response of OpenAPI.

Return type

Dict[str, Any]

graviti.openapi.action.delete_action(access_key, url, workspace, dataset, *, action)[source]#

Execute the OpenAPI DELETE /v2/datasets/{workspace}/{dataset}/actions/{action}.

Parameters
  • access_key (str) – User’s access key.

  • url (str) – The URL of the graviti website.

  • workspace (str) – The workspace of the dataset.

  • dataset (str) – Name of the dataset, unique for a user.

  • action (str) – The name of the action.

Return type

None

graviti.openapi.action.create_action_run(access_key, url, workspace, dataset, *, action, arguments)[source]#

Execute the OpenAPI POST /v2/datasets/{workspace}/{dataset}/actions/{action}/runs.

Parameters
  • access_key (str) – User’s access key.

  • url (str) – The URL of the graviti website.

  • workspace (str) – The workspace of the dataset.

  • dataset (str) – Name of the dataset, unique for a user.

  • action (str) – The name of the action.

  • arguments (Optional[Dict[str, Any]]) – The arguments of the action run.

Returns

The response of OpenAPI.

Return type

Dict[str, Any]

graviti.openapi.action.list_action_runs(access_key, url, workspace, dataset, *, action, sort=None, offset=None, limit=None)[source]#

Execute the OpenAPI GET /v2/datasets/{workspace}/{dataset}/actions/{action}/runs.

Parameters
  • access_key (str) – User’s access key.

  • url (str) – The URL of the graviti website.

  • workspace (str) – The workspace of the dataset.

  • dataset (str) – Name of the dataset, unique for a user.

  • action (str) – The name of the action.

  • sort (graviti.utility.SortParam) – The column and the direction the list result sorted by.

  • offset (Optional[int]) – The offset of the page. The default value of this param in OpenAPIv2 is 0.

  • limit (Optional[int]) – The limit of the page. The default value of this param in OpenAPIv2 is 128.

Returns

The response of OpenAPI.

Return type

Dict[str, Any]

graviti.openapi.action.get_action_run(access_key, url, workspace, dataset, *, action, run_number)[source]#

Execute the OpenAPI GET /v2/datasets/{workspace}/{dataset}/actions/{action}/runs /{run_number}.

Parameters
  • access_key (str) – User’s access key.

  • url (str) – The URL of the graviti website.

  • workspace (str) – The workspace of the dataset.

  • dataset (str) – Name of the dataset, unique for a user.

  • action (str) – The name of the aciton.

  • run_number (int) – The number of the aciton run.

Returns

The response of OpenAPI.

Return type

Dict[str, Any]

graviti.openapi.action.cancel_action_run(access_key, url, workspace, dataset, *, action, run_number)[source]#

Execute the OpenAPI POST /v2/datasets/{workspace}/{dataset}/actions/{action}/runs /{run_number}/cancel.

Parameters
  • access_key (str) – User’s access key.

  • url (str) – The URL of the graviti website.

  • workspace (str) – The workspace of the dataset.

  • dataset (str) – Name of the dataset, unique for a user.

  • action (str) – The name of the aciton.

  • run_number (int) – The number of the aciton run.

Returns

The response of OpenAPI.

Return type

Dict[str, Any]

graviti.openapi.action.get_action_run_node_log(access_key, url, workspace, dataset, *, action, run_number, node_id)[source]#

Execute the OpenAPI GET /v2/datasets/{workspace}/{dataset}/actions/{action}/runs /{run_number}/nodes/{node_id}/logs.

Parameters
  • access_key (str) – User’s access key.

  • url (str) – The URL of the graviti website.

  • workspace (str) – The workspace of the dataset.

  • dataset (str) – Name of the dataset, unique for a user.

  • action (str) – The name of the aciton.

  • run_number (int) – The number of the aciton run.

  • node_id (str) – The id of the action run node.

Returns

The response of OpenAPI.

Return type

requests.models.Response