{
  "swagger": "2.0",
  "basePath": "/api/v3/oneprovider",
  "info": {
    "version": "21.02.3",
    "title": "Oneprovider",
    "description": "# Overview\n\nThis is the RESTful API definition of Oneprovider component of Onedata data management system [onedata.org](http://onedata.org).\n\n> This API is defined using [Swagger](http://swagger.io/), the JSON specification can be used to automatically generate\n> client libraries - [swagger.json](../../../swagger/oneprovider/swagger.json).\n\nAll paths below are relative to a common Oneprovider basepath which is `/api/v3/oneprovider`, thus a complete example\nquery for 'mode' file attributes would be:\n```\nhttps://ONEPROVIDER_HOSTNAME/api/v3/oneprovider/data/$FILE_ID?attribute=mode\n```\nPlease note that currently the default port for Oneprovider instances is `443`.\n\nIn addition to REST API, Oneprovider also provides support for\n[CDMI](http://onedata.org/#/home/documentation/doc/advanced/cdmi.html) protocol.\n\n\n## Authentication\nTo use the APIs, the REST client must authenticate with the Oneprovider service and present\na proof of authorization to perform a specific operation. This is done using access tokens,\nwhich can be generated using the Onedata GUI or Onezone's REST API.\n\nThe token is passed in the request header like this:\n```\nX-Auth-Token: MIIFrzCCA5egAwIBAgIBEzANBgkqhkiG9w0BAQUFADBcMQswCQYDVQQGEwJQTDET...\n```\n\nThe authorization to perform a specific operation depends on the authenticated user's privileges\nin the corresponding space, file level permissions (posix, ACL) and caveats (restrictions)\ninscribed in the provided access token.\n\n\n## Data management basics\nThe Onedata system organizes all user data into logical containers called spaces.\n<!--- TODO VFS-7218 uncomment when the new docs are deployed -->\n<!--- For more information, please refer to the [documentation](https://onedata.org/#/home/documentation). -->\n\nFiles and directories in Onedata can be globally identified using unique File Ids or logical paths.\nWhenever possible, it is recommended to use File Ids, due to better performance and no need for escaping or encoding.\n\n### File path\nAll logical paths in Onedata use the slash (`/`) delimiter and must start with a space name:\n```lang-none\n/CMS 1/file.txt\n/MyExperiment/directory/subdirectory/image.jpg\n```\n\nWhen referencing files by path in the REST API, make sure to urlencode the path in the URL:\n```bash\n{...}/CMS%201/file.txt\n```\n\n### File Id\n\nFile Id is a unique, global identifier associated with a file or directory and can be used universally\nin the REST and CDMI APIs. There are several ways to find out the File Id of given file or directory:\n<!---  @TODO VFS-7218 remove redundant information and provide a link to the new docs -->\n\n**Web GUI** - click on Information in the file/directory context menu and look for File Id.\n\n**REST API** - use the File Id resolution endpoint. Below example returns the File Id of\n`/CMS 1/file.txt`, where `CMS 1` is the space name:\n\n```bash\ncurl -H \"X-Auth-Token: ${ACCESS_TOKEN}\" \\\n-X POST \"https://${ONEPROVIDER_DOMAIN}/api/v3/oneprovider/lookup-file-id/CMS%201/file.txt\"\n{\n    \"fileId\": \"094576776E667431723230677767776C6B497031394E445F6E3868677873...\"\n}\n```\n\n### Space Id\n\nSpace Id is a unique, global identifier associated with a space and can be used universally in the REST APIs.\nIn order to find out the Space Id:\n\n**Web GUI** - click on Information in the file/directory context menu and look for Space Id.\n\n**REST API** - use the [Get all user spaces](#operation/get_all_spaces) endpoint.\n\nThe Space Id can be used interchangeably with the space root directory's File Id in the path-based enpoints.\n\n**Remove specific file relative to the space root**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" -X DELETE \"https://$PROVIDER_HOST/api/v3/oneprovider/data/$SPACE_ID/path/dir1/file.txt\"\n# is equivalent to\ncurl -H \"X-Auth-Token: $TOKEN\" -X DELETE \"https://$PROVIDER_HOST/api/v3/oneprovider/data/$SPACE_ROOT_FILE_ID/path/dir1/file.txt\"\n```\n**Remove specific file relative to any parent directory**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" -X DELETE \"https://$PROVIDER_HOST/api/v3/oneprovider/data/$PARENT_FILE_ID/path/dir1/file.txt\"\n```\n\n\n## API structure\n\nThe API is divided into the following sections:\n\n### Space management\nThese methods provide means for getting basic information about spaces directly\nfrom the Oneprovider service, but also allows to define database views.\n\n### File access and management\nThe API provides capabilities for:\n  - browsing files in spaces and directories,\n  - creating and deleting files as well as updating their content\n  - querying for file attributes, such as 'mode' file permissions and updating them,\n  - managing custom file metadata (xattrs, JSON, RDF),\n  - manual registration of files for imported storages.\n\nMore information can be found [here](#section/Overview/Data-management-basics).\n\n### Replica and QoS management\nThese methods allow viewing file replica distribution, requesting file replication\n(transfers) between Oneproviders, viewing ongoing and historical transfers data,\nas well as managing QoS requirements that trigger automatic replication according to the QoS rules.\n\n### Share management\nOffers methods for creating, modyfying and deleting shares.\nShares are files or directories that were made publicly available,\nso that they can be viewed by everyone through a public URL.\n\n### Dataset & archive management\nAPI for managing datasets - designated files or directories that are used to facilitate\nbuilding collections of data meaningful for the users with additional features, such as\nwrite protection and archivisation mechanisms.\n\n### Automation\nBasic API for scheduling and viewing workflow executions.\n\n### Monitoring\nThe API provides means for subscribing (through HTTP long-polling technique) for\nfile related events such as reads, writes or deletes which are returned as complete file metadata\nrecords with sequence numbers representing their current version.\n\n### Service information\nPublicly available, basic configuration of the Oneprovider service.\n\nDetailed examples of API usage are available in the documentation of each operation.\n",
    "x-bash-codegen-description": "# Overview\n\nThis is the RESTful API definition of Oneprovider component of Onedata data management system [onedata.org](http://onedata.org).\n\n> This API is defined using [Swagger](http://swagger.io/), the JSON specification can be used to automatically generate\n> client libraries - [swagger.json](../../../swagger/oneprovider/swagger.json).\n\nAll paths below are relative to a common Oneprovider basepath which is `/api/v3/oneprovider`, thus a complete example\nquery for 'mode' file attributes would be:\n```\nhttps://ONEPROVIDER_HOSTNAME/api/v3/oneprovider/data/$FILE_ID?attribute=mode\n```\nPlease note that currently the default port for Oneprovider instances is `443`.\n\nIn addition to REST API, Oneprovider also provides support for\n[CDMI](http://onedata.org/#/home/documentation/doc/advanced/cdmi.html) protocol.\n\n\n## Authentication\nTo use the APIs, the REST client must authenticate with the Oneprovider service and present\na proof of authorization to perform a specific operation. This is done using access tokens,\nwhich can be generated using the Onedata GUI or Onezone's REST API.\n\nThe token is passed in the request header like this:\n```\nX-Auth-Token: MIIFrzCCA5egAwIBAgIBEzANBgkqhkiG9w0BAQUFADBcMQswCQYDVQQGEwJQTDET...\n```\n\nThe authorization to perform a specific operation depends on the authenticated user's privileges\nin the corresponding space, file level permissions (posix, ACL) and caveats (restrictions)\ninscribed in the provided access token.\n\n\n## Data management basics\nThe Onedata system organizes all user data into logical containers called spaces.\n<!--- TODO VFS-7218 uncomment when the new docs are deployed -->\n<!--- For more information, please refer to the [documentation](https://onedata.org/#/home/documentation). -->\n\nFiles and directories in Onedata can be globally identified using unique File Ids or logical paths.\nWhenever possible, it is recommended to use File Ids, due to better performance and no need for escaping or encoding.\n\n### File path\nAll logical paths in Onedata use the slash (`/`) delimiter and must start with a space name:\n```lang-none\n/CMS 1/file.txt\n/MyExperiment/directory/subdirectory/image.jpg\n```\n\nWhen referencing files by path in the REST API, make sure to urlencode the path in the URL:\n```bash\n{...}/CMS%201/file.txt\n```\n\n### File Id\n\nFile Id is a unique, global identifier associated with a file or directory and can be used universally\nin the REST and CDMI APIs. There are several ways to find out the File Id of given file or directory:\n<!---  @TODO VFS-7218 remove redundant information and provide a link to the new docs -->\n\n**Web GUI** - click on Information in the file/directory context menu and look for File Id.\n\n**REST API** - use the File Id resolution endpoint. Below example returns the File Id of\n`/CMS 1/file.txt`, where `CMS 1` is the space name:\n\n```bash\ncurl -H \"X-Auth-Token: ${ACCESS_TOKEN}\" \\\n-X POST \"https://${ONEPROVIDER_DOMAIN}/api/v3/oneprovider/lookup-file-id/CMS%201/file.txt\"\n{\n    \"fileId\": \"094576776E667431723230677767776C6B497031394E445F6E3868677873...\"\n}\n```\n\n### Space Id\n\nSpace Id is a unique, global identifier associated with a space and can be used universally in the REST APIs.\nIn order to find out the Space Id:\n\n**Web GUI** - click on Information in the file/directory context menu and look for Space Id.\n\n**REST API** - use the [Get all user spaces](#operation/get_all_spaces) endpoint.\n\nThe Space Id can be used interchangeably with the space root directory's File Id in the path-based enpoints.\n\n**Remove specific file relative to the space root**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" -X DELETE \"https://$PROVIDER_HOST/api/v3/oneprovider/data/$SPACE_ID/path/dir1/file.txt\"\n# is equivalent to\ncurl -H \"X-Auth-Token: $TOKEN\" -X DELETE \"https://$PROVIDER_HOST/api/v3/oneprovider/data/$SPACE_ROOT_FILE_ID/path/dir1/file.txt\"\n```\n**Remove specific file relative to any parent directory**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" -X DELETE \"https://$PROVIDER_HOST/api/v3/oneprovider/data/$PARENT_FILE_ID/path/dir1/file.txt\"\n```\n\n\n## API structure\n\nThe API is divided into the following sections:\n\n### Space management\nThese methods provide means for getting basic information about spaces directly\nfrom the Oneprovider service, but also allows to define database views.\n\n### File access and management\nThe API provides capabilities for:\n  - browsing files in spaces and directories,\n  - creating and deleting files as well as updating their content\n  - querying for file attributes, such as 'mode' file permissions and updating them,\n  - managing custom file metadata (xattrs, JSON, RDF),\n  - miscellaneous operations related to file management.\n\nMore information can be found [here](#section/Overview/Data-management-basics).\n\n### Replica and QoS management\nThese methods allow viewing file replica distribution, requesting file replication\n(transfers) between Oneproviders, viewing ongoing and historical transfers data,\nas well as managing QoS requirements that trigger automatic replication according to the QoS rules.\n\n### Share management\nOffers methods for creating, modyfying and deleting shares.\nShares are files or directories that were made publicly available,\nso that they can be viewed by everyone through a public URL.\n\n### Dataset & archive management\nAPI for managing datasets - designated files or directories that are used to facilitate\nbuilding collections of data meaningful for the users with additional features, such as\nwrite protection and archivisation mechanisms.\n\n### Automation\nBasic API for scheduling and viewing workflow executions.\n\n### Monitoring\nThe API provides means for subscribing (through HTTP long-polling technique) for\nfile related events such as reads, writes or deletes which are returned as complete file metadata\nrecords with sequence numbers representing their current version.\n\n### Service information\nPublicly available, basic configuration of the Oneprovider service.\n\nDetailed examples of API usage are available in the documentation of each operation.\n",
    "contact": {
      "name": "Onedata support",
      "url": "https://onedata.org/support",
      "email": "info@onedata.org"
    },
    "license": {
      "name": "Apache 2.0",
      "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
    },
    "x-logo": {
      "url": "https://onedata.org/assets/images/api/oneprovider-logo.svg",
      "backgroundColor": "#FFFFFF"
    }
  },
  "paths": {
    "/configuration": {
      "get": {
        "operationId": "get_configuration",
        "x-onedata-gri": {
          "type": "op_provider",
          "aspect": "configuration",
          "scope": "public"
        },
        "summary": "Get public information",
        "tags": [
          "Oneprovider"
        ],
        "x-bash-codegen-description": "Returns public information about the Oneprovider service.\n\nThis endpoint does not require authentication.\n",
        "description": "Returns public information about the Oneprovider service.\n\nThis endpoint does not require authentication.\n\n***Example cURL requests***\n\n**Get public information about the Oneprovider service**\n```bash\ncurl -X GET \"https://$PROVIDER_HOST/api/v3/oneprovider/configuration\"\n\n{\n    \"providerId\": \"c4798eb2dbd2486fae940e6fa0a5071d\",\n    \"name\": \"ProviderName\",\n    \"domain\": \"zone.domain.org\",\n    \"onezoneDomain\": \"example.domain.org\",\n    \"version\": \"R14B04\",\n    \"build\": \"14-g0d0fd5b\",\n    \"compatibleOnezoneVersions\": [\"R13B04, R14B04\"],\n    \"compatibleOneproviderVersions\": [\"R14B04\"],\n    \"compatibleOneclientVersions\": [\"R14B04\"]\n}\n```\n",
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Oneprovider configuration.",
            "schema": {
              "$ref": "#/definitions/Configuration"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli getConfiguration"
          }
        ]
      }
    },
    "/test_image": {
      "get": {
        "operationId": "test_image",
        "x-onedata-gri": {
          "type": "op_provider",
          "aspect": "test_image",
          "scope": "public"
        },
        "summary": "Get test image",
        "tags": [
          "Oneprovider"
        ],
        "x-bash-codegen-description": "This endpoint returns a dummy image in `.png` format. It is used internally\nby web applications across Onedata to check connectivity with certain services.\nThis endpoint does not require authentication.\n",
        "description": "This endpoint returns a dummy image in `.png` format. It is used internally\nby web applications across Onedata to check connectivity with certain services.\nThis endpoint does not require authentication.\n",
        "produces": [
          "image/png"
        ],
        "responses": {
          "200": {
            "description": "Test image."
          },
          "500": {
            "description": "Internal server Error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      }
    },
    "/health": {
      "get": {
        "operationId": "health",
        "x-onedata-gri": {
          "type": "op_provider",
          "aspect": "health",
          "scope": "public"
        },
        "summary": "Check cluster health",
        "tags": [
          "Oneprovider"
        ],
        "x-bash-codegen-description": "Returns status code indicating oneprovider service health status.\nThis endpoint does not require authentication.\n",
        "description": "Returns status code indicating oneprovider service health status.\nThis endpoint does not require authentication.\n",
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Service is healthy."
          },
          "500": {
            "description": "Service is unhealthy.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      }
    },
    "/spaces": {
      "get": {
        "operationId": "get_all_spaces",
        "x-onedata-gri": {
          "type": "op_space",
          "aspect": "list"
        },
        "tags": [
          "Space"
        ],
        "summary": "Get all user spaces",
        "x-bash-codegen-description": "Returns the list of all user spaces.\n",
        "description": "Returns the list of all user spaces.\n\n***Example cURL requests***\n\n**List all user spaces**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" -X GET \"https://$PROVIDER_HOST/api/v3/oneprovider/spaces\"\n\n[\n    {\n        \"spaceId\": \"fb519d81146bcc635b890ff03a5da0fdch34fe\",\n        \"fileId\": \"094576776E667431723230677767776C6B497031394E445F6E3868677873...\",\n        \"name\": \"Space1\"\n    },\n    {\n        \"spaceId\": \"e14039c53235c44f2f25dce4c90b1f0acha61c\",\n        \"fileId\": \"000000184465677569642373706163655F73706163653123737061636531...\",\n        \"name\": \"Space2\"\n    }\n]\n```\n",
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "The list of all user spaces - containining their names and Id's.",
            "schema": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Space name."
                  },
                  "spaceId": {
                    "type": "string",
                    "description": "Space Id."
                  },
                  "fileId": {
                    "type": "string",
                    "description": "Space directory Id."
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "Oneprovider REST API not available.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli getAllSpaces"
          }
        ]
      }
    },
    "/spaces/{sid}": {
      "get": {
        "operationId": "get_space",
        "x-onedata-gri": {
          "type": "op_space",
          "id": "?BINDING(sid)",
          "aspect": "instance"
        },
        "tags": [
          "Space"
        ],
        "summary": "Get basic space information",
        "x-bash-codegen-description": "Returns the basic information about space with given Id.\n",
        "description": "Returns the basic information about space with given Id.\n\n***Example cURL requests***\n\n**Get information about a specific space**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" -X GET \"https://$PROVIDER_HOST/api/v3/oneprovider/spaces/$SPACE_ID\"\n\n{\n    \"name\": \"My Space 1\",\n    \"providers\": [\n        {\n            \"providerId\": \"a0b1d2e6ad583ba1b14caf3b71bc6129ch4f74\",\n            \"providerName\": \"MyPrivateCloud\"\n        },\n        {\n            \"providerId\": \"b107606a22f006b82f6f665a9e6f116cch0500\",\n            \"providerName\": \"PublicCloud1\"\n        }\n    ],\n    \"spaceId\": \"fb519d81146bcc635b890ff03a5da0fdch34fe\",\n    \"fileId\": \"094576776E667431723230677767776C6B497031394E445F6E3868677873...\"\n}\n```\n",
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "The space information.",
            "schema": {
              "$ref": "#/definitions/Space"
            }
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "Oneprovider REST API not available.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "sid",
            "in": "path",
            "description": "Space Id.",
            "type": "string",
            "required": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli getSpace sid=$SPACE_ID"
          }
        ]
      }
    },
    "/spaces/{sid}/views": {
      "get": {
        "operationId": "get_space_views",
        "x-onedata-gri": {
          "type": "op_space",
          "id": "?BINDING(sid)",
          "aspect": "views"
        },
        "tags": [
          "View"
        ],
        "summary": "Get all space views",
        "x-bash-codegen-description": "Returns the list of all view names in a space.\nThe list is broken down into pages, each with length less or equal to the\nlimit parameter. If the nextPageToken in the response has non-null value, there are\nmore names to list - provide the token in the page_token parameter in\nthe following request.\n\nThis operation requires `space_view_views` privilege.\n",
        "description": "Returns the list of all view names in a space.\nThe list is broken down into pages, each with length less or equal to the\nlimit parameter. If the nextPageToken in the response has non-null value, there are\nmore names to list - provide the token in the page_token parameter in\nthe following request.\n\nThis operation requires `space_view_views` privilege.\n\n***Example cURL requests***\n\n**List at most 3 view names starting from page id 757136151113c2f**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X GET \"https://$PROVIDER_HOST/api/v3/oneprovider/spaces/$SPACE_ID/views?limit=3&page_token=757136151113c2f\"\n\n{\n    \"views\": [\n        \"favourites\",\n        \"images\",\n        \"videos\"\n    ],\n    \"nextPageToken\": \"8471726779817b3a\"\n}\n```\n",
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "The list of view names.",
            "schema": {
              "$ref": "#/definitions/Views"
            }
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "Oneprovider REST API not available.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "sid",
            "in": "path",
            "description": "Space Id in which to list views.\n",
            "type": "string",
            "required": true
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Allows to limit the number of returned views.\n",
            "type": "integer",
            "required": false,
            "minimum": 1,
            "maximum": 1000,
            "default": 100
          },
          {
            "name": "page_token",
            "in": "query",
            "description": "Allows to start the listing from a certain point, identified by the page token.\n",
            "type": "string",
            "required": false
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli sid=$SPACE_ID getSpaceViews limit=20 page_token=757136151113c2f"
          }
        ]
      }
    },
    "/spaces/{sid}/views/{view_name}": {
      "get": {
        "operationId": "get_space_view",
        "x-onedata-gri": {
          "type": "op_space",
          "id": "?BINDING(sid)",
          "aspect": "{view, ?BINDING(view_name)}"
        },
        "summary": "Get view",
        "tags": [
          "View"
        ],
        "x-bash-codegen-description": "This method returns a JSON describing specific view.\n\nThis operation requires `space_view_views` privilege.\n",
        "description": "This method returns a JSON describing specific view.\n\nThis operation requires `space_view_views` privilege.\n\n***Example cURL requests***\n\n**Get information about specific view**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X GET https://$PROVIDER_HOST/api/v3/oneprovider/spaces/$SPACE_ID/views/$VIEW_NAME\n\n{\n    \"spatial\": false,\n    \"mapFunction\": \"function (id, type, meta, ctx) {\\\\n        if(type == \\\\'custom_metadata\\\\' && meta[\\\\'onexattr\\\\']) {\\\\n            return [meta[\\\\'onexattr\\\\'], id];\\\\n        }\\\\n        return null;\\\\n    }\"\n    \"reduceFunction\": null,\n    \"viewOptions\": {\n        \"update_min_changes\": 100\n    },\n    \"providers\": [\n        \"6b9bc70630547d925861a27e1f050dfe\"\n    ]\n}\n```\n",
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Information about view.",
            "schema": {
              "$ref": "#/definitions/View"
            }
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "File not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "sid",
            "in": "path",
            "description": "Space Id in which view exist.\n",
            "type": "string",
            "required": true
          },
          {
            "name": "view_name",
            "in": "path",
            "description": "Name of the view.",
            "type": "string",
            "required": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli getSpaceView sid=$SPACE_ID view_name=$VIEW_NAME"
          }
        ]
      },
      "put": {
        "operationId": "create_space_view",
        "x-onedata-parse_body": "{as_is, <<\"mapFunction\">>}",
        "x-onedata-gri": {
          "type": "op_space",
          "id": "?BINDING(sid)",
          "aspect": "{view, ?BINDING(view_name)}"
        },
        "summary": "Create view",
        "tags": [
          "View"
        ],
        "x-bash-codegen-description": "This method creates or replaces an existing view with a new one.\n\nThis operation requires `space_manage_views` privilege.\n",
        "description": "This method creates or replaces an existing view with a new one.\n\nThis operation requires `space_manage_views` privilege.\n\n***Example cURL requests***\n\n**Create space view**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X PUT https://$PROVIDER_HOST/api/v3/oneprovider/spaces/$SPACE_ID/views/$VIEW_NAME?spatial=false&providers[]=$PROVIDER_ID_1&providers[]=$PROVIDER_ID_2 \\\n-H \"Content-Type: application/javascript\" -d \"@./my_view1.js\"\n```\n",
        "consumes": [
          "application/javascript"
        ],
        "responses": {
          "204": {
            "description": "View created successfully."
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "File not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "sid",
            "in": "path",
            "description": "Space Id in which view will be created.\n",
            "type": "string",
            "required": true
          },
          {
            "name": "view_name",
            "in": "path",
            "description": "Name of the view.",
            "type": "string",
            "required": true
          },
          {
            "name": "mapFunction",
            "in": "body",
            "description": "The view map function.",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "spatial",
            "in": "query",
            "description": "Specifies whether view is spatial or not.",
            "type": "boolean",
            "default": false,
            "required": false
          },
          {
            "name": "update_min_changes",
            "in": "query",
            "description": "Minimum number of document changes to trigger re-viewing.",
            "type": "integer",
            "required": false
          },
          {
            "name": "replica_update_min_changes",
            "in": "query",
            "description": "Minimum number of document changes to trigger re-viewing of a replica view.",
            "type": "integer",
            "required": false
          },
          {
            "name": "providers[]",
            "in": "query",
            "description": "Providers which will create view.",
            "type": "array",
            "items": {
              "type": "string"
            },
            "collectionFormat": "multi",
            "required": false
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "cat view.js | oneprovider-rest-cli createSpaceView sid=$SPACE_ID view_name=$VIEW_NAME 'providers[]=$PROVIDER_ID_1' 'providers[]=$PROVIDER_ID_2' -"
          }
        ]
      },
      "patch": {
        "operationId": "update_space_view",
        "x-onedata-parse_body": "{as_is, <<\"mapFunction\">>}",
        "x-onedata-gri": {
          "type": "op_space",
          "id": "?BINDING(sid)",
          "aspect": "{view, ?BINDING(view_name)}"
        },
        "summary": "Update view",
        "tags": [
          "View"
        ],
        "x-bash-codegen-description": "This method updates existing view definition.\n\nIt takes the same arguments as PUT. Only specified parameters will be overwritten.\n\nThis operation requires `space_manage_views` privilege.\n",
        "description": "This method updates existing view definition.\n\nIt takes the same arguments as PUT. Only specified parameters will be overwritten.\n\nThis operation requires `space_manage_views` privilege.\n\n***Example cURL requests***\n\n**Update space view**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X PATCH https://$PROVIDER_HOST/api/v3/oneprovider/spaces/$SPACE_ID/views/$VIEW_NAME?update_min_changes=10 \\\n-H \"Content-Type: application/javascript\" -d \"@./my_improved_view1.js\"\n```\n",
        "consumes": [
          "application/javascript"
        ],
        "responses": {
          "204": {
            "description": "View updated successfully."
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "File not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "sid",
            "in": "path",
            "description": "Space Id in which view exist.\n",
            "type": "string",
            "required": true
          },
          {
            "name": "view_name",
            "in": "path",
            "description": "Name of the view.",
            "type": "string",
            "required": true
          },
          {
            "name": "mapFunction",
            "in": "body",
            "description": "The view map function.",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "name": "spatial",
            "in": "query",
            "description": "Specifies whether view is spatial or not.",
            "type": "boolean",
            "required": false
          },
          {
            "name": "update_min_changes",
            "in": "query",
            "description": "Minimum number of document changes to trigger re-viewing.",
            "type": "integer",
            "required": false
          },
          {
            "name": "replica_update_min_changes",
            "in": "query",
            "description": "Minimum number of document changes to trigger re-viewing of a replica view.",
            "type": "integer",
            "required": false
          },
          {
            "name": "providers[]",
            "in": "query",
            "description": "Providers which will create view.",
            "type": "array",
            "items": {
              "type": "string"
            },
            "collectionFormat": "multi",
            "required": false
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "cat view.js | oneprovider-rest-cli updateSpaceView sid=$SPACE_ID view_name=$VIEW_NAME 'providers[]=$PROVIDER_ID' -"
          }
        ]
      },
      "delete": {
        "operationId": "remove_space_view",
        "x-onedata-gri": {
          "type": "op_space",
          "id": "?BINDING(sid)",
          "aspect": "{view, ?BINDING(view_name)}"
        },
        "summary": "Remove view",
        "tags": [
          "View"
        ],
        "x-bash-codegen-description": "This method removes an existing view.\n\nThis operation requires `space_manage_views` privilege.\n",
        "description": "This method removes an existing view.\n\nThis operation requires `space_manage_views` privilege.\n\n***Example cURL requests***\n\n**Remove existing view**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X DELETE https://$PROVIDER_HOST/api/v3/oneprovider/spaces/$SPACE_ID/views/$VIEW_NAME\n```\n",
        "responses": {
          "204": {
            "description": "View removed successfully."
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "File not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "sid",
            "in": "path",
            "description": "Space Id in which view exist.\n",
            "type": "string",
            "required": true
          },
          {
            "name": "view_name",
            "in": "path",
            "description": "Name of the view.",
            "type": "string",
            "required": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli removeSpaceView sid=$SPACE_ID view_name=$VIEW_NAME"
          }
        ]
      }
    },
    "/spaces/{sid}/views/{view_name}/reduce": {
      "put": {
        "operationId": "update_view_reduce_function",
        "x-onedata-parse_body": "{as_is, <<\"reduceFunction\">>}",
        "x-onedata-gri": {
          "type": "op_space",
          "id": "?BINDING(sid)",
          "aspect": "{view_reduce_function, ?BINDING(view_name)}"
        },
        "summary": "Update view reduce function",
        "tags": [
          "View"
        ],
        "x-bash-codegen-description": "This method replaces the existing view reduce function code with the request body.\n\nThe reduce functions are defined as JavaScript functions which are executed\non the database backend.\n\nThis operation requires `space_manage_views` privilege.\n",
        "description": "This method replaces the existing view reduce function code with the request body.\n\nThe reduce functions are defined as JavaScript functions which are executed\non the database backend.\n\nThis operation requires `space_manage_views` privilege.\n\n***Example cURL requests***\n\n**Update space view**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X PUT https://$PROVIDER_HOST/api/v3/oneprovider/spaces/$SPACE_ID/views/$VIEW_NAME/reduce \\\n-H \"Content-Type: application/javascript\" -d \"@./my_improved_reduce_fun.js\"\n```\n",
        "consumes": [
          "application/javascript"
        ],
        "responses": {
          "204": {
            "description": "View reduce function updated successfully."
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "File not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "sid",
            "in": "path",
            "description": "Space Id in which view exist.\n",
            "type": "string",
            "required": true
          },
          {
            "name": "view_name",
            "in": "path",
            "description": "Name of the view.",
            "type": "string",
            "required": true
          },
          {
            "name": "reduceFunction",
            "in": "body",
            "description": "The view reduce function.",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "cat view.js | oneprovider-rest-cli updateViewReduceFunction sid=$SPACE_ID view_name=$VIEW_NAME -"
          }
        ]
      },
      "delete": {
        "operationId": "remove_view_reduce_function",
        "x-onedata-gri": {
          "type": "op_space",
          "id": "?BINDING(sid)",
          "aspect": "{view_reduce_function, ?BINDING(view_name)}"
        },
        "summary": "Remove view reduce function",
        "tags": [
          "View"
        ],
        "x-bash-codegen-description": "This method removes the view reduce function.\n\nThis operation requires `space_manage_views` privilege.\n",
        "description": "This method removes the view reduce function.\n\nThis operation requires `space_manage_views` privilege.\n\n***Example cURL requests***\n\n**Remove view reduce function**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X DELETE https://$PROVIDER_HOST/api/v3/oneprovider/spaces/$SPACE_ID/views/$VIEW_NAME/reduce\n```\n",
        "responses": {
          "204": {
            "description": "View reduce function removed successfully."
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "File not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "sid",
            "in": "path",
            "description": "Space Id in which view exist.\n",
            "type": "string",
            "required": true
          },
          {
            "name": "view_name",
            "in": "path",
            "description": "Name of the view.",
            "type": "string",
            "required": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli removeViewReduceFunction sid=$SPACE_ID view_name=$VIEW_NAME"
          }
        ]
      }
    },
    "/spaces/{sid}/views/{view_name}/query": {
      "get": {
        "operationId": "query_space_view",
        "x-onedata-gri": {
          "type": "op_space",
          "id": "?BINDING(sid)",
          "aspect": "{query_view, ?BINDING(view_name)}"
        },
        "summary": "Query view",
        "tags": [
          "View"
        ],
        "x-bash-codegen-description": "This method returns the list of result objects for files which match the query \non a predefined view.\nThose objects contains following fields:\n- id - for use as `startkey_docid` or `endkey_docid` in following queries\n- key - the first element of list returned by user defined mapping/spatial function\n- value - the second element of list returned by user defined mapping/spatial function\n- geometry - describes geometry of data (only available in case of spatial views)\n\nCurrently, views are defined per space, i.e. the result will be limited\nto files and directories in a space for which the view was defined.\n\nThis operation supports custom view query attributes as provided by\nCouchbase:\n  [http://docs.couchbase.com/admin/admin/Views/views-querying.html].\n\nAdditionally, Couchbase spatial queries:\n  [http://docs.couchbase.com/admin/admin/Views/views-geospatial.html] are\npossible using the `bbox` query parameter.\nThese queries are possible on views which emit values conforming to the\n[http://geojson.org/] format.\n\nThis operation requires `space_query_views` privilege.\n",
        "description": "This method returns the list of result objects for files which match the query on a predefined view.\nThose objects contains following fields:\n* ``id`` - for use as `startkey_docid` or `endkey_docid` in following queries\n* ``key`` - the first element of list returned by user defined mapping/spatial function\n* ``value`` - the second element of list returned by user defined mapping/spatial function\n* ``geometry`` - describes geometry of data (only available in case of spatial views)\n\nCurrently, views are defined per space, i.e. the result will be limited to files and directories in a space for which the view was defined.\n\nThis operation supports also custom view query attributes as provided by [Couchbase](http://docs.couchbase.com/admin/admin/Views/views-querying.html).\n\nAdditionaly, Couchbase [spatial queries](http://docs.couchbase.com/admin/admin/Views/views-geospatial.html) are possible using `bbox` query parameter.\nThese queries are possible on views which emit values conforming to the [GeoJSON](http://geojson.org/) format.\n\nThis operation requires `space_query_views` privilege.\n\n***Example cURL requests***\n\n**Get 4 files from view skipping first 10**\n\nWith example map function used:\n```javascript\nfunction (id, type, meta, ctx) {\n    if(type == 'custom_metadata' && meta['onexattr']) {\n        return [meta['onexattr'], id];\n    }\n    return null;\n}\n```\n\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X GET https://$PROVIDER_HOST/api/v3/oneprovider/spaces/$SPACE_ID/views/VIEW_NAME/query?skip=10&limit=4\n\n[\n    {\n        \"id\": \"fd18b793d446099ae84f8bd5c054ad34\",\n        \"key\": 1,\n        \"value\": \"00000000002C45416775696423633062636533343133336336636633393238336134323333396430656461393323737061636531\"\n    },\n    {\n        \"id\": \"2785dbd91120e341265f9ee2370ccf08\",\n        \"key\": 2,\n        \"value\": \"00000000002CF7DB6775696423396261373964653764643866336432393436323262313133393738643338383323737061636531\"\n    },\n    {\n        \"id\": \"60a9e6da61e12deeb3e6c688fe861c01\",\n        \"key\": 3,\n        \"value\": \"00000000002C47916775696423336330336538623730333439353233383631313966346139343731316631656323737061636531\"\n    },\n    {\n        \"id\": \"651d696a8446e92ab55de163f9b8594d\",\n        \"key\": 4,\n        \"value\": \"00000000002CA8906775696423633835366438613139666565336337666165623538303736356465383039356223737061636531\"\n    },\n    ...\n]\n```\n\n**Get list of files associated with geospatial coordinates**\n\nWith example spatial function used:\n```javascript\nfunction (id, type, meta, ctx) {\n    if(type == 'custom_metadata' && meta['onexattr']) {\n        return [meta['onexattr'], id];\n    }\n    return null;\n}\n```\n\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X GET https://$PROVIDER_HOST/api/v3/oneprovider/spaces/$SPACE_ID/views/$VIEW_NAME/query?spatial=true&stale=false\n\n[\n    {\n        \"geometry\": {\n            \"type\": \"Point\",\n            \"coordinates\": [0, 0]\n        },\n        \"id\": \"36cfb018c312653e65b346c421d7a678\",\n        \"key\": [[0, 0], [0, 0]],\n        \"value\": \"00000000002C5DA36775696423663535633934306564393632656530666133663330633137393362333765356223737061636531\"\n    },\n    {\n        \"geometry\": {\n            \"type\": \"Point\",\n            \"coordinates\": [5.1, 10.22]\n        },\n        \"id\": \"972eb78ff8e262c4bebdc11799c20f51\",\n        \"key\": [[5.1, 5.1], [10.22, 10.22]],\n        \"value\": \"00000000002C678A6775696423363030666461383130623030386333616664363637396666653334366137656623737061636531\"\n    }\n]\n```\n\n**Get file popularity for a specific space**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X GET \"https://$PROVIDER_HOST/api/v3/oneprovider/spaces/$SPACE_ID/views/file-popularity/query?spatial=true&start_range=\\[1,0,0,0,0,0\\]&end_range=\\[null,null,null,null,null,null\\]\"\n```\n",
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Query results.",
            "schema": {
              "type": "array",
              "items": {
                "type": "object"
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "File not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "sid",
            "in": "path",
            "description": "Space Id in which view exist.",
            "type": "string",
            "required": true
          },
          {
            "name": "view_name",
            "in": "path",
            "description": "Name of the view.",
            "type": "string",
            "required": true
          },
          {
            "name": "descending",
            "in": "query",
            "description": "Return the documents in descending order (by key).",
            "type": "boolean",
            "required": false,
            "default": false
          },
          {
            "name": "key",
            "in": "query",
            "description": "Return only documents that match the specified key. Key must be specified as a JSON value.\n",
            "type": "string",
            "required": false
          },
          {
            "name": "keys",
            "in": "query",
            "description": "Return only documents that match any of the keys specified within the given array. Keys must be specified as a JSON array, escaped properly. Sorting is not applied when using this option.\n",
            "type": "string",
            "required": false
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Limit the number of the returned documents to the specified number.\n",
            "type": "integer",
            "required": false
          },
          {
            "name": "skip",
            "in": "query",
            "description": "Skip this number of records before starting to return the results.\n",
            "type": "integer",
            "required": false
          },
          {
            "name": "startkey",
            "in": "query",
            "description": "Return records with a value equal to or greater than the specified key. Key must be specified as a JSON value.\n",
            "type": "string",
            "required": false
          },
          {
            "name": "startkey_docid",
            "in": "query",
            "description": "Return records starting with the specified document Id.\n",
            "type": "string",
            "required": false
          },
          {
            "name": "endkey",
            "in": "query",
            "description": "Stop returning records when the specified key is reached. Key must be specified as a JSON value.\n",
            "type": "string",
            "required": false
          },
          {
            "name": "endkey_docid",
            "in": "query",
            "description": "Stop returning records when the specified document Id is reached.\n",
            "type": "string",
            "required": false
          },
          {
            "name": "inclusive_end",
            "in": "query",
            "description": "Specifies whether the specified end key is included in the result. ***Note:*** Do not use `inclusive_end` with `key` or `keys`.\n",
            "type": "boolean",
            "required": false,
            "default": false
          },
          {
            "name": "stale",
            "in": "query",
            "description": "Allow records from a stale view to be used. Allowed values are `ok`, `update_after` or `false`.\n",
            "type": "string",
            "required": false,
            "default": "update_after",
            "enum": [
              "ok",
              "update_after",
              "false"
            ]
          },
          {
            "name": "bbox",
            "in": "query",
            "description": "Specify the bounding box for a spatial query (e.g. ?bbox=-180,-90,0,0)\n",
            "type": "string",
            "required": false
          },
          {
            "name": "spatial",
            "in": "query",
            "description": "Enable spatial type of query. When querying the file-popularity view, the `start_range` and\n`end_range` constraints should be specified as 6-dimensional arrays, with the following fields:\n`[SizeLowerLimit, LastOpenHoursEpochLowerLimit, TotalOpenLowerLimit, HoursOpenAvgLowerLimit, DayOpenAvgLowerLimit, MonthOpenAvgLowerLimit]`.\n",
            "type": "boolean",
            "required": false
          },
          {
            "name": "start_range",
            "in": "query",
            "type": "string",
            "required": false,
            "description": "Array specifying the range in spatial queries (e.g. `start_range=[1,0,0,0,0,0]`)."
          },
          {
            "name": "end_range",
            "in": "query",
            "type": "string",
            "required": false,
            "description": "Array specifying the range in spatial queries (e.g. `end_range=[null,null,null,null,null,null]`)."
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli querySpaceView sid=$SPACE_ID view_name=$VIEW_NAME key=value1"
          }
        ]
      }
    },
    "/lookup-file-id/{path}": {
      "post": {
        "operationId": "lookup_file_id",
        "x-onedata-gri": {
          "type": "op_file",
          "id": "?PATH_BINDING",
          "aspect": "object_id"
        },
        "tags": [
          "File Path Resolution"
        ],
        "summary": "Lookup file id",
        "x-bash-codegen-description": "Returns Id of file or directory specified by path.\n",
        "description": "Returns Id of file or directory specified by path.\n\n***Example cURL requests***\n\n**Lookup file id**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X POST \"https://$PROVIDER_HOST/api/v3/oneprovider/lookup-file-id/MySpace/dir/readme.txt\"\n\n{\n  \"fileId\": \"094576776E667431723230677767776C6B497031394E445F6E3868677873...\"\n}\n```\n",
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "File Id.",
            "schema": {
              "type": "object",
              "properties": {
                "fileId": {
                  "type": "string",
                  "description": "File Id."
                }
              },
              "required": [
                "fileId"
              ],
              "example": {
                "fileId": "094576776E667431723230677767776C6B497031394E445F6E3868677873..."
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "Invalid path - file or directory not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "path",
            "in": "path",
            "description": "File path (e.g. '/MySpace/dir/readme.txt')",
            "type": "string",
            "required": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli lookupFileId path='/MySpace/dir/readme.txt'"
          }
        ]
      }
    },
    "/data/{id}/children": {
      "post": {
        "operationId": "create_file",
        "x-onedata-gri": {
          "type": "op_file",
          "id": "?OBJECTID_BINDING(id)",
          "aspect": "child"
        },
        "summary": "Create file in directory",
        "tags": [
          "Basic File Operations"
        ],
        "x-bash-codegen-description": "Creates a file in the directory specified by [$PARENT_ID](#operation/lookup_file_id).\n\nIf the file already exists, the operation fails with an error.\n\nThe file type can be of:\n- `REG` (regular file) - in this case, **the data sent in request body (if any)\nis saved as file content**.\n- `DIR` (directory).\n- `LNK` (hard link) - requires that `target_file_id` pointing to a regular file\nis specified.\n- `SYMLNK` (symbolic link) - requires that `target_file_path` is specified.\nWhen creating symbolic link with absolute path starting from specific space\nit is necessary to do so by replacing `/$SPACE_NAME/` in path by special prefix in the form\n`<__onedata_space_id:$SPACE_ID>/` (where $SPACE_ID is actual space id)\n",
        "description": "Creates a file in the directory specified by [$PARENT_ID](#operation/lookup_file_id).\n\nIf the file already exists, the operation fails with an error.\n\nThe file type can be of:\n- `REG` (regular file) - in this case, **the data sent in request body (if any)\nis saved as file content**.\n- `DIR` (directory).\n- `LNK` (hard link) - requires that `target_file_id` pointing to a regular file\nis specified.\n- `SYMLNK` (symbolic link) - requires that `target_file_path` is specified.\nWhen creating symbolic link with absolute path starting from specific space\nit is necessary to do so by replacing `/$SPACE_NAME/` in path by special prefix in the form\n`<__onedata_space_id:$SPACE_ID>/` (where $SPACE_ID is actual space id)\n\n***Example cURL requests***\n\n**Create file**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X POST \"https://$PROVIDER_HOST/api/v3/oneprovider/data/$PARENT_ID/children?name=$NAME\"\n-H \"Content-Type: application/octet-stream\" -d \"@file.dat\"\n\n{\n   \"fileId\": \"094576776E667431723230677767776C6B497031394E445F6E3868677873...\"\n}\n```\n\n**Create directory**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X POST \"https://$PROVIDER_HOST/api/v3/oneprovider/data/$PARENT_ID/children?name=$NAME&type=DIR\"\n\n{\n   \"fileId\": \"000000006CB6637368617265477569642333396432363661656463656266...\"\n}\n```\n\n**Create hard link**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X POST \"https://$PROVIDER_HOST/api/v3/oneprovider/data/$PARENT_ID/children?name=$NAME&type=LNK&target_file_id=$TARGET_FILE_ID\"\n\n{\n   \"fileId\": \"000000184465677569642373706163655F73706163653123737061636531...\"\n}\n```\n\n**Create symbolic link**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X POST \"https://$PROVIDER_HOST/api/v3/oneprovider/data/$PARENT_ID/children?name=$NAME&type=SYMLNK&target_file_path=$TARGET_FILE_PATH\"\n\n{\n   \"fileId\": \"00989AB98890037368617265477569642333396432363661656463656266...\"\n}\n```\n\nSee also [Create file at path](#operation/create_file_at_path).\n",
        "consumes": [
          "application/octet-stream"
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "201": {
            "description": "The request has been accepted and the result is the file Id. Also URI of the file in form https://$PROVIDER_HOST/api/v3/oneprovider/data/{id} is returned in the response `Location` header.\n",
            "headers": {
              "Location": {
                "description": "URI of the file.",
                "type": "string"
              }
            },
            "schema": {
              "type": "object",
              "properties": {
                "fileId": {
                  "type": "string",
                  "description": "file Id."
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "File not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Id of the parent directory.",
            "required": true,
            "type": "string"
          },
          {
            "name": "name",
            "in": "query",
            "description": "Name of the file.",
            "required": true,
            "type": "string"
          },
          {
            "name": "type",
            "in": "query",
            "description": "Type of the file.",
            "required": false,
            "type": "string",
            "enum": [
              "REG",
              "DIR",
              "LNK",
              "SYMLNK"
            ],
            "default": "REG"
          },
          {
            "name": "mode",
            "in": "query",
            "description": "POSIX file permissions in decimal format.",
            "required": false,
            "type": "integer"
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Offset at which the data sent as request body will be written to the file (relevant only if `type == \"REG\"`).\n",
            "required": false,
            "type": "integer",
            "default": 0
          },
          {
            "name": "target_file_id",
            "in": "query",
            "description": "The Id of the file to which the hard link should point (relevant only if `type == \"LNK\"`).\n",
            "required": false,
            "type": "string"
          },
          {
            "name": "target_file_path",
            "in": "query",
            "description": "Path to which the symbolic link should point (relevant only if `type == \"SYMLNK\"`).\n",
            "required": false,
            "type": "string"
          },
          {
            "name": "content",
            "in": "body",
            "description": "File content to be written at specified offset (relevant only if `type == \"REG\"`).",
            "required": false,
            "schema": {
              "type": "string",
              "format": "binary"
            }
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli createFile id=$PARENT_ID name=$FILE_NAME"
          }
        ]
      },
      "get": {
        "operationId": "list_children",
        "x-onedata-gri": {
          "type": "op_file",
          "id": "?OBJECTID_BINDING(id)",
          "aspect": "children"
        },
        "tags": [
          "Basic File Operations"
        ],
        "summary": "List directory files and subdirectories",
        "x-bash-codegen-description": "Returns the list of directory files and subdirectories for directory\nspecified by [$DIR_ID](#operation/lookup_file_id).\n",
        "description": "Returns the list of directory files and subdirectories for directory\nspecified by [$DIR_ID](#operation/lookup_file_id).\n\n***Example cURL requests***\n\n**Get files in space subdirectory**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X GET \"https://$PROVIDER_HOST/api/v3/oneprovider/data/$DIR_ID/children?attribute=size&attribute=name&limit=2\"\n\n{\n    \"children\": [\n        { \n            \"name\": File1.txt\n            \"size\": 1024\n        },\n        { \n            \"name\": File2.txt\n            \"size\": 16384\n        }\n    ],\n    \"isLast\": false,\n    \"nextPageToken\": \"g2gDZAAKbGlua190b2tlbmgCZAAMY2FjaGVkX3Rva2VuWgADY...\"\n}\n```\n",
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "The list of directory files and subdirectories.",
            "schema": {
              "$ref": "#/definitions/DirectoryChildren"
            }
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "Invalid path - file or directory not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Id of the directory.",
            "type": "string",
            "required": true
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Allows specifying maximum number of files that should be returned. If there are more files, they can be retrieved using `token` query parameter.\n",
            "type": "integer",
            "required": false,
            "maximum": 1000,
            "minimum": 1,
            "default": 1000
          },
          {
            "name": "token",
            "in": "query",
            "description": "Determines the starting point for listing. The listing will start from the next page (batch) of entries which follows the page previously obtained along with the corresponding `nextPageToken`. Cannot be provided alongside the `index` or `tune_for_large_continuous_listing` parameters.\n",
            "type": "string",
            "required": false,
            "default": null
          },
          {
            "name": "attribute",
            "in": "query",
            "description": "Name of attribute to be returned for each entry. Can be provided multiple times. When accessing a file via share mode, the following attributes are unavailable: `owner_id`, `storage_group_id`, `storage_user_id`, `provider_id`, `hardlinks_count`. If not provided, default attributes of `file_id` and `name` will be returned.\n",
            "type": "string",
            "enum": [
              "name",
              "owner_id",
              "type",
              "mode",
              "size",
              "atime",
              "mtime",
              "ctime",
              "storage_group_id",
              "storage_user_id",
              "shares",
              "provider_id",
              "file_id",
              "parent_id",
              "hardlinks_count",
              "index"
            ]
          },
          {
            "name": "index",
            "in": "query",
            "description": "Determines the starting point for listing - it will be started from given file name (inclusively). Cannot be provided alongside the `token` parameter.\n",
            "type": "string",
            "required": false
          },
          {
            "name": "tune_for_large_continuous_listing",
            "in": "query",
            "description": "This option increases performance of listing large directories (with thousands of files) when using subsequent calls with paging tokens.<br/> **CAUTION!!** When enabled, there is no guarantee that changes in the file tree performed after the start of listing will be included. Therefore it shouldn't be used when the listing result is expected to be up to date with the state of the file tree at the moment of listing. It should be avoided if the interval between subsequent listings is longer than 10 seconds, otherwise the listing performance will be much worse.<br/> Overusing this option may cause a significant load on the Oneprovider.<br/> Cannot be provided alongside the `token` parameter.\n",
            "type": "boolean",
            "required": false,
            "default": false
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli listChildren id=$FILE_ID limit=100 index=filename.txt"
          }
        ]
      }
    },
    "/data/{id}/files": {
      "get": {
        "operationId": "list_files_recursively",
        "x-onedata-gri": {
          "type": "op_file",
          "id": "?OBJECTID_BINDING(id)",
          "aspect": "files"
        },
        "tags": [
          "Basic File Operations"
        ],
        "summary": "List files recursively",
        "x-bash-codegen-description": "Recursively lists non-directory files (i.e regular files, symbolic links and hardlinks)\nin directory specified by [$DIR_ID](#operation/lookup_file_id) (listing root).\nFiles are listed in lexicographical order by their paths, which are relative to the listing root directory.\nIf there is no access to specified directory, its own relative path (`\".\"`) will be included in the\n`inaccessiblePaths` field and the listing result (i.e. `files` field) will be empty.\n",
        "description": "Recursively lists non-directory files (i.e regular files, symbolic links and hardlinks)\nin directory specified by [$DIR_ID](#operation/lookup_file_id) (listing root).\nFiles are listed in lexicographical order by their paths, which are relative to the listing root directory.\nIf there is no access to specified directory, its own relative path (`\".\"`) will be included in the\n`inaccessiblePaths` field and the listing result (i.e. `files` field) will be empty.\n\n***Example cURL requests***\n\n**List files recursively**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X GET \"https://$PROVIDER_HOST/api/v3/oneprovider/data/$DIR_ID/files?start_after=ParentDirName/Dir1\"\n\n{\n    \"files\": [\n        {\n            \"file_id\": \"FILE_ID1\",\n            \"path\": \"ParentDirName/Dir2\"\n        },\n        {\n            \"file_id\": \"FILE_ID2\",\n            \"path\": \"ParentDirName/File1.txt\"\n        },\n    ],\n    \"inaccessiblePaths\": [\n        \"ParentDirName/Dir3\"\n    ],\n    \"isLast\": false,\n    \"nextPageToken\": \"$PAGING_TOKEN\"\n}\n```\n",
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "The list of directory files and subdirectories.",
            "schema": {
              "$ref": "#/definitions/RecursiveFileList"
            }
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "Invalid path - file or directory not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Id of the directory.",
            "type": "string",
            "required": true
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Specifies the maximum number of entries that can be returned in one result batch. If there are more files, they can be retrieved using options that specify a custom starting point.\n",
            "type": "integer",
            "required": false,
            "maximum": 1000,
            "minimum": 1,
            "default": 1000
          },
          {
            "name": "token",
            "in": "query",
            "description": "Determines the starting point for listing. The listing will start from the next page (batch) of entries which follows the page previously obtained along with the corresponding `nextPageToken`. Cannot be provided alongside the `start_after` parameter.\n",
            "type": "string",
            "required": false
          },
          {
            "name": "start_after",
            "in": "query",
            "description": "Determines the starting point for listing - it will be started from the first file path lexicographically larger than the provided path.\n",
            "type": "string",
            "required": false
          },
          {
            "name": "prefix",
            "in": "query",
            "description": "Only files with paths that begin with this value will be listed.\n",
            "type": "string",
            "required": false
          },
          {
            "name": "attribute",
            "in": "query",
            "description": "Name of attribute to be returned for each entry. Can be provided multiple times. When accessing a file via share mode, the following attributes are unavailable: `owner_id`, `storage_group_id`, `storage_user_id`, `provider_id`, `hardlinks_count`. If not provided, default attributes of `file_id` and `path` will be returned.\n",
            "type": "string",
            "enum": [
              "name",
              "owner_id",
              "type",
              "mode",
              "size",
              "atime",
              "mtime",
              "ctime",
              "storage_group_id",
              "storage_user_id",
              "shares",
              "provider_id",
              "file_id",
              "parent_id",
              "hardlinks_count",
              "path"
            ]
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli listFilesRecursively id=$FILE_ID limit=100 start_after=dir1/dir2/filename.txt"
          }
        ]
      }
    },
    "/data/{id}/content": {
      "get": {
        "operationId": "download_file_content",
        "x-onedata-gri": {
          "type": "op_file",
          "id": "?OBJECTID_BINDING(id)",
          "aspect": "content"
        },
        "tags": [
          "Basic File Operations"
        ],
        "summary": "Download file content",
        "x-bash-codegen-description": "Returns the content of a file or directory specified by [$FILE_ID](#operation/lookup_file_id).\n\nIf $FILE_ID is a regular file, returns its binary content. Partial content\ndownload is also supported using\n[Range header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Range).\n\nIf $FILE_ID is a directory, returns a TAR archive with its contents.\nAny nested files or subdirectories to which the client does not have access\n(e.g. due to insufficient POSIX permissions or ACLs) are omitted in the resulting archive.\nRequest for directory download results in a redirection URL (in Location header) that\ncontains the ID of a temporary download session. The URL can be used to download the\ntarball, with support for resuming interrupted downloads using the Range header\n(where the range start is the number of already downloaded bytes and the range end is omitted).\n",
        "description": "Returns the content of a file or directory specified by [$FILE_ID](#operation/lookup_file_id).\n\nIf $FILE_ID is a regular file, returns its binary content. Partial content\ndownload is also supported using\n[Range header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Range).\n\nIf $FILE_ID is a directory, returns a TAR archive with its contents.\nAny nested files or subdirectories to which the client does not have access\n(e.g. due to insufficient POSIX permissions or ACLs) are omitted in the resulting archive.\nRequest for directory download results in a redirection URL (in Location header) that\ncontains the ID of a temporary download session. The URL can be used to download the\ntarball, with support for resuming interrupted downloads using the Range header\n(where the range start is the number of already downloaded bytes and the range end is omitted).\n\n\n***Example cURL requests***\n\n**Download entire file content**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X GET \"https://$PROVIDER_HOST/api/v3/oneprovider/data/$FILE_ID/content\"\n\nabcdefghijklmno\n```\n\n**Download only part of the file content**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X GET \"https://$PROVIDER_HOST/api/v3/oneprovider/data/$FILE_ID/content\" \\\n-H \"Range: bytes=5-8\"\n\nfghi\n```\n\n**Download a directory as tar archive**\n```bash\ncurl -sD - -H \"X-Auth-Token: $TOKEN\" \\\n-X GET \"https://$PROVIDER_HOST/api/v3/oneprovider/data/$DIR_ID/content\" | grep location\n\nlocation: https://$PROVIDER_HOST/download/$DOWNLOAD_ID\n```\n\n```\ncurl https://$PROVIDER_HOST/download/$DOWNLOAD_ID > directory.tar\n```\n\n**Download a directory as tar archive in a single request**\n```bash\ncurl -L -H \"X-Auth-Token: $TOKEN\" \\\n-X GET \"https://$PROVIDER_HOST/api/v3/oneprovider/data/$DIR_ID/content\"\n```\n\n**Resume download of a directory (previous download failed after 12345678 bytes)**\n```bash\ncurl -H \"Range: bytes=12345678-\" https://$PROVIDER_HOST/download/$DOWNLOAD_ID >> directory.tar\n```\n\n**Download a directory as tar archive in a single request without resolving symlinks**\n```bash\ncurl -L -H \"X-Auth-Token: $TOKEN\" \\\n-X GET \"https://$PROVIDER_HOST/api/v3/oneprovider/data/$DIR_ID/content?follow_symlinks=false\"\n```\n\nSee also [Download file content by path](#operation/download_file_content_by_path).\n",
        "produces": [
          "application/octet-stream"
        ],
        "responses": {
          "200": {
            "description": "Entire file content.",
            "schema": {
              "type": "string",
              "format": "binary"
            }
          },
          "206": {
            "description": "Part(s) of file content.",
            "schema": {
              "type": "string",
              "format": "binary"
            }
          },
          "302": {
            "description": "Redirection URL for directory download.",
            "headers": {
              "Location": {
                "description": "URL with the ID of a temporary download session.",
                "type": "string"
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "File not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Id of the file.",
            "type": "string",
            "required": true
          },
          {
            "name": "follow_symlinks",
            "in": "query",
            "description": "Flag controlling whether symbolic links in requested download should be resolved.",
            "required": false,
            "type": "boolean",
            "default": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli downloadFileContent id=$FILE_ID"
          }
        ]
      },
      "put": {
        "operationId": "update_file_content",
        "x-onedata-gri": {
          "type": "op_file",
          "id": "?OBJECTID_BINDING(id)",
          "aspect": "content"
        },
        "summary": "Update file content",
        "tags": [
          "Basic File Operations"
        ],
        "x-bash-codegen-description": "Updates content of file specified by [$FILE_ID](#operation/lookup_file_id).\n\nThe file must exist beforehand, otherwise the operation fails with an error.\n\nThe `offset` query parameter can be used to start writing from a certain byte\nin the file, in such case the file is NOT truncated (bytes beyond the overwritten\nfragment will be preserved). If no `offset` query is given, the file is truncated \nand the previous file content is completely overwritten.\n",
        "description": "Updates content of file specified by [$FILE_ID](#operation/lookup_file_id).\n\nThe file must exist beforehand, otherwise the operation fails with an error.\n\nThe `offset` query parameter can be used to start writing from a certain byte\nin the file, in such case the file is NOT truncated (bytes beyond the overwritten\nfragment will be preserved). If no `offset` query is given, the file is truncated \nand the previous file content is completely overwritten.\n\n***Example cURL requests***\n\n**Update file content starting from specified offset:**\n```bash\n# originally, the file content is  \"abcdefghijklmno\"\n\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X PUT \"https://$PROVIDER_HOST/api/v3/oneprovider/data/$FILE_ID/content?offset=4\" \\\n-H \"Content-Type: application/octet-stream\" -d \"WXYZ\"\n\n# upon success, the file content is \"abcdWXYZijklmno\"\n```\n",
        "consumes": [
          "application/octet-stream"
        ],
        "responses": {
          "204": {
            "description": "File content updated successfully."
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "File not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Id of the file.",
            "required": true,
            "type": "string"
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Offset at which the data sent as request body will be written to the file.\nIf not specified, the file will be completely overwritten.\n",
            "required": false,
            "type": "integer",
            "default": 0
          },
          {
            "name": "content",
            "in": "body",
            "description": "File content to be written at specified offset.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "binary"
            }
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "cat new_content.txt | oneprovider-rest-cli updateFileContent id=$PARENT_ID -"
          }
        ]
      }
    },
    "/data/{id}": {
      "delete": {
        "operationId": "remove_file",
        "x-onedata-gri": {
          "type": "op_file",
          "id": "?OBJECTID_BINDING(id)",
          "aspect": "instance"
        },
        "tags": [
          "Basic File Operations"
        ],
        "summary": "Remove file",
        "x-bash-codegen-description": "Removes file specified by [$FILE_ID](#operation/lookup_file_id).\nIn case of a directory, all its children are recursively removed - note that\nthe operation will fail part-way if the client does not have permissions to\nremove some of the nested files/directories.\n",
        "description": "Removes file specified by [$FILE_ID](#operation/lookup_file_id).\nIn case of a directory, all its children are recursively removed - note that\nthe operation will fail part-way if the client does not have permissions to\nremove some of the nested files/directories.\n\n***Example cURL requests***\n\n**Remove specific file**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" -X DELETE \"https://$PROVIDER_HOST/api/v3/oneprovider/data/$FILE_ID\"\n```\nSee also [Remove file at path](#operation/remove_file_at_path).\n",
        "responses": {
          "204": {
            "description": "The file has been removed."
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "File not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "File or directory Id",
            "type": "string",
            "required": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli removeFile id=$FILE_ID"
          }
        ]
      },
      "get": {
        "operationId": "get_attrs",
        "x-onedata-gri": {
          "type": "op_file",
          "id": "?OBJECTID_BINDING(id)",
          "aspect": "attrs"
        },
        "summary": "Get file attributes",
        "tags": [
          "Basic File Operations"
        ],
        "x-bash-codegen-description": "This method returns either all or only selected basic attributes associated\nwith file specified by [$FILE_ID](#operation/lookup_file_id).\n",
        "description": "This method returns either all or only selected basic attributes associated\nwith file specified by [$FILE_ID](#operation/lookup_file_id).\n\n***Example cURL requests***\n\n**Get file size**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X GET \"https://$PROVIDER_HOST/api/v3/oneprovider/data/$FILE_ID?attribute=size&attribute=name\"\n\n{\n    \"name\": \"File1.txt\"\n    \"size\": 100\n}\n```\n",
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Returns the requested file attributes.",
            "schema": {
              "$ref": "#/definitions/FileAttributes"
            }
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "File not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "File, directory or space Id",
            "type": "string",
            "required": true
          },
          {
            "name": "attribute",
            "in": "query",
            "description": "Name of attribute to query for. Can be provided multiple times.  When accessing file via share mode following attributes are unavailable:  `owner_id`, `storage_group_id`, `storage_user_id`, `provider_id`, `hardlinks_count`\n",
            "type": "string",
            "enum": [
              "name",
              "owner_id",
              "type",
              "mode",
              "size",
              "atime",
              "mtime",
              "ctime",
              "storage_group_id",
              "storage_user_id",
              "shares",
              "provider_id",
              "file_id",
              "parent_id",
              "hardlinks_count"
            ],
            "required": false
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli getAttrs id=$FILE_ID"
          }
        ]
      },
      "put": {
        "operationId": "set_attr",
        "x-onedata-parse_body": "as_json_params",
        "x-onedata-gri": {
          "type": "op_file",
          "id": "?OBJECTID_BINDING(id)",
          "aspect": "attrs"
        },
        "summary": "Set file attribute",
        "tags": [
          "Basic File Operations"
        ],
        "x-bash-codegen-description": "This method allows to set a value of a regular file attribute\nfor a file specified by [$FILE_ID](#operation/lookup_file_id).\n\nCurrently only POSIX mode can be changed by\nsending:\n```\n  { \"mode\": \"0777\" }\n```\nwhere the POSIX mode is specified in octal notation.\n",
        "description": "This method allows to set a value of a regular file attribute\nfor a file specified by [$FILE_ID](#operation/lookup_file_id).\n\nCurrently only POSIX mode can be changed by sending:\n```\n{ \"mode\": \"0777\" }\n```\nwhere the POSIX mode is specified in octal notation.\n\n***Example cURL requests***\n\n**Set file POSIX mode**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" -X PUT \"https://$PROVIDER_HOST/api/v3/oneprovider/data/$FILE_ID\" \\\n-H 'Content-Type: application/json' -d '{ \"mode\": \"0777\" }'\n```\n",
        "consumes": [
          "application/json"
        ],
        "responses": {
          "204": {
            "description": "File attributes updated successfuly."
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "File not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "File, directory or space Id",
            "type": "string",
            "required": true
          },
          {
            "name": "attribute",
            "in": "body",
            "description": "Attribute name and value.",
            "schema": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            }
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "echo '{\"mode\": \"0777\"}' | oneprovider-rest-cli setAttr id=$FILE_ID -"
          }
        ]
      }
    },
    "/data/{id}/hardlinks": {
      "get": {
        "operationId": "get_file_hardlinks",
        "x-onedata-gri": {
          "type": "op_file",
          "id": "?OBJECTID_BINDING(id)",
          "aspect": "hardlinks"
        },
        "tags": [
          "Basic File Operations"
        ],
        "summary": "Get file hard links",
        "x-bash-codegen-description": "Returns Ids of all hard links (including this one) associated with file specified\nby [$FILE_ID](#operation/lookup_file_id).\n",
        "description": "Returns Ids of all hard links (including this one) associated with file specified\nby [$FILE_ID](#operation/lookup_file_id).\n\n**Get file hard links**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X GET \"https://$PROVIDER_HOST/api/v3/oneprovider/data/$FILE_ID/hardlinks\"\n\n[\n    \"094576776E667431723230677767776C6B497031394E445F6E3868677873...\",\n    \"000000006CB6637368617265477569642333396432363661656463656266...\"\n]\n```\n",
        "produces": [
          "application/octet-stream"
        ],
        "responses": {
          "200": {
            "description": "File hard links.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "File not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "File Id.",
            "type": "string",
            "required": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli getFileHardlinks id=$FILE_ID"
          }
        ]
      }
    },
    "/data/{id}/hardlinks/{hid}": {
      "get": {
        "operationId": "test_for_hardlink_between_files",
        "x-onedata-gri": {
          "type": "op_file",
          "id": "?OBJECTID_BINDING(id)",
          "aspect": "{hardlinks, ?OBJECTID_BINDING(hid)}"
        },
        "tags": [
          "Basic File Operations"
        ],
        "summary": "Test for hard link between files",
        "x-bash-codegen-description": "Checks whether one file is a hard link to the other one. Both files are specified by\n[$FILE_ID](#operation/lookup_file_id). The relation is symmetric; the order of the\nfiles in the URL does not matter.\n",
        "description": "Checks whether one file is a hard link to the other one. Both files are specified by\n[$FILE_ID](#operation/lookup_file_id). The relation is symmetric; the order of the\nfiles in the URL does not matter.\n\n**Test for hard link between files**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X GET \"https://$PROVIDER_HOST/api/v3/oneprovider/data/$FILE_ID1/hardlinks/$FILE_ID2\"\n\n# return code = 0 (HTTP code = 204) -> true\n# return code != 0 (HTTP code = 404) -> false\n```\n",
        "produces": [
          "application/json"
        ],
        "responses": {
          "204": {
            "description": "A hard link does exist between the files."
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "No hard link exists between the files.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "First File Id.",
            "type": "string",
            "required": true
          },
          {
            "name": "hid",
            "in": "path",
            "description": "Second File Id.",
            "type": "string",
            "required": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli testForHardlinkBetweenFiles id=$FILE_ID1 hid=$FILE_ID2"
          }
        ]
      }
    },
    "/data/{id}/symlink_value": {
      "get": {
        "operationId": "get_symlink_value",
        "x-onedata-gri": {
          "type": "op_file",
          "id": "?OBJECTID_BINDING(id)",
          "aspect": "symlink_value"
        },
        "tags": [
          "Basic File Operations"
        ],
        "summary": "Get symbolic link value",
        "x-bash-codegen-description": "Returns the value of symbolic link specified by [$FILE_ID](#operation/lookup_file_id)\n(the path to where the link is pointing).\n",
        "description": "Returns the value of symbolic link specified by [$FILE_ID](#operation/lookup_file_id)\n(the path to where the link is pointing).\n\n**Get symbolic link value**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X GET \"https://$PROVIDER_HOST/api/v3/oneprovider/data/$FILE_ID/symlink_value\"\n\n../../Dir1/File1\n```\n",
        "produces": [
          "application/octet-stream"
        ],
        "responses": {
          "200": {
            "description": "Symbolic link value.",
            "schema": {
              "type": "string",
              "format": "binary"
            }
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "File not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Id of the symbolic link.",
            "type": "string",
            "required": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli getSymlinkValue id=$FILE_ID"
          }
        ]
      }
    },
    "/data/{id}/path/{path}": {
      "put": {
        "operationId": "create_file_at_path",
        "x-onedata-gri": {
          "type": "op_file",
          "id": "?OBJECTID_BINDING(id)",
          "aspect": "file_at_path"
        },
        "summary": "Create file at path",
        "tags": [
          "Basic File Operations"
        ],
        "x-bash-codegen-description": "Creates a file at path specified in the URL, relative to the base directory\ngiven in the `id` parameter (see the parameter description for details).\nIf the parent path does not exist and `create_parents` flag is set to true,\nthe operation will attempt to create intermediate parent directories.\n\nIf the file already exists, the operation fails with an error.\n\nThe file type can be of:\n- `REG` (regular file) - in this case, the **data sent in request body (if any)\nis saved as file content**.\n- `DIR` (directory).\n- `LNK` (hard link) - requires that `target_file_id` pointing to a regular file\nis specified.\n- `SYMLNK` (symbolic link) - requires that `target_file_path` is specified.\nWhen creating symbolic link with absolute path starting from specific space\nit is necessary to do so by replacing `/$SPACE_NAME/` in path by special prefix in the form\n`<__onedata_space_id:$SPACE_ID>/` (where $SPACE_ID is actual space id)\n",
        "description": "Creates a file at path specified in the URL, relative to the base directory\ngiven in the `id` parameter (see the parameter description for details).\nIf the parent path does not exist and `create_parents` flag is set to true,\nthe operation will attempt to create intermediate parent directories.\n\nIf the file already exists, the operation fails with an error.\n\nThe file type can be of:\n- `REG` (regular file) - in this case, the **data sent in request body (if any)\nis saved as file content**.\n- `DIR` (directory).\n- `LNK` (hard link) - requires that `target_file_id` pointing to a regular file\nis specified.\n- `SYMLNK` (symbolic link) - requires that `target_file_path` is specified.\nWhen creating symbolic link with absolute path starting from specific space\nit is necessary to do so by replacing `/$SPACE_NAME/` in path by special prefix in the form\n`<__onedata_space_id:$SPACE_ID>/` (where $SPACE_ID is actual space id)\n\n***Example cURL requests***\n\n**Create file**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X PUT \"https://$PROVIDER_HOST/api/v3/oneprovider/data/$SPACE_OR_PARENT_ID/path/dir1/$NAME\"\n-H \"Content-Type: application/octet-stream\" -d \"@file.dat\"\n\n{\n   \"fileId\": \"094576776E667431723230677767776C6B497031394E445F6E3868677873...\"\n}\n```\n\n**Create directory**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X PUT \"https://$PROVIDER_HOST/api/v3/oneprovider/data/$SPACE_OR_PARENT_ID/path/$NAME?type=DIR\"\n\n{\n   \"fileId\": \"000000006CB6637368617265477569642333396432363661656463656266...\"\n}\n```\n\n**Create hard link**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X PUT \"https://$PROVIDER_HOST/api/v3/oneprovider/data/$SPACE_OR_PARENT_ID/path/$NAME&type=LNK&target_file_id=$TARGET_FILE_ID\"\n\n{\n   \"fileId\": \"000000184465677569642373706163655F73706163653123737061636531...\"\n}\n```\n\n**Create symbolic link**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X PUT \"https://$PROVIDER_HOST/api/v3/oneprovider/data/$SPACE_OR_PARENT_ID/path/$NAME&type=SYMLNK&target_file_path=$TARGET_FILE_PATH\"\n\n{\n   \"fileId\": \"00989AB98890037368617265477569642333396432363661656463656266...\"\n}\n```\n\nSee also [Create file in directory](#operation/create_file).\n",
        "consumes": [
          "application/octet-stream"
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "201": {
            "description": "The request has been accepted and the result is the file Id. Also URI of the file in form https://$PROVIDER_HOST/api/v3/oneprovider/data/{id} is returned in the response `Location` header.\n",
            "headers": {
              "Location": {
                "description": "URI of the file.",
                "type": "string"
              }
            },
            "schema": {
              "type": "object",
              "properties": {
                "fileId": {
                  "type": "string",
                  "description": "file Id."
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "File not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID of the base directory, relative to which the path remainder will be resolved. It can be a **Space Id**\n(in which case the space root directory is taken), or a **File Id** of any existing\ndirectory (including the space root directory). See [Data](#section/Overview/Data-management-basics) section\nfor more information.\n",
            "required": true,
            "type": "string"
          },
          {
            "name": "path",
            "in": "path",
            "description": "Path relative to the base directory (specified in the id parameter).",
            "required": true,
            "type": "string"
          },
          {
            "name": "type",
            "in": "query",
            "description": "Type of the file.",
            "required": false,
            "type": "string",
            "enum": [
              "REG",
              "DIR",
              "LNK",
              "SYMLNK"
            ],
            "default": "REG"
          },
          {
            "name": "mode",
            "in": "query",
            "description": "POSIX file permissions in decimal format.",
            "required": false,
            "type": "integer"
          },
          {
            "name": "create_parents",
            "in": "query",
            "description": "Allows to create unexistient directories specified in path parameter.",
            "required": false,
            "type": "boolean",
            "default": false
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Offset at which the data sent as request body will be written to the file (relevant only if `type == \"REG\"`).\n",
            "required": false,
            "type": "integer",
            "default": 0
          },
          {
            "name": "target_file_id",
            "in": "query",
            "description": "The Id of the file to which the hard link should point (relevant only if `type == \"LNK\"`).\n",
            "required": false,
            "type": "string"
          },
          {
            "name": "target_file_path",
            "in": "query",
            "description": "Path to which the symbolic link should point (relevant only if `type == \"SYMLNK\"`).\n",
            "required": false,
            "type": "string"
          },
          {
            "name": "content",
            "in": "body",
            "description": "File content to be written at specified offset (relevant only if `type == \"REG\"`).",
            "required": false,
            "schema": {
              "type": "string",
              "format": "binary"
            }
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "cat file.txt | oneprovider-rest-cli createFileAtPath id=$SPACE_OR_PARENT_ID path=$PATH -"
          }
        ]
      },
      "get": {
        "operationId": "download_file_content_by_path",
        "x-onedata-gri": {
          "type": "op_file",
          "id": "?OBJECTID_BINDING(id)",
          "aspect": "file_at_path"
        },
        "tags": [
          "Basic File Operations"
        ],
        "summary": "Download file content by path",
        "x-bash-codegen-description": "Returns the content of a file or directory by path specified in the URL, relative to the base directory\ngiven in the `id` parameter (see the parameter description for details).\n\nIf requested file is a regular file, returns its binary content. Partial content\ndownload is also supported using\n[Range header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Range).\n\nIf requested file is a directory, returns a TAR archive with its contents.\nAny nested files or subdirectories to which the client does not have access\n(e.g. due to insufficient POSIX permissions or ACLs) are omitted in the resulting archive.\nRequest for directory download results in a redirection URL (in Location header) that\ncontains the ID of a temporary download session. The URL can be used to download the\ntarball, with support for resuming interrupted downloads using the Range header\n(where the range start is the number of already downloaded bytes and the range end is omitted).\n",
        "description": "Returns the content of a file or directory by path specified in the URL, relative to the base directory\ngiven in the `id` parameter (see the parameter description for details).\n\nIf requested file is a regular file, returns its binary content. Partial content\ndownload is also supported using\n[Range header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Range).\n\nIf requested file is a directory, returns a TAR archive with its contents.\nAny nested files or subdirectories to which the client does not have access\n(e.g. due to insufficient POSIX permissions or ACLs) are omitted in the resulting archive.\nRequest for directory download results in a redirection URL (in Location header) that\ncontains the ID of a temporary download session. The URL can be used to download the\ntarball, with support for resuming interrupted downloads using the Range header\n(where the range start is the number of already downloaded bytes and the range end is omitted).\n\n\n***Example cURL requests***\n\n**Download entire file content**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X GET \"https://$PROVIDER_HOST/api/v3/oneprovider/data/$SPACE_OR_PARENT_ID/path/dir1/dir2/file\" \\\n\nabcdefghijklmno\n```\n\n**Download only part of the file content**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X GET \"https://$PROVIDER_HOST/api/v3/oneprovider/data/$SPACE_OR_PARENT_ID/path/dir1/dir2/file\" \\\n-H \"Range: bytes=5-8\"\n\nfghi\n```\n\n**Download a directory as tar archive**\n```bash\ncurl -sD - -H \"X-Auth-Token: $TOKEN\" \\\n-X GET \"https://$PROVIDER_HOST/api/v3/oneprovider/data/$SPACE_OR_PARENT_ID/path/dir1\" | grep location\n\nlocation: https://$PROVIDER_HOST/download/$DOWNLOAD_ID\n```\n\n```\ncurl https://$PROVIDER_HOST/download/$DOWNLOAD_ID > directory.tar\n```\n\n**Download a directory as tar archive in a single request**\n```bash\ncurl -L -H \"X-Auth-Token: $TOKEN\" \\\n-X GET \"https://$PROVIDER_HOST/api/v3/oneprovider/data/$SPACE_OR_PARENT_ID/path/dir1\"\n```\n\n**Resume download of a directory (previous download failed after 12345678 bytes)**\n```bash\ncurl -H \"Range: bytes=12345678-\" https://$PROVIDER_HOST/download/$DOWNLOAD_ID >> directory.tar\n```\n\n**Download a directory as tar archive in a single request without resolving symlinks**\n```bash\ncurl -L -H \"X-Auth-Token: $TOKEN\" \\\n-X GET \"https://$PROVIDER_HOST/api/v3/oneprovider/data/$SPACE_OR_PARENT_ID/path/dir1?follow_symlinks=false\"\n```\n\nSee also [Download file content by ID](#operation/download_file_content).\n",
        "produces": [
          "application/octet-stream"
        ],
        "responses": {
          "200": {
            "description": "Entire file content.",
            "schema": {
              "type": "string",
              "format": "binary"
            }
          },
          "206": {
            "description": "Part(s) of file content.",
            "schema": {
              "type": "string",
              "format": "binary"
            }
          },
          "302": {
            "description": "Redirection URL for directory download.",
            "headers": {
              "Location": {
                "description": "URL with the ID of a temporary download session.",
                "type": "string"
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "File not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID of the base directory, relative to which the path remainder will be resolved. It can be a **Space Id**\n(in which case the space root directory is taken), or a **File Id** of any existing\ndirectory (including the space root directory). See [Data](#section/Overview/Data-management-basics) section\nfor more information.\n",
            "type": "string",
            "required": true
          },
          {
            "name": "path",
            "in": "path",
            "description": "Path relative to the base directory (specified in the id parameter).",
            "required": true,
            "type": "string"
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli downloadFileContentByPath id=$SPACE_OR_PARENT_ID path=$PATH"
          }
        ]
      },
      "delete": {
        "operationId": "remove_file_at_path",
        "x-onedata-gri": {
          "type": "op_file",
          "id": "?OBJECTID_BINDING(id)",
          "aspect": "file_at_path"
        },
        "tags": [
          "Basic File Operations"
        ],
        "summary": "Remove file at path",
        "x-bash-codegen-description": "Removes file by path specified in the URL, relative to the base directory\ngiven in the `id` parameter (see the parameter description for details).\n\nIn case of a directory, all its children are recursively removed - note that\nthe operation will fail part-way if the client does not have permissions to\nremove some of the nested files/directories.\n",
        "description": "Removes file by path specified in the URL, relative to the base directory\ngiven in the `id` parameter (see the parameter description for details).\n\nIn case of a directory, all its children are recursively removed - note that\nthe operation will fail part-way if the client does not have permissions to\nremove some of the nested files/directories.\n\n***Example cURL requests***\n\n**Remove specific file**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" -X DELETE \"https://$PROVIDER_HOST/api/v3/oneprovider/data/$SPACE_OR_PARENT_ID/path/dir1/file.txt\"\n```\n\nSee also [Remove file by ID](#operation/remove_file).\n",
        "responses": {
          "204": {
            "description": "The file has been removed."
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "File not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID of the base directory, relative to which the path remainder will be resolved. It can be a **Space Id**\n(in which case the space root directory is taken), or a **File Id** of any existing\ndirectory (including the space root directory). See [Data](#section/Overview/Data-management-basics) section\nfor more information.\n",
            "type": "string",
            "required": true
          },
          {
            "name": "path",
            "in": "path",
            "description": "Path relative to the base directory (specified in the id parameter).",
            "required": true,
            "type": "string"
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli removeFileAtPath id=$SPACE_OR_PARENT_ID path=$PATH"
          }
        ]
      }
    },
    "/data/{id}/metadata/json": {
      "get": {
        "operationId": "get_json_metadata",
        "x-onedata-gri": {
          "type": "op_file",
          "id": "?OBJECTID_BINDING(id)",
          "aspect": "json_metadata"
        },
        "summary": "Get file json metadata",
        "tags": [
          "Custom File Metadata"
        ],
        "x-bash-codegen-description": "This method returns the json metadata associated with file specified by [$FILE_ID](#operation/lookup_file_id).\n\nBy default the method returns the complete json metadata. But it is possible to request\nonly a part of the document by specifying `filter_type` and `filter` attributes in the query.\n\nSupported filter types are:\n  * **keypath** - list of JSON keys which point to requested JSON object,\n    separated by `.`, array elements should be expressed as `[i]`\n    (e.g. `key1.key2.[2].key3`)\n",
        "description": "This method returns the json metadata associated with file specified by [$FILE_ID](#operation/lookup_file_id).\n\nBy default the method returns the complete json metadata. But it is possible to request\nonly a part of the document by specifying `filter_type` and `filter` attributes in the query.\n\nSupported filter types are:\n  * **keypath** - list of JSON keys which point to requested JSON object,\n    separated by `.`, array elements should be expressed as `[i]`\n    (e.g. `key1.key2.[2].key3`)\n\n***Example cURL requests***\n\n**Get specific JSON value from metadata document**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X GET https://$PROVIDER_HOST/api/v3/oneprovider/data/$FILE_ID/metadata/json?filter_type=keypath&filter=key1.key2.[2].key3\n\n{\"key4\": \"value\"}\n```\n",
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "JSON metadata.",
            "schema": {
              "type": "string"
            }
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "File not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Id of the file.",
            "type": "string",
            "required": true
          },
          {
            "name": "filter_type",
            "in": "query",
            "description": "The type of filter to apply to the metadata document.",
            "type": "string",
            "enum": [
              "keypath"
            ],
            "required": false
          },
          {
            "name": "filter",
            "in": "query",
            "description": "The filter to apply to the metadata document before returning. Required if `filter_type` is specified.\n",
            "type": "string",
            "required": false
          },
          {
            "name": "inherited",
            "in": "query",
            "description": "When set to true, this operation will merge the metadata documents from parent directories as well as entire space into a single JSON document.\n",
            "type": "boolean",
            "required": false
          },
          {
            "name": "resolve_symlink",
            "in": "query",
            "description": "Indicates whether the operation should be performed on the symbolic link itself (`false`) or on the target file that it points to (`true`).\n",
            "type": "boolean",
            "default": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli getJsonMetadata id=$FILE_ID inherited=false"
          }
        ]
      },
      "put": {
        "operationId": "set_json_metadata",
        "x-onedata-parse_body": "{as_is, <<\"metadata\">>}",
        "x-onedata-gri": {
          "type": "op_file",
          "id": "?OBJECTID_BINDING(id)",
          "aspect": "json_metadata"
        },
        "summary": "Set file json metadata",
        "tags": [
          "Custom File Metadata"
        ],
        "x-bash-codegen-description": "This method allows to set json metadata for a file specified by [$FILE_ID](#operation/lookup_file_id).\n\nThis operation will replace the previous json metadata if any.\n",
        "description": "This method allows to set json metadata for a file specified by [$FILE_ID](#operation/lookup_file_id).\n\nThis operation will replace the previous json metadata if any.\n\n***Example cURL requests***\n\n**Set JSON metadata for file**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X PUT https://$PROVIDER_HOST/api/v3/oneprovider/data/$FILE_ID/metadata/json \\\n-H \"Content-Type: application/json\" -d '{\n    \"key1\": {\n        \"key2\": [\"val1\", \"val2\", \"val3\", \"val4\"]\n    }\n}'\n```\n",
        "consumes": [
          "application/json"
        ],
        "responses": {
          "204": {
            "description": "JSON metadata updated successfully."
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "File not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Id of the file.",
            "type": "string",
            "required": true
          },
          {
            "name": "filter_type",
            "in": "query",
            "description": "The type of filter to apply to the metadata document.",
            "type": "string",
            "enum": [
              "keypath"
            ],
            "required": false
          },
          {
            "name": "filter",
            "in": "query",
            "description": "The filter allowing to set specific metadata document key. Required if `filter_type` is specified.\n",
            "type": "string",
            "required": false
          },
          {
            "name": "metadata",
            "in": "body",
            "description": "The json metadata.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "resolve_symlink",
            "in": "query",
            "description": "Indicates whether the operation should be performed on the symbolic link itself (`false`) or on the target file that it points to (`true`).\n",
            "type": "boolean",
            "default": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "cat metadata.json | oneprovider-rest-cli setJsonMetadata id=$FILE_ID -"
          }
        ]
      },
      "delete": {
        "operationId": "remove_json_metadata",
        "x-onedata-gri": {
          "type": "op_file",
          "id": "?OBJECTID_BINDING(id)",
          "aspect": "json_metadata"
        },
        "summary": "Remove file json metadata",
        "tags": [
          "Custom File Metadata"
        ],
        "x-bash-codegen-description": "Removes json metadata from the file specified by [$FILE_ID](#operation/lookup_file_id).\n",
        "description": "Removes json metadata from the file specified by [$FILE_ID](#operation/lookup_file_id).\n\n***Example cURL requests***\n\n**Remove file json metadata**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X DELETE https://$PROVIDER_HOST/api/v3/oneprovider/data/$FILE_ID/metadata/json\n```\n",
        "responses": {
          "204": {
            "description": "File json metadata has been removed."
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "File not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Id of the file.",
            "type": "string",
            "required": true
          },
          {
            "name": "resolve_symlink",
            "in": "query",
            "description": "Indicates whether the operation should be performed on the symbolic link itself (`false`) or on the target file that it points to (`true`).\n",
            "type": "boolean",
            "default": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli removeJsonMetadata id=$FILE_ID"
          }
        ]
      }
    },
    "/data/{id}/metadata/rdf": {
      "get": {
        "operationId": "get_rdf_metadata",
        "x-onedata-gri": {
          "type": "op_file",
          "id": "?OBJECTID_BINDING(id)",
          "aspect": "rdf_metadata"
        },
        "summary": "Get file rdf metadata",
        "tags": [
          "Custom File Metadata"
        ],
        "x-bash-codegen-description": "This method returns the rdf metadata for a file specified by [$FILE_ID](#operation/lookup_file_id).\n",
        "description": "This method returns the rdf metadata for a file specified by [$FILE_ID](#operation/lookup_file_id).\n\n***Example cURL requests***\n\n**Get complete RDF metadata document for file**\n\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X GET https://$PROVIDER_HOST/api/v3/oneprovider/data/$FILE_ID/metadata/rdf\n\n<RDF><homepage>https://www.onedata.org</homepage></RDF>\n```\n",
        "produces": [
          "application/rdf+xml"
        ],
        "responses": {
          "200": {
            "description": "Rdf metadata.",
            "schema": {
              "type": "string",
              "example": "<RDF><homepage>https://www.onedata.org</homepage></RDF>"
            }
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "File not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Id of the file.",
            "type": "string",
            "required": true
          },
          {
            "name": "resolve_symlink",
            "in": "query",
            "description": "Indicates whether the operation should be performed on the symbolic link itself (`false`) or on the target file that it points to (`true`).\n",
            "type": "boolean",
            "default": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli getRdfMetadata id=$FILE_ID"
          }
        ]
      },
      "put": {
        "operationId": "set_rdf_metadata",
        "x-onedata-parse_body": "{as_is, <<\"metadata\">>}",
        "x-onedata-gri": {
          "type": "op_file",
          "id": "?OBJECTID_BINDING(id)",
          "aspect": "rdf_metadata"
        },
        "summary": "Set file rdf metadata",
        "tags": [
          "Custom File Metadata"
        ],
        "x-bash-codegen-description": "This method allows to set specific rdf metadata for a file specified by [$FILE_ID](#operation/lookup_file_id).\n\nThis operation will replace the previous rdf metadata if any.\n",
        "description": "This method allows to set specific rdf metadata for a file specified by [$FILE_ID](#operation/lookup_file_id).\n\nThis operation will replace the previous rdf metadata if any.\n\n***Example cURL requests***\n\n**Set RDF metadata for space from RDF file**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X PUT https://$PROVIDER_HOST/api/v3/oneprovider/data/$FILE_ID/metadata/rdf \\\n-H \"Content-Type: application/rdf+xml\" -d \"@./space1_dublincore.rdf\"\n```\n",
        "consumes": [
          "application/rdf+xml"
        ],
        "responses": {
          "204": {
            "description": "Rdf metadata updated successfully."
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "File not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Id of the file.",
            "type": "string",
            "required": true
          },
          {
            "name": "metadata",
            "in": "body",
            "description": "The rdf metadata.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "resolve_symlink",
            "in": "query",
            "description": "Indicates whether the operation should be performed on the symbolic link itself (`false`) or on the target file that it points to (`true`).\n",
            "type": "boolean",
            "default": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "cat metadata.rdf | oneprovider-rest-cli setRdfMetadata id=$FILE_ID -"
          }
        ]
      },
      "delete": {
        "operationId": "remove_rdf_metadata",
        "x-onedata-gri": {
          "type": "op_file",
          "id": "?OBJECTID_BINDING(id)",
          "aspect": "rdf_metadata"
        },
        "summary": "Remove file rdf metadata",
        "tags": [
          "Custom File Metadata"
        ],
        "x-bash-codegen-description": "Removes rdf metadata from the file specified by [$FILE_ID](#operation/lookup_file_id).\n",
        "description": "Removes rdf metadata from the file specified by [$FILE_ID](#operation/lookup_file_id).\n\n***Example cURL requests***\n\n**Remove file rdf metadata**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X DELETE https://$PROVIDER_HOST/api/v3/oneprovider/data/$FILE_ID/metadata/rdf\n```\n",
        "responses": {
          "204": {
            "description": "File rdf metadata has been removed."
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "File not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Id of the file.",
            "type": "string",
            "required": true
          },
          {
            "name": "resolve_symlink",
            "in": "query",
            "description": "Indicates whether the operation should be performed on the symbolic link itself (`false`) or on the target file that it points to (`true`).\n",
            "type": "boolean",
            "default": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli removeRdfMetadata id=$FILE_ID"
          }
        ]
      }
    },
    "/data/{id}/metadata/xattrs": {
      "get": {
        "operationId": "get_xattrs",
        "x-onedata-gri": {
          "type": "op_file",
          "id": "?OBJECTID_BINDING(id)",
          "aspect": "xattrs"
        },
        "summary": "Get file extended attributes",
        "tags": [
          "Custom File Metadata"
        ],
        "x-bash-codegen-description": "This method returns the selected extended attributes associated with file\nspecified by [$FILE_ID](#operation/lookup_file_id).\n",
        "description": "This method returns the selected extended attributes associated with file\nspecified by [$FILE_ID](#operation/lookup_file_id).\n\n***Example cURL requests***\n\n**Get extended file attributes**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X GET \"https://$PROVIDER_HOST/api/v3/oneprovider/data/$FILE_ID/metadata/xattrs?attribute=license\"\n\n{\n    \"license\": \"CC-0\"\n}\n```\n",
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Returns the requested file extended attributes.",
            "schema": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "File not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Id of the file.",
            "type": "string",
            "required": true
          },
          {
            "name": "attribute",
            "in": "query",
            "description": "Name of attribute to query for.",
            "type": "string",
            "required": false
          },
          {
            "name": "inherited",
            "in": "query",
            "description": "When set to true, this operation returns attributes including those inherited from parent directories and from the space root directory. If the same attribute is set on different nesting levels, the lowest level takes precedence (e.g. file attributes override the attributes from its parent directory).\n",
            "type": "boolean",
            "default": false,
            "required": false
          },
          {
            "name": "show_internal",
            "in": "query",
            "description": "When set to true, this operation returns all attributes including those normally not shown (e.g. json/rdf metadata, acl and cdmi attributes).\n",
            "type": "boolean",
            "default": false,
            "required": false
          },
          {
            "name": "resolve_symlink",
            "in": "query",
            "description": "Indicates whether the operation should be performed on the symbolic link itself (`false`) or on the target file that it points to (`true`).\n",
            "type": "boolean",
            "default": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli getXattrs id=$FILE_ID"
          }
        ]
      },
      "put": {
        "operationId": "set_xattr",
        "x-onedata-parse_body": "{as_is, <<\"metadata\">>}",
        "x-onedata-gri": {
          "type": "op_file",
          "id": "?OBJECTID_BINDING(id)",
          "aspect": "xattrs"
        },
        "summary": "Set file extended attribute",
        "tags": [
          "Custom File Metadata"
        ],
        "x-bash-codegen-description": "This method allows to set a value of a given extended file attributes\n(leaving other ones intact) for a file specified by [$FILE_ID](#operation/lookup_file_id).\n",
        "description": "This method allows to set a value of a given extended file attributes\n(leaving other ones intact) for a file specified by [$FILE_ID](#operation/lookup_file_id).\n\n***Example cURL requests***\n\n**Set extended file attribute**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X PUT \"https://$PROVIDER_HOST/api/v3/oneprovider/data/$FILE_ID/metadata/xattrs\" \\\n-H 'Content-Type: application/json' -d '{ \"license\": \"CC-0\" }'\n```\n",
        "consumes": [
          "application/json"
        ],
        "responses": {
          "204": {
            "description": "File extended attributes updated successfuly."
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "File not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Id of the file.",
            "type": "string",
            "required": true
          },
          {
            "name": "metadata",
            "in": "body",
            "description": "Extended attribute name and value.",
            "schema": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            }
          },
          {
            "name": "resolve_symlink",
            "in": "query",
            "description": "Indicates whether the operation should be performed on the symbolic link itself (`false`) or on the target file that it points to (`true`).\n",
            "type": "boolean",
            "default": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli setXattr id=$FILE_ID license==CC-0"
          }
        ]
      },
      "delete": {
        "operationId": "remove_xattrs",
        "x-onedata-parse_body": "as_json_params",
        "x-onedata-gri": {
          "type": "op_file",
          "id": "?OBJECTID_BINDING(id)",
          "aspect": "xattrs"
        },
        "summary": "Remove file xattrs",
        "tags": [
          "Custom File Metadata"
        ],
        "x-bash-codegen-description": "Removes specific xattrs from the file specified by [$FILE_ID](#operation/lookup_file_id).\n",
        "description": "Removes specific xattrs from the file specified by [$FILE_ID](#operation/lookup_file_id).\n\n***Example cURL requests***\n\n**Remove specific file xattrs**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X DELETE https://$PROVIDER_HOST/api/v3/oneprovider/data/$FILE_ID/metadata/xattrs \\\n-H 'Content-Type: application/json' -d '{ \"keys\": [\"license\"] }'\n```\n",
        "responses": {
          "204": {
            "description": "Specific file xattrs has been removed."
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "File not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Id of the file.",
            "type": "string",
            "required": true
          },
          {
            "name": "data",
            "in": "body",
            "description": "The xattrs to remove.",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "keys": {
                  "type": "array",
                  "description": "List of xattrs to remove.",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          {
            "name": "resolve_symlink",
            "in": "query",
            "description": "Indicates whether the operation should be performed on the symbolic link itself (`false`) or on the target file that it points to (`true`).\n",
            "type": "boolean",
            "default": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli removeXattrs id=$FILE_ID keys=='[\"license\"]'"
          }
        ]
      }
    },
    "/data/{id}/dir_size_stats": {
      "get": {
        "operationId": "get_directory_size_stats",
        "x-onedata-parse_body": "as_json_params",
        "x-onedata-gri": {
          "type": "op_file",
          "id": "?OBJECTID_BINDING(id)",
          "aspect": "{dir_size_stats_collection, ?QUERIED_PROVIDER_BINDING}"
        },
        "summary": "Get directory size statistics",
        "tags": [
          "Miscellaneous"
        ],
        "x-bash-codegen-description": "Retrieves historical size statistics over time for a directory.\nThe response includes only the information pertaining to the queried provider;\nin order to collect globally-complete statistics, all providers supporting the\nspace must be queried. There may be discrepancies in statistics such as logical\nsize of data, which stem from synchronization delays between providers.\n\nSize statistics over time are available only for directories. They are collected hierarchically i.e. for a \ncertain directory, its statistics are a sum of statistics for the directory (regarding its direct children),\nand the statistics from all its subdirectories. Additionally, size statistics for the space directory\nencompass relevant information from archives.\n\n**This endpoint requires the size statistics to be enabled for the containing space on the queried provider.**\nOtherwise, an adequate error will be returned.\n\nTwo request modes are supported: \n  * `layout` - returns information about the structure of stats collection, \ni.e. the names of the available time series and metrics within them\n  * `slice` - returns a slice of statistics as a collection of slices of \nrequested time series and metrics\n\nThe following time series are available for each directory:\n  * `total_size` - the total logical size of file data contained in the directory, \ni.e. the sum of logical byte sizes of all regular files.\n  * `storage_use_$STORAGE_ID` - storage size used to store the physical data\nof the contained files for given `$STORAGE_ID`. Only the storage backends\nowned by the queried providers are returned.\n  * `reg_file_and_link_count` - the count of regular files, hardlinks, \nand symbolic links contained in the directory.\n  * `dir_count` - the count of directories contained in the directory.\n  * `file_errors_count` - the count of error occurrences when the statistics \nmechanisms were not able to gather size information about a certain file.\n  * `dir_errors_count` - like above, for directories.\n\nIf the values of `file_errors_count` or `dir_errors_count` are not zero, the statistics may not be accurate.\n\nThe following metrics are available for each time series: `day`, `hour`, `minute`, `month`.\n",
        "description": "Retrieves historical size statistics over time for a directory.\nThe response includes only the information pertaining to the queried provider;\nin order to collect globally-complete statistics, all providers supporting the\nspace must be queried. There may be discrepancies in statistics such as logical\nsize of data, which stem from synchronization delays between providers.\n\nSize statistics over time are available only for directories. They are collected hierarchically i.e. for a \ncertain directory, its statistics are a sum of statistics for the directory (regarding its direct children),\nand the statistics from all its subdirectories. Additionally, size statistics for the space directory\nencompass relevant information from archives.\n\n**This endpoint requires the size statistics to be enabled for the containing space on the queried provider.**\nOtherwise, an adequate error will be returned.\n\nTwo request modes are supported: \n  * `layout` - returns information about the structure of stats collection, \ni.e. the names of the available time series and metrics within them\n  * `slice` - returns a slice of statistics as a collection of slices of \nrequested time series and metrics\n\nThe following time series are available for each directory:\n  * `total_size` - the total logical size of file data contained in the directory, \ni.e. the sum of logical byte sizes of all regular files.\n  * `storage_use_$STORAGE_ID` - storage size used to store the physical data\nof the contained files for given `$STORAGE_ID`. Only the storage backends\nowned by the queried providers are returned.\n  * `reg_file_and_link_count` - the count of regular files, hardlinks, \nand symbolic links contained in the directory.\n  * `dir_count` - the count of directories contained in the directory.\n  * `file_errors_count` - the count of error occurrences when the statistics \nmechanisms were not able to gather size information about a certain file.\n  * `dir_errors_count` - like above, for directories.\n\nIf the values of `file_errors_count` or `dir_errors_count` are not zero, the statistics may not be accurate.\n\nThe following metrics are available for each time series: `day`, `hour`, `minute`, `month`.\n\n***Example cURL requests***\n\n**Get the layout of directory size statistics**    \n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X GET \"https://$PROVIDER_HOST/api/v3/oneprovider/data/$DIR_ID/dir_size_stats\" \\\n-H \"Content-Type: application/json\" -d '{\n    \"mode\": \"layout\"  \n}'\n\n{\n    \"layout\": {\n        \"total_size\": [\n            \"day\",\n            \"hour\",\n            \"minute\",\n            \"month\"\n        ],\n        \"storage_use_7ab46e96fdb27a2694493c2c5bd7491dch8f55\": [...],\n        \"reg_file_and_link_count\": [...],\n        \"file_errors_count\": [...],\n        \"dir_errors_count\": [...],\n        \"dir_count\": [...]\n    }\n}\n```\n\n**Get a slice of directory size statistics**    \n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X GET \"https://$PROVIDER_HOST/api/v3/oneprovider/data/$DIR_ID/dir_size_stats\" \\\n-H \"Content-Type: application/json\" -d '{\n    \"mode\": \"slice\",\n    \"extendedInfo\": true,\n    \"layout\": {\n        \"total_size\": [\n            \"minute\"\n        ],\n        \"storage_use_7ab46e96fdb27a2694493c2c5bd7491dch8f55\": [\n            \"minute\"\n        ]\n    },\n    \"startTimestamp\": 1687513285,\n    \"stopTimestamp\": 1687499802,\n    \"windowLimit\": 31\n}'\n\n{\n    \"slice\": {\n        \"total_size\": {\n            \"minute\": [\n                {\n                    \"value\": 883365,\n                    \"timestamp\": 1687513260,\n                    \"lastMeasurementTimestamp\": 1687513287,\n                    \"firstMeasurementTimestamp\": 1687513287\n                },\n                ...\n            ]\n        },\n        \"storage_use_7ab46e96fdb27a2694493c2c5bd7491dch8f55\": {\n            \"minute\": [\n                {\n                    \"value\": 56280,\n                    \"timestamp\": 1687513260,\n                    \"lastMeasurementTimestamp\": 1687513287,\n                    \"firstMeasurementTimestamp\": 1687513287\n                },\n                ...\n            ]\n        }\n    }\n}'\n```\n",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Query response. Depending on the query mode, contains the `layout` or `slice` object.\n",
            "schema": {
              "$ref": "#/definitions/DirSizeStatsResponse"
            }
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Directory Id\n",
            "type": "string",
            "required": true
          },
          {
            "name": "data",
            "in": "body",
            "description": "Query body.",
            "required": true,
            "schema": {
              "$ref": "#/definitions/DirSizeStatsQuery"
            }
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli getDirectorySizeStats id=$DIR_ID"
          }
        ]
      }
    },
    "/data/register": {
      "post": {
        "operationId": "register_file",
        "x-onedata-parse_body": "as_json_params",
        "x-onedata-gri": {
          "type": "op_file",
          "aspect": "register_file"
        },
        "tags": [
          "Miscellaneous"
        ],
        "summary": "Register file",
        "x-bash-codegen-description": "Registers a file located on an `imported storage`.\nThis operation is available only in spaces supported with `imported storages` with `manual import mode` enabled.\nIn such setup, the files existing on the storage are not automatically visible\nin the space and must be registered manually by the space users -\n[learn more](https://onedata.org/#/home/documentation/stable/doc/using_onedata/file-registration.html).\n\nThe operation creates the necessary metadata for the file and registers its physical location on the storage in Onedata,\nwhich makes the file visible and accessible within the space. The metadata can be provided explicitly by the registering user,\nor an automatic detection will be performed (although not all storage backends support the required `stat` operation or\nequivalent - in such case some metadata must be provided for the operation to succeed).\n\nThe registration of the same file can be repeated, which updates the previous metadata with the new information.\nIn most cases, the metadata is overwritten with new values, with exception of xattrs - previous values are merged with new ones.\n\nThis operation requires:\n  * space_register_file privilege\n",
        "description": "Registers a file located on an `imported storage`.\nThis operation is available only in spaces supported with `imported storages` with `manual import mode` enabled.\nIn such setup, the files existing on the storage are not automatically visible\nin the space and must be registered manually by the space users -\n[learn more](https://onedata.org/#/home/documentation/stable/doc/using_onedata/file-registration.html).\n\nThe operation creates the necessary metadata for the file and registers its physical location on the storage in Onedata,\nwhich makes the file visible and accessible within the space. The metadata can be provided explicitly by the registering user,\nor an automatic detection will be performed (although not all storage backends support the required `stat` operation or\nequivalent - in such case some metadata must be provided for the operation to succeed).\n\nThe registration of the same file can be repeated, which updates the previous metadata with the new information.\nIn most cases, the metadata is overwritten with new values, with exception of xattrs - previous values are merged with new ones.\n\nThis operation requires:\n  * space_register_file privilege\n\n***Example cURL requests***\n\n**Register file**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" -X POST \"https://$PROVIDER_HOST/api/v3/oneprovider/data/register\" \\\n-H 'Content-Type: application/json' -d \"@./file_spec.json\"\n```\n",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "201": {
            "description": "The file has been registered in the Onedata file-system and the result is its Id. Also URI of the new file in form https://$PROVIDER_HOST/api/v3/oneprovider/data/{Id} is returned in the response `Location` header.\n",
            "headers": {
              "Location": {
                "description": "URI of the new file.",
                "type": "string"
              }
            },
            "schema": {
              "type": "object",
              "properties": {
                "fileId": {
                  "type": "string",
                  "description": "New file Id."
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "At lease one of the required resources (space, storage or file on the storage) does not exist.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "fileRegistrationRequest",
            "in": "body",
            "description": "Specification of a file to be registered.",
            "schema": {
              "$ref": "#/definitions/FileRegistrationRequest"
            },
            "required": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "cat file_spec.json | oneprovider-rest-cli registerFile -"
          }
        ]
      }
    },
    "/data/{id}/distribution": {
      "get": {
        "operationId": "get_file_distribution",
        "x-onedata-gri": {
          "type": "op_file",
          "id": "?OBJECTID_BINDING(id)",
          "aspect": "distribution"
        },
        "tags": [
          "File Distribution"
        ],
        "summary": "Get file distribution",
        "x-bash-codegen-description": "Returns information about distribution of a specific file among different storage providers.\n",
        "description": "Returns information about distribution of a specific file among different storage providers.\n\n***Example cURL requests***\n\n**Get file distribution**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" -X GET \"https://$PROVIDER_HOST/api/v3/oneprovider/data/$FILE_ID/distribution\"\n\n{\n  \"type\": \"REG\"\n  \"distributionPerProvider\": {\n    \"$PROVIDER_ID1\": {\n      \"success\": true\n      \"logicalSize\": 8\n      \"distributionPerStorage\": {\n        \"$STORAGE_ID\": {\n          \"blocks\": [[0, 4], [6, 2]]\n          \"physicalSize\": 6\n        }\n      }\n    }\n    \"$PROVIDER_ID2\": {\n      \"success\": false\n      \"distributionPerStorage\": {\n        \"$STORAGE_ID\": {\n          \"error\": {\n            \"description\": \"Operation failed with POSIX error: enoent.\"\n            \"details\": {\n              \"errno\": \"enoent\"\n            }\n          }\n        }\n      }\n    }\n  }\n}\n```\n",
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "The distribution of the file.",
            "schema": {
              "$ref": "#/definitions/FileDistribution"
            }
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "File not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The Id of the file",
            "type": "string",
            "required": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli getFileDistribution id=$FILE_ID"
          }
        ]
      }
    },
    "/data/{id}/storage_locations": {
      "get": {
        "operationId": "get_file_storage_locations",
        "x-onedata-gri": {
          "type": "op_file",
          "id": "?OBJECTID_BINDING(id)",
          "aspect": "storage_locations"
        },
        "tags": [
          "File Distribution"
        ],
        "summary": "Get file storage locations",
        "x-bash-codegen-description": "Returns information about regular file location on each storage. `null` value for a storage \nmeans that there is no file replica on this storage.\n",
        "description": "Returns information about regular file location on each storage. `null` value for a storage \nmeans that there is no file replica on this storage.\n\n***Example cURL requests***\n\n**Get file storage locations**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" -X GET \"https://$PROVIDER_HOST/api/v3/oneprovider/data/$FILE_ID/storage_locations\"\n\n{\n  \"locationsPerProvider\": {\n    \"$PROVIDER_ID1\": {\n      \"locationsPerStorage\": {\n        \"$STORAGE_ID1\": \"path/to/file\"\n      }\n    },\n    \"$PROVIDER_ID2\": {\n      \"locationsPerStorage\": {\n        \"$STORAGE_ID2\": null\n      }\n    }\n  }\n}\n```\n",
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Storage file locations.",
            "schema": {
              "$ref": "#/definitions/StorageFileLocations"
            }
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "File not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The Id of the file",
            "type": "string",
            "required": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli getFileStorageLocations id=$FILE_ID"
          }
        ]
      }
    },
    "/spaces/{sid}/transfers": {
      "get": {
        "operationId": "get_all_transfers",
        "x-onedata-gri": {
          "type": "op_space",
          "id": "?BINDING(sid)",
          "aspect": "transfers"
        },
        "tags": [
          "Transfer"
        ],
        "summary": "Get all space transfers",
        "x-bash-codegen-description": "Returns the list of all transfer IDs in a space with given state.\nThe list is broken down into pages, each with length less or equal to the\nlimit parameter. If the nextPageToken in the response has non-null value, there are\nmore transfers to list - provide the token in the page_token parameter in\nthe following request.\n\nThis operation requires `space_view_transfers` privilege.\n",
        "description": "Returns the list of all transfer IDs in a space with given state.\nThe list is broken down into pages, each with length less or equal to the\nlimit parameter. If the nextPageToken in the response has non-null value, there are\nmore transfers to list - provide the token in the page_token parameter in\nthe following request.\n\nThis operation requires `space_view_transfers` privilege.\n\n***Example cURL requests***\n\n**List at most 3 ongoing transfers starting from page id 757136151113c2f**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X GET \"https://$PROVIDER_HOST/api/v3/oneprovider/spaces/$SPACE_ID/transfers?state=ongoing&limit=3&page_token=757136151113c2f\"\n\n{\n    \"transfers\": [\n        \"2727a9fe5f5df6b43a8033386d2990e8ch5df6\",\n        \"4bd9b58f6387622bf07f7388945e4fc4ch8762\",\n        \"579a785181331e618b26980166b6ba2fch331e\"\n    ],\n    \"nextPageToken\": \"8471726779817b3a\"\n}\n```\n",
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "The list of transfer IDs.",
            "schema": {
              "type": "object",
              "properties": {
                "transfers": {
                  "type": "array",
                  "description": "The list of transfer Ids.",
                  "items": {
                    "type": "string"
                  }
                },
                "nextPageToken": {
                  "$ref": "#/definitions/ListPageToken"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "Oneprovider REST API not available.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "sid",
            "in": "path",
            "description": "Space Id in which to list transfers.\n",
            "type": "string",
            "required": true
          },
          {
            "name": "state",
            "in": "query",
            "description": "Specifies the state of transfers to list. The default is \"ongoing\".\n",
            "type": "string",
            "enum": [
              "waiting",
              "ongoing",
              "ended"
            ],
            "required": false
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Allows to limit the number of returned transfers.\n",
            "type": "integer",
            "required": false,
            "minimum": 1,
            "maximum": 1000,
            "default": 100
          },
          {
            "name": "page_token",
            "in": "query",
            "description": "Allows to start the listing from a certain point, identified by the page token.\n",
            "type": "string",
            "required": false
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli sid=$SPACE_ID getAllTransfers state=ongoing limit=20 page_token=757136151113c2f"
          }
        ]
      }
    },
    "/transfers": {
      "post": {
        "operationId": "create_transfer",
        "x-onedata-parse_body": "as_json_params",
        "x-onedata-gri": {
          "type": "op_transfer",
          "aspect": "instance"
        },
        "summary": "Create transfer",
        "tags": [
          "Transfer"
        ],
        "x-bash-codegen-description": "Creates transfer, which is a process of data movement between providers.\nThis operation is asynchronous and it can take a long time depending on the\nsize of the data to move.\n\nThe following types of transfer are supported:\n- `replication` - process of copying data to achieve a complete replica in provider\n  specified as `replicatingProviderId`. The data will be copied\n  from one or more providers in the space that hold replicas\n  or some fragments. This operation requires\n  `space_schedule_replication` privilege.\n- `eviction` - process of removing replica(s) from provider specified in `evictingProviderId`.\n  Eviction is safe - will succeed only if there is at least one\n  complete replica (accumulated) on other providers in the space.\n  This operation requires `space_schedule_eviction` privilege.\n- `migration` - `replication` followed by `eviction`. This operation requires both\n  `space_schedule_replication` and `space_schedule_eviction` privileges.\n\nEach transfer applies to one or more files/directories, depending on chosen `dataSourceType`:\n  - file - a single chosen file or directory\n  - view - all files that are returned as a result of querying chosen view\n\nIn case of a directory, the transfer applies to all its subfiles and subdirectories (recursively).\n",
        "description": "Creates transfer, which is a process of data movement between providers.\nThis operation is asynchronous and it can take a long time depending on the\nsize of the data to move.\n\nThe following types of transfer are supported:\n- `replication` - process of copying data to achieve a complete replica in provider\n  specified as `replicatingProviderId`. The data will be copied\n  from one or more providers in the space that hold replicas\n  or some fragments. This operation requires\n  `space_schedule_replication` privilege.\n- `eviction` - process of removing replica(s) from provider specified in `evictingProviderId`.\n  Eviction is safe - will succeed only if there is at least one\n  complete replica (accumulated) on other providers in the space.\n  This operation requires `space_schedule_eviction` privilege.\n- `migration` - `replication` followed by `eviction`. This operation requires both\n  `space_schedule_replication` and `space_schedule_eviction` privileges.\n\nEach transfer applies to one or more files/directories, depending on chosen `dataSourceType`:\n  - file - a single chosen file or directory\n  - view - all files that are returned as a result of querying chosen view\n\nIn case of a directory, the transfer applies to all its subfiles and subdirectories (recursively).\n\n***Example cURL requests***\n\n**Create file replication**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" -X POST \"https://$PROVIDER_HOST/api/v3/oneprovider/transfers\" \\\n-H \"Content-Type: application/json\" -d '{\n    \"type\": \"replication\",\n    \"replicatingProviderId\": \"'$PROVIDER_ID'\",\n    \"dataSourceType\": \"file\",\n    \"fileId\": \"'$FILE_ID'\"\n}'\n```\n",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "201": {
            "description": "The request has been accepted and the result is the transfer Id. Also URI of the transfer in form https://$PROVIDER_HOST/api/v3/oneprovider/transfers/{id} is returned in the response `Location` header.\n",
            "headers": {
              "Location": {
                "description": "URI of the transfer.",
                "type": "string"
              }
            },
            "schema": {
              "type": "object",
              "properties": {
                "transferId": {
                  "type": "string",
                  "description": "Transfer Id."
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "File not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "data",
            "in": "body",
            "description": "Transfer properties.",
            "schema": {
              "$ref": "#/definitions/TransferCreateRequest"
            },
            "required": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli createTransfer type==replication replicatingProviderId==$PROVIDER_ID dataSourceType==file fileId==$FILE_ID"
          }
        ]
      }
    },
    "/transfers/{tid}": {
      "get": {
        "operationId": "get_transfer_status",
        "x-onedata-gri": {
          "type": "op_transfer",
          "id": "?BINDING(tid)",
          "aspect": "instance"
        },
        "tags": [
          "Transfer"
        ],
        "summary": "Get transfer status",
        "x-bash-codegen-description": "Returns status of specific transfer.\n\nThis operation requires `space_view_transfers` privilege.\n",
        "description": "Returns status of specific transfer.\n\nThis operation requires `space_view_transfers` privilege.\n\n***Example cURL requests***\n\n**Get status of specific transfer**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" -X GET \"https://$PROVIDER_HOST/api/v3/oneprovider/transfers/$TRANSFER_ID\"\n\n{\n    \"type\": \"replication\",\n    \"userId\": \"admin\",\n    \"rerunId\": null,\n    \"effectiveJobTransferId\": $TRANSFER_ID,\n    \"spaceId\": \"6ec1a5413b6f4e2b01a5c85a8fd797e2\",\n    \"dataSourceType\": \"file\",\n    \"fileId\": \"00000000005CF4706775696423745F772D67686431633765446F4D76546D6F2D67575F3361737A7670486B477A7936587734507265584A7723394A4F355F5F396E4C31623031594576776E667431723230677767776C6B497031394E445F6E3868677873\",\n    \"filePath\": \"/space/tmp\",\n    \"transferStatus\": \"completed\",\n    \"effectiveJobStatus\": \"completed\",\n    \"replicationStatus\": \"completed\",\n    \"evictionStatus\": \"skipped\",\n    \"replicatingProviderId\": \"HICATChd8wzbFmB6qfGby9VN7MfdXgI1qC4pULGVm8Q\",\n    \"evictingProviderId\": null,\n    \"callback\": null,\n    \"filesToProcess\": 1,\n    \"filesProcessed\": 1,\n    \"filesReplicated\": 1,\n    \"filesEvicted\": 0,\n    \"filesFailed\": 0,\n    \"bytesReplicated\": 10485760000,\n    \"scheduleTime\": 1504688800,\n    \"startTime\": 15046888765,\n    \"finishTime\": 1504688814,\n    \"lastUpdate\": 1504988814,\n    \"minHist\": {\n        \"ASDxicvuisodr78w979879wer\": [419430400, 1153433600, 1258291200, 1468006400, 1048576000, 1048576000, 1048576000, 1153433600, 629145600, 1258291200, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n    },\n    \"hrHist\": {\n        \"ASDxicvuisodr78w979879wer\": [10485760000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n    },\n    \"dyHist\": {\n        \"ASDxicvuisodr78w979879wer\": [10485760000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n    },\n    \"mthHist\": {\n        \"ASDxicvuisodr78w979879wer\": [10485760000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n    }\n}\n```\n",
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Transfer status.",
            "schema": {
              "$ref": "#/definitions/TransferStatus"
            }
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "Transfer with provided Id was not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "tid",
            "in": "path",
            "description": "Transfer Id.",
            "type": "string",
            "required": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli getTransferStatus tid=$TRANSFER_ID"
          }
        ]
      },
      "delete": {
        "operationId": "cancel_transfer",
        "x-onedata-gri": {
          "type": "op_transfer",
          "id": "?BINDING(tid)",
          "aspect": "cancel"
        },
        "tags": [
          "Transfer"
        ],
        "summary": "Cancel specific transfer",
        "x-bash-codegen-description": "Cancels a scheduled or active transfer. Returns 400 in case the transfer\nis already completed, canceled or failed.\n\nThis operation requires `space_cancel_replication` privilege in case of canceling replication,\n`space_cancel_eviction` privilege in case of canceling eviction and both of them when\ncanceling migration.\n\nHowever, canceling your own transfers does not require any privileges.\n",
        "description": "Cancels a scheduled or active transfer. Returns 400 in case the transfer is already completed, canceled or failed.\n\nThis operation requires `space_cancel_replication` privilege in case of canceling replication,\n`space_cancel_eviction` privilege in case of canceling eviction and both of them when\ncanceling migration.\n\nHowever, canceling your own transfers does not require any privileges.\n\n***Example cURL requests***\n\n**Cancel specific transfer**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" -X DELETE \"https://$PROVIDER_HOST/api/v3/oneprovider/transfers/$TRANSFER_ID\"\n```\n",
        "responses": {
          "204": {
            "description": "The transfer has been canceled."
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "Transfer with provided Id was not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "tid",
            "in": "path",
            "description": "Transfer Id.",
            "type": "string",
            "required": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli cancelTransfer tid=$TRANSFER_ID"
          }
        ]
      }
    },
    "/transfers/{tid}/rerun": {
      "post": {
        "operationId": "rerun_transfer",
        "x-onedata-gri": {
          "type": "op_transfer",
          "id": "?BINDING(tid)",
          "aspect": "rerun"
        },
        "tags": [
          "Transfer"
        ],
        "summary": "Rerun ended transfer",
        "x-bash-codegen-description": "Reruns ended transfer by creating a new, identical transfer.\n\nThis operation requires:\n  * `space_schedule_replication` when rerunning replication\n  * `space_schedule_eviction` when rerunning eviction\n  * `space_schedule_replication` and `space_schedule_eviction` when rerunning migration\n\nAdditionally, rerunning transfers using views requires `space_query_views` privilege.\n",
        "description": "Reruns ended transfer by creating a new, identical transfer.\n\nThis operation requires:\n  * `space_schedule_replication` when rerunning replication\n  * `space_schedule_eviction` when rerunning eviction\n  * `space_schedule_replication` and `space_schedule_eviction` when rerunning migration\n\nAdditionally, rerunning transfers using views requires `space_query_views` privilege.\n\n***Example cURL requests***\n\n**Rerun finished transfer**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X POST \"https://$PROVIDER_HOST/api/v3/oneprovider/transfers/$TRANSFER_ID/rerun\"\n```\n",
        "produces": [
          "application/json"
        ],
        "responses": {
          "201": {
            "description": "The rerun request has been accepted and the result is the transfer Id, which can be used for monitoring the new transfer status. Also URI of the new transfer in form https://$PROVIDER_HOST/api/v3/oneprovider/transfers/{tid} is returned in the response `Location` header.\n",
            "headers": {
              "Location": {
                "description": "URI of the new transfer.",
                "type": "string"
              }
            },
            "schema": {
              "type": "object",
              "properties": {
                "transferId": {
                  "type": "string",
                  "description": "New transfer Id."
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "Transfer with provided Id was not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "tid",
            "in": "path",
            "description": "Transfer Id.",
            "type": "string",
            "required": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli rerunTransfer tid=$TRANSFER_ID"
          }
        ]
      }
    },
    "/qos_requirements": {
      "post": {
        "operationId": "add_qos_requirement",
        "x-onedata-parse_body": "as_json_params",
        "x-onedata-gri": {
          "type": "op_qos",
          "aspect": "instance"
        },
        "tags": [
          "QoS"
        ],
        "summary": "Add QoS requirement",
        "x-bash-codegen-description": "Adds new QoS requirement for given file or directory. This triggers\ndata replication (if needed) based on requirements defined in new QoS requirement.\n",
        "description": "Adds new QoS requirement for given file or directory. This triggers\ndata replication (if needed) based on requirements defined in new QoS requirement.\n\nFor more information about QoS, please see [here](https://onedata.org/#/home/documentation/doc/using_onedata/qos.html).\n\n***Example cURL requests***\n\n**Add QoS requirement for file**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" -X POST \"https://$PROVIDER_HOST/api/v3/oneprovider/qos_requirements\" \\\n-H \"Content-Type: application/json\" -d '{\n    \"expression\": \"country=FR\",\n    \"replicasNum\": 2,\n    \"fileId\": \"'$FILE_ID'\"\n}'\n```\n",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "201": {
            "description": "The request has been accepted and the result is the QoS requirement Id. Also URI of the QoS requirement in form https://$PROVIDER_HOST/api/v3/oneprovider/qos_requirements/{qid} is returned in the response `Location` header.\n",
            "headers": {
              "Location": {
                "description": "URI of the QoS requirement.",
                "type": "string"
              }
            },
            "schema": {
              "type": "object",
              "properties": {
                "qosRequirementId": {
                  "type": "string",
                  "description": "QoS requirement Id."
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "File not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "data",
            "in": "body",
            "description": "QoS requirement properties",
            "schema": {
              "$ref": "#/definitions/QosCreateRequest"
            },
            "required": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli addQosRequirement fileId=$FILE_ID expression='country=FR' replicasNum=2"
          }
        ]
      }
    },
    "/qos_requirements/{qid}": {
      "get": {
        "operationId": "get_qos_requirement",
        "x-onedata-gri": {
          "type": "op_qos",
          "id": "?BINDING(qid)",
          "aspect": "instance"
        },
        "tags": [
          "QoS"
        ],
        "summary": "Get QoS requirement",
        "x-bash-codegen-description": "Returns detailed information about particular QoS requirement.\n",
        "description": "Returns detailed information about particular QoS requirement.\n\n***Example cURL requests***\n\n**Get detailed information about QoS requirement**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X GET \"https://$PROVIDER_HOST/api/v3/oneprovider/qos_requirements/$QOS_REQ_ID\"\n\n{\n    \"qosRequirementId\": \"c84f669f9522c46976fee490d80651f0\",\n    \"fileId\": \"$FILE_ID\",\n    \"qosExpression\": \"country=FR\",\n    \"replicasNum\": 2,\n    \"status\": \"fulfilled\"\n}\n\n```\n",
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Information about QoS requirement.",
            "schema": {
              "$ref": "#/definitions/QosRequirement"
            }
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "QoS requirement not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "qid",
            "in": "path",
            "description": "QoS requirement Id",
            "type": "string",
            "required": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli getQosRequirement qid=$QOS_REQ_ID"
          }
        ]
      },
      "delete": {
        "operationId": "remove_qos_requirement",
        "x-onedata-gri": {
          "type": "op_qos",
          "id": "?BINDING(qid)",
          "aspect": "instance"
        },
        "summary": "Remove QoS requirement",
        "tags": [
          "QoS"
        ],
        "x-bash-codegen-description": "Removes QoS requirement.\n",
        "description": "Removes QoS requirement.\n\n***Example cURL requests***\n\n**Remove QoS requirement.**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X DELETE \"https://$PROVIDER_HOST/api/v3/oneprovider/qos_requirements/$QOS_REQ_ID\"\n```\n",
        "responses": {
          "204": {
            "description": "QoS requirement has been removed."
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "QoS requirement not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "qid",
            "in": "path",
            "description": "QoS requirement Id",
            "type": "string",
            "required": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli removeQosRequirement qid=$QOS_REQ_ID"
          }
        ]
      }
    },
    "/qos_requirements/{qid}/audit_log": {
      "get": {
        "operationId": "get_qos_requirement_audit_log",
        "x-onedata-gri": {
          "type": "op_qos",
          "id": "?BINDING(qid)",
          "aspect": "audit_log"
        },
        "tags": [
          "QoS"
        ],
        "summary": "Get QoS audit log",
        "x-bash-codegen-description": "Returns audit log of performed locally (on selected Oneprovider) files operations\nthat were result of given QoS requirement. The audit log stores logs concerning all \nfiles affected by a specific QoS requirement.\n",
        "description": "Returns audit log of performed locally (on selected Oneprovider) files operations\nthat were result of given QoS requirement. The audit log stores logs concerning all \nfiles affected by a specific QoS requirement.\n\n***Example cURL requests***\n\n**Get QoS audit log**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" -X GET \\ \n\"https://$PROVIDER_HOST/api/v3/oneprovider/qos_requirements/$QOS_REQ_ID/audit_log?timestamp=1626334701662&offset=1\"\n\n{\n    \"isLast\": false,\n    \"logEntries\": [{\n        \"index\": 0,\n        \"timestamp\": 1626334701662,\n        \"content\": {\n            \"fileId\": $FILE_ID,\n            \"severity\": \"info\"\n            \"status\": \"completed\",\n            \"description\": \"Local replica reconciled.\"\n        }\n    }]\n}\n\n```\n",
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "QoS requirement audit log.",
            "schema": {
              "$ref": "#/definitions/QosRequirementAuditLog"
            }
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "QoS audit log not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "qid",
            "in": "path",
            "description": "QoS requirement Id",
            "type": "string",
            "required": true
          },
          {
            "name": "timestamp",
            "in": "query",
            "description": "Starting timestamp for listing - the listing will start with an entry that has an equal or greater timestamp.\n",
            "type": "integer",
            "required": false,
            "minimum": 0
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Offset from the beginning of the collection specifying starting point for listing relative to timestamp.\n",
            "type": "integer",
            "required": false,
            "default": 0
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of entries that should be returned. If there are more entries, they can be retrieved using `offset` or `timestamp` query parameters.\n",
            "type": "integer",
            "required": false,
            "default": 1000
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli getQosRequirementAuditLog qid=$QOS_REQ_ID timestamp=1626334701662 offset=1"
          }
        ]
      }
    },
    "/data/{id}/qos/summary": {
      "get": {
        "operationId": "get_file_qos_summary",
        "x-onedata-gri": {
          "type": "op_file",
          "id": "?OBJECTID_BINDING(id)",
          "aspect": "qos_summary"
        },
        "tags": [
          "QoS"
        ],
        "summary": "Get QoS summary for file or directory",
        "x-bash-codegen-description": "Returns QoS summary for a file specified by [$FILE_ID](#operation/lookup_file_id).\nQoS summary contains information about effective QoS, which is calculated by merging\nQoS requirements defined directly for file or directory with QoS requirements defined for all\nits ancestors.  \n",
        "description": "Returns QoS summary for a file specified by [$FILE_ID](#operation/lookup_file_id).\nQoS summary contains information about effective QoS, which is calculated by merging\nQoS requirements defined directly for file or directory with QoS requirements defined for all\nits ancestors.  \n\n***Example cURL requests***\n\n**Get file QoS summary**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" -X GET \"https://$PROVIDER_HOST/api/v3/oneprovider/data/$FILE_ID/qos/summary\"\n\n{\n    \"requirements\": [{\"$QOS_REQ_ID\": \"pending\"}],\n    \"status\": \"pending\"\n}\n\n```\n",
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "QoS summary for file or directory.",
            "schema": {
              "$ref": "#/definitions/QosSummary"
            }
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "File or directory not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Id of the file or directory.",
            "type": "string",
            "required": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli getFileQosSummary id=$FILE_ID"
          }
        ]
      }
    },
    "/spaces/{sid}/evaluate_qos_expression": {
      "post": {
        "operationId": "evaluate_qos_expression",
        "x-onedata-parse_body": "as_json_params",
        "x-onedata-gri": {
          "type": "op_space",
          "id": "?BINDING(sid)",
          "aspect": "evaluate_qos_expression"
        },
        "tags": [
          "QoS"
        ],
        "summary": "Evaluate QoS expression",
        "x-bash-codegen-description": "Parses given QoS expression and evaluates it against the parameters of storages supporting the space.\nReturns the list of storages that match the expression. In case of invalid expression, returns an error\nwith the parser report.\n\nThis operation requires `space_manage_qos` privilege.\n",
        "description": "Parses given QoS expression and evaluates it against the parameters of storages supporting the space.\nReturns the list of storages that match the expression. In case of invalid expression, returns an error\nwith the parser report.\n\nThis operation requires `space_manage_qos` privilege.\n\n***Example cURL requests***\n\n**Evaluate QoS expression**\n```bash\ncurl -X POST -H \"X-Auth-Token: $TOKEN\" \\\n-H \"Content-type: application/json\" \\\n-d \"{\"expression\": \"key = value\"}\" \\\n\"https://$PROVIDER_HOST/api/v3/oneprovider/spaces/$SPACE_ID/evaluate_qos_expression\"\n\n{\n  \"matchingStorages\": {\n    [{\n      \"id\": \"$STORAGE_ID\",\n      \"name\": \"storage_name\",\n      \"providerId\": \"$PROVIDER_ID\"\n    }]\n}\n```\n",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "The list of storages matching given QoS expression (objects containing basic storage details)",
            "schema": {
              "type": "object",
              "properties": {
                "matchingStorages": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/StorageDetails"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "Oneprovider REST API not available.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "sid",
            "in": "path",
            "description": "Space Id in which to evaluate QoS expression.\n",
            "type": "string",
            "required": true
          },
          {
            "name": "expression",
            "in": "body",
            "description": "QoS expression to be evaluated.",
            "schema": {
              "type": "string",
              "example": "key = value"
            },
            "required": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli sid=$SPACE_ID evaluateQosExpression expression=\"key=value\""
          }
        ]
      }
    },
    "/shares": {
      "post": {
        "operationId": "create_share",
        "x-onedata-parse_body": "as_json_params",
        "x-onedata-gri": {
          "type": "op_share",
          "aspect": "instance"
        },
        "summary": "Create share",
        "tags": [
          "Share"
        ],
        "x-bash-codegen-description": "Shares a file or a directory. Shared files can be viewed by everyone through public URL.\nThis operation assigns a share Id that can be used to manage share, see:\n  * [Get basic information about share](#operation/get_share)\n  * [List shares associated with file or directory](#operation/list_file_shares_by_id)\n  * [Change name of the share](#operation/update_share)\n  * [Remove share](#operation/remove_share)\n\nAny number of shares can be associated with each file or directory.\n\nThis operation requires `space_manage_share` privilege.\n",
        "description": "Shares a file or a directory. Shared files can be viewed by everyone through public URL.\nThis operation assigns a share Id that can be used to manage share, see:\n  * [Get basic information about share](#operation/get_share)\n  * [List shares associated with file or directory](#operation/list_file_shares_by_id)\n  * [Change name of the share](#operation/update_share)\n  * [Remove share](#operation/remove_share)\n\nAny number of shares can be associated with each file or directory.\n\nThis operation requires `space_manage_share` privilege.\n\n***Example cURL requests***\n\n**Create share**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" -X POST \"https://$PROVIDER_HOST/api/v3/oneprovider/shares\" \\\n-H \"Content-Type: application/json\" -d '{\"name\": \"MyShare\", \"rootFileId\": \"'$FILE_ID'\"}'\n```\n",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "201": {
            "description": "The request has been accepted and the result is the share Id. Also URI of the Share in form https://$PROVIDER_HOST/api/v3/oneprovider/shares/{id} is returned in the response `Location` header.\n",
            "headers": {
              "Location": {
                "description": "URI of the Share.",
                "type": "string"
              }
            },
            "schema": {
              "type": "object",
              "properties": {
                "shareId": {
                  "type": "string",
                  "description": "Share Id."
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "File not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "data",
            "in": "body",
            "description": "Share properties.",
            "schema": {
              "$ref": "#/definitions/ShareCreateRequest"
            },
            "required": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli createShare name==MyShare fileId==$FILE_ID"
          }
        ]
      }
    },
    "/shares/{shid}": {
      "get": {
        "operationId": "get_share",
        "x-onedata-gri": {
          "type": "op_share",
          "id": "?BINDING(shid)",
          "aspect": "instance"
        },
        "summary": "Get share info",
        "tags": [
          "Share"
        ],
        "x-bash-codegen-description": "Returns the basic information about share.\n",
        "description": "Returns the basic information about share.\n\n***Example cURL requests***\n\n**Get the basic information about share**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" -X GET \"https://$PROVIDER_HOST/api/v3/oneprovider/shares/$SHARE_ID\"\n\n{\n    \"shareId\": \"1f4b762b1380946e73aeca574c77f14c\",\n    \"name\": \"Experiment XYZ\",\n    \"description\": \"# Experiment XYZ\\nThis collection contains results from Experiment XYZ.\",\n    \"publicUrl\": \"https://onedata.org/shares/1f4b762b1380946e73aeca574c77f14c\",\n    \"rootFileType\": \"DIR\",\n    \"rootFileId\": \"00000000006CB663736861726547756964233339643236366165646365...\",\n    \"spaceId\": \"6ec1a5413b6f4e2b01a5c85a8fd797e2\",\n    \"handleId\" \"doi:10.15911/MyShares.726855\"\n}\n```\n",
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "The share information.",
            "schema": {
              "$ref": "#/definitions/Share"
            }
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "File or share not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "shid",
            "in": "path",
            "description": "Share Id",
            "type": "string",
            "required": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli getShare shid=$SHARE_ID"
          }
        ]
      },
      "patch": {
        "operationId": "update_share",
        "x-onedata-parse_body": "as_json_params",
        "x-onedata-gri": {
          "type": "op_share",
          "id": "?BINDING(shid)",
          "aspect": "instance"
        },
        "summary": "Update share",
        "tags": [
          "Share"
        ],
        "x-bash-codegen-description": "Changes name and/or description of the share.\n\nThis operation requires `space_manage_share` privilege.\n",
        "description": "Changes name and/or description of the share.\n\nThis operation requires `space_manage_share` privilege.\n\n***Example cURL requests***\n\n**Change name of the share**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" -X PATCH \"https://$PROVIDER_HOST/api/v3/oneprovider/shares/$SHARE_ID\" \\\n-H \"Content-Type: application/json\" -d '{\n    \"name\": \"NewShareName\",\n    \"description\": \"# New description\"\n}'\n```\n",
        "consumes": [
          "application/json"
        ],
        "responses": {
          "204": {
            "description": "Share's name has been changed."
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "Share not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "shid",
            "in": "path",
            "description": "Share Id",
            "type": "string",
            "required": true
          },
          {
            "name": "data",
            "in": "body",
            "description": "New share details",
            "schema": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "New name for the share."
                },
                "description": {
                  "type": "string",
                  "description": "New description of the share."
                }
              }
            },
            "required": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli updateShare shid=$SHARE_ID name==NewShareName description==\"# New description\""
          }
        ]
      },
      "delete": {
        "operationId": "remove_share",
        "x-onedata-gri": {
          "type": "op_share",
          "id": "?BINDING(shid)",
          "aspect": "instance"
        },
        "summary": "Remove share",
        "tags": [
          "Share"
        ],
        "x-bash-codegen-description": "Removes a specific share. This operation will not remove data from shared\nfile or directory but it will not be accessible through public url anymore.\n\nThis operation requires `space_manage_share` privilege.\n",
        "description": "Removes a specific share. This operation will not remove data from shared\nfile or directory but it will not be accessible through public url anymore.\n\nThis operation requires `space_manage_share` privilege.\n\n***Example cURL requests***\n\n**Remove share**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X DELETE \"https://$PROVIDER_HOST/api/v3/oneprovider/shares/$SHARE_ID\"\n```\n",
        "responses": {
          "204": {
            "description": "Share has been removed."
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "Share not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "shid",
            "in": "path",
            "description": "Share Id",
            "type": "string",
            "required": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli removeShare shid=$SHARE_ID"
          }
        ]
      }
    },
    "/spaces/{sid}/datasets": {
      "get": {
        "operationId": "list_space_top_datasets",
        "x-onedata-gri": {
          "type": "op_space",
          "id": "?BINDING(sid)",
          "aspect": "datasets"
        },
        "tags": [
          "Dataset"
        ],
        "summary": "List space top datasets",
        "x-bash-codegen-description": "Returns the list of space's top datasets - ones that do not have any parent\ndataset. In special case when dataset has been established for space root\ndirectory, there is only one top dataset.\n\nDatasets in each space are divided into two separate trees based on their states:\n* `attached` - this tree represents the hierarchy of datasets, which corresponds\n  to the hierarchy of files in the space. It can be perceived as a \"compressed\"\n  file tree, containing only the nodes corresponding to files/directories marked\n  as a dataset. For example, dataset A is child of dataset B because\n  B's root directory is ancestor to A's root file and no directory between\n  them is a root of any attached dataset. Consequently, moving dataset's root file\n  to other location may change the dataset location in the tree.\n\n* `detached` - this tree represents the hierarchy of datasets for the moment\n  of detachment and does not change when root files are moved. Individual\n  datasets from this tree can be reattached, causing the tree to be\n  restructured in specific cases.\n",
        "description": "Returns the list of space's top datasets - ones that do not have any parent\ndataset. In special case when dataset has been established for space root\ndirectory, there is only one top dataset.\n\nDatasets in each space are divided into two separate trees based on their states:\n* `attached` - this tree represents the hierarchy of datasets, which corresponds\n  to the hierarchy of files in the space. It can be perceived as a \"compressed\"\n  file tree, containing only the nodes corresponding to files/directories marked\n  as a dataset. For example, dataset A is child of dataset B because\n  B's root directory is ancestor to A's root file and no directory between\n  them is a root of any attached dataset. Consequently, moving dataset's root file\n  to other location may change the dataset location in the tree.\n\n* `detached` - this tree represents the hierarchy of datasets for the moment\n  of detachment and does not change when root files are moved. Individual\n  datasets from this tree can be reattached, causing the tree to be\n  restructured in specific cases.\n\n***Example cURL requests***\n\n**List space top datasets**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X GET \"https://$PROVIDER_HOST/api/v3/oneprovider/spaces/$SPACE_ID/datasets?state=attached\"\n\n{\n    \"datasets\": [\n        {\n            \"datasetId\": \"1f4b762b1380946e73aeca574c77f14c\",\n            \"name\": \"File1.txt\"\n        },\n        {\n            \"datasetId\": \"64233339643236366165646365626666\",\n            \"name\": \"Dir2\"\n        }\n    ],\n    \"nextPageToken\": \"RGlyMjY0MjMzMzM5NjQzMjM2MzY2MTY1NjQ2MzY1NjI2NjY2\"\n}\n```\n",
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "The list of space top datasets.",
            "schema": {
              "$ref": "#/definitions/Datasets"
            }
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "Invalid path - space not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "sid",
            "in": "path",
            "description": "Space Id",
            "type": "string",
            "required": true
          },
          {
            "name": "state",
            "in": "query",
            "description": "The dataset tree to list from.",
            "type": "string",
            "enum": [
              "attached",
              "detached"
            ],
            "required": true,
            "default": "attached"
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Allows specifying maximum number of entries that should be returned. If there are more datasets, they can be retrieved using `offset` or `token` query parameters.\n",
            "type": "integer",
            "required": false,
            "minimum": 1,
            "maximum": 1000,
            "default": 100
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Offset determining beginning of the list of datasets returned in the response. Expressed in number of entries, further adjusts the starting point of listing indicated by `index` or `token` parameters. The value can be negative, in such case entries preceding the starting point will be returned.\n",
            "type": "integer",
            "required": false,
            "default": 0
          },
          {
            "name": "index",
            "in": "query",
            "description": "Determines the starting point for listing. The listing will (inclusively) start from the first dataset whose name is lexicographically greater or equal to the specified index. Since the index may include characters that are not URL-safe, it should always be urlencoded.\n",
            "type": "string",
            "required": false,
            "default": null
          },
          {
            "name": "token",
            "in": "query",
            "description": "Determines the starting point for listing. The listing will start from the next page (batch) of entries which follows the page previously obtained along with the corresponding `nextPageToken`. If both `token` and `index` are passed, the `token` prevails.\n",
            "type": "string",
            "required": false,
            "default": null
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli listSpaceTopDatasets sid=$SPACE_ID limit=100 offset=300"
          }
        ]
      }
    },
    "/datasets/{did}/children": {
      "get": {
        "operationId": "list_dataset_children",
        "x-onedata-gri": {
          "type": "op_dataset",
          "id": "?BINDING(did)",
          "aspect": "children"
        },
        "tags": [
          "Dataset"
        ],
        "summary": "List child datasets of a dataset",
        "x-bash-codegen-description": "Returns the list of child datasets of a specific dataset. The list of top datasets\nin a space can be acquired using [this endpoint](#operation/list_space_top_datasets).\n",
        "description": "Returns the list of child datasets of a specific dataset. The list of top datasets\nin a space can be acquired using [this endpoint](#operation/list_space_top_datasets).\n\n***Example cURL requests***\n\n**List child datasets**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X GET \"https://$PROVIDER_HOST/api/v3/oneprovider/datasets/$DATASET_ID/children\"\n\n{\n    \"datasets\": [\n        {\n            \"datasetId\": \"1f4b762b1380946e73aeca574c77f14c\",\n            \"name\": \"File1.txt\"\n        },\n        {\n            \"datasetId\": \"64233339643236366165646365626666\",\n            \"name\": \"Dir2\"\n        }\n    ],\n    \"nextPageToken\": \"RGlyMjY0MjMzMzM5NjQzMjM2MzY2MTY1NjQ2MzY1NjI2NjY2\"\n}\n```\n",
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "The list of child datasets.",
            "schema": {
              "$ref": "#/definitions/Datasets"
            }
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "Invalid path - dataset not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "did",
            "in": "path",
            "description": "Dataset Id",
            "type": "string",
            "required": true
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Allows specifying maximum number of entries that should be returned. If there are more child datasets, they can be retrieved using `offset` or `token` query parameters.\n",
            "type": "integer",
            "required": false,
            "maximum": 1000,
            "minimum": 1,
            "default": 1000
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Offset determining beginning of the list of datasets returned in the response. Expressed in number of entries, further adjusts the starting point of listing indicated by `index` or `token` parameters. The value can be negative, in such case entries preceding the starting point will be returned.\n",
            "type": "integer",
            "required": false,
            "default": 0
          },
          {
            "name": "index",
            "in": "query",
            "description": "Determines the starting point for listing. The listing will (inclusively) start from the first dataset whose name is lexicographically greater or equal to the specified index. Since the index may include characters that are not URL-safe, it should always be urlencoded.\n",
            "type": "string",
            "required": false,
            "default": null
          },
          {
            "name": "token",
            "in": "query",
            "description": "Determines the starting point for listing. The listing will start from the next page (batch) of entries which follows the page previously obtained along with the corresponding `nextPageToken`. If both `token` and `index` are passed, the `token` prevails.\n",
            "type": "string",
            "required": false,
            "default": null
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli listDatasetChildren did=$DATASET_ID limit=100 offset=300"
          }
        ]
      }
    },
    "/datasets": {
      "post": {
        "operationId": "establish_dataset",
        "x-onedata-parse_body": "as_json_params",
        "x-onedata-gri": {
          "type": "op_dataset",
          "aspect": "instance"
        },
        "summary": "Establish dataset",
        "tags": [
          "Dataset"
        ],
        "x-bash-codegen-description": "Establishes a dataset with the specified file/directory as the dataset's root.\nFor each file/directory, only one dataset can be established.\n\nThis operation requires `space_manage_datasets` privilege.\n",
        "description": "Establishes a dataset with the specified file/directory as the dataset's root.\nFor each file/directory, only one dataset can be established.\n\nThis operation requires `space_manage_datasets` privilege.\n\n***Example cURL requests***\n\n**Establish dataset**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" -X POST \"https://$PROVIDER_HOST/api/v3/oneprovider/datasets\" \\\n-H \"Content-Type: application/json\" -d '{\n    \"rootFileId\": \"'$FILE_ID'\",\n    \"protectionFlags\": [\"data_protection\"]\n}'\n```\n",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "201": {
            "description": "The request has been accepted and the result is the dataset Id. Also URI of the Dataset in form https://$PROVIDER_HOST/api/v3/oneprovider/datasets/{id} is returned in the response `Location` header.\n",
            "headers": {
              "Location": {
                "description": "URI of the Dataset.",
                "type": "string"
              }
            },
            "schema": {
              "type": "object",
              "properties": {
                "datasetId": {
                  "type": "string",
                  "description": "Dataset Id."
                }
              },
              "example": {
                "datasetId": "1f4b762b1380946e73aeca574c77f14c"
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "File not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "data",
            "in": "body",
            "description": "Dataset properties.",
            "schema": {
              "$ref": "#/definitions/DatasetEstablishRequest"
            },
            "required": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "cat dataset.json | oneprovider-rest-cli establishDataset -"
          }
        ]
      }
    },
    "/datasets/{did}": {
      "get": {
        "operationId": "get_dataset",
        "x-onedata-gri": {
          "type": "op_dataset",
          "id": "?BINDING(did)",
          "aspect": "instance"
        },
        "summary": "Get dataset information",
        "tags": [
          "Dataset"
        ],
        "x-bash-codegen-description": "Returns the basic information about a dataset.\n",
        "description": "Returns the basic information about a dataset.\n\n***Example cURL requests***\n\n**Get the basic information about dataset**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" -X GET \"https://$PROVIDER_HOST/api/v3/oneprovider/datasets/$DATASET_ID\"\n\n{\n    \"state\": \"attached\",\n    \"datasetId\": \"1f4b762b1380946e73aeca574c77f14c\",\n    \"parentId\": null,\n    \"rootFileId\": \"00000000006CB663736861726547756964233339643236366165646365...\",\n    \"rootFileType\": \"DIR\",\n    \"rootFilePath\": \"/MySpace/dir\",\n    \"rootFileDeleted\": false,\n    \"protectionFlags\": [\"data_protection\"],\n    \"effectiveProtectionFlags\": [\"data_protection\", \"metadata_protection\"],\n    \"creationTime\": 1576152793,\n    \"archiveCount\": 5\n}\n```\n",
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "The dataset information.",
            "schema": {
              "$ref": "#/definitions/Dataset"
            }
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "Dataset not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "did",
            "in": "path",
            "description": "Dataset Id",
            "type": "string",
            "required": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli getDataset did=$DATASET_ID"
          }
        ]
      },
      "patch": {
        "operationId": "update_dataset",
        "x-onedata-parse_body": "as_json_params",
        "x-onedata-gri": {
          "type": "op_dataset",
          "id": "?BINDING(did)",
          "aspect": "instance"
        },
        "summary": "Update dataset",
        "tags": [
          "Dataset"
        ],
        "x-bash-codegen-description": "Changes dataset properties.\n\nThis operation requires `space_manage_datasets` privilege.\n",
        "description": "Changes dataset properties.\n\nThis operation requires `space_manage_datasets` privilege.\n\n***Example cURL requests***\n\n**Change dataset protection flags**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" -X PATCH \"https://$PROVIDER_HOST/api/v3/oneprovider/datasets/$DATASET_ID\" \\\n-H \"Content-Type: application/json\" -d '{\n    \"setProtectionFlags\": [\"metadata_protection\"],\n    \"unsetProtectionFlags\": [\"data_protection\"]\n}'\n```\n",
        "consumes": [
          "application/json"
        ],
        "responses": {
          "204": {
            "description": "Dataset's properties has been changed."
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "Dataset not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "did",
            "in": "path",
            "description": "Dataset Id",
            "type": "string",
            "required": true
          },
          {
            "name": "data",
            "in": "body",
            "description": "Dataset properties",
            "schema": {
              "$ref": "#/definitions/DatasetUpdateRequest"
            },
            "required": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli updateDataset did=$DATASET_ID attached==true"
          }
        ]
      },
      "delete": {
        "operationId": "remove_dataset",
        "x-onedata-gri": {
          "type": "op_dataset",
          "id": "?BINDING(did)",
          "aspect": "instance"
        },
        "summary": "Remove dataset",
        "tags": [
          "Dataset"
        ],
        "x-bash-codegen-description": "Removes a specific dataset. This procedure does not modify any files or directories\nthat were a part of the dataset.\n<!--- TODO VFS-7304 Add information that datasets can be deleted only if they have no archives -->\n\nThis operation requires `space_manage_datasets` privilege.\n",
        "description": "Removes a specific dataset. This procedure does not modify any files or directories\nthat were a part of the dataset.\n<!--- TODO VFS-7304 Add information that datasets can be deleted only if they have no archives -->\n\nThis operation requires `space_manage_datasets` privilege.\n\n***Example cURL requests***\n\n**Remove dataset**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X DELETE \"https://$PROVIDER_HOST/api/v3/oneprovider/datasets/$DATASET_ID\"\n```\n",
        "responses": {
          "204": {
            "description": "Dataset has been removed."
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "Dataset not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "did",
            "in": "path",
            "description": "Dataset Id",
            "type": "string",
            "required": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli removeDataset did=$DATASET_ID"
          }
        ]
      }
    },
    "/data/{id}/dataset/summary": {
      "get": {
        "operationId": "get_file_dataset_summary",
        "x-onedata-gri": {
          "type": "op_file",
          "id": "?OBJECTID_BINDING(id)",
          "aspect": "dataset_summary"
        },
        "tags": [
          "Dataset"
        ],
        "summary": "Get dataset summary for file or directory",
        "x-bash-codegen-description": "Returns dataset summary for a file specified by [$FILE_ID](#operation/lookup_file_id).\n",
        "description": "Returns dataset summary for a file specified by [$FILE_ID](#operation/lookup_file_id).\n\n***Example cURL requests***\n\n**Get file's dataset summary**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" -X GET \"https://$PROVIDER_HOST/api/v3/oneprovider/data/$FILE_ID/dataset/summary\"\n\n{\n    \"directDataset\": null,\n    \"effectiveAncestorDatasets\": [\"1f4b762b1380946e73aeca574c77f14c\", \"64233339643236366165646365626666\"],\n    \"effectiveProtectionFlags\": [\"data_protection\", \"metadata_protection\"]\n}\n```\n",
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Dataset summary for file or directory.",
            "schema": {
              "$ref": "#/definitions/DatasetSummary"
            }
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "File or directory not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Id of the file or directory.",
            "type": "string",
            "required": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli getFileDatasetSummary id=$FILE_ID"
          }
        ]
      }
    },
    "/datasets/{did}/archives": {
      "get": {
        "operationId": "list_dataset_archives",
        "x-onedata-gri": {
          "type": "op_dataset",
          "id": "?BINDING(did)",
          "aspect": "archives"
        },
        "tags": [
          "Archive"
        ],
        "summary": "List archives of a dataset",
        "x-bash-codegen-description": "Returns the list of archives created from a specific dataset.\n\nThis operation requires `space_view_archives` privilege.\n",
        "description": "Returns the list of archives created from a specific dataset.\n\nThis operation requires `space_view_archives` privilege.\n\n***Example cURL requests***\n\n**List dataset archives**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X GET \"https://$PROVIDER_HOST/api/v3/oneprovider/datasets/$DATASET_ID/archives\"\n\n{\n    \"archives\": [\"d0f08b098804da5504609b2c54b507b3\", \"5a1e63f7cf5282a206144f77822c3f10\"],\n    \"nextPageToken\": \"UkdseU1qWTBNak16TXpNNU5qUXpNak0yTXpZMk1UWTFOalEyTXpZMU5qSTJOalky\"\n}\n```\n",
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "The list of archives.",
            "schema": {
              "$ref": "#/definitions/Archives"
            }
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "Invalid path - dataset not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "did",
            "in": "path",
            "description": "Dataset Id",
            "type": "string",
            "required": true
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Allows specifying maximum number of entries that should be returned. If there are more archives, they can be retrieved using `offset` or `token` query parameters.\n",
            "type": "integer",
            "required": false,
            "maximum": 1000,
            "minimum": 1,
            "default": 1000
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Offset determining beginning of the list of archives returned in the response. Expressed in number of entries, further adjusts the starting point of listing indicated by `token` parameter. The value can be negative, in such case entries preceding the starting point will be returned.\n",
            "type": "integer",
            "required": false,
            "default": 0
          },
          {
            "name": "token",
            "in": "query",
            "description": "Determines the starting point for listing. The listing will start from the next page (batch) of entries which follows the page previously obtained along with the corresponding `nextPageToken`.\n",
            "type": "string",
            "required": false,
            "default": null
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli listDatasetArchives did=$DATASET_ID limit=100 offset=300"
          }
        ]
      }
    },
    "/archives": {
      "post": {
        "operationId": "create_archive",
        "x-onedata-parse_body": "as_json_params",
        "x-onedata-gri": {
          "type": "op_archive",
          "aspect": "instance"
        },
        "summary": "Create archive from a dataset",
        "tags": [
          "Archive"
        ],
        "x-bash-codegen-description": "Creates an archive of a dataset - a snapshot of its data and metadata.\n\nThis operation requires `space_manage_datasets` and `space_create_archives` privileges.\n",
        "description": "Creates an archive of a dataset - a snapshot of its data and metadata.\n\nThis operation requires `space_manage_datasets` and `space_create_archives` privileges.\n\n***Example cURL requests***\n\n**Create archive from a dataset**\n<!--- TODO VFS-7616 add metadata structure to the example-->\n\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" -X POST \"https://$PROVIDER_HOST/api/v3/oneprovider/archives\" \\\n-H \"Content-Type: application/json\" -d '{\n    \"datasetId\": \"'$DATASET_ID'\",\n    \"config\": {\n        \"incremental\": {\"enabled\": true},\n        \"includeDip\": false,\n        \"layout\": \"bagit\",\n        \"createNestedArchives\": true,\n        \"followSymlinks\": true\n    },\n    \"preservedCallback\": \"https://example.org/preserved_archives\",\n    \"deletedCallback\": \"https://example.org/deleted_archives\",\n    \"description\": \"Archived dataset with experiment data from 2021.\"\n}'\n```\n",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "201": {
            "description": "The request has been accepted and the result is the archive Id. Also URI of the Archive in form https://$PROVIDER_HOST/api/v3/oneprovider/archives/{id} is returned in the response `Location` header.\n",
            "headers": {
              "Location": {
                "description": "URI of the Archive.",
                "type": "string"
              }
            },
            "schema": {
              "type": "object",
              "properties": {
                "archiveId": {
                  "type": "string",
                  "description": "Archive Id."
                }
              },
              "example": {
                "archiveId": "ae6f78c89a97c9e78e891105f703bcb8"
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "Dataset not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "data",
            "in": "body",
            "description": "Dataset properties.",
            "schema": {
              "$ref": "#/definitions/ArchiveCreateRequest"
            },
            "required": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "cat archive_params.json | oneprovider-rest-cli createArchive -"
          }
        ]
      }
    },
    "/archives/{aid}": {
      "get": {
        "operationId": "get_archive",
        "x-onedata-gri": {
          "type": "op_archive",
          "id": "?BINDING(aid)",
          "aspect": "instance"
        },
        "summary": "Get archive information",
        "tags": [
          "Archive"
        ],
        "x-bash-codegen-description": "Returns the basic information about an archive.\n\nThis operation requires `space_view_archives` privilege.\n",
        "description": "Returns the basic information about an archive.\n\nThis operation requires `space_view_archives` privilege.\n\n***Example cURL requests***\n\n**Get the basic information about archive**\n<!--- TODO VFS-7616 add metadata structure to the example-->\n\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" -X GET \"https://$PROVIDER_HOST/api/v3/oneprovider/archives/$ARCHIVE_ID\"\n\n{\n    \"archiveId\": \"ae6f78c89a97c9e78e891105f703bcb8\",\n    \"state\": \"preserved\",\n    \"datasetId\": \"1f4b762b1380946e73aeca574c77f14c\",\n    \"rootDirectoryId\": \"00000000006CB663736861726547756964233339643236366165646365\",\n    \"creationTime\": 1576152793,\n    \"config\": {\n      \"incremental\": {\"enabled\": true},\n      \"includeDip\": false,\n      \"layout\": \"bagit\",\n    },\n    \"preservedCallback\": \"https://example.org/preserved_archives\",\n    \"deletedCallback\": null,\n    \"description\": \"Archived dataset with experiment data from 2021.\",\n    \"stats\": {\n        \"filesArchived\": 7940,\n        \"filesFailed\": 3,\n        \"bytesArchived\": 879245378924537\n    },\n    \"baseArchiveId\": \"ae6f78c89a97c9e78e891105f703bcb8\",\n    \"relatedAipId\": \"e891105f703bcb8ae6f78c89a97c9e78\",\n    \"relatedDipId\": \"78e891105f703bcb8ae6f78c89a97c9e\"\n}\n```\n",
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "The archive information.",
            "schema": {
              "$ref": "#/definitions/Archive"
            }
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "Archive not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "aid",
            "in": "path",
            "description": "Archive Id",
            "type": "string",
            "required": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli getArchive aid=$ARCHIVE_ID"
          }
        ]
      },
      "patch": {
        "operationId": "update_archive",
        "x-onedata-parse_body": "as_json_params",
        "x-onedata-gri": {
          "type": "op_archive",
          "id": "?BINDING(aid)",
          "aspect": "instance"
        },
        "summary": "Update archive",
        "tags": [
          "Archive"
        ],
        "x-bash-codegen-description": "Changes archive properties.\n\nThis operation requires `space_manage_datasets` and `space_create_archives` privileges.\n",
        "description": "Changes archive properties.\n\nThis operation requires `space_manage_datasets` and `space_create_archives` privileges.\n\n***Example cURL requests***\n\n**Change archive description and callbacks**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" -X PATCH \"https://$PROVIDER_HOST/api/v3/oneprovider/archives/$ARCHIVE_ID\" \\\n-H \"Content-Type: application/json\" -d '{\n    \"description\": \"New archive description\",\n    \"preservedCallback\": \"https://archives.org/preserved_archives\",\n    \"deletedCallback\": \"https://archives.org/deleted_archives\"\n}'\n```\n",
        "consumes": [
          "application/json"
        ],
        "responses": {
          "204": {
            "description": "Archive's properties has been changed."
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "Archive not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "aid",
            "in": "path",
            "description": "Archive Id",
            "type": "string",
            "required": true
          },
          {
            "name": "data",
            "in": "body",
            "description": "Archive properties",
            "schema": {
              "$ref": "#/definitions/ArchiveUpdateRequest"
            },
            "required": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "cat archive.json | oneprovider-rest-cli updateArchive aid=$ARCHIVE_ID -"
          }
        ]
      }
    },
    "/archives/{aid}/delete": {
      "post": {
        "operationId": "delete_archive",
        "x-onedata-parse_body": "as_json_params",
        "x-onedata-gri": {
          "type": "op_archive",
          "id": "?BINDING(aid)",
          "aspect": "delete"
        },
        "summary": "Delete archive",
        "tags": [
          "Archive"
        ],
        "x-bash-codegen-description": "Initializes process of purging an archive.\nFirst, the archived data is deleted from the storage, then all the information concerning the archive is deleted.\nThe process may be time consuming therefore it is possible to pass callback URL\non which the POST request will be performed to notify that the process has finished.\nThe callback request will include JSON `{\"archiveId\": $ARCHIVE_ID}` as a body to determine which\narchive has been deleted.\n\nThis operation requires `space_manage_datasets` and `space_remove_archives` privileges.\n",
        "description": "Initializes process of purging an archive.\nFirst, the archived data is deleted from the storage, then all the information concerning the archive is deleted.\nThe process may be time consuming therefore it is possible to pass callback URL\non which the POST request will be performed to notify that the process has finished.\nThe callback request will include JSON `{\"archiveId\": $ARCHIVE_ID}` as a body to determine which\narchive has been deleted.\n\nThis operation requires `space_manage_datasets` and `space_remove_archives` privileges.\n\n***Example cURL requests***\n\n**Delete archive**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" -X POST \"https://$PROVIDER_HOST/api/v3/oneprovider/archives/$ARCHIVE_ID/delete\" \\\n-H \"Content-Type: application/json\" -d '{\n    \"deletedCallback\": \"https://example.org/deleted_archives\"\n}'\n```\n",
        "consumes": [
          "application/json"
        ],
        "responses": {
          "204": {
            "description": "The request has been accepted and the process of purging an archive has started.\n"
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "Archive not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "aid",
            "in": "path",
            "description": "Id of a specific archive to be deleted.",
            "type": "string",
            "required": true
          },
          {
            "name": "data",
            "in": "body",
            "description": "Parameters for initializing purging of an archive.",
            "schema": {
              "$ref": "#/definitions/ArchiveDeleteRequest"
            },
            "required": false
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli deleteArchive archiveId=$ARCHIVE_ID deletedCallback=='https://example.org/deleted_archives'"
          }
        ]
      }
    },
    "/archives/{aid}/recall": {
      "post": {
        "operationId": "recall_archive",
        "x-onedata-parse_body": "as_json_params",
        "x-onedata-gri": {
          "type": "op_archive",
          "id": "?BINDING(aid)",
          "aspect": "recall"
        },
        "summary": "Recall archive",
        "tags": [
          "Archive"
        ],
        "x-bash-codegen-description": "Initializes process of recalling an archive.\nThe recall creates a copy of the archive content in specified destination.\n\nThis operation requires `space_recall_archives` privilege.\n",
        "description": "Initializes process of recalling an archive.\nThe recall creates a copy of the archive content in specified destination.\n\nThis operation requires `space_recall_archives` privilege.\n\n***Example cURL requests***\n\n**Recall archive**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" -X POST \"https://$PROVIDER_HOST/api/v3/oneprovider/archives/$ARCHIVE_ID/recall\" \\\n-H \"Content-Type: application/json\" -d '{\n    \"parentDirectoryId\": \"$PARENT_DIRECTORY_ID\",\n    \"targetFileName\": \"example_name\"\n}'\n\n{\n    \"rootFileId\": \"$ROOT_FILE_ID\"\n}\n```\n",
        "consumes": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Archive recall initialization request response.",
            "schema": {
              "$ref": "#/definitions/ArchiveRecallResponse"
            }
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "Archive not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "aid",
            "in": "path",
            "description": "Id of a specific archive to be recalled.",
            "type": "string",
            "required": true
          },
          {
            "name": "data",
            "in": "body",
            "description": "Parameters for initializing recall of an archive.",
            "schema": {
              "$ref": "#/definitions/ArchiveRecallRequest"
            },
            "required": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli recallArchive archiveId=$ARCHIVE_ID targetFileId==$FILE_ID"
          }
        ]
      }
    },
    "/data/{id}/recall/cancel": {
      "post": {
        "operationId": "cancel_archive_recall",
        "x-onedata-gri": {
          "type": "op_file",
          "id": "?OBJECTID_BINDING(id)",
          "aspect": "cancel_archive_recall"
        },
        "tags": [
          "Archive"
        ],
        "summary": "Cancel an archive recall",
        "x-bash-codegen-description": "Cancels an ongoing archive recall, identified by the root [FILE_ID] to which the archive \nis being recalled.\n",
        "description": "Cancels an ongoing archive recall, identified by the root [FILE_ID] to which the archive \nis being recalled.\n\n**Cancel archive recall**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X POST \"https://$PROVIDER_HOST/api/v3/oneprovider/data/$FILE_ID/recall/cancel\"\n```\n",
        "produces": [
          "application/json"
        ],
        "responses": {
          "204": {
            "description": "Ongoing archive recall has been cancelled."
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "This file is not a root of any archive recall.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "File Id.",
            "type": "string",
            "required": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli cancelArchiveRecall id=$FILE_ID"
          }
        ]
      }
    },
    "/data/{id}/recall/details": {
      "get": {
        "operationId": "get_archive_recall_details",
        "x-onedata-gri": {
          "type": "op_file",
          "id": "?OBJECTID_BINDING(id)",
          "aspect": "archive_recall_details"
        },
        "tags": [
          "Archive"
        ],
        "summary": "Get details of an archive recall",
        "x-bash-codegen-description": "If this file is a root of a past or ongoing archive recall, returns its details. Otherwise, \nreturns `404 NOT FOUND` error.\n",
        "description": "If this file is a root of a past or ongoing archive recall, returns its details. Otherwise, \nreturns `404 NOT FOUND` error.\n\n**Get archive recall details**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X GET \"https://$PROVIDER_HOST/api/v3/oneprovider/data/$FILE_ID/recall/details\"\n\n{\n    \"archiveId\": \"$ARCHIVE_ID\",\n    \"datasetId\": \"$DATASET_ID\",\n    \"startTime\": 1643103923417,\n    \"finishTime\": 1643103933417,\n    \"totalFileCount\" : 1,\n    \"totalByteSize\": 65536,\n    \"lastError\": {\n        \"fileId\": \"$FILE_ID\",\n        \"reason\": {\n          \"description\": \"The resource could not be found.\",\n          \"id\": \"notFound\"\n        }\n    }\n}\n```\n",
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Archive recall details.",
            "schema": {
              "$ref": "#/definitions/ArchiveRecallDetails"
            }
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "This file is not a root of any archive recall.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "File Id.",
            "type": "string",
            "required": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli getArchiveRecallDetails id=$FILE_ID"
          }
        ]
      }
    },
    "/data/{id}/recall/progress": {
      "get": {
        "operationId": "get_archive_recall_progress",
        "x-onedata-gri": {
          "type": "op_file",
          "id": "?OBJECTID_BINDING(id)",
          "aspect": "archive_recall_progress"
        },
        "tags": [
          "Archive"
        ],
        "summary": "Get progress of an archive recall",
        "x-bash-codegen-description": "If this file is a root of a past or ongoing archive recall, returns its progress. Otherwise, \nreturns `404 NOT FOUND` error.\nThis resource is only available on the Oneprovider performing the recall.\n",
        "description": "If this file is a root of a past or ongoing archive recall, returns its progress. Otherwise, \nreturns `404 NOT FOUND` error.\nThis resource is only available on the Oneprovider performing the recall.\n\n**Get archive recall progress**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X GET \"https://$PROVIDER_HOST/api/v3/oneprovider/data/$FILE_ID/recall/progress\"\n\n{\n    \"filesCopied\": 8,\n    \"bytesCopied\": 16384,\n    \"filesFailed\": 1\n}\n```\n",
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Archive recall progress.",
            "schema": {
              "$ref": "#/definitions/ArchiveRecallProgress"
            }
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "This file is not a root of any archive recall.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "File Id.",
            "type": "string",
            "required": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli getArchiveRecallProgress id=$FILE_ID"
          }
        ]
      }
    },
    "/spaces/{sid}/automation/execution/workflows": {
      "get": {
        "operationId": "list_workflow_executions",
        "x-onedata-gri": {
          "type": "op_space",
          "id": "?BINDING(sid)",
          "aspect": "atm_workflow_executions"
        },
        "tags": [
          "Workflow execution"
        ],
        "summary": "List workflow executions",
        "x-bash-codegen-description": "Returns the list of workflow execution Ids with given phase within a space.\nThe list will include only workflow executions based on schemas from \ninventories to which user has access.\n\nThis operation requires `space_view_atm_workflow_executions` privilege.\n",
        "description": "Returns the list of workflow execution Ids with given phase within a space.\nThe list will include only workflow executions based on schemas from \ninventories to which user has access.\n\nThis operation requires `space_view_atm_workflow_executions` privilege.\n\n***Example cURL requests***\n\n**List at most 3 ongoing workflow executions starting from page id 757136151113c2f**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X GET \"https://$PROVIDER_HOST/api/v3/oneprovider/spaces/$SPACE_ID/automation/execution/workflows?phase=ongoing&limit=3&token=757136151113c2f\"\n\n{\n    \"atmWorkflowExecutions\": [\n        \"2727a9fe5f5df6b43a8033386d2990e8ch5df6\",\n        \"4bd9b58f6387622bf07f7388945e4fc4ch8762\",\n        \"579a785181331e618b26980166b6ba2fch331e\"\n    ],\n    \"isLast\": false,\n    \"nextPageToken\": \"8471726779817b3a\"\n}\n```\n",
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "The list of workflow execution Ids.",
            "schema": {
              "type": "object",
              "properties": {
                "atmWorkflowExecutions": {
                  "type": "array",
                  "description": "The list of workflow execution Ids.",
                  "items": {
                    "type": "string"
                  }
                },
                "isLast": {
                  "type": "boolean",
                  "description": "Indicates whether there are more workflow execution to be listed.",
                  "example": false
                },
                "nextPageToken": {
                  "$ref": "#/definitions/ListPageToken"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "Oneprovider REST API not available.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "sid",
            "in": "path",
            "description": "Space Id in which to list workflow executions.\n",
            "type": "string",
            "required": true
          },
          {
            "name": "phase",
            "in": "query",
            "description": "Specifies the phase of workflow executions to list.",
            "type": "string",
            "enum": [
              "waiting",
              "ongoing",
              "suspended",
              "ended"
            ],
            "required": false,
            "default": "ongoing"
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Allows specifying maximum number of entries that should be returned.  If there are more workflow executions, they can be retrieved using  `offset` or `token` query parameters.\n",
            "type": "integer",
            "required": false,
            "maximum": 1000,
            "minimum": 1,
            "default": 1000
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Offset determining beginning of the list of workflow executions returned  in the response. Expressed in number of entries, further adjusts the  starting point of listing indicated by `token` parameter. The value can be negative, in such case entries preceding the starting  point will be returned.\n",
            "type": "integer",
            "required": false,
            "default": 0
          },
          {
            "name": "token",
            "in": "query",
            "description": "Determines the starting point for listing. The listing will start from  the next page (batch) of entries which follows the page previously  obtained along with the corresponding `nextPageToken`.\n",
            "type": "string",
            "required": false,
            "default": null
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli sid=$SPACE_ID listWorkflowExecutions phase=ongoing limit=20 token=757136151113c2f"
          }
        ]
      }
    },
    "/automation/execution/workflows": {
      "post": {
        "operationId": "schedule_workflow_execution",
        "x-onedata-parse_body": "as_json_params",
        "x-onedata-gri": {
          "type": "op_atm_workflow_execution",
          "aspect": "instance"
        },
        "summary": "Schedule workflow execution",
        "tags": [
          "Workflow execution"
        ],
        "x-bash-codegen-description": "Schedules a workflow execution based on specified workflow schema revision.\nThe execution is asynchronous.\n\nThis operation requires `space_schedule_atm_workflow_executions` privilege and\nthe requesting user must belong to the automation inventory containing the\ncorresponding workflow schema definition.\n",
        "description": "Schedules a workflow execution based on specified workflow schema revision.\nThe execution is asynchronous.\n\nThis operation requires `space_schedule_atm_workflow_executions` privilege and\nthe requesting user must belong to the automation inventory containing the\ncorresponding workflow schema definition.\n\n***Example cURL requests***\n\n**Create workflow execution**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" -X POST \"https://$PROVIDER_HOST/api/v3/oneprovider/automation/execution/workflows\" \\\n-H \"Content-Type: application/json\" -d '{\n    \"spaceId\": \"'$SPACE_ID'\",\n    \"atmWorkflowSchemaId\": \"'$ATM_WORKFLOW_SCHEMA_ID'\",\n    \"atmWorkflowSchemaRevisionNumber\": 3,\n    \"storeInitialContentOverlay\": {\n        \"de6d2e524459dd235f80aa8652a68879b5dbe9\": [\n            {\n                \"file_id\": \"0000000000523261677569642330376134636136616638613431366334386338343366356338643562323662\"\n            }\n        ],\n        \"83cf895501eb11f9bc71e4b2b41a252e8561b5\": {\n            \"file_id\": \"000000000052A6E0677569642334653938663463616538386232366437366539636462393634633031653733\"\n        }\n    },\n    \"logLevel\": \"debug\",\n    \"callback\": \"https://my-server.example.com/execution-callback\"\n}'\n\n{\"atmWorkflowExecutionId\": \"11a53ed06d175c89bc3ed5be61f8217cch1890\"}\n```\n",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "201": {
            "description": "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.\n",
            "headers": {
              "Location": {
                "description": "URI of the workflow execution.",
                "type": "string"
              }
            },
            "schema": {
              "type": "object",
              "properties": {
                "atmWorkflowExecutionId": {
                  "type": "string",
                  "description": "Workflow execution Id."
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "Workflow execution with provided Id was not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "data",
            "in": "body",
            "description": "Workflow execution properties.",
            "schema": {
              "$ref": "#/definitions/AtmWorkflowExecutionScheduleRequest"
            },
            "required": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli scheduleWorkflowExecution spaceId==$SPACE_ID atmWorkflowSchemaId==$ATM_WORKFLOW_SCHEMA_ID atmWorkflowSchemaRevisionNumber==3"
          }
        ]
      }
    },
    "/automation/execution/workflows/{wid}": {
      "get": {
        "operationId": "get_workflow_execution_details",
        "x-onedata-gri": {
          "type": "op_atm_workflow_execution",
          "id": "?BINDING(wid)",
          "aspect": "instance"
        },
        "tags": [
          "Workflow execution"
        ],
        "summary": "Get workflow execution details",
        "x-bash-codegen-description": "Returns the details of a specific workflow execution.\n\nThis operation requires `space_view_atm_workflow_executions` privilege and\nthe requesting user must belong to the automation inventory containing the\ncorresponding workflow schema definition.\n",
        "description": "Returns the details of a specific workflow execution.\n\nThis operation requires `space_view_atm_workflow_executions` privilege and\nthe requesting user must belong to the automation inventory containing the\ncorresponding workflow schema definition.\n\n***Example cURL requests***\n\n**Get workflow execution details**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X GET \"https://$PROVIDER_HOST/api/v3/oneprovider/automation/execution/workflows/$ATM_WORKFLOW_EXECUTION_ID\"\n\n{\n    \"atmWorkflowExecutionId\": \"11a53ed06d175c89bc3ed5be61f8217cch1890\",\n    \"atmWorkflowSchemaSnapshotId\": \"821711ad53ed06be61f175c89bc3ed5cch1890\",\n    \"name\": \"test execution\",\n    \"atmInventoryId\": \"2d180796daafcf15d586d29dd13dae48chd5fc\",\n    \"spaceId\": \"c17147cc3188408c26f522881282cb83ch9853\",\n    \"userId\": \"08c26cc228812c3188417147f582cb83ch9853\",\n    \"status\": \"enqueued\",\n    \"scheduleTime\": 1626107063,\n    \"startTime\": 0,\n    \"suspendTime\": 0,\n    \"finishTime\": 0,\n    \"lambdaSnapshotRegistry\": {\n        \"e412848d415329d81b7edd15c80b7740chf93f\": \"3946496fb29e3cf3faa96dbbd58d42d9ch9e3c\"\n    },\n    \"storeRegistry\": {\n        \"216a5de15ba9f8f3138168682c3da954212abf\": \"805392e2b84fb7e6ff5b31b4b7e70845ch1995\"\n    },\n    \"systemAuditLogStoreId\": \"1439ca4dee1a251483923f4535bca500e72f2a\",\n    \"lanes\": [\n        {\n            \"schemaId\": \"3a1a829f714a41b043c4ce67402d8c136f125f\",\n            \"runs\": [\n                {\n                    \"runNumber\": 3,\n                    \"originRunNumber\": 1,\n                    \"runType\": \"retry\",\n                    \"status\": \"pending\",\n                    \"iteratedStoreId\": \"1b502545a3f9faa7f1e339f4aea793117be91d\",\n                    \"exceptionStoreId\": \"98c669ec69c0394a38391c0ab0117f67ch260d\",\n                    \"parallelBoxes\": [\n                        {\n                            \"taskRegistry\": {\n                                \"d92b861a5edfb08b920e0e80f4670a87f48176\": \"1697f7c1f46e0e22bb426bead5a3cb47chda3d\"\n                            },\n                            \"schemaId\": \"0068146d662adc878f699bf82af08b9ddbd9ab\"\n                        }\n                    ],\n                    \"isRetriable\": false,\n                    \"isRerunable\": false\n                },\n                ...\n            ]\n        }\n    ]\n}\n```\n",
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Workflow execution details.",
            "schema": {
              "$ref": "#/definitions/AtmWorkflowExecutionDetails"
            }
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "Workflow execution with provided Id was not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "wid",
            "in": "path",
            "description": "Workflow execution Id.",
            "type": "string",
            "required": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli getWorkflowExecutionDetails wid=$ATM_WORKFLOW_EXECUTION_ID"
          }
        ]
      },
      "delete": {
        "operationId": "delete_workflow_execution",
        "x-onedata-gri": {
          "type": "op_atm_workflow_execution",
          "id": "?BINDING(wid)",
          "aspect": "instance"
        },
        "tags": [
          "Workflow execution"
        ],
        "summary": "Delete workflow execution",
        "x-bash-codegen-description": "Deletes stopped workflow execution.\n\nThis operation requires `space_schedule_atm_workflow_executions` when\ninvoked by scheduling user, or `space_manage_atm_workflow_executions` \notherwise.\n",
        "description": "Deletes stopped workflow execution.\n\nThis operation requires `space_schedule_atm_workflow_executions` when\ninvoked by scheduling user, or `space_manage_atm_workflow_executions` \notherwise.\n\n***Example cURL requests***\n\n**Delete workflow execution details**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X DELETE \"https://$PROVIDER_HOST/api/v3/oneprovider/automation/execution/workflows/$ATM_WORKFLOW_EXECUTION_ID\"\n```\n",
        "produces": [
          "application/json"
        ],
        "responses": {
          "204": {
            "description": "The workflow execution deletion has been initiated."
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "Workflow execution with provided Id was not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "wid",
            "in": "path",
            "description": "Workflow execution Id.",
            "type": "string",
            "required": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli deleteWorkflowExecution wid=$ATM_WORKFLOW_EXECUTION_ID"
          }
        ]
      }
    },
    "/automation/execution/workflows/{wid}/cancel": {
      "post": {
        "operationId": "cancel_workflow_execution",
        "x-onedata-gri": {
          "type": "op_atm_workflow_execution",
          "id": "?BINDING(wid)",
          "aspect": "cancel"
        },
        "summary": "Cancel workflow execution",
        "tags": [
          "Workflow execution"
        ],
        "x-bash-codegen-description": "Cancels scheduled, ongoing or suspended workflow execution.\n\nThis operation requires `space_schedule_atm_workflow_executions` when\ninvoked by scheduling user, or `space_manage_atm_workflow_executions` \notherwise.\n",
        "description": "Cancels scheduled, ongoing or suspended workflow execution.\n\nThis operation requires `space_schedule_atm_workflow_executions` when\ninvoked by scheduling user, or `space_manage_atm_workflow_executions` \notherwise.\n\n***Example cURL requests***\n\n**Cancel workflow execution**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X POST \"https://$PROVIDER_HOST/api/v3/oneprovider/automation/execution/workflows/$ATM_WORKFLOW_EXECUTION_ID/cancel\"\n```\n",
        "responses": {
          "204": {
            "description": "The workflow execution cancel has been initiated."
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "Workflow execution with provided Id was not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "wid",
            "in": "path",
            "description": "Workflow execution Id.",
            "type": "string",
            "required": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli cancelWorkflowExecution wid=$ATM_WORKFLOW_SCHEMA_ID"
          }
        ]
      }
    },
    "/automation/execution/workflows/{wid}/pause": {
      "post": {
        "operationId": "pause_workflow_execution",
        "x-onedata-gri": {
          "type": "op_atm_workflow_execution",
          "id": "?BINDING(wid)",
          "aspect": "pause"
        },
        "summary": "Pause workflow execution",
        "tags": [
          "Workflow execution"
        ],
        "x-bash-codegen-description": "Pauses scheduled or ongoing workflow execution.\n\nThis operation requires `space_schedule_atm_workflow_executions` when\ninvoked by scheduling user, or `space_manage_atm_workflow_executions` \notherwise.\n",
        "description": "Pauses scheduled or ongoing workflow execution.\n\nThis operation requires `space_schedule_atm_workflow_executions` when\ninvoked by scheduling user, or `space_manage_atm_workflow_executions` \notherwise.\n\n***Example cURL requests***\n\n**Pause workflow execution**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X POST \"https://$PROVIDER_HOST/api/v3/oneprovider/automation/execution/workflows/$ATM_WORKFLOW_EXECUTION_ID/pause\"\n```\n",
        "responses": {
          "204": {
            "description": "The workflow execution pause has been initiated."
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "Workflow execution with provided Id was not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "wid",
            "in": "path",
            "description": "Workflow execution Id.",
            "type": "string",
            "required": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli pauseWorkflowExecution wid=$ATM_WORKFLOW_SCHEMA_ID"
          }
        ]
      }
    },
    "/automation/execution/workflows/{wid}/resume": {
      "post": {
        "operationId": "resume_workflow_execution",
        "x-onedata-gri": {
          "type": "op_atm_workflow_execution",
          "id": "?BINDING(wid)",
          "aspect": "resume"
        },
        "summary": "Resume workflow execution",
        "tags": [
          "Workflow execution"
        ],
        "x-bash-codegen-description": "Resumes suspended (either paused or interrupted) workflow execution.\n\nThis operation requires `space_schedule_atm_workflow_executions` when\ninvoked by scheduling user, or `space_manage_atm_workflow_executions` \notherwise.\n",
        "description": "Resumes suspended (either paused or interrupted) workflow execution.\n\nThis operation requires `space_schedule_atm_workflow_executions` when\ninvoked by scheduling user, or `space_manage_atm_workflow_executions` \notherwise.\n\n***Example cURL requests***\n\n**Resume workflow execution**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X POST \"https://$PROVIDER_HOST/api/v3/oneprovider/automation/execution/workflows/$ATM_WORKFLOW_EXECUTION_ID/resume\"\n```\n",
        "responses": {
          "204": {
            "description": "The workflow execution resume has been initiated."
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "Workflow execution with provided Id was not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "wid",
            "in": "path",
            "description": "Workflow execution Id.",
            "type": "string",
            "required": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli resumeWorkflowExecution wid=$ATM_WORKFLOW_SCHEMA_ID"
          }
        ]
      }
    },
    "/automation/execution/workflows/{wid}/force_continue": {
      "post": {
        "operationId": "force_continue_workflow_execution",
        "x-onedata-gri": {
          "type": "op_atm_workflow_execution",
          "id": "?BINDING(wid)",
          "aspect": "force_continue"
        },
        "summary": "Force continue workflow execution",
        "tags": [
          "Workflow execution"
        ],
        "x-bash-codegen-description": "Forcefully proceeds with a failed execution, commencing from the subsequent \nlane to the one that failed.\n\nThis operation requires `space_schedule_atm_workflow_executions` when\ninvoked by scheduling user, or `space_manage_atm_workflow_executions` \notherwise.\n",
        "description": "Forcefully proceeds with a failed execution, commencing from the subsequent \nlane to the one that failed.\n\nThis operation requires `space_schedule_atm_workflow_executions` when\ninvoked by scheduling user, or `space_manage_atm_workflow_executions` \notherwise.\n\n***Example cURL requests***\n\n**Force continue workflow execution**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X POST \"https://$PROVIDER_HOST/api/v3/oneprovider/automation/execution/workflows/$ATM_WORKFLOW_EXECUTION_ID/force_continue\"\n```\n",
        "responses": {
          "204": {
            "description": "The workflow execution forced continuation has been initiated."
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "Workflow execution with provided Id was not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "wid",
            "in": "path",
            "description": "Workflow execution Id.",
            "type": "string",
            "required": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli forceContinueWorkflowExecution wid=$ATM_WORKFLOW_SCHEMA_ID"
          }
        ]
      }
    },
    "/automation/execution/workflows/{wid}/rerun": {
      "post": {
        "operationId": "rerun_workflow_execution",
        "x-onedata-parse_body": "as_json_params",
        "x-onedata-gri": {
          "type": "op_atm_workflow_execution",
          "id": "?BINDING(wid)",
          "aspect": "rerun"
        },
        "summary": "Rerun workflow execution",
        "tags": [
          "Workflow execution"
        ],
        "x-bash-codegen-description": "Reruns stopped workflow execution starting from specified lane run.\n\nThis operation requires `space_schedule_atm_workflow_executions` when\ninvoked by scheduling user, or `space_manage_atm_workflow_executions` \notherwise.\n",
        "description": "Reruns stopped workflow execution starting from specified lane run.\n\nThis operation requires `space_schedule_atm_workflow_executions` when\ninvoked by scheduling user, or `space_manage_atm_workflow_executions` \notherwise.\n\n***Example cURL requests***\n\n**Rerun workflow execution**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X POST \"https://$PROVIDER_HOST/api/v3/oneprovider/automation/execution/workflows/$ATM_WORKFLOW_EXECUTION_ID/rerun\"\n-H \"Content-Type: application/json\" -d '{\n    \"laneIndex\": 2,\n    \"laneRunNumber\": 3\n}'\n```\n",
        "consumes": [
          "application/json"
        ],
        "responses": {
          "204": {
            "description": "The workflow execution rerun has been initiated."
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "Workflow execution with provided Id was not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "wid",
            "in": "path",
            "description": "Workflow execution Id.",
            "type": "string",
            "required": true
          },
          {
            "name": "data",
            "in": "body",
            "description": "Lane run reference.",
            "schema": {
              "type": "object",
              "properties": {
                "laneIndex": {
                  "type": "integer",
                  "description": "Lane index"
                },
                "laneRunNumber": {
                  "type": "integer",
                  "description": "Lane run `runNumber`"
                }
              },
              "required": [
                "laneIndex",
                "laneRunNumber"
              ],
              "example": {
                "laneIndex": 2,
                "laneRunNumber": 3
              }
            },
            "required": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli rerunWorkflowExecution wid=$ATM_WORKFLOW_SCHEMA_ID laneIndex==2 laneRunNumber==3"
          }
        ]
      }
    },
    "/automation/execution/workflows/{wid}/retry": {
      "post": {
        "operationId": "retry_workflow_execution",
        "x-onedata-parse_body": "as_json_params",
        "x-onedata-gri": {
          "type": "op_atm_workflow_execution",
          "id": "?BINDING(wid)",
          "aspect": "retry"
        },
        "summary": "Retry workflow execution",
        "tags": [
          "Workflow execution"
        ],
        "x-bash-codegen-description": "Retries failed workflow execution starting from specified lane run.\n\nThis operation requires `space_schedule_atm_workflow_executions` when\ninvoked by scheduling user, or `space_manage_atm_workflow_executions` \notherwise.\n",
        "description": "Retries failed workflow execution starting from specified lane run.\n\nThis operation requires `space_schedule_atm_workflow_executions` when\ninvoked by scheduling user, or `space_manage_atm_workflow_executions` \notherwise.\n\n***Example cURL requests***\n\n**Retry workflow execution**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" \\\n-X POST \"https://$PROVIDER_HOST/api/v3/oneprovider/automation/execution/workflows/$ATM_WORKFLOW_EXECUTION_ID/retry\"\n-H \"Content-Type: application/json\" -d '{\n    \"laneIndex\": 2,\n    \"laneRunNumber\": 3\n}'\n```\n",
        "consumes": [
          "application/json"
        ],
        "responses": {
          "204": {
            "description": "The workflow execution retry has been initiated."
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "Workflow execution with provided Id was not found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "wid",
            "in": "path",
            "description": "Workflow execution Id.",
            "type": "string",
            "required": true
          },
          {
            "name": "data",
            "in": "body",
            "description": "Lane run reference.",
            "schema": {
              "type": "object",
              "properties": {
                "laneIndex": {
                  "type": "integer",
                  "description": "Lane index"
                },
                "laneRunNumber": {
                  "type": "integer",
                  "description": "Lane run `runNumber`"
                }
              },
              "required": [
                "laneIndex",
                "laneRunNumber"
              ],
              "example": {
                "laneIndex": 2,
                "laneRunNumber": 3
              }
            },
            "required": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli retryWorkflowExecution wid=$ATM_WORKFLOW_SCHEMA_ID laneIndex==2 laneRunNumber==3"
          }
        ]
      }
    },
    "/changes/metadata/{sid}": {
      "post": {
        "operationId": "get_space_changes",
        "x-onedata-custom-handler": "changes_stream_handler",
        "x-onedata-gri": {
          "type": "op_metrics",
          "id": "?BINDING(sid)",
          "aspect": "changes"
        },
        "tags": [
          "Monitoring"
        ],
        "summary": "Subscribe to file events",
        "x-bash-codegen-description": "This method subscribes through HTTP streaming on events of specific type\nfor a given space.\n\nUntil the connection is kept alive, the events will be streamed to\nsubscribers as soon as they occur. The optional `timeout` parameter\ncan be used to automatically disconnect  when no events occur in a\ngiven time window.\n\nThis operation requires `space_view_changes_stream` privilege.\n",
        "description": "This method subscribes through HTTP streaming on events of specific type for a given space.\n\nUntil the connection is kept alive, the events will be streamed to subscribers as soon as they are occur. The optional `timeout` parameter can be used to automatically disconnect  when no events occur in a given time window.\n\nThis operation requires `space_view_changes_stream` privilege.\n\n***Example cURL requests***\n\n**Listen to space change events**\n```bash\ncurl -N -H \"X-Auth-Token: $TOKEN\" \\\n-X POST \"https://$PROVIDER_HOST/api/v3/oneprovider/changes/metadata/$SPACE_ID\" \\\n-H \"Content-Type: application/json\" -d \"@./changes_req.json\"\n```\n",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Subscription to events has been successful.",
            "schema": {
              "$ref": "#/definitions/MetadataChangesEvent"
            }
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "403": {
            "description": "Forbidden request.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "404": {
            "description": "Oneprovider REST API not available.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "parameters": [
          {
            "name": "sid",
            "in": "path",
            "description": "Space Id.",
            "type": "string",
            "required": true
          },
          {
            "name": "changesSpecification",
            "in": "body",
            "description": "Specification of metadata changes to observe.",
            "schema": {
              "$ref": "#/definitions/MetadataChangesStreamRequest"
            },
            "required": true
          },
          {
            "name": "timeout",
            "in": "query",
            "description": "Optional timeout in milliseconds, which allows to automatically break connection when no event occured in specified time. By default the timeout is unlimited.\n",
            "type": "integer",
            "required": false
          },
          {
            "name": "last_seq",
            "in": "query",
            "description": "Last known file metadata sequence number\n",
            "type": "integer",
            "required": false
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "cat changes_req.json | oneprovider-rest-cli streamSpaceChanges sid=$SPACE_ID timeout=10000 last_seq=124721 -"
          }
        ]
      }
    }
  },
  "definitions": {
    "Configuration": {
      "description": "Public information about Oneprovider configuration and version.",
      "type": "object",
      "properties": {
        "providerId": {
          "type": "string",
          "description": "Id of the Oneprovider"
        },
        "name": {
          "type": "string",
          "description": "Oneprovider's name"
        },
        "domain": {
          "type": "string",
          "description": "Oneprovider's domain"
        },
        "onezoneDomain": {
          "type": "string",
          "description": "Domain of the Onezone where this Oneprovider is registered"
        },
        "version": {
          "type": "string",
          "description": "Version of this Oneprovider"
        },
        "build": {
          "type": "string",
          "description": "Build number of this Oneprovider"
        },
        "compatibleOnezoneVersions": {
          "type": "array",
          "description": "List of compatible Onezone versions",
          "items": {
            "type": "string"
          }
        },
        "compatibleOneproviderVersions": {
          "type": "array",
          "description": "List of compatible Oneprovider versions",
          "items": {
            "type": "string"
          }
        },
        "compatibleOneclientVersions": {
          "type": "array",
          "description": "List of compatible Oneclient versions",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "Error": {
      "type": "object",
      "description": "Generic error model for REST requests.",
      "properties": {
        "error": {
          "description": "Identifier representing internal error code.",
          "type": "string"
        },
        "error_description": {
          "description": "Detailed error message.",
          "type": "string"
        }
      },
      "example": {
        "error": "invalid_token",
        "error_description": "Provided token could not be validated."
      }
    },
    "ErrorJson": {
      "type": "object",
      "properties": {
        "description": {
          "description": "Detailed description of the error.",
          "type": "string"
        },
        "id": {
          "description": "Id of the error.",
          "type": "string"
        },
        "details": {
          "description": "Key value map with details describing the error.",
          "type": "object"
        }
      },
      "required": [
        "description",
        "id"
      ]
    },
    "Timestamp": {
      "type": "integer",
      "description": "Timestamp in seconds (UNIX epoch), e.g. `1563819329`."
    },
    "IsLast": {
      "type": "boolean",
      "description": "Due to delays in synchronization between Oneproviders, the number of returned entries can be smaller than the requested limit, even though there are still some ensuing ones. The `isLast` flag is the only valid indicator that all entries has been listed.\n",
      "example": true
    },
    "ListPageToken": {
      "type": "string",
      "description": "A token in the listing response that can be passed in the consecutive request to start listing from the next page of entries. When end of list is reached, the token is returned with a `null` value.\n",
      "example": "RGlyMjY0MjMzMzM5NjQzMjM2MzY2MTY1NjQ2MzY1NjI2NjY2"
    },
    "DirectoryChildren": {
      "type": "object",
      "properties": {
        "children": {
          "type": "array",
          "description": "The list of directory files and subdirectories.",
          "items": {
            "$ref": "#/definitions/FileAttributes"
          }
        },
        "isLast": {
          "$ref": "#/definitions/IsLast"
        },
        "nextPageToken": {
          "$ref": "#/definitions/ListPageToken"
        }
      },
      "example": {
        "children": [
          {
            "name": "File1.txt",
            "type": "REG",
            "mode": 511,
            "size": 1024,
            "atime": 1464958683054,
            "mtime": 1464958683051,
            "ctime": 1464958681054,
            "owner_id": "MTZjYzc1ZWEtN2ZjNC00Y2QxLTljYzgtMTJmYTMxNTk1YzUw",
            "file_id": "00000CF4706775696423745F772D67686431633765446F4D76546D6...",
            "parent_id": "000006CB66373686172654775696423333964323636616564636562...",
            "provider_id": "YzQ3OThlYjItZGJkMi00ODZmLWFlOTQtMGU2ZmEwYTUwNzFk",
            "storage_user_id": 1935313,
            "storage_group_id": 1101841,
            "shares": [
              "1d24c36707d99197c6cd995810a43aca",
              "6825604b0eb6a47b8b7a04b6369eb24d"
            ],
            "hardlinks_count": 1
          }
        ],
        "isLast": false,
        "nextPageToken": "g2gDZAAKbGlua190b2tlbmgCZAAMY2FjaGVkX3Rva2VuWgADY..."
      }
    },
    "RecursiveFileList": {
      "type": "object",
      "properties": {
        "files": {
          "type": "array",
          "description": "The list of files.",
          "items": {
            "$ref": "#/definitions/FileAttributes"
          }
        },
        "inaccessiblePaths": {
          "type": "array",
          "description": "Paths to directiories that were not listed due to lack of access privileges.",
          "items": {
            "type": "string"
          }
        },
        "isLast": {
          "$ref": "#/definitions/IsLast"
        },
        "nextPageToken": {
          "$ref": "#/definitions/ListPageToken"
        }
      },
      "example": {
        "files": [
          {
            "name": "File1.txt",
            "type": "REG",
            "mode": 511,
            "size": 1024,
            "atime": 1464958683054,
            "mtime": 1464958683051,
            "ctime": 1464958681054,
            "owner_id": "MTZjYzc1ZWEtN2ZjNC00Y2QxLTljYzgtMTJmYTMxNTk1YzUw",
            "file_id": "00000CF4706775696423745F772D67686431633765446F4D76546D6...",
            "parent_id": "000006CB66373686172654775696423333964323636616564636562...",
            "provider_id": "YzQ3OThlYjItZGJkMi00ODZmLWFlOTQtMGU2ZmEwYTUwNzFk",
            "storage_user_id": 1935313,
            "storage_group_id": 1101841,
            "shares": [
              "1d24c36707d99197c6cd995810a43aca",
              "6825604b0eb6a47b8b7a04b6369eb24d"
            ],
            "hardlinks_count": 1,
            "index": "g2gDZAAKbGlzdF9pbmRleG0AAAAEbmFtZW0AAAAHdHJlZV9pZA",
            "path": "dir1/dir2/dir3/File1.txt"
          }
        ],
        "inaccessiblePaths": [
          "dir1/dir3"
        ],
        "isLast": false,
        "nextPageToken": "g2gDZAAKbGlua190b2tlbmgCZAAMY2FjaGVkX3Rva2VuWgADY..."
      }
    },
    "FileDistribution": {
      "type": "object",
      "description": "Describes distribution of a single file among different storage providers.\n",
      "properties": {
        "type": {
          "$ref": "#/definitions/FileType"
        },
        "distributionPerProvider": {
          "type": "object",
          "additionalProperties": {
            "type": "object",
            "description": "File distribution for a specific provider.",
            "properties": {
              "success": {
                "type": "boolean",
                "description": "Indicates whether fetching file distribution for this provider was successful."
              },
              "logicalSize": {
                "type": "integer",
                "description": "Logical size of file/dir as seen by this provider (only if `success` = true)."
              },
              "distributionPerStorage": {
                "type": "object",
                "description": "Map with file distribution per storage.\n",
                "additionalProperties": {
                  "type": "object",
                  "description": "File distribution for a specific storage.",
                  "properties": {
                    "blocks": {
                      "type": "array",
                      "description": "A list of blocks in byte ranges stored on this storage (only for REG file type and `success` = true).\n",
                      "items": {
                        "type": "array",
                        "description": "File block specified as a pair [offset, size].",
                        "items": {
                          "type": "integer"
                        },
                        "maxItems": 2,
                        "minItems": 2
                      }
                    },
                    "physicalSize": {
                      "type": "integer",
                      "description": "Physical size of the file on this storage (only when `success` = true)."
                    },
                    "error": {
                      "type": "object",
                      "description": "Error that occured for this storage (only when `success` = false).",
                      "properties": {
                        "description": {
                          "description": "Detailed description of the error.",
                          "type": "string"
                        },
                        "id": {
                          "description": "Id of the error.",
                          "type": "string"
                        },
                        "details": {
                          "description": "Key value map with details describing the error.",
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "example": {
        "type": "REG",
        "distributionPerProvider": {
          "$PROVIDER_ID1": {
            "success": true,
            "logicalSize": 8,
            "distributionPerStorage": {
              "$STORAGE_ID": {
                "blocks": [
                  [
                    0,
                    4
                  ],
                  [
                    6,
                    2
                  ]
                ],
                "physicalSize": 6
              }
            }
          },
          "$PROVIDER_ID2": {
            "success": false,
            "distributionPerStorage": {
              "$STORAGE_ID": {
                "error": {
                  "description": "Operation failed with POSIX error: enoent.",
                  "details": {
                    "errno": "enoent"
                  }
                }
              }
            }
          }
        }
      }
    },
    "StorageFileLocations": {
      "type": "object",
      "description": "Describes storage locations of a single file among different storage providers.\n",
      "properties": {
        "locationsPerProvider": {
          "type": "object",
          "additionalProperties": {
            "type": "object",
            "description": "File storage locations for a specific provider.",
            "properties": {
              "locationsPerStorage": {
                "type": "object",
                "description": "Map with file storage location per storage.\n",
                "additionalProperties": {
                  "type": "string",
                  "description": "File storage location for a specific storage."
                }
              }
            }
          }
        }
      },
      "example": {
        "locationsPerProvider": {
          "$PROVIDER_ID1": {
            "locationsPerStorage": {
              "$STORAGE_ID": "path/to/file"
            }
          },
          "$PROVIDER_ID2": {
            "locationsPerStorage": {
              "$STORAGE_ID": null
            }
          }
        }
      }
    },
    "FileType": {
      "type": "string",
      "description": "The type of the file:\n* `REG` - regular file.\n* `DIR` - directory.\n* `SYMLNK` - symbolic link.\n",
      "enum": [
        "REG",
        "DIR",
        "SYMLNK"
      ],
      "example": "REG"
    },
    "FileAttributes": {
      "type": "object",
      "description": "File or directory basic attributes.",
      "properties": {
        "name": {
          "type": "string",
          "description": "File name."
        },
        "type": {
          "$ref": "#/definitions/FileType"
        },
        "mode": {
          "type": "string",
          "description": "POSIX file permissions as string expressing octal notation."
        },
        "size": {
          "type": "integer",
          "description": "Size of the file in bytes."
        },
        "atime": {
          "type": "integer",
          "description": "Last access timestamp (in seconds)."
        },
        "mtime": {
          "type": "integer",
          "description": "Last modification timestamp (in seconds)."
        },
        "ctime": {
          "type": "integer",
          "description": "Last attributes modification timestamp (in seconds)."
        },
        "owner_id": {
          "type": "string",
          "description": "Id of the owner of this file."
        },
        "file_id": {
          "type": "string",
          "description": "Id of the file."
        },
        "parent_id": {
          "type": "string",
          "description": "Id of the parent directory or `null` in case of file tree root."
        },
        "provider_id": {
          "type": "string",
          "description": "Id of the provider on which this file was created."
        },
        "storage_user_id": {
          "type": "string",
          "description": "Id of the owner of this file on storage."
        },
        "storage_group_id": {
          "type": "string",
          "description": "Id of the group owner of this file on storage."
        },
        "shares": {
          "type": "array",
          "description": "The list of Ids of shares created for this file.",
          "items": {
            "type": "string"
          }
        },
        "hardlinks_count": {
          "type": "integer",
          "description": "The number of hard links (including this one) associated with this file.\n"
        },
        "index": {
          "type": "string",
          "description": "File index that can be provided as starting point when listing files.\n"
        }
      },
      "example": {
        "name": "File1.txt",
        "type": "REG",
        "mode": "511",
        "size": 1024,
        "atime": 1464958683054,
        "mtime": 1464958683051,
        "ctime": 1464958681054,
        "owner_id": "MTZjYzc1ZWEtN2ZjNC00Y2QxLTljYzgtMTJmYTMxNTk1YzUw",
        "file_id": "00000CF4706775696423745F772D67686431633765446F4D76546D6...",
        "parent_id": "000006CB66373686172654775696423333964323636616564636562...",
        "provider_id": "YzQ3OThlYjItZGJkMi00ODZmLWFlOTQtMGU2ZmEwYTUwNzFk",
        "storage_user_id": 1935313,
        "storage_group_id": 1101841,
        "shares": [
          "1d24c36707d99197c6cd995810a43aca",
          "6825604b0eb6a47b8b7a04b6369eb24d"
        ],
        "hardlinks_count": 1,
        "index": "g2gDZAAKbGlzdF9pbmRleG0AAAAEbmFtZW0AAAAHdHJlZV9pZA"
      }
    },
    "DirSizeStatsResponse": {
      "type": "object",
      "description": "Response to a directory size statistics query. Depending on the query mode, contains the\n`layout` or `slice` object.\n",
      "properties": {
        "layout": {
          "$ref": "#/definitions/TimeSeriesLayout"
        },
        "slice": {
          "$ref": "#/definitions/TimeSeriesSlice"
        }
      },
      "example": {
        "layout": {
          "total_size": [
            "day",
            "hour",
            "minute",
            "month"
          ],
          "storage_use_7ab46e96fdb27a2694493c2c5bd7491dch8f55": [
            "day",
            "hour",
            "minute",
            "month"
          ],
          "reg_file_and_link_count": [
            "day",
            "hour",
            "minute",
            "month"
          ],
          "file_errors_count": [
            "day",
            "hour",
            "minute",
            "month"
          ],
          "dir_errors_count": [
            "day",
            "hour",
            "minute",
            "month"
          ],
          "dir_count": [
            "day",
            "hour",
            "minute",
            "month"
          ]
        },
        "slice": {
          "total_size": {
            "minute": [
              {
                "value": 883365,
                "timestamp": 1687513260,
                "lastMeasurementTimestamp": 1687513287,
                "firstMeasurementTimestamp": 1687513287
              }
            ]
          },
          "storage_use_7ab46e96fdb27a2694493c2c5bd7491dch8f55": {
            "minute": [
              {
                "value": 56280,
                "timestamp": 1687513260,
                "lastMeasurementTimestamp": 1687513287,
                "firstMeasurementTimestamp": 1687513287
              }
            ]
          }
        }
      }
    },
    "DirSizeStatsQuery": {
      "type": "object",
      "description": "Specifies the mode of the query.",
      "discriminator": "mode",
      "x-onedata-oneof": true,
      "x-onedata-subclasses": [
        "layout",
        "slice"
      ],
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "layout",
            "slice"
          ],
          "default": "layout"
        }
      },
      "required": [
        "mode"
      ]
    },
    "layout": {
      "allOf": [
        {
          "$ref": "#/definitions/DirSizeStatsQuery"
        },
        {
          "type": "object",
          "properties": {
            "mode": {
              "type": "string",
              "enum": [
                "layout"
              ],
              "x-discriminator-value": "layout",
              "description": "Indicates the mode of the query. The `layout` mode returns information about the structure of stats \ncollection, i.e. the names of the available time series and metrics within them.\n"
            }
          }
        }
      ],
      "required": [
        "mode"
      ],
      "example": {
        "mode": "layout"
      }
    },
    "slice": {
      "allOf": [
        {
          "$ref": "#/definitions/DirSizeStatsQuery"
        },
        {
          "type": "object",
          "properties": {
            "mode": {
              "type": "string",
              "enum": [
                "slice"
              ],
              "x-discriminator-value": "slice",
              "description": "Indicates the mode of the query. The `slice` mode returns a collection of slices \nof requested time series and metrics that were specified in the `layout` field\n(which may express a subset of the queried collection). A metric slice is a list\nof time windows in descending order. The list may be incomplete, since windows are created\nas needed - along with the first measurement falling in their timespan. Missing windows \nshould be treated as windows with zero value.\n"
            },
            "layout": {
              "$ref": "#/definitions/TimeSeriesLayout"
            },
            "startTimestamp": {
              "type": "string",
              "description": "Latest timestamp used to determine the starting point for descending listing of time windows. \nThe first window to be listed is the one that includes the given timestamp in its timespan. \nIf no such window exists, the next existing one is taken.\n"
            },
            "stopTimestamp": {
              "type": "string",
              "description": "Oldest timestamp used to determine the end of descending listing of time windows.  \nThe last window to be listed is the one that includes the given timestamp in its timespan. \nIf no such window exists, the previous existing one is taken.\n"
            },
            "windowLimit": {
              "type": "string",
              "description": "Maximum number of time windows to be listed."
            },
            "extendedInfo": {
              "type": "string",
              "description": "If true, information about the first and last timestamp of measurements per window will be included."
            }
          }
        }
      ],
      "required": [
        "mode",
        "layout"
      ],
      "example": {
        "mode": "slice",
        "layout": {
          "dir_count": [
            "minute"
          ],
          "reg_file_and_link_count": [
            "minute"
          ],
          "total_size": [
            "minute"
          ],
          "storage_use_7ab46e96fdb27a2694493c2c5bd7491dch8f55": [
            "minute"
          ]
        },
        "startTimestamp": 1687513285,
        "stopTimestamp": 1687499802,
        "windowLimit": 31,
        "extendedInfo": true
      }
    },
    "TimeSeriesLayout": {
      "type": "object",
      "description": "A map of arrays representing the structure of a time series collection - the names of time series\nand metrics within them.\n",
      "additionalProperties": {
        "type": "array",
        "description": "Array of metric names for the time series.",
        "items": {
          "type": "string",
          "description": "Metric name."
        }
      },
      "example": {
        "total_size": [
          "day",
          "hour",
          "minute",
          "month"
        ]
      }
    },
    "TimeSeriesSlice": {
      "type": "object",
      "description": "Listing of time series windows per time series and per metric within a time series.",
      "additionalProperties": {
        "type": "object",
        "description": "Listing of time series windows per metric within this time series.",
        "additionalProperties": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/TSWindowInfo"
          }
        }
      },
      "example": {
        "total_size": {
          "minute": [
            {
              "timestamp": 1687513260,
              "value": 883365,
              "firstMeasurementTimestamp": 1687513287,
              "lastMeasurementTimestamp": 1687513287
            }
          ]
        }
      }
    },
    "TSWindowInfo": {
      "type": "object",
      "description": "An object representing a time series window.",
      "properties": {
        "timestamp": {
          "type": "integer",
          "format": "timestamp",
          "description": "Timestamp of the beginning of the time window, treated as the ID of the window."
        },
        "value": {
          "type": "number",
          "description": "Value of the window, representing aggregated measurements."
        },
        "firstMeasurementTimestamp": {
          "type": "integer",
          "format": "timestamp",
          "description": "The timestamp of the first measurement falling within this time window."
        },
        "lastMeasurementTimestamp": {
          "type": "integer",
          "format": "timestamp",
          "description": "The timestamp of the last measurement falling within this time window."
        }
      },
      "required": [
        "timestamp",
        "value"
      ],
      "example": {
        "timestamp": 1687513260,
        "value": 883365,
        "firstMeasurementTimestamp": 1687513283,
        "lastMeasurementTimestamp": 1687513287
      }
    },
    "MetadataChangesEvent": {
      "type": "object",
      "description": "Metadata changes.",
      "properties": {
        "fileId": {
          "type": "string",
          "description": "Unique Id of the file."
        },
        "filePath": {
          "type": "string",
          "description": "Absolute path to the file (starting with the Space name)."
        },
        "seq": {
          "type": "string",
          "description": "Sequence number (version) of the metadata document."
        },
        "fileMeta": {
          "type": "object",
          "description": "Requested fileMeta fields and additional information.",
          "properties": {
            "rev": {
              "type": "string",
              "description": "Last revision of fileMeta."
            },
            "mutators": {
              "type": "array",
              "items": {
                "type": "string",
                "description": "Providers that changed this metadata."
              }
            },
            "deleted": {
              "type": "boolean",
              "description": "Indicates whether this metadata was deleted or not."
            },
            "changed": {
              "type": "boolean",
              "description": "Indicates whether changes occured to this metadata or not."
            },
            "fields": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "File name."
                },
                "type": {
                  "$ref": "#/definitions/FileType"
                },
                "mode": {
                  "type": "integer",
                  "description": "POSIX file permissions."
                },
                "owner": {
                  "type": "string",
                  "description": "File owner."
                },
                "provider_id": {
                  "type": "string",
                  "description": "Id of provider which created this file."
                },
                "shares": {
                  "type": "array",
                  "description": "Array of this file shares Ids.",
                  "items": {
                    "type": "string",
                    "description": "Share Id."
                  }
                },
                "deleted": {
                  "type": "boolean",
                  "description": "Set to 'true' when file itself was deleted but file metadata must remain for some time. Otherwise false."
                }
              }
            }
          }
        },
        "fileLocation": {
          "type": "object",
          "description": "Requested fileLocation fields and additional information.",
          "properties": {
            "rev": {
              "type": "string",
              "description": "Last revision of fileLocation."
            },
            "mutators": {
              "type": "array",
              "items": {
                "type": "string",
                "description": "Providers that changed this metadata."
              }
            },
            "deleted": {
              "type": "boolean",
              "description": "Indicates whether this metadata was deleted or not."
            },
            "changed": {
              "type": "boolean",
              "description": "Indicates whether changes occured to this metadata or not."
            },
            "fields": {
              "type": "object",
              "properties": {
                "provider_id": {
                  "type": "string",
                  "description": "Provider Id in which change occured."
                },
                "storage_id": {
                  "type": "string",
                  "description": "Storage Id in which file exists."
                },
                "size": {
                  "type": "integer",
                  "description": "File size."
                },
                "space_id": {
                  "type": "string",
                  "description": "Space Id in which space exists."
                },
                "storage_file_created": {
                  "type": "boolean",
                  "description": "Indicates whether file was created on storage or only metadata exists."
                }
              }
            }
          }
        },
        "times": {
          "type": "object",
          "description": "Requested times fields and additional information.",
          "properties": {
            "rev": {
              "type": "string",
              "description": "Last revision of times."
            },
            "mutators": {
              "type": "array",
              "items": {
                "type": "string",
                "description": "Providers that changed this metadata."
              }
            },
            "deleted": {
              "type": "boolean",
              "description": "Indicates whether this metadata was deleted or not."
            },
            "changed": {
              "type": "boolean",
              "description": "Indicates whether changes occured to this metadata or not."
            },
            "fields": {
              "type": "object",
              "properties": {
                "atime": {
                  "type": "integer",
                  "description": "POSIX atime."
                },
                "mtime": {
                  "type": "integer",
                  "description": "POSIX mtime."
                },
                "ctime": {
                  "type": "integer",
                  "description": "POSIX ctime."
                }
              }
            }
          }
        },
        "customMetadata": {
          "type": "object",
          "description": "Requested customMetadata fields and additional information.",
          "properties": {
            "rev": {
              "type": "string",
              "description": "Last revision of customMetadata."
            },
            "mutators": {
              "type": "array",
              "items": {
                "type": "string",
                "description": "Providers that changed this metadata."
              }
            },
            "deleted": {
              "type": "boolean",
              "description": "Indicates whether this metadata was deleted or not."
            },
            "changed": {
              "type": "boolean",
              "description": "Indicates whether changes occured to this metadata or not."
            },
            "fields": {
              "type": "object",
              "description": "Retrieved xattr values. In case of missing fields `null` values are returned.\n"
            },
            "exists": {
              "type": "object",
              "description": "Map indicating whether given xattrs exists or not.\n"
            }
          }
        }
      },
      "required": [
        "fileId",
        "filePath",
        "seq"
      ],
      "example": {
        "fileId": "4efc4a0c-0a61-4766-8fe9-c3d7fb414da8",
        "filePath": "/Space1/dir2/file1.txt",
        "seq": 123,
        "fileMeta": {
          "rev": "2-c500a5eb026d9474429903d47841f9c5",
          "mutators": [
            "<<\"p1.1542789098.test\">>"
          ],
          "changed": true,
          "deleted": false,
          "fields": {
            "owner": "john"
          }
        },
        "customMetadata": {
          "rev": "1-09f941b4e8452ef6a244c5181d894814",
          "mutators": [
            "<<\"p1.1542789098.test\">>"
          ],
          "changed": false,
          "deleted": false,
          "exists": {
            "onedata_json": true
          },
          "fields": {
            "key1": "value1"
          }
        }
      }
    },
    "FileRegistrationRequest": {
      "type": "object",
      "description": "Specification of file to be registered in the Onedata file-system.",
      "properties": {
        "spaceId": {
          "type": "string",
          "description": "Id of the space in which the file will be registered - the space must be supported by the storage hosting the file (`storageId`). The space support must have `manual import mode`.\n"
        },
        "storageId": {
          "type": "string",
          "description": "Id of the storage hosting the file - the storage must support the target space (`spaceId`). The storage must be configured as an `imported storage` with `canonical` path type.\n"
        },
        "storageFileId": {
          "type": "string",
          "description": "Identifier of the file on storage, relevant for given storage backend:\n   * path on POSIX-compatible or canonical object storages, e.g. `/dir/file.txt`\n   * URL on HTTP based storages, e.g. `https://www.example.org/data/21/run123.tar`\n"
        },
        "destinationPath": {
          "type": "string",
          "description": "An absolute path in space where file should be created."
        },
        "size": {
          "type": "integer",
          "description": "Size of the file in bytes. If not passed, it will be acquired from storage. If storage does not support the `stat` operation or equivalent used for acquiring files metadata, registration will fail if this value is missing.\n"
        },
        "mode": {
          "type": "string",
          "description": "User defined POSIX file permissions in octal format. If not passed, it will be acquired from storage or default `\"664\"` mode will be used.\n"
        },
        "atime": {
          "type": "integer",
          "description": "User defined last access timestamp (in seconds). If not passed, it will be acquired from storage or current timestamp will be used.\n"
        },
        "mtime": {
          "type": "integer",
          "description": "User defined last modification timestamp (in seconds). If not passed, it will be acquired from storage or current timestamp will be used.\n"
        },
        "ctime": {
          "type": "integer",
          "description": "User defined last attributes modification timestamp (in seconds). If not passed, it will be acquired from storage or current timestamp will be used.\n"
        },
        "uid": {
          "type": "string",
          "description": "User defined of the Id of the owner of this file on storage. If not passed, it will be acquired from storage or `0` will be used. This value will be mapped, using LUMA DB, to acquire Onedata user Id of the file owner.\n"
        },
        "gid": {
          "type": "string",
          "description": "User defined Id of the group owner of this file on storage. If not passed, it will be acquired from storage or `0` will be used. This value will be used as display GID in `getattr` operation.\n"
        },
        "xattrs": {
          "type": "object",
          "description": "Map with extended attributes key-value pairs which will be attached to newly created file.",
          "additionalProperties": {
            "type": "string"
          }
        },
        "json": {
          "type": "object",
          "description": "Map with custom JSON metadata which will be attached to newly created file.",
          "additionalProperties": {
            "type": "string"
          }
        },
        "rdf": {
          "type": "string",
          "description": "Base64 encoded RDF metadata which will be attached to newly created file."
        },
        "autoDetectAttributes": {
          "type": "boolean",
          "description": "Flag which determines whether additional `stat` operation (or equivalent) should be performed on the storage to automatically detect file attributes - they will be used if not provided explicitly in the request. The detection also ensures that the file exists - it is performed if the flag is set to `true`, even if all attributes are provided.\nIf this flag is set to `false`, default attributes are used if not provided explicitly. The only exception is the `size` attribute, which is mandatory. The registration request will fail if `autoDetectAttributes` is set to `false` and `size` is not provided.\nIt is possible to register a file that does not exist on storage if `autoDetectAttributes` is set to `false`. Such file will be visible in Onedata but not accessible.\n",
          "default": true
        }
      },
      "example": {
        "spaceId": "761f76677f42ad5289d6472675d5ecf2dfd57be6",
        "storageId": "2c1e539dbebf76a697e44782787585ebb0f47af1",
        "storageFileId": "https://www.example.org/data/2010/01/05/run123.tar",
        "destinationPath": "/data/2010/01/05/run123.tar",
        "mode": "664",
        "size": 1024,
        "atime": 1464958683054,
        "mtime": 1464958683051,
        "ctime": 1464958681054,
        "uid": 1935313,
        "gid": 1101841,
        "xattrs": {
          "colour": "red",
          "country": "FR",
          "checksum": "189e725f4587b679740f0f7783745056"
        },
        "json": {
          "year": 2014,
          "month": 10,
          "day": 1,
          "run": 5038219,
          "subrun": 1
        },
        "rdf": "PD94bWwgdmVyc2lvbj0iMS4wIj8+CjxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5v cmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyIKICAgICAgICAgICAgeG1sbnM6ZGM9Imh0dHA6 Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICAgICAgICAgICB4bWxuczpleD0iaHR0cDov L2V4YW1wbGUub3JnL3N0dWZmLzEuMC8iPgoKICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0i aHR0cDovL3d3dy53My5vcmcvVFIvcmRmLXN5bnRheC1ncmFtbWFyIgogICAgICAgICAgICAgZGM6 dGl0bGU9IlJERjEuMSBYTUwgU3ludGF4Ij4KICAgIDxleDplZGl0b3I+CiAgICAgIDxyZGY6RGVz Y3JpcHRpb24gZXg6ZnVsbE5hbWU9IkRhdmUgQmVja2V0dCI+CiAgICAgICAgPGV4OmhvbWVQYWdl IHJkZjpyZXNvdXJjZT0iaHR0cDovL3B1cmwub3JnL25ldC9kYWpvYmUvIiAvPgogICAgICA8L3Jk ZjpEZXNjcmlwdGlvbj4KICAgIDwvZXg6ZWRpdG9yPgogIDwvcmRmOkRlc2NyaXB0aW9uPgoKPC9y ZGY6UkRGPgo=\n",
        "autoDetectAttributes": true
      }
    },
    "MetadataChangesStreamRequest": {
      "type": "object",
      "description": "Specification of metadata changes to observe and stream.",
      "properties": {
        "triggers": {
          "type": "array",
          "description": "List of documents which modifications should trigger sending changes.",
          "items": {
            "type": "string",
            "enum": [
              "fileMeta",
              "fileLocation",
              "times",
              "customMetadata"
            ]
          }
        },
        "fileMeta": {
          "type": "object",
          "description": "Specification of fileMeta fields to observe.",
          "properties": {
            "always": {
              "type": "boolean",
              "default": false,
              "description": "Indicates whether specified fileMeta fields should be sent on other metadata changes."
            },
            "fields": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "name",
                  "type",
                  "mode",
                  "owner",
                  "provider_id",
                  "shares",
                  "deleted"
                ]
              }
            }
          }
        },
        "fileLocation": {
          "type": "object",
          "description": "Specification of fileLocation fields to observe.",
          "properties": {
            "always": {
              "type": "boolean",
              "default": false,
              "description": "Indicates whether specified fileLocation fields should be sent on other metadata changes."
            },
            "fields": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "provider_id",
                  "storage_id",
                  "size",
                  "space_id",
                  "storage_file_created"
                ]
              }
            }
          }
        },
        "times": {
          "type": "object",
          "description": "Specification of times fields to observe.",
          "properties": {
            "always": {
              "type": "boolean",
              "default": false,
              "description": "Indicates whether specified times fields should be sent on other metadata changes."
            },
            "fields": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "atime",
                  "mtime",
                  "ctime"
                ]
              }
            }
          }
        },
        "customMetadata": {
          "type": "object",
          "description": "Specification of customMetadata fields to observe.",
          "properties": {
            "always": {
              "type": "boolean",
              "default": false,
              "description": "Indicates whether specified customMetadata fields should be sent on other metadata changes."
            },
            "fields": {
              "type": "array",
              "description": "Xattrs names to retrieve. In case of missing fields `null` values are returned. In order to fetch special attributes additional keys can be specified, namely  `onedata_json`, `onedata_rdf` or `onedata_keyvalue` (fetches all fields beside special ones).\n",
              "items": {
                "type": "string"
              }
            },
            "exists": {
              "type": "array",
              "description": "Xattrs names to check for existence. Existence of special attributes can also be checked by specifying `onedata_json`, `onedata_rdf` or `onedata_keyvalue`  (checks if any normal attribute exists).\n",
              "items": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "Space": {
      "type": "object",
      "description": "Basic information about space.",
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of the space."
        },
        "spaceId": {
          "type": "string",
          "description": "Id of the space."
        },
        "fileId": {
          "type": "string",
          "description": "Id of space directory."
        },
        "providers": {
          "type": "array",
          "description": "The list of providers who support this space.",
          "items": {
            "$ref": "#/definitions/Provider"
          }
        }
      },
      "example": {
        "name": "My Space 1",
        "spaceId": "cda5d1bd-ca13-40ef-95e6-51fc1cc3b322",
        "fileId": "094576776E667431723230677767776C6B497031394E445F6E3868677873",
        "providers": [
          {
            "providerId": "c40a3a39-0bbc-41cd-878f-5591f8c55014",
            "providerName": "MyPrivateCloud"
          },
          {
            "providerId": "27d58af6-82ef-4bdd-a596-c4ff080fbde6",
            "providerName": "PublicCloud1"
          }
        ]
      }
    },
    "Provider": {
      "type": "object",
      "description": "Provider instance definitions.",
      "properties": {
        "providerId": {
          "type": "string",
          "description": "The Id of the provider supporting the space."
        },
        "providerName": {
          "type": "string",
          "description": "The name of the provider"
        }
      },
      "example": {
        "providerId": "c40a3a39-0bbc-41cd-878f-5591f8c55014",
        "providerName": "MyFavouriteCloudProvider"
      }
    },
    "Metrics": {
      "type": "object",
      "description": "Export of monitoring metrics for specific provider.",
      "properties": {
        "providerId": {
          "type": "string",
          "description": "The Id of the provider."
        },
        "rrd": {
          "description": "RRD database export.",
          "$ref": "#/definitions/RRD"
        }
      },
      "example": {
        "providerId": "4efc4a0c-0a61-4766-8fe9-c3d7fb414da8",
        "rrd": {
          "about": "RRDtool graph JSON output",
          "meta": {
            "start": 1465466700,
            "end": 1465553100,
            "step": 300,
            "legend": [
              "storage_free"
            ]
          },
          "data": [
            [
              5.6435528434
            ],
            [
              2.6435528434
            ],
            [
              4.6435528434
            ]
          ]
        }
      }
    },
    "RRD": {
      "type": "object",
      "description": "RRD database export.",
      "properties": {
        "about": {
          "type": "string",
          "description": "Name of the RRD database"
        },
        "meta": {
          "type": "object",
          "properties": {
            "start": {
              "type": "number",
              "description": "Start timestamp of the metrics."
            },
            "end": {
              "type": "number",
              "description": "End timestamp of the metrics."
            },
            "step": {
              "type": "number",
              "description": "Step of the metrics."
            },
            "legend": {
              "type": "array",
              "description": "Names of the columns in the exported array",
              "items": {
                "type": "string"
              }
            }
          }
        },
        "data": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "type": "number"
            }
          }
        }
      },
      "example": {
        "about": "RRDtool graph JSON output",
        "meta": {
          "start": 1465466700,
          "end": 1465553100,
          "step": 300,
          "legend": [
            "space s1; metric block_access; user u1; oneprovider Id p1; block_access_read[iops/s]",
            "space s1; metric block_access; user u1; oneprovider Id p1; block_access_write[iops/s]"
          ]
        },
        "data": [
          [
            null,
            null
          ],
          [
            5.6435528434,
            2.6435528434
          ],
          [
            5.6435528434,
            2.6435528434
          ],
          [
            5.6435528434,
            2.6435528434
          ],
          [
            null,
            null
          ],
          [
            0,
            0
          ]
        ]
      }
    },
    "View": {
      "type": "object",
      "description": "The basic view information.",
      "properties": {
        "spatial": {
          "description": "Whether given view is spatial or not.",
          "type": "boolean"
        },
        "mapFunction": {
          "description": "View mapping function.",
          "type": "string"
        },
        "reduceFunction": {
          "description": "View reduce function or null if there is none.",
          "type": "string"
        },
        "viewOptions": {
          "$ref": "#/definitions/ViewOptions"
        },
        "providers": {
          "description": "List of providers on which view can be queried.",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "spatial",
        "mapFunction",
        "reduceFunction",
        "viewOptions",
        "providers"
      ],
      "example": {
        "spatial": false,
        "mapFunction": "function (id, type, meta, ctx) {\\n        if(type == \\'custom_metadata\\' && meta[\\'onexattr\\']) {\\n            return [meta[\\'onexattr\\'], id];\\n        }\\n        return null;\\n    }",
        "spaceId": "ee4ac5df-095c-4760-bee9-a9bd2f37e508",
        "reduceFunction": "null,",
        "viewOptions": {
          "update_min_changes": 100
        },
        "providers": [
          "6b9bc70630547d925861a27e1f050dfe"
        ]
      }
    },
    "Views": {
      "type": "object",
      "description": "The list of views names.",
      "properties": {
        "views": {
          "type": "array",
          "description": "List of space views",
          "items": {
            "type": "string"
          }
        },
        "nextPageToken": {
          "$ref": "#/definitions/ListPageToken"
        }
      },
      "required": [
        "views"
      ],
      "example": {
        "views": [
          "images",
          "videos"
        ],
        "nextPageToken": "8471726779817b3a"
      }
    },
    "ViewOptions": {
      "type": "object",
      "description": "Options specified during creation or update of view conforming to the\n[automated view update](https://docs.couchbase.com/server/4.1/developer-guide/views-operation.html#automated-index-updates) description.\n",
      "properties": {
        "update_min_changes": {
          "description": "Minimum number of document changes to trigger re-viewing.",
          "type": "integer"
        },
        "replica_update_min_changes": {
          "description": "Minimum number of document changes to trigger re-viewing of a replica index.",
          "type": "integer"
        }
      },
      "example": {
        "update_min_changes": 100
      }
    },
    "ShareCreateRequest": {
      "type": "object",
      "description": "Share create request.",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the share."
        },
        "description": {
          "type": "string",
          "description": "Description of the share contents, interpreted as markdown format when displayed in GUI."
        },
        "rootFileId": {
          "type": "string",
          "description": "Id of file or directory to be shared. The whole space can also be shared."
        },
        "fileId": {
          "type": "string",
          "description": "(deprecated) Id of file or directory to be shared. The whole space can also be shared."
        }
      },
      "required": [
        "name"
      ],
      "example": {
        "name": "MyShare",
        "description": "# Top level header\nDescription of the share contents.",
        "rootFileId": "00000000005CF4706775696423745F772D67686431633765446F4D76546D6F2D67575F3361737A7670486B477A7936587734507265584A7723394A4F355F5F396E4C31623031594576776E667431723230677767776C6B497031394E445F6E3868677873"
      }
    },
    "Share": {
      "type": "object",
      "description": "Basic information about a share.",
      "properties": {
        "shareId": {
          "type": "string",
          "description": "Share Id."
        },
        "name": {
          "type": "string",
          "description": "The name of the share."
        },
        "description": {
          "type": "string",
          "description": "Description of the share contents, interpreted as markdown format when displayed in GUI."
        },
        "publicUrl": {
          "type": "string",
          "description": "The publicly accessible URL for the share."
        },
        "spaceId": {
          "type": "string",
          "description": "The Id of the space in which the share was created."
        },
        "rootFileId": {
          "type": "string",
          "description": "Public Id of shared file or directory, allowing read access to its contents without authentication."
        },
        "rootFileType": {
          "$ref": "#/definitions/FileType"
        },
        "handleId": {
          "type": "string",
          "description": "The Id of open data Handle (e.g. DOI or PID) assigned to this share or null."
        }
      },
      "required": [
        "shareId",
        "name",
        "description",
        "publicUrl",
        "spaceId",
        "rootFileId",
        "rootFileType"
      ],
      "example": {
        "shareId": "1f4b762b1380946e73aeca574c77f14c",
        "name": "Experiment XYZ",
        "description": "# Experiment XYZ\\nThis collection contains results from Experiment XYZ.",
        "publicUrl": "https://onedata.org/shares/1f4b762b1380946e73aeca574c77f14c",
        "spaceId": "6ec1a5413b6f4e2b01a5c85a8fd797e2",
        "rootFileId": "00000000006CB663736861726547756964233339643236366165646365\\ 6266666164353939663761373734313235363166342336656331613534313362366634653\\ 2623031613563383561386664373937653223316634623736326231333830393436653733\\ 6165636135373463373766313463",
        "rootFileType": "DIR",
        "handleId": "doi:10.15911/MyShares.726855"
      }
    },
    "Shares": {
      "type": "object",
      "description": "List of shares.",
      "properties": {
        "shares": {
          "type": "array",
          "description": "The list of share Ids.",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "shares"
      ],
      "example": {
        "shares": [
          "1d24c36707d99197c6cd995810a43aca",
          "6825604b0eb6a47b8b7a04b6369eb24d"
        ]
      }
    },
    "Archive": {
      "type": "object",
      "description": "Basic information about an archive. Archive is a snapshot of a dataset at the certain moment. It contains both data and metadata from the dataset.\n",
      "properties": {
        "archiveId": {
          "type": "string",
          "description": "Archive Id."
        },
        "state": {
          "$ref": "#/definitions/ArchiveState"
        },
        "datasetId": {
          "type": "string",
          "description": "Id of the dataset from which the archive has been created."
        },
        "rootDirectoryId": {
          "type": "string",
          "description": "Id of the hidden directory in the space where the archive is stored.\n"
        },
        "creationTime": {
          "$ref": "#/definitions/Timestamp"
        },
        "config": {
          "$ref": "#/definitions/ArchiveConfig"
        },
        "description": {
          "$ref": "#/definitions/ArchiveDescription"
        },
        "preservedCallback": {
          "$ref": "#/definitions/ArchivePreservedCallback"
        },
        "deletedCallback": {
          "$ref": "#/definitions/ArchiveDeletedCallback"
        },
        "stats": {
          "$ref": "#/definitions/ArchiveStats"
        },
        "baseArchiveId": {
          "$ref": "#/definitions/ArchiveBase"
        },
        "relatedAipId": {
          "type": "string",
          "description": "Id of the related archival information package (AIP) archive. Can be null when there is no such archive.\n"
        },
        "relatedDipId": {
          "type": "string",
          "description": "Id of the related dissemination information package (DIP) archive. Can be null when there is no such archive.\n"
        }
      },
      "required": [
        "state",
        "archiveId",
        "datasetId",
        "rootDirectoryId",
        "creationTime",
        "description",
        "stats"
      ],
      "example": {
        "archiveId": "ae6f78c89a97c9e78e891105f703bcb8",
        "state": "preserved",
        "datasetId": "1f4b762b1380946e73aeca574c77f14c",
        "rootDirectoryId": "00000000006CB663736861726547756964233339643236366165646365",
        "creationTime": 1576152793,
        "config": {
          "incremental": {
            "enabled": true
          },
          "includeDip": false,
          "layout": "plain"
        },
        "preservedCallback": "https://example.org/preserved_archives",
        "deletedCallback": "https://example.org/deleted_archives",
        "description": "Archived dataset with experiment data from 2021.",
        "stats": {
          "filesArchived": 7940,
          "filesFailed": 3,
          "bytesArchived": 879245378924537
        },
        "baseArchiveId": "ae6f78c89a97c9e78e891105f703bcb8",
        "relatedAipId": "e891105f703bcb8ae6f78c89a97c9e78",
        "relatedDipId": "78e891105f703bcb8ae6f78c89a97c9e"
      }
    },
    "ArchiveBase": {
      "type": "string",
      "description": "This attribute determines which archive will be the base archive for incremental creation of a new archive\n(consult description of the `incremental` parameter).\nIf not set, last successfully preserved archive will be used.\nIf `incremental` is not enabled this field is ignored.\n",
      "example": "ae6f78c89a97c9e78e891105f703bcb8"
    },
    "ArchiveConfig": {
      "type": "object",
      "description": "Parameters used to configure the process of creating an archive.\n",
      "properties": {
        "incremental": {
          "$ref": "#/definitions/ArchiveIncremental"
        },
        "includeDip": {
          "$ref": "#/definitions/ArchiveIncludeDip"
        },
        "layout": {
          "$ref": "#/definitions/ArchiveLayout"
        },
        "createNestedArchives": {
          "$ref": "#/definitions/ArchiveCreateNestedArchives"
        },
        "followSymlinks": {
          "$ref": "#/definitions/ArchiveFollowSymlinks"
        }
      },
      "example": {
        "incremental": {
          "enabled": true
        },
        "includeDip": false,
        "layout": "plain",
        "createNestedArchives": "false,",
        "followSymlinks": true
      }
    },
    "ArchiveCreateRequest": {
      "type": "object",
      "description": "Archive create request.",
      "properties": {
        "datasetId": {
          "type": "string",
          "description": "Id of the dataset that will be archived."
        },
        "config": {
          "$ref": "#/definitions/ArchiveConfig"
        },
        "description": {
          "$ref": "#/definitions/ArchiveDescription"
        },
        "preservedCallback": {
          "$ref": "#/definitions/ArchivePreservedCallback"
        },
        "deletedCallback": {
          "$ref": "#/definitions/ArchiveDeletedCallback"
        }
      },
      "required": [
        "datasetId"
      ],
      "example": {
        "datasetId": "1f4b762b1380946e73aeca574c77f14c",
        "config": {
          "incremental": {
            "enabled": true,
            "basedOn": "ae6f78c89a97c9e78e891105f703bcb8"
          },
          "includeDip": false,
          "layout": "plain"
        },
        "preservedCallback": "https://example.org/preserved_archives",
        "deletedCallback": "https://example.org/deleted_archives",
        "description": "Archived dataset with experiment data from 2021."
      }
    },
    "ArchiveDescription": {
      "type": "string",
      "description": "User defined description of the archive.",
      "example": "Archived dataset with experiment data from 2021."
    },
    "ArchiveIncludeDip": {
      "type": "boolean",
      "description": "<!--- TODO VFS-7616 refine archive params and their description-->\nThis flag determines whether dissemination information package (DIP) is created alongside with\narchival information package (AIP), on the storage.\nFor more information on DIP and AIP please consult [Open Archival Information System](https://en.wikipedia.org/wiki/Open_Archival_Information_System).\n",
      "default": false,
      "example": true
    },
    "ArchiveIncremental": {
      "type": "object",
      "description": "This field determines whether archive is incremental - storing only files that have\nchanged in comparison to the base archive (provided under the \"basedOn\" key).\nUnchanged files are preserved as hard links to the corresponding files in the base archive.\nIf does not enabled, all files belonging to the dataset are stored directly in the archive.\n",
      "properties": {
        "enabled": {
          "type": "boolean"
        },
        "basedOn": {
          "$ref": "#/definitions/ArchiveBase"
        }
      },
      "default": {
        "enabled": false
      },
      "example": {
        "enabled": true,
        "basedOn": "ae6f78c89a97c9e78e891105f703bcb8"
      },
      "required": [
        "enabled"
      ]
    },
    "ArchiveDeleteRequest": {
      "type": "object",
      "description": "Archive delete initialization request.",
      "properties": {
        "deletedCallback": {
          "$ref": "#/definitions/ArchiveDeletedCallback"
        }
      },
      "example": {
        "deletedCallback": "https://example.org/deleted_archives"
      }
    },
    "ArchiveRecallRequest": {
      "type": "object",
      "description": "Archive recall initialization request.",
      "properties": {
        "parentDirectoryId": {
          "description": "Id of a parent directory where the target directory will be created.",
          "type": "string"
        },
        "targetFileName": {
          "description": "Name of the file/directory that will be created as the root of the recalled archive.\nIf not specified, defaults to the dataset's name.\n",
          "type": "string"
        }
      },
      "required": [
        "targetParentId"
      ],
      "example": {
        "parentDirectoryId": "DIRECTORY_ID",
        "targetFileName": "example_name"
      }
    },
    "ArchiveRecallResponse": {
      "type": "object",
      "description": "Archive recall initialization response.",
      "properties": {
        "rootFileId": {
          "description": "Id of the root file of the recalled archive.",
          "type": "string"
        }
      },
      "required": [
        "rootFileId"
      ],
      "example": {
        "rootFileId": "$FILE_ID"
      }
    },
    "ArchiveLayout": {
      "type": "string",
      "description": "<!--- TODO VFS-7616 refine archive params and their description-->\nThe layout of files and directories in an archive.\n\n* `plain` - Structure of the data in the archive is an exact copy of the dataset.\n\n* `bagit` - Data in the archive are stored in the [bagit format](https://tools.ietf.org/html/rfc8493).\n",
      "enum": [
        "plain",
        "bagit"
      ],
      "default": "plain",
      "example": "plain"
    },
    "ArchiveCreateNestedArchives": {
      "type": "boolean",
      "description": "<!--- TODO VFS-7616 refine archive params and their description-->\nThis flag determines the strategy of archiving nested datasets (i. e. datasets inside the dataset that is being archived).\n\nIf set to `true`, a separate archive will be created for each nested dataset, and a symbolic link to the nested archive will\nbe created in the parent archive in the place of the nested dataset's root file/directory. The procedure is recursive and\nmay effectively create a tree of linked archives.\n\nIf set to `false`, the resulting archive will be monolithic, i. e. all files and directories from nested datasets will be copied\ndirectly to the archive, in their respective locations. Effectively, the internal hierarchy of datasets has no impact on the\nresulting archive content.\n",
      "default": false,
      "example": true
    },
    "ArchiveFollowSymlinks": {
      "type": "boolean",
      "description": "<!--- TODO VFS-7616 refine archive params and their description-->\nThis flag determines whether symbolic links **pointing to paths outside of the dataset**\nshould be resolved during archive creation. \n\nIf set to `true`, valid links will be resolved and their target files/directories will be \ncopied to the archive in their place. Invalid symbolic links (not resolvable to a valid path\nin the space) will be ignored and not included in the archive.\n\nIf set to `false`, symbolic links will be copied to the resulting archive and their target\npaths will not be modified. Note that these symbolic links may target modifiable files in the space.\n\n**NOTE**: Symbolic links pointing to files inside the dataset are always preserved, \nregardless of this setting. Their target paths are reconstructed to point to the \ncorresponding files in the resulting archive.\n",
      "default": true,
      "example": false
    },
    "ArchivePreservedCallback": {
      "type": "string",
      "description": "URL on which POST request will be performed to notify that process of persisting an archive has finished.\nThe callback request will include body in the following JSON format:\n```\n{\n    \"archiveId\": \"$ARCHIVE_ID\",\n    \"datasetId\" : \"$DATASET_ID\",\n    \"error\": \"Error description\"\n}\n```\n\n`\"error\"` field will have `null` value if archivisation has been finished successfully.\n\nRequested server should response with one of `2xx` HTTP codes. If the request fails or returns any\nother HTTP code, it will be retried.\n",
      "example": "https://example.org/preserved_archives"
    },
    "ArchiveDeletedCallback": {
      "type": "string",
      "description": "URL on which POST request will be performed to notify that process of purging an archive has finished.\nThe callback request will include body in the following JSON format:\n```\n{\n    \"archiveId\": \"$ARCHIVE_ID\",\n    \"datasetId\": \"$DATASET_ID\",\n    \"error\": \"Error description\"\n}\n```\n\n`\"error\"` field will have `null` value if purging of an archive has been finished successfully.\n\nRequested server should response with one of `2xx` HTTP codes. If the request fails or returns any\nother HTTP code, it will be retried.\n",
      "example": "https://example.org/deleted_archives"
    },
    "ArchiveState": {
      "type": "string",
      "description": "The state of the archive:\n\n* `pending` - the archive creation has been scheduled, but the process of archiving data on the storage has not started yet,\n\n* `building` - the process of archiving data on the storage is in progress,\n\n* `verifying` - the process of verifying archived data on the storage is in progress, \n\n* `preserved` - all data has been successfully archived on the storage,\n\n* `verification_failed` - the data in the archive was modified externally during the archiving process and the archive is considered inconsistent,\n\n* `failed` - an error occured during the process of archiving data on the storage,\n\n* `purging` - the archive is being deleted. In the process, the archived data is deleted from the storage, then all the information concerning the archive is deleted.\n",
      "enum": [
        "pending",
        "building",
        "preserved",
        "failed",
        "purging"
      ],
      "example": "preserved"
    },
    "ArchiveStats": {
      "type": "object",
      "description": "Archivisation job statistics.\n",
      "properties": {
        "filesArchived": {
          "type": "integer",
          "description": "Counter of successfully archived files."
        },
        "filesFailed": {
          "type": "integer",
          "description": "Counter of files for which archiving process has failed."
        },
        "bytesArchived": {
          "type": "integer",
          "description": "Total size of already archived files in bytes."
        }
      },
      "required": [
        "filesArchived",
        "filesFailed",
        "bytesArchived"
      ],
      "example": {
        "filesArchived": 7940,
        "filesFailed": 3,
        "bytesArchived": 879245378924537
      }
    },
    "ArchiveUpdateRequest": {
      "type": "object",
      "description": "Archive update request.",
      "properties": {
        "description": {
          "$ref": "#/definitions/ArchiveDescription"
        },
        "preservedCallback": {
          "$ref": "#/definitions/ArchivePreservedCallback"
        },
        "deletedCallback": {
          "$ref": "#/definitions/ArchiveDeletedCallback"
        }
      },
      "example": {
        "description": "Archived dataset with experiment data from 2019.",
        "preservedCallback": "https://archives.org/preserved_archives",
        "deletedCallback": "https://archives.org/deleted_archives"
      }
    },
    "Archives": {
      "type": "object",
      "properties": {
        "archives": {
          "type": "array",
          "description": "The list of archive Ids.",
          "items": {
            "type": "string",
            "description": "Archive Id."
          }
        },
        "nextPageToken": {
          "$ref": "#/definitions/ListPageToken"
        }
      },
      "required": [
        "archives"
      ],
      "example": {
        "archives": [
          "d0f08b098804da5504609b2c54b507b3",
          "5a1e63f7cf5282a206144f77822c3f10"
        ],
        "nextPageToken": "UkdseU1qWTBNak16TXpNNU5qUXpNak0yTXpZMk1UWTFOalEyTXpZMU5qSTJOalky"
      }
    },
    "ArchiveRecallDetails": {
      "type": "object",
      "description": "Archive recall details.",
      "properties": {
        "archiveId": {
          "description": "Id of the archive that is being recalled.",
          "type": "string"
        },
        "datasetId": {
          "description": "Id of the dataset from which the archive was created.",
          "type": "string"
        },
        "startTime": {
          "description": "Timestamp in milliseconds (UNIX epoch) when the recall started (null if not started yet).",
          "type": "integer"
        },
        "finishTime": {
          "description": "Timestamp in milliseconds (UNIX epoch) when the recall finished (null if not finished yet).",
          "type": "integer"
        },
        "totalFileCount": {
          "description": "Number of files in source archive (number of files that is to be copied by recall).",
          "type": "integer"
        },
        "totalByteSize": {
          "description": "Number of bytes in source archive (number of bytes that is to be copied by recall).",
          "type": "integer"
        },
        "lastError": {
          "description": "Information about the last encountered error, or `null`.",
          "type": "object",
          "properties": {
            "fileId": {
              "description": "Id of the file for which error occured.",
              "type": "string"
            },
            "reason": {
              "$ref": "#/definitions/ErrorJson"
            }
          }
        }
      },
      "required": [
        "archiveId",
        "datasetid",
        "totalFileCount",
        "totalByteSize"
      ],
      "example": {
        "archiveId": "$ARCHIVE_ID",
        "datasetId": "$DATASET_ID",
        "startTime": 1643103923417,
        "finishTimes": 1643103933417,
        "totalFileCount": 1,
        "totalByteSize": 65536,
        "lastError": {
          "fileId": "$FILE_ID",
          "reason": {
            "description": "The resource could not be found.",
            "id": "notFound"
          }
        }
      }
    },
    "ArchiveRecallProgress": {
      "type": "object",
      "description": "Archive recall progress.",
      "properties": {
        "filesCopied": {
          "description": "Number of files copied so far.",
          "type": "integer"
        },
        "bytesCopied": {
          "description": "Number of bytes copied so far.",
          "type": "integer"
        },
        "filesFailed": {
          "description": "Number of failed files.",
          "type": "integer"
        }
      },
      "required": [
        "filesCopied",
        "bytesCopied",
        "filesFailed"
      ],
      "example": {
        "filesCopied": 8,
        "bytesCopied": 16384,
        "filesFailed": 1
      }
    },
    "DatasetProtectionFlags": {
      "type": "array",
      "description": "Dataset protection flags:\n\n* `data_protection` - causes all dataset's files and directories to be\n   protected from modifying their content.\n\n* `metadata_protection` - causes all dataset's files and directories to be\n   protected from modifying their metadata (custom metadata, ACL, etc.).\n\nRequests to modify the data/metadata when protection is enabled will be rejected\nwith the EPERM POSIX error.\n\nThe protection flags are ignored when the dataset is in `detached` state.\n\nChanging the protection flags may not have an immediate effect,\nespecially for files that were already opened before the change.\n\nNote however that some basic readonly file attributes (such as e.g. `atime`\nupdated when a file is read) will be modified regardless.\n",
      "items": {
        "type": "string",
        "enum": [
          "data_protection",
          "metadata_protection"
        ]
      },
      "example": [
        "data_protection"
      ]
    },
    "EffectiveFileProtectionFlags": {
      "type": "array",
      "description": "Effective file protection flags:\n\n* `data_protection` - causes file/directory to be\n   protected from modifying its content.\n\n* `metadata_protection` - causes file/directory to be\n   protected from modifying its metadata (custom metadata, ACL, etc.).\n\nRequests to modify the data/metadata when protection is enabled will be rejected\nwith the EPERM POSIX error.\n\nProtection flags are calculated as a union of protection flags of all\nattached datasets to which the file belongs to.\n\nChanging the protection flags may not have an immediate effect,\nespecially for files that were already opened before the change.\n\nNote however that some basic readonly file attributes (such as e.g. `atime`\nupdated when a file is read) will be modified regardless.\n",
      "items": {
        "type": "string",
        "enum": [
          "data_protection",
          "metadata_protection"
        ]
      },
      "example": [
        "data_protection"
      ]
    },
    "DatasetState": {
      "type": "string",
      "description": "The state of the dataset:\n\n* `attached` - the dataset is coupled with its root file/directory, which means\n  that the file/directory is treated as a dataset and offers some additional\n  features (e.g. protection flags). The root file/directory contents are directly\n  the dataset contents.\n\n* `detached` - the dataset is decoupled from its root file/directory and serves only archival\n  purposes. The dataset does not correspond to any physical content in the file tree and\n  changes to the original root file/directory contents are not reflected in the dataset.\n  <!--- TODO VFS-7304\n  The only purpose of detached datasets it so keep track of its archives that were created\n  during its `attached` lifecycle.\n  -->\n  A `detached` dataset can be reattached, but only to the\n  original file/directory and only if it still exists. Once a dataset has been established,\n  its root file/directory can no longer be changed.\n",
      "enum": [
        "attached",
        "detached"
      ],
      "example": "attached"
    },
    "Dataset": {
      "type": "object",
      "description": "Basic information about a dataset.",
      "properties": {
        "state": {
          "$ref": "#/definitions/DatasetState"
        },
        "datasetId": {
          "type": "string",
          "description": "Dataset Id."
        },
        "parentId": {
          "type": "string",
          "description": "Parent dataset Id or `null` in case of top dataset."
        },
        "rootFileId": {
          "type": "string",
          "description": "Id of file or directory being the dataset root. Once the dataset has been established the root file can no longer be changed. Even after detaching dataset it can be reattached only to the same file and only if it still exists.\n"
        },
        "rootFileType": {
          "$ref": "#/definitions/FileType"
        },
        "rootFilePath": {
          "type": "string",
          "description": "Path to the file or directory in the virtual file system. For datasets in `detached` state this field is frozen and shows the value it had at the time of detaching. It is done for archival purposes as file may have been renamed or removed.\n"
        },
        "rootFileDeleted": {
          "type": "boolean",
          "description": "Flag informing whether dataset's root file has been deleted.  Only relevant for detached datasets. If the root file has been deleted, it is no longer possible to reattach the dataset.\n"
        },
        "protectionFlags": {
          "$ref": "#/definitions/DatasetProtectionFlags"
        },
        "effectiveProtectionFlags": {
          "$ref": "#/definitions/DatasetProtectionFlags"
        },
        "creationTime": {
          "$ref": "#/definitions/Timestamp"
        },
        "archiveCount": {
          "type": "integer",
          "description": "Number of archives created from the dataset.\n"
        }
      },
      "required": [
        "state",
        "datasetId",
        "rootFileId",
        "rootFileType",
        "rootFilePath",
        "protectionFlags",
        "effectiveProtectionFlags",
        "creationTime"
      ],
      "example": {
        "state": "attached",
        "datasetId": "1f4b762b1380946e73aeca574c77f14c",
        "parentId": null,
        "rootFileId": "00000000006CB663736861726547756964233339643236366165646365...",
        "rootFileType": "DIR",
        "rootFilePath": "/MySpace/dir",
        "protectionFlags": [
          "metadata_protection"
        ],
        "effectiveProtectionFlags": [
          "data_protection",
          "metadata_protection"
        ],
        "creationTime": 1576152793,
        "archiveCount": 5
      }
    },
    "DatasetSummary": {
      "type": "object",
      "description": "Dataset summary for file or directory.",
      "properties": {
        "directDataset": {
          "type": "string",
          "description": "Id of dataset established for this file regardless if attached or detached,\nor `null` if there isn't one.\n"
        },
        "effectiveAncestorDatasets": {
          "type": "array",
          "description": "Ids of all datasets in `attached` state registered for this file ancestor directories.",
          "items": {
            "type": "string"
          }
        },
        "effectiveProtectionFlags": {
          "$ref": "#/definitions/EffectiveFileProtectionFlags"
        }
      },
      "example": {
        "directDataset": null,
        "effectiveAncestorDatasets": [
          "1f4b762b1380946e73aeca574c77f14c",
          "64233339643236366165646365626666"
        ],
        "effectiveProtectionFlags": [
          "data_protection",
          "metadata_protection"
        ]
      }
    },
    "DatasetEstablishRequest": {
      "type": "object",
      "description": "Dataset establish request.",
      "properties": {
        "rootFileId": {
          "type": "string",
          "description": "Id of file or directory for which dataset should be established."
        },
        "protectionFlags": {
          "$ref": "#/definitions/DatasetProtectionFlags"
        }
      },
      "required": [
        "rootFileId"
      ],
      "example": {
        "rootFileId": "00000000005CF4706775696423745F772...",
        "protectionFlags": [
          "data_protection"
        ]
      }
    },
    "DatasetUpdateRequest": {
      "type": "object",
      "description": "Dataset update request.",
      "properties": {
        "state": {
          "$ref": "#/definitions/DatasetState"
        },
        "setProtectionFlags": {
          "$ref": "#/definitions/DatasetProtectionFlags"
        },
        "unsetProtectionFlags": {
          "$ref": "#/definitions/DatasetProtectionFlags"
        }
      },
      "example": {
        "setProtectionFlags": [
          "data_protection"
        ]
      }
    },
    "Datasets": {
      "type": "object",
      "properties": {
        "datasets": {
          "type": "array",
          "description": "The list of dataset Ids.",
          "items": {
            "type": "object",
            "properties": {
              "datasetId": {
                "type": "string",
                "description": "Dataset Id."
              },
              "name": {
                "type": "string",
                "description": "Dataset's root file/directory name."
              }
            }
          }
        },
        "nextPageToken": {
          "$ref": "#/definitions/ListPageToken"
        }
      },
      "required": [
        "datasets"
      ],
      "example": {
        "datasets": [
          {
            "datasetId": "1f4b762b1380946e73aeca574c77f14c",
            "name": "File1.txt"
          },
          {
            "datasetId": 6.423333964323636e+31,
            "name": "Dir2"
          }
        ],
        "nextPageToken": "RGlyMjY0MjMzMzM5NjQzMjM2MzY2MTY1NjQ2MzY1NjI2NjY2"
      }
    },
    "QosRequirement": {
      "description": "Object representing a QoS requirement.",
      "type": "object",
      "properties": {
        "fileId": {
          "type": "string",
          "description": "Id of file that requirement was created for."
        },
        "expression": {
          "type": "string",
          "description": "Expression used to select storages on which file should be replicated."
        },
        "replicasNum": {
          "type": "integer",
          "description": "Number of required file replicas.",
          "default": 1
        },
        "status": {
          "type": "string",
          "enum": [
            "fulfilled",
            "pending",
            "impossible"
          ],
          "description": "Indicates fulfillment status of QoS requirement. \n"
        }
      },
      "example": {
        "qosRequirementId": "c84f669f9522c46976fee490d80651f0",
        "fileId": "00000000005CF4706775696423745F772D67686431633765446F4D76546D6F2D67575F3361737A7670486B477A7936587734507265584A7723394A4F355F5F396E4C31623031594576776E667431723230677767776C6B497031394E445F6E3868677873",
        "expression": "country=FR",
        "replicasNum": 2,
        "status": "fulfilled"
      }
    },
    "QosCreateRequest": {
      "description": "Object representing body of request that adds QoS requirement for file or directory",
      "type": "object",
      "properties": {
        "fileId": {
          "type": "string",
          "description": "Id of file or directory requirement is going to be created for."
        },
        "expression": {
          "type": "string",
          "description": "Expression used to select storages on which file should be replicated."
        },
        "replicasNum": {
          "type": "integer",
          "description": "Number of required file replicas.",
          "default": 1
        }
      },
      "example": {
        "fileId": "00000000005CF4706775696423745F772D67686431633765446F4D76546D6F2D67575F3361737A7670486B477A7936587734507265584A7723394A4F355F5F396E4C31623031594576776E667431723230677767776C6B497031394E445F6E3868677873",
        "expression": "country=FR",
        "replicasNum": 2
      }
    },
    "QosSummary": {
      "description": "QoS summary for file or directory.",
      "type": "object",
      "properties": {
        "requirements": {
          "type": "object",
          "description": "Mapping including all QoS requirements (Ids) that influence given file/directory and corresponding  information of fulfillment status for this file/directory (fulfilled/pending/impossible).\n"
        },
        "status": {
          "type": "string",
          "enum": [
            "fulfilled",
            "pending",
            "impossible"
          ],
          "description": "Aggregated status of all QoS requirements for given file or directory.  \n"
        }
      },
      "example": {
        "requirements": {
          "c84f669f9522c46976fee490d80651f0": "pending",
          "22c46976fee490d80651f0c84f669f95": "fulfilled"
        },
        "status": "pending"
      }
    },
    "QosRequirementAuditLog": {
      "description": "Audit log of QoS requirement.",
      "type": "object",
      "properties": {
        "isLast": {
          "type": "boolean",
          "description": "Flag indicating whether last entry in audit log was listed.\n"
        },
        "logEntries": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "index": {
                "type": "integer",
                "description": "Index of this log entry, used to identify the position of this log\nin a series of logs.\n"
              },
              "timestamp": {
                "type": "integer",
                "description": "UNIX epoch timestamp in seconds of event described by entry."
              },
              "content": {
                "type": "object",
                "properties": {
                  "fileId": {
                    "type": "string",
                    "description": "Id of file for which event occured."
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "scheduled",
                      "completed",
                      "failed",
                      "skipped"
                    ]
                  },
                  "severity": {
                    "type": "string",
                    "enum": [
                      "info",
                      "error"
                    ]
                  },
                  "description": {
                    "type": "string",
                    "description": "Detailed description of the recorded event."
                  },
                  "reason": {
                    "$ref": "#/definitions/ErrorJson"
                  }
                },
                "required": [
                  "fileId",
                  "severity",
                  "status",
                  "description"
                ]
              }
            },
            "required": [
              "index",
              "timestamp",
              "content"
            ]
          }
        }
      },
      "required": [
        "isLast",
        "logEntries"
      ],
      "example": {
        "isLast": false,
        "logEntries": [
          {
            "index": 0,
            "timestamp": 1626334701662,
            "content": {
              "fileId": "$FILE_ID",
              "severity": "info",
              "status": "completed",
              "description": "Local replica reconciled."
            }
          },
          {
            "index": 1,
            "timestamp": 1626334701672,
            "content": {
              "fileId": "$FILE_ID",
              "severity": "error",
              "status": "failed",
              "description": "Failed to reconcile local replica: Operation failed with POSIX error: enoent.",
              "reason": {
                "description": "Operation failed with POSIX error: enoent.",
                "details": {
                  "errno": "enoent"
                },
                "id": "posix"
              }
            }
          }
        ]
      }
    },
    "StorageDetails": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Id of storage."
        },
        "name": {
          "type": "string",
          "description": "Name of storage."
        },
        "providerId": {
          "type": "string",
          "description": "Id of provider storage belongs to."
        }
      },
      "example": {
        "id": "STORAGE_ID",
        "name": "storage_name",
        "providerId": "$PROVIDER_ID"
      }
    },
    "TransferCreateRequest": {
      "type": "object",
      "description": "Transfer create request.",
      "discriminator": "dataSourceType",
      "x-onedata-oneof": true,
      "x-onedata-subclasses": [
        "file",
        "view"
      ],
      "properties": {
        "type": {
          "type": "string",
          "description": "Requested type of transfer. Depending on selected type specifying also `replicatingProviderId`, `evictingProviderId` or both may be required.\n",
          "enum": [
            "replication",
            "eviction",
            "migration"
          ]
        },
        "replicatingProviderId": {
          "type": "string",
          "description": "Id of provider to which data will be copied, ensuring that the provider has a complete replica at the end of the process. The data will be copied from one or more providers in the space that hold replicas or some fragments.\n"
        },
        "evictingProviderId": {
          "type": "string",
          "description": "Id of provider from which replica(s) are to be removed. Eviction is safe - will succeed only if there is at least one complete replica (accumulated) on other providers in the space.\n"
        },
        "callback": {
          "type": "string",
          "description": "This parameter allows the user to specify a REST callback URL which will be called (http `POST` request with transfer Id in body) when the transfer is complete.\n"
        },
        "dataSourceType": {
          "type": "string",
          "enum": [
            "file",
            "view"
          ]
        }
      },
      "required": [
        "type",
        "dataSourceType"
      ]
    },
    "file": {
      "allOf": [
        {
          "$ref": "#/definitions/TransferCreateRequest"
        },
        {
          "type": "object",
          "properties": {
            "dataSourceType": {
              "type": "string",
              "enum": [
                "file"
              ],
              "x-discriminator-value": "file",
              "description": "Indicates the method of determining files to be transferred.\n\n`type = \"file\"` - this transfer covers a single file or a whole directory\n(recursively). When scheduling such transfer, the user must have permissions\nto access the file/directory.\n"
            },
            "fileId": {
              "type": "string",
              "description": "Id of file to be transferred."
            }
          }
        }
      ],
      "required": [
        "dataSourceType",
        "fileId"
      ],
      "example": {
        "type": "replication",
        "replicatingProviderId": "6b9bc70630547d925861a27e1f050dfe",
        "dataSourceType": "file",
        "fileId": "00000000005CF4706775696423745F772D67686431633765446F4D76546D6F2D67575F3361737A7670486B477A7936587734507265584A7723394A4F355F5F396E4C31623031594576776E667431723230677767776C6B497031394E445F6E3868677873"
      }
    },
    "view": {
      "allOf": [
        {
          "$ref": "#/definitions/TransferCreateRequest"
        },
        {
          "type": "object",
          "properties": {
            "dataSourceType": {
              "type": "string",
              "enum": [
                "view"
              ],
              "x-discriminator-value": "view",
              "description": "Indicates the method of determining files to be transferred.\n\n`type = \"view\"` - this transfer covers files that are returned as a result\nof querying chosen view. The view must be defined on all providers involved in\nthe process and querying it must return a valid list of file ids to be\ntransferred. For more information about views, please see\n[here](https://onedata.org/#/home/documentation/doc/using_onedata/replication_management.html#advanced-operations-using-views).\n"
            },
            "spaceId": {
              "type": "string",
              "description": "Id of space containing the view."
            },
            "viewName": {
              "type": "string",
              "description": "Name of the view that will be queried to obtain the list of\nfiles to be transferred.\n"
            },
            "queryViewParams": {
              "$ref": "#/definitions/QueryViewParams"
            }
          }
        }
      ],
      "required": [
        "dataSourceType",
        "spaceId",
        "viewName"
      ],
      "example": {
        "type": "eviction",
        "evictingProviderId": "6b9bc70630547d925861a27e1f050dfe",
        "dataSourceType": "view",
        "spaceId": "6ec1a5413b6f4e2b01a5c85a8fd797e2",
        "viewName": "MyImages"
      }
    },
    "TransferStatus": {
      "type": "object",
      "description": "File transfer status.",
      "properties": {
        "type": {
          "type": "string",
          "description": "Requested type of transfer.",
          "enum": [
            "replication",
            "eviction",
            "migration"
          ]
        },
        "userId": {
          "type": "string",
          "description": "Id of the user that started the transfer."
        },
        "rerunId": {
          "type": "string",
          "description": "If the transfer was rerun, this field contains the Id of the new transfer, otherwise null."
        },
        "effectiveJobTransferId": {
          "type": "string",
          "description": "Last transfer Id in chain made of `rerunId`."
        },
        "spaceId": {
          "type": "string",
          "description": "Id of space in context of which transfer was performed."
        },
        "dataSourceType": {
          "type": "string",
          "description": "Indicates the method of determining files to be transferred.\n      \n`type = \"file\"` - this transfer covers a single file or a whole directory\n(recursively). When scheduling such transfer, the user must have permissions to\naccess the file/directory.\n    \n`type = \"view\"` - this transfer covers files that are returned as a result of\nquerying chosen view. The view must be defined on all providers involved in\nthe process and querying it must return a valid list of file ids to be transferred.\nFor more information about views, please see\n[here](https://onedata.org/#/home/documentation/doc/using_onedata/replication_management.html#advanced-operations-using-views).\n",
          "enum": [
            "file",
            "view"
          ]
        },
        "fileId": {
          "type": "string",
          "description": "Id of the transferred file or directory."
        },
        "filePath": {
          "type": "string",
          "description": "Path to the file or directory in the virtual file system."
        },
        "viewName": {
          "type": "string",
          "description": "Name of the view that was queried to obtain the list of files to transfer.\n"
        },
        "queryViewParams": {
          "$ref": "#/definitions/QueryViewParams"
        },
        "transferStatus": {
          "type": "string",
          "description": "Overall status of transfer.",
          "enum": [
            "scheduled",
            "enqueued",
            "skipped",
            "replicating",
            "evicting",
            "completed",
            "aborting",
            "cancelled",
            "failed"
          ]
        },
        "effectiveJobStatus": {
          "type": "string",
          "description": "Overall status of effective transfer job (the last one in chain made of `rerunId`).\n",
          "enum": [
            "scheduled",
            "enqueued",
            "skipped",
            "replicating",
            "evicting",
            "completed",
            "aborting",
            "cancelled",
            "failed"
          ]
        },
        "replicationStatus": {
          "type": "string",
          "description": "The status of transfer replication phase.",
          "enum": [
            "scheduled",
            "enqueued",
            "skipped",
            "active",
            "completed",
            "aborting",
            "cancelled",
            "failed"
          ]
        },
        "evictionStatus": {
          "type": "string",
          "description": "The status of transfer eviction phase.",
          "enum": [
            "scheduled",
            "enqueued",
            "skipped",
            "active",
            "completed",
            "aborting",
            "cancelled",
            "failed"
          ]
        },
        "replicatingProviderId": {
          "type": "string",
          "description": "Id of provider to which data was copied, ensuring that the provider\nhas a complete replica at the end of the process.\n"
        },
        "evictingProviderId": {
          "type": "string",
          "description": "Id of provider from which replica(s) were removed."
        },
        "callback": {
          "type": "string",
          "description": "Optional callback URL, which will be invoked on transfer completion."
        },
        "filesToProcess": {
          "type": "integer",
          "description": "Total number of files in this transfer."
        },
        "filesProcessed": {
          "type": "integer",
          "description": "Number of files already processed."
        },
        "filesReplicated": {
          "type": "integer",
          "description": "Number of files already replicated."
        },
        "filesEvicted": {
          "type": "integer",
          "description": "Number of files already evicted."
        },
        "filesFailed": {
          "type": "integer",
          "description": "Number of files for which eviction or replication has failed."
        },
        "bytesReplicated": {
          "type": "integer",
          "description": "Number of bytes already replicated."
        },
        "scheduleTime": {
          "type": "integer",
          "description": "Schedule time in seconds (POSIX epoch timestamp)."
        },
        "startTime": {
          "type": "integer",
          "description": "Start time in seconds (POSIX epoch timestamp)."
        },
        "finishTime": {
          "type": "integer",
          "description": "Finish time in seconds (POSIX epoch timestamp)."
        },
        "lastUpdate": {
          "type": "integer",
          "description": "Last transfer update time in seconds (POSIX epoch timestamp)."
        },
        "minHist": {
          "type": "object",
          "description": "Replication statistics within the last minute, per provider.",
          "additionalProperties": {
            "type": "array",
            "description": "Bytes replicated histogram for the last minute with 5 seconds window.",
            "items": {
              "type": "integer"
            }
          }
        },
        "hrHist": {
          "type": "object",
          "description": "Replication statistics within the last hour, per provider.",
          "additionalProperties": {
            "type": "array",
            "description": "Bytes replicated histogram for the last hour with 1 minute window.",
            "items": {
              "type": "integer"
            }
          }
        },
        "dyHist": {
          "type": "object",
          "description": "Replication statistics within the last day, per provider.",
          "additionalProperties": {
            "type": "array",
            "description": "Bytes replicated histogram for the last day with 1 hour window.",
            "items": {
              "type": "integer"
            }
          }
        },
        "mthHist": {
          "type": "object",
          "description": "Replication statistics within the last month, per provider.",
          "additionalProperties": {
            "type": "array",
            "description": "Bytes replicated histogram for the last month with 1 day window.",
            "items": {
              "type": "integer"
            }
          }
        }
      },
      "required": [
        "type",
        "userId",
        "rerunId",
        "spaceId",
        "dataSourceType",
        "transferStatus",
        "replicationStatus",
        "evictionStatus",
        "replicatingProviderId",
        "evictingProviderId",
        "callback",
        "filesToProcess",
        "filesProcessed",
        "filesReplicated",
        "filesEvicted",
        "filesFailed",
        "bytesReplicated",
        "scheduleTime",
        "startTime",
        "finishTime",
        "lastUpdate",
        "minHist",
        "hrHist",
        "dyHist",
        "mthHist"
      ],
      "example": {
        "type": "replication",
        "userId": "admin",
        "rerunId": null,
        "effectiveJobTransferId": "c4798eb2dbd2486fae940e6fa0a5071d",
        "spaceId": "6ec1a5413b6f4e2b01a5c85a8fd797e2",
        "dataSourceType": "file",
        "fileId": "00000000005CF4706775696423745F772D67686431633765446F4D76546D6F2D67575F3361737A7670486B477A7936587734507265584A7723394A4F355F5F396E4C31623031594576776E667431723230677767776C6B497031394E445F6E3868677873",
        "filePath": "/My Space 1/Dir2/file3.txt",
        "transferStatus": "completed",
        "effectiveJobStatus": "completed",
        "replicationStatus": "completed",
        "evictionStatus": "skipped",
        "replicatingProviderId": "HICATChd8wzbFmB6qfGby9VN7MfdXgI1qC4pULGVm8Q",
        "evictingProviderId": null,
        "callback": null,
        "filesToProcess": 1,
        "filesProcessed": 1,
        "filesReplicated": 1,
        "filesEvicted": 0,
        "filesFailed": 0,
        "bytesReplicated": 10485760000,
        "scheduleTime": 1504688800,
        "startTime": 15046888765,
        "finishTime": 1504688814,
        "lastUpdate": 1504988814,
        "minHist": {
          "ASDxicvuisodr78w979879wer": [
            419430400,
            1153433600,
            1258291200,
            1468006400,
            1048576000,
            1048576000,
            1048576000,
            1153433600,
            629145600,
            1258291200,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0
          ]
        },
        "hrHist": {
          "ASDxicvuisodr78w979879wer": [
            10485760000,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0
          ]
        },
        "dyHist": {
          "ASDxicvuisodr78w979879wer": [
            10485760000,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0
          ]
        },
        "mthHist": {
          "ASDxicvuisodr78w979879wer": [
            10485760000,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0
          ]
        }
      }
    },
    "QueryViewParams": {
      "type": "object",
      "description": "View query attributes as provided by\n[Couchbase](http://docs.couchbase.com/admin/admin/Views/views-querying.html)\n",
      "properties": {
        "descending": {
          "type": "boolean",
          "description": "Return the documents in descending order (by key).",
          "default": false
        },
        "key": {
          "type": "string",
          "description": "Return only documents that match the specified key. Key must be specified as a JSON value.\n"
        },
        "limit": {
          "type": "integer",
          "description": "Limit the number of the returned documents to the specified number.\n"
        },
        "skip": {
          "type": "integer",
          "description": "Skip this number of records before starting to return the results.\n"
        },
        "startkey": {
          "type": "string",
          "description": "Return records with a value equal to or greater than the specified key. Key must be specified as a JSON value.\n"
        },
        "startkey_docid": {
          "type": "string",
          "description": "Return records starting with the specified document Id.\n"
        },
        "endkey": {
          "type": "string",
          "description": "Stop returning records when the specified key is reached. Key must be specified as a JSON value.\n"
        },
        "endkey_docid": {
          "type": "string",
          "description": "Stop returning records when the specified document Id is reached.\n"
        },
        "inclusive_end": {
          "type": "boolean",
          "description": "Specifies whether the specified end key is included in the result. ***Note:*** Do not use `inclusive_end` with `key` or `keys`.\n",
          "default": false
        },
        "stale": {
          "type": "string",
          "description": "Allow records from a stale view to be used. Allowed values are `ok`, `update_after` or `false`.\n",
          "default": "update_after",
          "enum": [
            "ok",
            "update_after",
            "false"
          ]
        },
        "bbox": {
          "type": "string",
          "description": "Specify the bounding box for a spatial query (e.g. `bbox=-180,-90,0,0`)\n"
        },
        "spatial": {
          "type": "boolean",
          "description": "Enable spatial type of query. When querying the file-popularity view,\nthe `start_range` and `end_range` constraints should be specified as\n6-dimensional arrays, with the following fields:\n`[SizeLowerLimit, LastOpenHoursEpochLowerLimit, TotalOpenLowerLimit,\nHoursOpenAvgLowerLimit, DayOpenAvgLowerLimit, MonthOpenAvgLowerLimit]`.\n"
        },
        "start_range": {
          "type": "string",
          "description": "Array specifying the range in spatial queries (e.g. `start_range=[1,0,0,0,0,0]`).\n"
        },
        "end_range": {
          "type": "string",
          "description": "Array specifying the range in spatial queries\n(e.g. `end_range=[null,null,null,null,null,null]`).\n"
        }
      }
    },
    "AtmWorkflowExecutionScheduleRequest": {
      "type": "object",
      "description": "Workflow execution create request.",
      "properties": {
        "spaceId": {
          "type": "string",
          "description": "Id of the space in context of which the workflow will be executed.\n"
        },
        "atmWorkflowSchemaId": {
          "type": "string",
          "description": "Id of the workflow schema."
        },
        "atmWorkflowSchemaRevisionNumber": {
          "type": "string",
          "description": "Number of workflow schema revision describing the tasks and stores for  the workflow.\n"
        },
        "storeInitialContentOverlay": {
          "type": "object",
          "description": "Map with store schema Ids (keys) and corresponding initial content  of the stores.\n",
          "additionalProperties": {}
        },
        "logLevel": {
          "type": "string",
          "description": "Level controling the amount of information recorded in audit logs as only\nlogs with severity equal or higher to this level will be stored. \n",
          "enum": [
            "debug",
            "info",
            "notice",
            "warning",
            "error",
            "critical",
            "alert",
            "emergency"
          ],
          "default": "info"
        },
        "callback": {
          "type": "string",
          "description": "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.\n"
        }
      },
      "required": [
        "spaceId",
        "atmWorkflowSchemaId",
        "atmWorkflowSchemaRevisionNumber"
      ]
    },
    "AtmWorkflowExecutionDetails": {
      "type": "object",
      "description": "Workflow execution details.",
      "properties": {
        "atmWorkflowExecutionId": {
          "type": "string",
          "description": "Id of this workflow execution."
        },
        "atmWorkflowSchemaSnapshotId": {
          "type": "string",
          "description": "Id of the snapshot of the workflow schema describing the tasks\nand stores for this workflow.\n"
        },
        "name": {
          "type": "string",
          "description": "Name of the workflow schema used for this execution."
        },
        "atmInventoryId": {
          "type": "string",
          "description": "Id of automation inventory from which the workflow schema originates."
        },
        "spaceId": {
          "type": "string",
          "description": "Id of the space in context of which the workflow was executed."
        },
        "userId": {
          "type": "string",
          "description": "Id of the scheduling user."
        },
        "status": {
          "type": "string",
          "description": "Overall status of the workflow execution.",
          "enum": [
            "resuming",
            "scheduled",
            "active",
            "stopping",
            "interrupted",
            "paused",
            "finished",
            "crashed",
            "cancelled",
            "failed"
          ]
        },
        "scheduleTime": {
          "type": "integer",
          "description": "Schedule time in seconds (POSIX epoch timestamp)."
        },
        "startTime": {
          "type": "integer",
          "description": "Start time in seconds (POSIX epoch timestamp)."
        },
        "suspendTime": {
          "type": "integer",
          "description": "Suspend time in seconds (POSIX epoch timestamp)."
        },
        "finishTime": {
          "type": "integer",
          "description": "Finish time in seconds (POSIX epoch timestamp)."
        },
        "lambdaSnapshotRegistry": {
          "type": "object",
          "description": "Map with lambda Ids (keys) and corresponding snapshot Ids.",
          "additionalProperties": {
            "type": "string"
          }
        },
        "storeRegistry": {
          "type": "object",
          "description": "Map with store schema Ids (keys) and corresponding store instance Ids.\n",
          "additionalProperties": {
            "type": "string"
          }
        },
        "systemAuditLogStoreId": {
          "type": "string",
          "description": "Id of this execution system audit log store."
        },
        "lanes": {
          "type": "array",
          "description": "Details of lanes in this workflow execution.",
          "items": {
            "type": "object",
            "description": "Basic information about workflow execution's lane.",
            "properties": {
              "schemaId": {
                "type": "string",
                "description": "Id of the lane schema used for this execution."
              },
              "runs": {
                "type": "array",
                "description": "Basic information about lane's runs.",
                "items": {
                  "$ref": "#/definitions/AtmWorkflowExecutionLaneRunDetails"
                }
              }
            }
          }
        }
      },
      "required": [
        "atmWorkflowExecutionId",
        "atmWorkflowSchemaSnapshotId",
        "name",
        "atmInventoryId",
        "spaceId",
        "userId",
        "status",
        "scheduleTime",
        "startTime",
        "suspendTime",
        "finishTime",
        "lambdaSnapshotRegistry",
        "storeRegistry",
        "systemAuditLogStoreId",
        "lanes"
      ],
      "example": {
        "atmWorkflowExecutionId": "11a53ed06d175c89bc3ed5be61f8217cch1890",
        "atmWorkflowSchemaSnapshotId": "821711ad53ed06be61f175c89bc3ed5cch1890",
        "name": "test execution",
        "atmInventoryId": "2d180796daafcf15d586d29dd13dae48chd5fc",
        "spaceId": "c17147cc3188408c26f522881282cb83ch9853",
        "userId": "08c26cc228812c3188417147f582cb83ch9853",
        "status": "enqueued",
        "scheduleTime": 1626107063,
        "startTime": 0,
        "suspendTime": 0,
        "finishTime": 0,
        "lambdaSnapshotRegistry": {
          "e412848d415329d81b7edd15c80b7740chf93f": "3946496fb29e3cf3faa96dbbd58d42d9ch9e3c"
        },
        "storeRegistry": {
          "216a5de15ba9f8f3138168682c3da954212abf": "805392e2b84fb7e6ff5b31b4b7e70845ch1995"
        },
        "systemAuditLogStoreId": "1439ca4dee1a251483923f4535bca500e72f2a",
        "lanes": [
          {
            "schemaId": "3a1a829f714a41b043c4ce67402d8c136f125f",
            "runs": [
              {
                "runNumber": 1,
                "originRunNumber": null,
                "runType": "regular",
                "status": "pending",
                "iteratedStoreId": "1b502545a3f9faa7f1e339f4aea793117be91d",
                "exceptionStoreId": "98c669ec69c0394a38391c0ab0117f67ch260d",
                "parallelBoxes": {
                  "schemaId": "0068146d662adc878f699bf82af08b9ddbd9ab",
                  "taskRegistry": {
                    "d92b861a5edfb08b920e0e80f4670a87f48176": "1697f7c1f46e0e22bb426bead5a3cb47chda3d"
                  }
                },
                "isRetriable": false,
                "isRerunable": false
              }
            ]
          }
        ]
      }
    },
    "AtmWorkflowExecutionLaneRunDetails": {
      "type": "object",
      "description": "Workflow execution lane run details.",
      "properties": {
        "runNumber": {
          "type": "integer",
          "description": "Number of workflow execution run in which this lane run is included.  When prepared in advance, this value is `null`, as the specific number  is not yet known.\n"
        },
        "originRunNumber": {
          "type": "integer",
          "description": "Number of workflow execution lane run on which this lane run is based  in case of repeat (either rerun or retry) or `null` otherwise.\n"
        },
        "runType": {
          "type": "string",
          "description": "Type of lane run.",
          "enum": [
            "regular",
            "rerun",
            "retry"
          ]
        },
        "status": {
          "type": "string",
          "description": "Overall status of the lane run.",
          "enum": [
            "resuming",
            "scheduled",
            "preparing",
            "enqueued",
            "active",
            "stopping",
            "interrupted",
            "paused",
            "finished",
            "crashed",
            "cancelled",
            "failed"
          ]
        },
        "iteratedStoreId": {
          "type": "string",
          "description": "Id of this lane run iterated store."
        },
        "exceptionStoreId": {
          "type": "string",
          "description": "Id of this lane run exception store."
        },
        "parallelBoxes": {
          "type": "array",
          "description": "Details of parallel boxes in this lane run.",
          "items": {
            "type": "object",
            "description": "Basic information about parallel box.",
            "properties": {
              "schemaId": {
                "type": "string",
                "description": "Id of the parallel box schema used for this execution."
              },
              "taskRegistry": {
                "type": "object",
                "description": "Map with task schema Ids (keys) and corresponding task execution Ids.\n",
                "additionalProperties": {
                  "type": "string"
                }
              }
            }
          }
        },
        "isRetriable": {
          "type": "boolean",
          "description": "Indicates whether this lane execution run can be retried or not."
        },
        "isRerunable": {
          "type": "boolean",
          "description": "Indicates whether this lane execution run can be rerun or not."
        }
      },
      "required": [
        "runNumber",
        "originRunNumber",
        "runType",
        "status",
        "iteratedStoreId",
        "exceptionStoreId",
        "parallelBoxes",
        "isRetriable",
        "isRerunable"
      ],
      "example": {
        "runNumber": 3,
        "originRunNumber": 1,
        "runType": "retry",
        "status": "pending",
        "iteratedStoreId": "1b502545a3f9faa7f1e339f4aea793117be91d",
        "exceptionStoreId": "98c669ec69c0394a38391c0ab0117f67ch260d",
        "parallelBoxes": {
          "schemaId": "0068146d662adc878f699bf82af08b9ddbd9ab",
          "taskRegistry": {
            "d92b861a5edfb08b920e0e80f4670a87f48176": "1697f7c1f46e0e22bb426bead5a3cb47chda3d"
          }
        },
        "isRetriable": false,
        "isRerunable": false
      }
    }
  },
  "tags": [
    {
      "name": "Oneprovider",
      "description": "Information about the Oneprovider service."
    },
    {
      "name": "Space",
      "description": "Spaces related operations."
    },
    {
      "name": "View",
      "description": "Views related operations."
    },
    {
      "name": "File Path Resolution",
      "description": "Files and Directories path resolution operations."
    },
    {
      "name": "Basic File Operations",
      "description": "Files and Directories basic operations."
    },
    {
      "name": "File Distribution",
      "description": "Operations concerning file distribution."
    },
    {
      "name": "Custom File Metadata",
      "description": "Files and Directories custom metadata related operations."
    },
    {
      "name": "Miscellaneous",
      "description": "Miscellaneous operations related to file management."
    },
    {
      "name": "Share",
      "description": "Shares related operations."
    },
    {
      "name": "Dataset",
      "description": "Datasets related operations."
    },
    {
      "name": "Archive",
      "description": "Archives related operations."
    },
    {
      "name": "QoS",
      "description": "QoS related operations."
    },
    {
      "name": "Transfer",
      "description": "Transfers related operations."
    },
    {
      "name": "Workflow execution",
      "description": "Workflow executions related operations."
    },
    {
      "name": "Monitoring",
      "description": "Metrics and change events monitoring related operations."
    }
  ],
  "x-tagGroups": [
    {
      "name": "Space management",
      "tags": [
        "Space",
        "View"
      ]
    },
    {
      "name": "File access & management",
      "tags": [
        "File Path Resolution",
        "Basic File Operations",
        "Custom File Metadata",
        "Miscellaneous"
      ]
    },
    {
      "name": "Replica & QoS management",
      "tags": [
        "File Distribution",
        "Transfer",
        "QoS"
      ]
    },
    {
      "name": "Share management",
      "tags": [
        "Share"
      ]
    },
    {
      "name": "Dataset & archive management",
      "tags": [
        "Dataset",
        "Archive"
      ]
    },
    {
      "name": "Automation",
      "tags": [
        "Workflow execution"
      ]
    },
    {
      "name": "Monitoring & metrics",
      "tags": [
        "Monitoring"
      ]
    },
    {
      "name": "Service information",
      "tags": [
        "Oneprovider"
      ]
    }
  ],
  "securityDefinitions": {
    "api_key1": {
      "type": "apiKey",
      "name": "X-Auth-Token",
      "in": "header"
    },
    "api_key2": {
      "type": "apiKey",
      "name": "Authorization",
      "in": "header"
    }
  },
  "security": [
    {
      "api_key1": []
    },
    {
      "api_key2": []
    }
  ]
}
