Onedata API Reference

REST API references for Onezone, Oneprovider, and Onepanel.

Schedule workflow execution

POST /automation/execution/workflows

Schedules a workflow execution based on specified workflow schema revision. The execution is asynchronous.

This operation requires space_schedule_atm_workflow_executions privilege and the requesting user must belong to the automation inventory containing the corresponding workflow schema definition.

Example cURL requests

Create workflow execution

curl -H "X-Auth-Token: $TOKEN" -X POST "https://$PROVIDER_HOST/api/v3/oneprovider/automation/execution/workflows" \
-H "Content-Type: application/json" -d '{
    "spaceId": "'$SPACE_ID'",
    "atmWorkflowSchemaId": "'$ATM_WORKFLOW_SCHEMA_ID'",
    "atmWorkflowSchemaRevisionNumber": 3,
    "storeInitialContentOverlay": {
        "de6d2e524459dd235f80aa8652a68879b5dbe9": [
            {
                "fileId": "0000000000523261677569642330376134636136616638613431366334386338343366356338643562323662"
            }
        ],
        "83cf895501eb11f9bc71e4b2b41a252e8561b5": {
            "fileId": "000000000052A6E0677569642334653938663463616538386232366437366539636462393634633031653733"
        }
    },
    "logLevel": "debug",
    "callback": "https://my-server.example.com/execution-callback"
}'

{"atmWorkflowExecutionId": "11a53ed06d175c89bc3ed5be61f8217cch1890"}

Request body

application/json

Workflow execution properties.

PropertyType & Description
spaceId
string

Id of the space in context of which the workflow will be executed.

atmWorkflowSchemaId
string

Id of the workflow schema.

atmWorkflowSchemaRevisionNumber
string

Number of workflow schema revision describing the tasks and stores for the workflow.

storeInitialContentOverlay
object

Map with store schema Ids (keys) and corresponding initial content of the stores.

logLevel
string

Level controling the amount of information recorded in audit logs as only logs with severity equal or higher to this level will be stored.

Enum:
debuginfonoticewarningerrorcriticalalertemergency
callback
string

Custom REST callback URL which will be called when the workflow execution ends - a http POST request with workflow execution Id and status in body.

Request Examples

Shell
oneprovider-rest-cli scheduleWorkflowExecution spaceId==$SPACE_ID atmWorkflowSchemaId==$ATM_WORKFLOW_SCHEMA_ID atmWorkflowSchemaRevisionNumber==3

Responses

application/json
201

The request has been accepted and the result is the workflow execution Id. Also URI of the workflow execution in form https://$PROVIDER_HOST/api/v3/oneprovider/automation/execution/workflows/{id} is returned in the response Location header.

PropertyType & Description
atmWorkflowExecutionId
string

Workflow execution Id.

400

Invalid request.

PropertyType & Description
error
object (ErrorJson)

Object describing an error.

id required
string

String identifying the error type. Does not change between error instances.

description required
string

Human readable error description. May contain information specific to given error instance.

details
object

Details about the error instance. The object schema is specific to each error type.

ctx required
object (ErrorJsonCtx)

Technical information about error.

timestamp required
integer

Timestamp in milliseconds.

serviceReleaseVersion required
string

Release version of a product, for example "25.0".

serviceId required
string

Identifier of a service instance — either Oneprovider Id or "onezone".

serviceDomain required
string

Domain of the service.

serviceBuildVersion required
string

Build version of the service.

service required
string

Short name of service.

Enum:
ozwopwozpopp
onedataErrorsRevision required
string

Revision of onedata-errors repo, where the error is defined.

module required
string

Module where the error occurred.

line required
integer

Line number in the module where the error occurred.

Example

application/json
{
  "error": {
    "id": "example",
    "description": "This is an example error.",
    "ctx": {
      "timestamp": 1750762637248,
      "serviceReleaseVersion": "25.0",
      "serviceId": "a7ee2722915b8bf7fb064eb65087cc61ch9357",
      "serviceDomain": "dev-oneprovider-krakow.default.svc.cluster.local",
      "serviceBuildVersion": "231-g8d26f953c3",
      "service": "opw",
      "onedataErrorsRevision": "ca3af8cb",
      "module": "metadata_req",
      "line": 45
    }
  }
}
403

Forbidden request.

PropertyType & Description
error
object (ErrorJson)

Object describing an error.

id required
string

