---
title: "Process and download data synchronously"
method: POST
path: "/result"
tags: ["Data Processing"]
---

# Process and download data synchronously

`POST /result`

Executes a user-defined process directly (synchronously) and the result will be downloaded in the format specified in the process graph. This endpoint can be used to generate small previews or test user-defined processes before starting a batch job.
Timeouts on either client- or server-side are to be expected for complex computations. Back-ends MAY send the openEO error `ProcessGraphComplexity` immediately if the computation is expected to time out. Otherwise requests MAY time-out after a certain amount of time by sending openEO error `RequestTimeout`.
A header named `OpenEO-Costs` MAY be sent with all responses, which MUST include the costs for processing and downloading the data. Additionally,  a link to a log file MAY be sent in the header.

## Request body

- object
  - `process` ProcessGraphWithMetadata, required
    - `id` string — The identifier for the process. It MUST be unique across its namespace (e.g. predefined processes or user-defined processes). Clients SHOULD warn the user if a user-defined process is added with the same identifier as one of the predefined process.
    - `summary` string — A short summary of what the process does.
    - `description` string, commonmark — Detailed description to explain the entity. [CommonMark 0.29](http://commonmark.org/) syntax MAY be used for rich text representation. In addition to the CommonMark syntax, clients can convert process IDs that are formatted as in the following example into links instead of code blocks: ``` ``process_id()`` ```
    - `categories` string[] — A list of categories.
    - `parameters` ProcessParameter[] — A list of parameters. The order in the array corresponds to the parameter order to be used in clients that don't support named parameters. **Note:** Specifying an empty array is different from (if allowed) `null` or the property being absent. An empty array means the process has no parameters. `null` / property absent means that the parameters are unknown as the user has not specified them. There could still be parameters in the process graph, if one is specified.
      - `name` string, required — A unique name for the parameter. It is RECOMMENDED to use [snake case](https://en.wikipedia.org/wiki/Snake_case) (e.g. `window_size` or `scale_factor`).
      - `description` string, commonmark, required — Detailed description to explain the entity. [CommonMark 0.29](http://commonmark.org/) syntax MAY be used for rich text representation. In addition to the CommonMark syntax, clients can convert process IDs that are formatted as in the following example into links instead of code blocks: ``` ``process_id()`` ```
      - `optional` boolean — Determines whether this parameter is optional to be specified even when no default is specified. Clients SHOULD automatically set this parameter to `true`, if a default value is specified. Back-ends SHOULD NOT fail, if a default value is specified and this flag is missing.
      - `deprecated` boolean — Declares that the specified entity is deprecated with the potential to be removed in any of the next versions. It should be transitioned out of usage as soon as possible and users should refrain from using it in new implementations.
      - `experimental` boolean — Declares that the specified entity is experimental, which means that it is likely to change or may produce unpredictable behaviour. Users should refrain from using it in production, but still feel encouraged to try it out and give feedback.
      - `default` unknown
    - `returns` ProcessReturnValue — Description of the data that is returned by this process.
      - `description` string, commonmark — Detailed description to explain the entity. [CommonMark 0.29](http://commonmark.org/) syntax MAY be used for rich text representation. In addition to the CommonMark syntax, clients can convert process IDs that are formatted as in the following example into links instead of code blocks: ``` ``process_id()`` ```
      - `schema` union, required — Either a single data type or a list of data types.
        - JsonSchema — Specifies a data type supported by a parameter or return value. The data types are specified according to the [JSON Schema draft-07](http://json-schema.org/) specification. See the chapter ['Schemas' in 'Defining Processes'](#section/Processes/Defining-Processes) for more information. JSON Schemas SHOULD NOT contain `default`, `anyOf`, `oneOf`, `allOf` or `not` at the top-level of the schema. Instead specify each data type in a separate array element. The following more complex JSON Schema keywords SHOULD NOT be used: `if`, `then`, `else`, `readOnly`, `writeOnly`, `dependencies`, `minProperties`, `maxProperties`, `patternProperties`. JSON Schemas SHOULD always be dereferenced (i.e. all `$refs` should be resolved). This allows clients to consume the schemas much better. Clients are not expected to support dereferencing `$refs`. Note: The specified schema is only a common subset of JSON Schema. Additional keywords MAY be used.
          - `type` union — The allowed basic data type(s) for a value according to [JSON Schema draft-07](https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.1.1). If this property is not present, all data types are allowed.
            - 'array' | 'boolean' | 'integer' | 'null' | 'number' | 'object' | 'string'
            - JsonSchemaType[]
          - `subtype` string — The allowed sub data type for a value. See the chapter on [subtypes](#section/Processes/Defining-Processes) for more information.
          - `pattern` string, regex — The regular expression a string value must match against. See [JSON Schema draft-07](https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.3.3).
          - `enum` unknown[] — An exclusive list of allowed values. See [JSON Schema draft-07](https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.1.2).
            - unknown
          - `minimum` number — The minimum value (inclusive) allowed for a numerical value. See [JSON Schema draft-07](https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.2.4).
          - `maximum` number — The maximum value (inclusive) allowed for a numerical value. See [JSON Schema draft-07](https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.2.2).
          - `minItems` number — The minimum number of items required in an array. See [JSON Schema draft-07](https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.4.4).
          - `maxItems` number — The maximum number of items required in an array. See [JSON Schema draft-07](https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.4.3).
          - `items` union — Specifies schemas for the items in an array according to [JSON Schema draft-07](https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.4.1).
            - JsonSchema[]
            - JsonSchema — recursive
          - `deprecated` boolean — Declares that the specified entity is deprecated with the potential to be removed in any of the next versions. It should be transitioned out of usage as soon as possible and users should refrain from using it in new implementations.
        - JsonSchema[] — A list of data types this parameter supports, specified as JSON Schemas.
          - `type` union — The allowed basic data type(s) for a value according to [JSON Schema draft-07](https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.1.1). If this property is not present, all data types are allowed.
            - 'array' | 'boolean' | 'integer' | 'null' | 'number' | 'object' | 'string'
            - JsonSchemaType[]
          - `subtype` string — The allowed sub data type for a value. See the chapter on [subtypes](#section/Processes/Defining-Processes) for more information.
          - `pattern` string, regex — The regular expression a string value must match against. See [JSON Schema draft-07](https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.3.3).
          - `enum` unknown[] — An exclusive list of allowed values. See [JSON Schema draft-07](https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.1.2).
            - unknown
          - `minimum` number — The minimum value (inclusive) allowed for a numerical value. See [JSON Schema draft-07](https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.2.4).
          - `maximum` number — The maximum value (inclusive) allowed for a numerical value. See [JSON Schema draft-07](https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.2.2).
          - `minItems` number — The minimum number of items required in an array. See [JSON Schema draft-07](https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.4.4).
          - `maxItems` number — The maximum number of items required in an array. See [JSON Schema draft-07](https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.4.3).
          - `items` union — Specifies schemas for the items in an array according to [JSON Schema draft-07](https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.4.1).
            - JsonSchema[]
            - JsonSchema — recursive
          - `deprecated` boolean — Declares that the specified entity is deprecated with the potential to be removed in any of the next versions. It should be transitioned out of usage as soon as possible and users should refrain from using it in new implementations.
    - `deprecated` boolean — Declares that the specified entity is deprecated with the potential to be removed in any of the next versions. It should be transitioned out of usage as soon as possible and users should refrain from using it in new implementations.
    - `experimental` boolean — Declares that the specified entity is experimental, which means that it is likely to change or may produce unpredictable behaviour. Users should refrain from using it in production, but still feel encouraged to try it out and give feedback.
    - `exceptions` ProcessExceptions — Declares exceptions (errors) that might occur during execution of this process. This list is just for informative purposes and may be incomplete. This list MUST only contain exceptions that stop the execution of a process and MUST NOT contain warnings, notices or debugging messages. It is meant to primarily contain errors that have been caused by the user. It is RECOMMENDED that exceptions are referred to and explained in process or parameter descriptions. The keys define the error code and MUST match the following pattern: `^\w+$` This schema follows the schema of the general openEO error list (see errors.json).
    - `examples` object[] — Examples, may be used for unit tests.
      - `title` string — A title for the example.
      - `description` string, commonmark — Detailed description to explain the entity. [CommonMark 0.29](http://commonmark.org/) syntax MAY be used for rich text representation. In addition to the CommonMark syntax, clients can convert process IDs that are formatted as in the following example into links instead of code blocks: ``` ``process_id()`` ```
      - `arguments` ProcessArguments, required — unresolved $ref
      - `returns` unknown
    - `links` Link[] — Links related to this process, e.g. additional external documentation. It is RECOMMENDED to provide links with the following `rel` (relation) types: 1. `latest-version`: If a process has been marked as deprecated, a link SHOULD point to the preferred version of the process. The relation types `predecessor-version` (link to older version) and `successor-version` (link to newer version) can also be used to show the relation between versions. 2. `example`: Links to examples of other processes that use this process. 3. `cite-as`: For all DOIs associated with the process, the respective DOI links SHOULD be added. For additional relation types see also the lists of [common relation types in openEO](#section/API-Principles/Web-Linking).
      - `rel` string, required — Relationship between the current document and the linked document. SHOULD be a [registered link relation type](https://www.iana.org/assignments/link-relations/link-relations.xml) whenever feasible.
      - `href` string, uri, required — The value MUST be a valid URL.
      - `type` string — The value MUST be a string that hints at the format used to represent data at the provided URI, preferably a media (MIME) type.
      - `title` string — Used as a human-readable label for a link.
    - `process_graph` ProcessGraph — A process graph defines a graph-like structure as a connected set of executable processes. Each key is a unique identifier (node ID) that is used to refer to the process in the graph.
  - `budget` number, nullable — Maximum amount of costs the request is allowed to produce. The value MUST be specified in the currency of the back-end. No limits apply, if the value is `null` or the back-end has no currency set in `GET /`.
  - `plan` string, nullable — The billing plan to process and charge the job or service with. Billing plans MUST be accepted in a *case insensitive* manner. Back-ends MUST resolve the billing plan in the following way: * If a non-`null` value is given: Persist the `plan` that has been provided in the request. * Otherwise: 1. Persist the `default_plan` exposed through `GET /me`, if available. 2. Persist the `default_plan` exposed through `GET /`, if available. 3. If a single plan is exposed by the back-end, persist it. 4. Otherwise, the back-end MUST throw a `BillingPlanMissing` error. The resolved plan MUST be persisted permanently, regardless of any changes to the exposed billing plans in `GET /` in the future. Billing plans not on the list of available plans MUST be rejected with openEO error `BillingPlanInvalid`.
  - `log_level` 'error' | 'warning' | 'info' | 'debug' — The minimum severity level for log entries that the back-end stores for the processing request. The order of the levels is as follows (from low to high severity): `debug`, `info`, `warning`, `error`. That means if `warning` is set, the back-end will only store log entries with the level `warning` and `error`. The default minimum log level is `info`. Users need to specifically set this property to `debug` to get *all* log entries. It is RECOMMENDED that users set the level at least to "warning" in production workflows.

## Response `200`

Result data in the requested output format

## Other responses

- `4XX` — The request can't be fulfilled due to an error on client-side, i.e. the request is invalid. The client SHOULD NOT repeat the request without modifications. The response body SHOULD contain a JSON error object. MUST be any HTTP status code specified in [RFC 7231](https://www.rfc-editor.org/rfc/rfc7231.html#section-6.6). This request MUST respond with HTTP status codes 401 if authorization is required or 403 if the authorization failed or access is forbidden in general to the authenticated user. HTTP status code 404 SHOULD be used if the value of a path parameter is invalid. See also: * [Error Handling](#section/API-Principles/Error-Handling) in the API in general. * [Common Error Codes](errors.json)
- `5XX` — The request can't be fulfilled due to an error at the back-end. The error is never the client’s fault and therefore it is reasonable for the client to retry the exact same request that triggered this response. The response body SHOULD contain a JSON error object. MUST be any HTTP status code specified in [RFC 7231](https://www.rfc-editor.org/rfc/rfc7231.html#section-6.6). See also: * [Error Handling](#section/API-Principles/Error-Handling) in the API in general. * [Common Error Codes](errors.json)

## Changes

- **2022-11-03** `86d3896dd3c8` — 4 breaking, 6 warning, 16 info
  - removed `#/components/schemas/process_graph_json_schema, #/components/schemas/datacube_json_schema, subschema #1: Generic` from the `process/allOf[subschema #1: Process]/parameters/items/schema/oneOf[subschema #2: Multiple data types]/items/` request property `oneOf` list
  - removed `#/components/schemas/process_graph_json_schema, #/components/schemas/datacube_json_schema, subschema #1: Generic` from the `process/allOf[subschema #1: Process]/returns/schema/oneOf[subschema #2: Multiple data types]/items/` request property `oneOf` list
  - removed `#/components/schemas/process_json_schema` from the `process/allOf[subschema #1: Process]/parameters/items/schema` request property `oneOf` list
  - removed `#/components/schemas/process_json_schema` from the `process/allOf[subschema #1: Process]/returns/schema` request property `oneOf` list
  - …22 more

[Change history](https://skmtc.dev/open-eo/apis/openeo-api/changes/result/post.md)

---

[API](https://skmtc.dev/open-eo/apis/openeo-api.md) · [All operations](https://skmtc.dev/open-eo/apis/openeo-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/open-eo/openeo-api/revisions/86d3896dd3c8/schema)
