

```json
{
  "openapi": "3.0.2",
  "info": {
    "title": "Workflow Engine API",
    "version": "master-5dc056e",
    "description": "# Introduction\n\nThe Workflow Engine API enables you to create, trigger, and monitor RT3D templates in the cloud. It offers built-in templates for common RT3D data preparation (convert, optimize, transform) so your assets can be interoperable. You can also create your own custom templates to be used by members of your organization. This helps scale your workload, eliminate repetitive tasks, and improve data integrity.\n\n**With the Workflow Engine API you can:**\n* Run built-in RT3D templates offered by Unity Technologies using industry leading solutions like Pixyz\n* Run custom templates with your own operators using custom scripts\n* Monitor jobs and debug your custom templates\n# Get Started\n\nPrerequisites: You have a Unity account.\nTo get started, you will first need to create a service account and assign suitable roles for it. Note that you must be an Organization Owner to manage service accounts.\n\n## Set up a service account\n\nYou can find information on how to create a service account\n[here](https://services.docs.unity.com/docs/service-account-auth/#create-a-service-account).\nAfter the service account has been created, you will need to authenticate an API and choose the roles that would be assigned to it.\n\n## Authentication & Authorization\n\nTo learn how to authenticate your requests, please visit the\n[Admin API authentication](https://services.docs.unity.com/docs/service-account-auth/#authenticate-an-api-using-service-account-credentials) page.\n\n## Roles and Permissions\n\nThe service account must have the relevant access to be able to call the APIs. The Workflow Engine API uses the Automation roles. Please see below for the available\nservice account roles and their corresponding access rights:\n\n| Role                                | Access Rights                                                                                         |\n|-------------------------------------|-------------------------------------------------------------------------------------------------------|\n| Automation Developer                | Grants full read and write access.                                                                    |\n| Automation User                     | Grants access to the read, list and trigger endpoints. Also grants access to retry and terminate job. |\n| Automation Viewer                   | Grants access to the read and list endpoints.                                                         |\n\nYou can learn more about the Automation roles available on the\n[Admin API authentication page](https://services.docs.unity.com/docs/service-account-auth/#available-roles) under St (Storage and transformation) section.\n# Guides\n\nThis section contains guides on how to use the API.\n## Jobs\n\n### Get job list\n\nYou can retrieve jobs from your organization in a paginated list and narrow the results using filters via [GET /workflow-engine/v1/organizations/{organizationId}/jobs]. The available filters are:\n* inputDatasetId\n* inputDatasetVersion\n* outputDatasetId\n* outputDatasetVersion\n* status\n* template\n\n### Monitor a Job\n\nWith a job id, you can directly view the state of a job by calling [GET /workflow-engine/v1/organizations/{organizationId}/jobs/{id}].\nThe response can be used to determine the progress of the job and its individual steps.\nIf its status equals succeeded then it will also contain any output data generated from the workflow.\n\n### Retry a Job\nWith a job id, you can retry a job that failed by calling [PUT /workflow-engine/v1/organizations/{organizationId}/jobs/{id}/retry].\n\n### Terminate a Job\nWith a job id, you can terminate a job that is running by calling [PUT /workflow-engine/v1/organizations/{organizationId}/jobs/{id}/terminate].\n## Custom Templates\n\n### Get custom template list\n\nYou can retrieve the list of custom template for your organization via [GET /workflow-engine/v1/organizations/{organizationId}/templates].\n\n### Get custom template details\n\nWith a custom template's id you can retrieve the template details by calling [GET /workflow-engine/v1/organizations/{organizationId}/templates/{template_id}].\n\n### Trigger custom template by id\nWith a custom template's id you can trigger a template by calling [POST /workflow-engine/v1/organizations/{organizationId}/templates/{template_id}/trigger].\n",
    "contact": {
      "name": "API Support",
      "url": "https://support.unity.com/"
    },
    "license": {
      "name": "Unity Terms of Service",
      "url": "https://unity.com/legal"
    }
  },
  "servers": [
    {
      "url": "https://services.api.unity.com",
      "description": "Production"
    }
  ],
  "paths": {
    "/workflow-engine/v1/organizations/{organizationId}/jobs": {
      "get": {
        "tags": [
          "Jobs"
        ],
        "summary": "List workflow jobs",
        "description": "Returns list of workflow jobs scoped by organization with optional filters.",
        "operationId": "get_jobs_list_workflow_engine_v1_organizations__organizationId__jobs_get",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "The active Organization ID",
            "required": true,
            "schema": {
              "type": "string",
              "example": "3973850012340"
            },
            "example": "3973850012340"
          },
          {
            "description": "UUID of the input dataset",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "title": "Inputdatasetid",
              "description": "UUID of the input dataset"
            },
            "example": "b40397bf-ef96-4106-ab01-4a0dea914aa6",
            "name": "inputDatasetId",
            "in": "query"
          },
          {
            "description": "UUID of the input dataset version",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "title": "Inputdatasetversion",
              "description": "UUID of the input dataset version"
            },
            "example": "b40397bf-ef96-4106-ab01-4a0dea914aa6",
            "name": "inputDatasetVersion",
            "in": "query"
          },
          {
            "description": "UUID of the output dataset",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "title": "Outputdatasetid",
              "description": "UUID of the output dataset"
            },
            "example": "b40397bf-ef96-4106-ab01-4a0dea914aa6",
            "name": "outputDatasetId",
            "in": "query"
          },
          {
            "description": "UUID of the output dataset version",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "title": "Outputdatasetversion",
              "description": "UUID of the output dataset version"
            },
            "example": "b40397bf-ef96-4106-ab01-4a0dea914aa6",
            "name": "outputDatasetVersion",
            "in": "query"
          },
          {
            "description": "Status of the workflow job",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(Running|Succeeded|Failed|Error|Pending|Queued|Suspended)$",
              "title": "Status",
              "description": "Status of the workflow job"
            },
            "example": "Running",
            "name": "status",
            "in": "query"
          },
          {
            "description": "Name of the workflow template",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Template",
              "description": "Name of the workflow template"
            },
            "example": "My Custom Workflow",
            "name": "template",
            "in": "query"
          },
          {
            "description": "The maximum number of records to return",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "description": "The maximum number of records to return",
              "default": 10
            },
            "example": 10,
            "name": "limit",
            "in": "query"
          },
          {
            "description": "Offset of the records to return",
            "required": false,
            "schema": {
              "title": "Offset",
              "description": "Offset of the records to return",
              "default": 0
            },
            "example": 0,
            "name": "offset",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Returns when operation succeeds",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowJobsList"
                }
              }
            }
          },
          "422": {
            "description": "Returns when the request fails to process the template's spec",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Returns when an unexpected server error occurs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/workflow-engine/v1/organizations/{organizationId}/jobs/{id}": {
      "get": {
        "tags": [
          "Jobs"
        ],
        "summary": "Get workflow job details",
        "description": "Get a workflow job details by providing its ID.",
        "operationId": "get_workflow_job_details_workflow_engine_v1_organizations__organizationId__jobs__id__get",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "The active Organization ID",
            "required": true,
            "schema": {
              "type": "string",
              "example": "3973850012340"
            },
            "example": "3973850012340"
          },
          {
            "description": "Workflow job id",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Id",
              "description": "Workflow job id"
            },
            "name": "id",
            "in": "path"
          },
          {
            "description": "enforce job synchronization",
            "required": false,
            "schema": {
              "type": "boolean",
              "title": "Force Refresh",
              "description": "enforce job synchronization",
              "default": false
            },
            "example": true,
            "name": "force_refresh",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Returns job details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowJobResponse"
                }
              }
            }
          },
          "403": {
            "description": "Returns when not authorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Returns when job is not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "description": "Returns when an unexpected server error occurs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/workflow-engine/v1/organizations/{organizationId}/templates": {
      "get": {
        "tags": [
          "CustomTemplates"
        ],
        "summary": "List custom templates",
        "description": "List custom templates for your Organization.",
        "operationId": "list_templates_workflow_engine_v1_organizations__organizationId__templates_get",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "The active Organization ID",
            "required": true,
            "schema": {
              "type": "string",
              "example": "3973850012340"
            },
            "example": "3973850012340"
          },
          {
            "description": "Template's Creator ID",
            "required": false,
            "schema": {
              "title": "Creatorid",
              "description": "Template's Creator ID"
            },
            "name": "creatorId",
            "in": "query"
          },
          {
            "description": "Offset to list from",
            "required": false,
            "schema": {
              "title": "Offset",
              "description": "Offset to list from",
              "default": 0
            },
            "example": 0,
            "name": "offset",
            "in": "query"
          },
          {
            "description": "The maximum number of templates to return",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "description": "The maximum number of templates to return",
              "default": 10
            },
            "example": 10,
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a list of WorkflowTemplates",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowTemplateList"
                }
              }
            }
          },
          "403": {
            "description": "Returns when not authorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "description": "Returns when an unexpected server error occurs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/workflow-engine/v1/organizations/{organizationId}/jobs/{job_id}/retry": {
      "put": {
        "tags": [
          "Jobs"
        ],
        "summary": "Retry a job",
        "description": "Retry a job by providing its ID.",
        "operationId": "retry_job_workflow_engine_v1_organizations__organizationId__jobs__job_id__retry_put",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "The active Organization ID",
            "required": true,
            "schema": {
              "type": "string",
              "example": "3973850012340"
            },
            "example": "3973850012340"
          },
          {
            "description": "Job id to retry",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Job Id",
              "description": "Job id to retry"
            },
            "name": "job_id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Returns when operation succeeds",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TriggerJobResponse"
                }
              }
            }
          },
          "403": {
            "description": "Returns when not authorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Returns when job is not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "description": "Returns when an unexpected server error occurs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Returns when server is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/workflow-engine/v1/organizations/{organizationId}/jobs/{job_id}/terminate": {
      "put": {
        "tags": [
          "Jobs"
        ],
        "summary": "Terminate a job",
        "description": "Terminate a job by providing its ID.",
        "operationId": "terminate_job_workflow_engine_v1_organizations__organizationId__jobs__job_id__terminate_put",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "The active Organization ID",
            "required": true,
            "schema": {
              "type": "string",
              "example": "3973850012340"
            },
            "example": "3973850012340"
          },
          {
            "description": "Job id to terminate",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Job Id",
              "description": "Job id to terminate"
            },
            "name": "job_id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Returns when operation succeeds",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobTerminateResponse"
                }
              }
            }
          },
          "403": {
            "description": "Returns when not authorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Returns when job is not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "412": {
            "description": "Returns when job is not valid for termination",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "description": "Returns when an unexpected server error occurs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Returns when server is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/workflow-engine/v1/organizations/{organizationId}/templates/{template_id}": {
      "get": {
        "tags": [
          "CustomTemplates"
        ],
        "summary": "Get custom template details",
        "description": "Get a custom template details for your Organization by providing its template ID.",
        "operationId": "get_template_by_id_workflow_engine_v1_organizations__organizationId__templates__template_id__get",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "The active Organization ID",
            "required": true,
            "schema": {
              "type": "string",
              "example": "3973850012340"
            },
            "example": "3973850012340"
          },
          {
            "description": "WorkflowTemplate ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Template Id",
              "description": "WorkflowTemplate ID"
            },
            "name": "template_id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a WorkflowTemplate",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowTemplateResponse"
                }
              }
            }
          },
          "403": {
            "description": "Returns when not authorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Returns when WorkflowTemplate is not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "description": "Returns when an unexpected server error occurs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/workflow-engine/v1/organizations/{organizationId}/templates/{template_id}/trigger": {
      "post": {
        "tags": [
          "CustomTemplates"
        ],
        "summary": "Trigger a custom template",
        "description": "Trigger a custom template for your Organization by providing its template ID.",
        "operationId": "trigger_workflow_by_template_id_workflow_engine_v1_organizations__organizationId__templates__template_id__trigger_post",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "The active Organization ID",
            "required": true,
            "schema": {
              "type": "string",
              "example": "3973850012340"
            },
            "example": "3973850012340"
          },
          {
            "description": "Template ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Template Id",
              "description": "Template ID"
            },
            "name": "template_id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "title": "Payload",
                "description": "The request body for a template is defined by the parameters outlined in its `WorkflowTemplate.inputs`. The fields in the body correspond with the `name` of each input parameter and their values must adhere to its defined `type`. Required parameters must be included in the request body, while optional parameters can be omitted."
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Returns when Job is triggered",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TriggerJobResponse"
                }
              }
            }
          },
          "403": {
            "description": "Returns when user does not have permission to trigger the resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Returns when resource is not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Returns when the request fails to process the template's spec",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Returns when an unexpected server error occurs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "DatasetVersionsResponse": {
        "properties": {
          "dataset_id": {
            "type": "string",
            "title": "Dataset Id",
            "default": ""
          },
          "dataset_version": {
            "type": "string",
            "title": "Dataset Version"
          },
          "uri": {
            "type": "string",
            "title": "Uri"
          }
        },
        "type": "object",
        "title": "DatasetVersionsResponse",
        "description": "Any common logic to be shared by all models goes here"
      },
      "ErrorCode": {
        "type": "string",
        "enum": [
          "400"
        ],
        "title": "ErrorCode",
        "description": "An enumeration."
      },
      "ErrorResponse": {
        "properties": {
          "detail": {
            "type": "string",
            "title": "Detail"
          },
          "status_code": {
            "type": "integer",
            "title": "Status Code"
          }
        },
        "type": "object",
        "required": [
          "status_code"
        ],
        "title": "ErrorResponse",
        "description": "Contains the error information describing the encountered error."
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "JobError": {
        "properties": {
          "message": {
            "type": "string",
            "title": "Message"
          },
          "code": {
            "$ref": "#/components/schemas/ErrorCode"
          }
        },
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "title": "JobError",
        "description": "Contains the error code describing the encountered error."
      },
      "JobTerminateResponse": {
        "properties": {
          "status": {
            "type": "string",
            "title": "Status"
          }
        },
        "type": "object",
        "required": [
          "status"
        ],
        "title": "JobTerminateResponse",
        "description": "Contains the status of the job terminate request."
      },
      "OutputParameter": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name",
            "default": ""
          },
          "valueFrom": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Valuefrom",
            "default": {}
          },
          "default": {
            "type": "string",
            "title": "Default",
            "default": ""
          }
        },
        "type": "object",
        "title": "OutputParameter"
      },
      "RuntimeResourceRequirementLimit": {
        "properties": {
          "cpu": {
            "type": "string",
            "title": "Cpu",
            "description": "Number of CPU cores",
            "default": "1",
            "example": "2"
          },
          "memory": {
            "type": "string",
            "title": "Memory",
            "description": "Memory size",
            "default": "16Gi",
            "example": "16Gi"
          },
          "nvidia.com/gpu": {
            "type": "string",
            "title": "Nvidia.Com/Gpu",
            "description": "Number of GPU",
            "default": "0",
            "example": "1"
          }
        },
        "type": "object",
        "title": "RuntimeResourceRequirementLimit"
      },
      "RuntimeResourceRequirementRequest": {
        "properties": {
          "cpu": {
            "type": "string",
            "title": "Cpu",
            "description": "Number of CPU cores",
            "default": "1",
            "example": "2"
          },
          "memory": {
            "type": "string",
            "title": "Memory",
            "description": "Memory size",
            "default": "16Gi",
            "example": "16Gi"
          },
          "nvidia.com/gpu": {
            "type": "string",
            "title": "Nvidia.Com/Gpu",
            "description": "Number of GPU",
            "default": "0",
            "example": "1"
          }
        },
        "type": "object",
        "title": "RuntimeResourceRequirementRequest"
      },
      "RuntimeResourceRequirements": {
        "properties": {
          "requests": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RuntimeResourceRequirementRequest"
              }
            ],
            "title": "Requests",
            "default": {
              "cpu": "1",
              "memory": "16Gi",
              "gpu": "0"
            }
          },
          "limits": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RuntimeResourceRequirementLimit"
              }
            ],
            "title": "Limits",
            "default": {
              "cpu": "4",
              "memory": "16Gi",
              "gpu": "0"
            }
          }
        },
        "type": "object",
        "title": "RuntimeResourceRequirements"
      },
      "SimpleInputType": {
        "type": "string",
        "enum": [
          "int",
          "str",
          "list",
          "bool",
          "float",
          "UUID",
          "Dataset"
        ],
        "title": "SimpleInputType",
        "description": "An enumeration."
      },
      "TriggerJobResponse": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id",
            "description": "A Job identifier",
            "example": "c2535cac-969d-4cab-b7b5-9c8b4c7d4658"
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "A Job name",
            "deprecated": true,
            "example": "my-first-custom-workflow-zpjdt"
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/WorkflowStatus"
              }
            ],
            "description": "Job status",
            "example": "Failed"
          },
          "inputs": {
            "type": "object",
            "title": "Inputs",
            "description": "job inputs"
          },
          "errors": {
            "items": {
              "$ref": "#/components/schemas/JobError"
            },
            "type": "array",
            "title": "Errors",
            "deprecated": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Job created datetime",
            "example": "2023-02-13T22:46:01+00:00"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "status",
          "created_at"
        ],
        "title": "TriggerJobResponse",
        "description": "Contains information about the triggered job."
      },
      "TypedInputParameter": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name",
            "default": ""
          },
          "description": {
            "type": "string",
            "title": "Description",
            "default": ""
          },
          "defaultValue": {
            "title": "Defaultvalue"
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SimpleInputType"
              }
            ],
            "default": "str"
          },
          "required": {
            "type": "boolean",
            "title": "Required",
            "default": true
          },
          "metadata": {
            "type": "object",
            "title": "Metadata"
          }
        },
        "type": "object",
        "title": "TypedInputParameter"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "WorkflowArtifact": {
        "properties": {
          "url": {
            "type": "string",
            "title": "Url"
          },
          "path": {
            "type": "string",
            "title": "Path"
          }
        },
        "type": "object",
        "required": [
          "url",
          "path"
        ],
        "title": "WorkflowArtifact"
      },
      "WorkflowJobResponse": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id",
            "description": "A Job identifier",
            "example": "c2535cac-969d-4cab-b7b5-9c8b4c7d4658"
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "A Job name",
            "deprecated": true,
            "example": "my-first-custom-workflow-zpjdt"
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/WorkflowStatus"
              }
            ],
            "description": "Job status",
            "example": "Failed"
          },
          "inputs": {
            "type": "object",
            "title": "Inputs",
            "description": "job inputs"
          },
          "errors": {
            "items": {
              "$ref": "#/components/schemas/JobError"
            },
            "type": "array",
            "title": "Errors",
            "deprecated": true
          },
          "user_id": {
            "type": "string",
            "title": "User Id",
            "description": "User identifier",
            "example": "5772981717015"
          },
          "organization_id": {
            "type": "string",
            "title": "Organization Id",
            "description": "Organization identifier",
            "example": "5772981717015",
            "nullable": true
          },
          "from_template": {
            "type": "string",
            "title": "From Template",
            "description": "Template identifier",
            "example": "b40397bf-ef96-4106-ab01-4a0dea914aa6",
            "nullable": true
          },
          "template_name": {
            "type": "string",
            "title": "Template Name",
            "description": "Template name",
            "example": "my-template",
            "nullable": true
          },
          "started_at": {
            "type": "string",
            "format": "date-time",
            "title": "Started At",
            "description": "Job start datetime",
            "example": "2023-02-13T23:17:22+00:00",
            "nullable": true
          },
          "finished_at": {
            "type": "string",
            "format": "date-time",
            "title": "Finished At",
            "description": "Job end datetime",
            "example": "2023-02-13T23:17:22+00:00",
            "nullable": true
          },
          "duration_in_seconds": {
            "type": "number",
            "title": "Duration In Seconds",
            "description": "Job duration in seconds",
            "example": 1900,
            "nullable": true
          },
          "progress": {
            "type": "integer",
            "title": "Progress",
            "description": "Job Progress",
            "example": 100,
            "nullable": true
          },
          "error": {
            "type": "string",
            "title": "Error",
            "description": "Job error",
            "example": "Error (exit code 255)",
            "nullable": true
          },
          "steps": {
            "items": {
              "$ref": "#/components/schemas/WorkflowJobStep"
            },
            "type": "array",
            "title": "Steps",
            "description": "Job steps",
            "nullable": true
          },
          "resource_duration": {
            "additionalProperties": {
              "type": "integer"
            },
            "type": "object",
            "title": "Resource Duration",
            "description": "Resource duration in seconds",
            "example": {
              "cpu": 1000,
              "memory": 1000
            },
            "nullable": true
          },
          "results": {
            "type": "object",
            "title": "Results",
            "description": "job results",
            "example": {
              "step0": {
                "/output/model.glb": "/api/datasets/822d400b-8565-428b/versions/db127388-adc754a01a9a"
              }
            }
          },
          "input_datasets": {
            "items": {
              "$ref": "#/components/schemas/DatasetVersionsResponse"
            },
            "type": "array",
            "title": "Input Datasets",
            "description": "job datasets"
          },
          "output_datasets": {
            "items": {
              "$ref": "#/components/schemas/DatasetVersionsResponse"
            },
            "type": "array",
            "title": "Output Datasets",
            "description": "job datasets"
          },
          "outputs": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/WorkflowParameter"
                },
                "type": "array"
              },
              {
                "items": {
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "object"
              }
            ],
            "title": "Outputs",
            "description": "job outputs",
            "nullable": true
          },
          "external_workflow_id": {
            "type": "string",
            "title": "External Workflow Id",
            "description": "External workflow identifier",
            "example": "123e4567-e89b-12d3-a456-426614174000"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At",
            "description": "Job update datetime",
            "example": "2023-02-13T23:17:22+00:00",
            "nullable": true
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "status",
          "user_id"
        ],
        "title": "WorkflowJobResponse",
        "description": "Workflow Job Details"
      },
      "WorkflowJobStep": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id",
            "description": "Step identifier",
            "example": "file-import-template-2fpj4-3759637542"
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Name of the step",
            "example": "download-dataset"
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/WorkflowStatus"
              }
            ],
            "description": "Status of the step",
            "example": "Failed"
          },
          "error": {
            "type": "string",
            "title": "Error",
            "description": "Error message",
            "example": "Error code 404",
            "nullable": true
          },
          "host_node_name": {
            "type": "string",
            "title": "Host Node Name",
            "description": "Node name",
            "example": "file-import-template-2fpj4-workspace-index-download-3759637542",
            "nullable": true
          },
          "progress": {
            "type": "string",
            "title": "Progress",
            "description": "Progress returns values between 0 and 1",
            "example": "0.1",
            "nullable": true
          },
          "started_at": {
            "type": "string",
            "format": "date-time",
            "title": "Started At",
            "description": "Step start datetime",
            "example": "2023-02-13T21:45:52+00:00",
            "nullable": true
          },
          "finished_at": {
            "type": "string",
            "format": "date-time",
            "title": "Finished At",
            "description": "Step end datetime",
            "example": "2023-02-13T22:45:52+00:00",
            "nullable": true
          },
          "duration_seconds": {
            "type": "number",
            "title": "Duration Seconds",
            "nullable": true
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "status"
        ],
        "title": "WorkflowJobStep",
        "description": "Step of a workflow job"
      },
      "WorkflowJobsList": {
        "properties": {
          "offset": {
            "type": "integer",
            "title": "Offset"
          },
          "limit": {
            "type": "integer",
            "title": "Limit"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/WorkflowJobResponse"
            },
            "type": "array",
            "title": "Results"
          }
        },
        "type": "object",
        "required": [
          "offset",
          "limit",
          "total",
          "results"
        ],
        "title": "WorkflowJobsList",
        "description": "List of workflow jobs"
      },
      "WorkflowParameter": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "value": {
            "type": "string",
            "title": "Value"
          }
        },
        "type": "object",
        "required": [
          "name",
          "value"
        ],
        "title": "WorkflowParameter"
      },
      "WorkflowStatus": {
        "type": "string",
        "enum": [
          "Queued",
          "Pending",
          "Running",
          "Succeeded",
          "Failed",
          "Error",
          "Terminated",
          "Skipped",
          "Suspended"
        ],
        "title": "WorkflowStatus",
        "description": "An enumeration."
      },
      "WorkflowStep": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id",
            "description": "Id of the step"
          },
          "name": {
            "type": "string",
            "pattern": "^[a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9])?(\\.[a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9])?)*-?$",
            "title": "Name"
          },
          "depends": {
            "type": "string",
            "title": "Depends",
            "description": "Id of the step to depend on"
          },
          "env": {
            "type": "object",
            "title": "Env",
            "description": "Environment variables to pass to the container",
            "example": {
              "MY_ENV": "my_value"
            }
          },
          "resources": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RuntimeResourceRequirements"
              }
            ],
            "title": "Resources",
            "default": {
              "requests": {
                "cpu": "1",
                "memory": "16Gi",
                "gpu": "0"
              },
              "limits": {
                "cpu": "4",
                "memory": "16Gi",
                "gpu": "0"
              }
            }
          },
          "outputs": {
            "items": {
              "$ref": "#/components/schemas/OutputParameter"
            },
            "type": "array",
            "title": "Outputs",
            "description": "Output parameters of the workflow step",
            "default": []
          },
          "builtin_workflow": {
            "type": "boolean",
            "title": "Builtin Workflow",
            "default": false
          },
          "image": {
            "type": "string",
            "title": "Image",
            "default": "python:3.7"
          },
          "command": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Command",
            "default": []
          },
          "args": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Args",
            "default": []
          },
          "template": {
            "$ref": "#/components/schemas/WorkflowStepTemplate"
          },
          "action": {
            "$ref": "#/components/schemas/WorkflowStepAction"
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "WorkflowStep"
      },
      "WorkflowStepAction": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "arguments": {
            "type": "object",
            "title": "Arguments"
          }
        },
        "type": "object",
        "required": [
          "id",
          "arguments"
        ],
        "title": "WorkflowStepAction"
      },
      "WorkflowStepTemplate": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "entrypoint": {
            "type": "string",
            "title": "Entrypoint",
            "default": "main"
          },
          "arguments": {
            "type": "object",
            "title": "Arguments"
          }
        },
        "type": "object",
        "required": [
          "name",
          "arguments"
        ],
        "title": "WorkflowStepTemplate"
      },
      "WorkflowTemplateList": {
        "properties": {
          "offset": {
            "type": "integer",
            "title": "Offset"
          },
          "limit": {
            "type": "integer",
            "title": "Limit"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/WorkflowTemplateResponse"
            },
            "type": "array",
            "title": "Results"
          }
        },
        "type": "object",
        "required": [
          "offset",
          "limit",
          "total",
          "results"
        ],
        "title": "WorkflowTemplateList"
      },
      "WorkflowTemplateResponse": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "labels": {
            "type": "object",
            "title": "Labels"
          },
          "description": {
            "type": "string",
            "maxLength": 256,
            "minLength": 20,
            "title": "Description",
            "description": "Optional string with minimum length of 20 and maximum length of 256 characters"
          },
          "creator_id": {
            "type": "string",
            "title": "Creator Id"
          },
          "annotations": {
            "type": "object",
            "title": "Annotations"
          },
          "spec": {
            "$ref": "#/components/schemas/WorkflowTemplateSpec"
          },
          "inputs": {
            "items": {
              "$ref": "#/components/schemas/TypedInputParameter"
            },
            "type": "array",
            "title": "Inputs"
          },
          "organization_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Organization Ids"
          },
          "type": {
            "type": "string",
            "title": "Type"
          }
        },
        "type": "object",
        "required": [
          "creator_id",
          "type"
        ],
        "title": "WorkflowTemplateResponse"
      },
      "WorkflowTemplateSpec": {
        "properties": {
          "name": {
            "type": "string",
            "pattern": "^[a-zA-Z0-9]([-a-zA-Z0-9 ]*[a-zA-Z0-9])?(\\.[a-zA-Z0-9]([-a-zA-Z0-9 ]*[a-zA-Z0-9])?)*-?$",
            "title": "Name",
            "description": "Name of the workflow"
          },
          "priority": {
            "type": "integer",
            "maximum": 100,
            "minimum": 1,
            "title": "Priority",
            "description": "Priority of the workflow",
            "default": 1
          },
          "storage_size": {
            "type": "string",
            "title": "Storage Size",
            "description": "Storage size of the volume (Mi, Gi..). Use 0 for no volume",
            "default": "20Gi"
          },
          "timeout_minutes": {
            "type": "integer",
            "maximum": 1500,
            "minimum": 1,
            "title": "Timeout Minutes",
            "description": "Timeout of the workflow in minutes",
            "default": 60
          },
          "mounts": {
            "items": {
              "$ref": "#/components/schemas/WorkflowArtifact"
            },
            "type": "array",
            "title": "Mounts",
            "description": "Input datasets used in the workflow during execution"
          },
          "artifacts": {
            "items": {
              "$ref": "#/components/schemas/WorkflowArtifact"
            },
            "type": "array",
            "title": "Artifacts",
            "description": "Files or directories to upload to an output dataset at the end of execution"
          },
          "steps": {
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/WorkflowStep"
                },
                {
                  "$ref": "#/components/schemas/WorkflowStepTemplate"
                }
              ]
            },
            "type": "array",
            "title": "Steps"
          },
          "parameters": {
            "items": {
              "$ref": "#/components/schemas/TypedInputParameter"
            },
            "type": "array",
            "title": "Parameters",
            "description": "Input parameters of the workflow"
          }
        },
        "type": "object",
        "required": [
          "steps",
          "parameters"
        ],
        "title": "WorkflowTemplateSpec",
        "description": "Use this to define an automated transformation workflow that will be executed by the Workflow Engine\n\nA transformation workflow has 3 steps:\n1. Pulling datasets from DT Storage\n2. Performing transformation steps\n3. Pushing artifacts to DT Storage",
        "example": {
          "name": "My Custom Workflow",
          "parameters": [
            {
              "name": "inputDatasetId",
              "required": true,
              "type": "str",
              "defaultValue": "9d618978-0ba1-4961-9086-caa69a898304"
            },
            {
              "name": "inputDatasetVersion",
              "required": false,
              "type": "str",
              "defaultValue": "latest"
            },
            {
              "name": "outputDatasetId",
              "required": true,
              "type": "str",
              "defaultValue": "9d618978-0ba1-4961-9086-caa69a898304"
            }
          ],
          "mounts": [
            {
              "path": "/workspace/inputs",
              "url": "https://dt.unity.com/api/datasets/{{ inputDatasetId }}/versions/{{ inputDatasetVersion }}"
            }
          ],
          "artifacts": [
            {
              "path": "/workspace/directorylist.txt",
              "url": "https://dt.unity.com/api/datasets/{{ outputDatasetId }}"
            }
          ],
          "steps": [
            {
              "name": "job-2",
              "image": "us-central1-docker.pkg.dev/unity-vert-reflect-mgmt/docker/pixyz-compute_engine_cpu:2022.2.0.7",
              "command": [
                "bash"
              ],
              "args": [
                "find",
                "/workspace",
                ">",
                "/workspace/directorylist.txt"
              ],
              "outputs": [
                {
                  "name": "OutputDirectoryList",
                  "valueFrom": {
                    "path": "/workspace/directorylist.txt"
                  },
                  "default": "Empty"
                }
              ]
            }
          ]
        }
      }
    },
    "securitySchemes": {
      "Client": {
        "type": "http",
        "description": "To get started with Authentication, please visit the [Client Authentication section](https://services.docs.unity.com/docs/client-auth).",
        "scheme": "bearer"
      },
      "ServiceAccount": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "security": [
    {
      "Client": [
        "Client"
      ]
    },
    {
      "ServiceAccount": [
        "ServiceAccount"
      ]
    }
  ],
  "tags": [
    {
      "name": "Jobs",
      "description": "Jobs related resource"
    },
    {
      "name": "CustomTemplates",
      "description": "Custom template related resource"
    }
  ]
}
```