String identifying the error type. Does not change between error instances.

description required
string

Human readable error description. May contain information specific to given error instance.

details
object

Details about the error instance. The object schema is specific to each error type.

ctx required
object (ErrorJsonCtx)

Technical information about error.

timestamp required
integer

Timestamp in milliseconds.

serviceReleaseVersion required
string

Release version of a product, for example "25.0".

serviceId required
string

Identifier of a service instance — either Oneprovider Id or "onezone".

serviceDomain required
string

Domain of the service.

serviceBuildVersion required
string

Build version of the service.

service required
string

Short name of service.

Enum:
ozwopwozpopp
onedataErrorsRevision required
string

Revision of onedata-errors repo, where the error is defined.

module required
string

Module where the error occurred.

line required
integer

Line number in the module where the error occurred.

Example

application/json
{
  "error": {
    "id": "example",
    "description": "This is an example error.",
    "ctx": {
      "timestamp": 1750762637248,
      "serviceReleaseVersion": "25.0",
      "serviceId": "a7ee2722915b8bf7fb064eb65087cc61ch9357",
      "serviceDomain": "dev-oneprovider-krakow.default.svc.cluster.local",
      "serviceBuildVersion": "231-g8d26f953c3",
      "service": "opw",
      "onedataErrorsRevision": "ca3af8cb",
      "module": "metadata_req",
      "line": 45
    }
  }
}
404

Workflow execution with provided Id was not found.

PropertyType & Description
error
object (ErrorJson)

Object describing an error.

id required
string

String identifying the error type. Does not change between error instances.

description required
string

Human readable error description. May contain information specific to given error instance.

details
object

Details about the error instance. The object schema is specific to each error type.

ctx required
object (ErrorJsonCtx)

Technical information about error.

timestamp required
integer

Timestamp in milliseconds.

serviceReleaseVersion required
string

Release version of a product, for example "25.0".

serviceId required
string

Identifier of a service instance — either Oneprovider Id or "onezone".

serviceDomain required
string

Domain of the service.

serviceBuildVersion required
string

Build version of the service.

service required
string

Short name of service.

Enum:
ozwopwozpopp
onedataErrorsRevision required
string

Revision of onedata-errors repo, where the error is defined.

module required
string

Module where the error occurred.

line required
integer

Line number in the module where the error occurred.

Example

application/json
{
  "error": {
    "id": "example",
    "description": "This is an example error.",
    "ctx": {
      "timestamp": 1750762637248,
      "serviceReleaseVersion": "25.0",
      "serviceId": "a7ee2722915b8bf7fb064eb65087cc61ch9357",
      "serviceDomain": "dev-oneprovider-krakow.default.svc.cluster.local",
      "serviceBuildVersion": "231-g8d26f953c3",
      "service": "opw",
      "onedataErrorsRevision": "ca3af8cb",
      "module": "metadata_req",
      "line": 45
    }
  }
}
500

Internal server error.

PropertyType & Description
error
object (ErrorJson)

Object describing an error.

id required
string

String identifying the error type. Does not change between error instances.

description required
string

Human readable error description. May contain information specific to given error instance.

details
object

Details about the error instance. The object schema is specific to each error type.

ctx required
object (ErrorJsonCtx)

Technical information about error.

timestamp required
integer

Timestamp in milliseconds.

serviceReleaseVersion required
string

Release version of a product, for example "25.0".

serviceId required
string

Identifier of a service instance — either Oneprovider Id or "onezone".

serviceDomain required
string

Domain of the service.

serviceBuildVersion required
string

Build version of the service.

service required
string

Short name of service.

Enum:
ozwopwozpopp
onedataErrorsRevision required
string

Revision of onedata-errors repo, where the error is defined.

module required
string

Module where the error occurred.

line required
integer

Line number in the module where the error occurred.

Example

application/json
{
  "error": {
    "id": "example",
    "description": "This is an example error.",
    "ctx": {
      "timestamp": 1750762637248,
      "serviceReleaseVersion": "25.0",
      "serviceId": "a7ee2722915b8bf7fb064eb65087cc61ch9357",
      "serviceDomain": "dev-oneprovider-krakow.default.svc.cluster.local",
      "serviceBuildVersion": "231-g8d26f953c3",
      "service": "opw",
      "onedataErrorsRevision": "ca3af8cb",
      "module": "metadata_req",
      "line": 45
    }
  }
}