{
  "swagger": "2.0",
  "basePath": "/api/v3/oneprovider",
  "info": {
    "version": "20.02.2",
    "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 [CDMI](http://onedata.org/#/home/documentation/doc/advanced/cdmi.html) protocol,\nand some of data management operations are currently only possible via CDMI.\n\n\n## Authentication\nIn order to be able to use this API the REST client must be able to authenticate with the Oneprovider service.\n\nCurrently this is supported through authentication token which can be generate using the Onedata user interface.\nThe token must be added to the request header like this:\n```\nX-Auth-Token: LAKSJHDLKJAHSDKLJHASKLCBBASKLCBLHABSCBALKSBCK...\n```\nIn case this Onedata deployment supports authentication delegation other IdP's,\nthe `X-Auth-Token` field can contain token from such IdP with appropriate prefix,\nas configured by Onezone administrators, e.g.:\n```\n  X-Auth-Token: github:GST5aasdA7asdAASFG7asdasaAS\n```\nIn addition please take into account, that depending on your account authorization rights, not all operations\nmay be possible.\n\n## API structure\nThe Oneprovider API reflects the fact that most operations deal directly with virtual file paths relative to\nuser spaces, which are provided as part of the paths in the REST calls.\n\nThe API provides the following functionality:\n\n### Data\n\n#### File information\nThe `/data/` path methods provide basic capability for:\n  - browsing files in spaces and directories,\n  - querying for file attributes, such as 'mode' file permissions and updating them,\n  - managing file metadata.\n\n#### Share information\nThe `/share/` methods enable creating, modyfying and deleting shares.\nShares are directories that were made publicly available, so they can be viewed by everyone\nthrough public URL.\n\n#### Space information\nThe `/space/` methods provide means for getting basic information about\nspaces directly from the Oneprovider service but also allows to define views and\nlist transfers for specified space.\n\n### Replication\n\n#### Replica management\nThe `/replicas/` methods allow retrieving information about file replica distribution\namong Onedata providers as well as requesting specific file replication to selected\nproviders.\n\n#### Transfer management\nThe `/transfer/` operations provide basic transfer management functionality based on the Id of transfer\nreturned by `/replicas/{path} [POST]` operation.\n\n### Monitoring\n\n#### Changes subscription\nThe `/changes/` method group 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#### Monitoring metrics\nThe `/metrics/` operations enable retrieval of internal Oneprovider monitoring data.\nAll monitoring data is returned in the form of [RRD](http://oss.oetiker.ch/rrdtool/)\ndatabase files, with resolution determined by the `step` query parameter.\n\n## Examples\n\n**Create replica of file at specific storage provider**\n```bash\ncurl -v --tlsv1.2 -H \"X-Auth-Token: $TOKEN\" -X POST \\\n\"https://$PROVIDER/api/v3/oneprovider/replicas/MySpace1/MyFile2.txt?provider_id=$PROVIDER_ID\"\n```\n\n**Get space storage qouta metric**\n```bash\ncurl -v --tlsv1.2 -H \"X-Auth-Token: $TOKEN\" -X GET \\\n\"https://$PROVIDER/api/v3/oneprovider/metrics/space/MySpace1?metric=storage_qouta\"\n```\n\nMore detailed examples are available in the documentation of each operation.\n",
    "x-bash-codegen-description": "This is the RESTful API definition of Oneprovider component of Onedata data\nmanagement system [onedata.org](http://onedata.org).\n\n\n## Authentication\nIn order to be able to use this API the REST client must be able to\nauthenticate with the Oneprovider service.\n\nCurrently this is supported through authentication token which can be\ngenerate using the Onedata user interface. The token must be added to the\nrequest header like this:\n```\nX-Auth-Token: LAKSJHDLKJAHSDKLJHASKLCBBASKLCBLHABSCBALKSBCK\n```\nor exported as an environment variable:\n```\nexport ONEPROVIDER_API_KEY=LAKSJHDLKJAHSDKLJHASKLCBBASKLCBLHABSCBALKSBCK\n```\n\nIn addition please take into account, that depending on your account\nauthorization rights, not all operations may be possible.\n\n## API structure\nThe Oneprovider API reflects the fact that most operations deal directly\nwith virtual file paths relative to user spaces, which are provided as part\nof the paths in the REST calls.\n\nThe API provides the following functionality:\n\n### Data\n\n#### File information\nThe `/data/` path methods provide basic capability for:\n  - browsing files in spaces and directories,\n  - querying for file attributes, such as 'mode' file permissions and updating them,\n  - managing file metadata.\n\n#### Share information\nThe `/share/` methods enable creating, modyfying and deleting shares.\nShares are directories that were made publicly available, so they can be viewed by everyone\nthrough public URL.\n\n#### Space information\nThe `/space/` methods provide means for getting basic information about\nspaces directly from the Oneprovider service but also allows to define views and\nlist transfers for specified space.\n\n### Replication\n\n#### Replica management\nThe `/replicas/` methods allow retrieving information about file replica distribution\namong Onedata providers as well as requesting specific file replication to selected\nproviders.\n\n#### Transfer management\nThe `/transfer/` operations provide basic transfer management functionality based on the Id of transfer\nreturned by `/replicas/{path} [POST]` operation.\n\n### Monitoring\n\n#### Changes subscription\nThe `/changes/` method group 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#### Monitoring metrics\nThe `/metrics/` operations enable retrieval of internal Oneprovider monitoring data.\nAll monitoring data is returned in the form of [RRD](http://oss.oetiker.ch/rrdtool/)\ndatabase files, with resolution determined by the `step` query parameter.\n\n## Examples\n\n**Create replica of file at specific storage provider**\n```bash\ncurl -v --tlsv1.2 -H \"X-Auth-Token: $TOKEN\" -X POST \\\n\"https://$PROVIDER/api/v3/oneprovider/replicas/MySpace1/MyFile2.txt?provider_id=$PROVIDER_ID\"\n```\n\n**Get space storage qouta metric**\n```bash\ncurl -v --tlsv1.2 -H \"X-Auth-Token: $TOKEN\" -X GET \\\n\"https://$PROVIDER/api/v3/oneprovider/metrics/space/MySpace1?metric=storage_qouta\"\n```\n\nMore detailed examples 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 \"https://$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": "Configuration returned successfully.",
            "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"
            }
          }
        }
      }
    },
    "/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 -X GET -H \"X-Auth-Token: $TOKEN\" \\\n\"https://$HOST/api/v3/oneprovider/spaces\"\n\n[\n  {\n    \"spaceId\": \"51306215-674a-47b7-afd1-54fa45bcaff7\",\n    \"name\": \"Space1\"\n  },\n  {\n    \"spaceId\": \"0a568302-0f5e-454d-a6bc-7da7e1bfb985\",\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."
                  }
                }
              }
            }
          },
          "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 -X GET -H \"X-Auth-Token: $TOKEN\" \\\n\"https://$HOST/api/v3/oneprovider/spaces/$SPACE_ID\"\n\n{\n    \"name\": \"My Space 1\",\n    \"providers\": [\n        {\n            \"providerId\": \"51306215-674a-47b7-afd1-54fa45bcaff7\",\n            \"providerName\": \"MyPrivateCloud\"\n        },\n        {\n            \"providerId\": \"0a568302-0f5e-454d-a6bc-7da7e1bfb985\",\n            \"providerName\": \"PublicCloud1\"\n        }\n    ],\n    \"spaceId\": \"8f4b1e94-fdf8-4754-9962-edb01b2ee0f7\"\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 is present in the response, 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 is present in the response, 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 -X GET -H \"X-Auth-Token: $TOKEN\" \\\n\"https://$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, nextPageToken is present when there is more to list.",
            "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
          },
          {
            "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\" -X GET \\\nhttps://$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\" -X PUT \\\n-H \"Content-type: application/javascript\" \\\n-d \"@./my_improved_view1.js\" \\\nhttps://$HOST/api/v3/oneprovider/spaces/$SPACE_ID/views/$VIEW_NAME?spatial=false&providers[]=$PROVIDER_ID_1&providers[]=$PROVIDER_ID_2\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\" -X PATCH \\\n-H \"Content-type: application/javascript\" \\\nhttps://$HOST/api/v3/oneprovider/spaces/$SPACE_ID/views/$VIEW_NAME?update_min_changes=10\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\" -X DELETE \\\nhttps://$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\" -X PUT \\\n-H \"Content-type: application/javascript\" \\\n-d \"@./my_improved_reduce_fun.js\" \\\nhttps://$HOST/api/v3/oneprovider/spaces/$SPACE_ID/views/$VIEW_NAME/reduce\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\" -X DELETE \\\nhttps://$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\" -X GET \\\nhttps://$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\" -X GET \\\nhttps://$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 -sSk -X GET -H \"X-Auth-Token: $TOKEN\" \"https://$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 returned successfully.",
            "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 -X POST -H \"X-Auth-Token: $TOKEN\" \\\n\"https://$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": {
      "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 [$FILE_ID](#operation/lookup_file_id).\n",
        "description": "Returns the list of directory files and subdirectories for directory\nspecified by [$FILE_ID](#operation/lookup_file_id).\n\n***Example cURL requests***\n\n**Get files in space subdirectory**\n```bash\ncurl -X GET -H \"X-Auth-Token: $TOKEN\" \\\n\"https://$HOST/api/v3/oneprovider/data/$DIR_ID/children\"\n\n{\n  \"children\": [\n    {\n      \"id\": \"00000000005CF4706775696423745F772D67686431633765446F4D76546D6F2D67575F3361737A7670486B477A7936587734507265584A7723394A4F355F5F396E4C31623031594576776E667431723230677767776C6B497031394E445F6E3868677873\",\n      \"name\": \"File1.txt\"\n    },\n    {\n      \"id\": \"00000000006CB6637368617265477569642333396432363661656463656266666164353939663761373734313235363166342336656331613534313362366634653262303161356338356138666437393765322331663462373632623133383039343665\",\n      \"name\": \"Dir2\"\n    }\n  ]\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 to specify maximum number of files that should be returned. If there are more files, they can be retrieved using `index` and `offset` query parameters.\n",
            "type": "integer",
            "required": false,
            "maximum": 1000,
            "minimum": 1,
            "default": 1000
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Index of the partial result, can be used to get subset of the result, when the number of files and directories under given path exceeds 1000.\n",
            "type": "integer",
            "required": false,
            "default": 0
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli listChildren id=$FILE_ID limit=100 offset=300"
          }
        ]
      }
    },
    "/data/{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 -X GET -H \"X-Auth-Token: $TOKEN\" \\\n\"https://$HOST/api/v3/oneprovider/data/$FILE_ID?attribute=size\"\n\n{\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. When accessing file via share mode following attributes are unavailable: `owner_id`, `storage_group_id`, `storage_user_id`, `provider_id`\n",
            "type": "string",
            "enum": [
              "name",
              "owner_id",
              "type",
              "mode",
              "size",
              "atime",
              "mtime",
              "ctime",
              "storage_group_id",
              "storage_user_id",
              "shares",
              "provider_id",
              "file_id"
            ],
            "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 -X PUT -H \"X-Auth-Token: $TOKEN\" \\\n-H 'Content-type: application/json' -d '{ \"mode\": \"0777\" }'\n\"https://$HOST/api/v3/oneprovider/data/$FILE_ID\"\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}/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 a specific file distribution among different storage\nproviders. Each provider is associated with a list of byte ranges (specified\nas a list of pairs [offset, size]), which describe which blocks of given\nfile are stored at this provider.\n",
        "description": "Returns information about a specific file distribution among different storage\nproviders. Each provider is associated with a list of byte ranges (specified\nas a list of pairs [offset, size]), which describe which blocks of given\nfile are stored at this provider.\n\n***Example cURL requests***\n\n**Get file distribution**\n```bash\ncurl -X GET -H \"X-Auth-Token: $TOKEN\" \\\n\"https://$HOST/api/v3/oneprovider/data/$FILE_ID/distribution\"\n\n[\n  {\n    \"blocks\": [ [ 0, 4 ], [ 10, 20 ] ],\n    \"providerId\": \"57ecb305-a097-4243-bd03-a995e78ab206\"\n  },\n  {\n    \"blocks\": [ [ 5, 9 ] ],\n    \"providerId\": \"7dedd2c7-dc58-4e62-925e-94663faa70fc\"\n  }\n]\n```\n",
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "The list of file blocks stored at each provider.",
            "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}/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\" -X GET \\\nhttps://$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 returned successfully.",
            "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
          }
        ],
        "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\" -X PUT \\\n-H \"Content-type: application/json\" \\\n-d '{ \"key1\": { \"key2\": [\"val1\", \"val2\", \"val3\", \"val4\"] } }'\nhttps://$HOST/api/v3/oneprovider/data/$FILE_ID/metadata/json\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"
            }
          }
        ],
        "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**Removes file json metadata**\n```bash\ncurl -X DELETE -H \"X-Auth-Token: $TOKEN\" https://$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
          }
        ],
        "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\" -X GET \\\nhttps://$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 returned successfully.",
            "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
          }
        ],
        "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\" -X PUT \\\n-H \"Content-type: application/rdf+xml\" \\\n-d \"@./space1_dublincore.rdf\"\nhttps://$HOST/api/v3/oneprovider/data/$FILE_ID/metadata/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"
            }
          }
        ],
        "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**Removes file rdf metadata**\n```bash\ncurl -X DELETE -H \"X-Auth-Token: $TOKEN\" https://$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
          }
        ],
        "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\" -X GET \\\n\"https://$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
          }
        ],
        "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 -X PUT -H \"X-Auth-Token: $TOKEN\" \\\n-H 'Content-type: application/json' -d '{ \"license\": \"CC-0\" }' \\\n\"https://$HOST/api/v3/oneprovider/data/$FILE_ID/metadata/xattrs\"\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"
              }
            }
          }
        ],
        "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**Removes specific file xattrs**\n```bash\ncurl -X DELETE -H \"X-Auth-Token: $TOKEN\"\n-H 'Content-type: application/json' -d '{ \"keys\": [\"license\"] }' \\\nhttps://$HOST/api/v3/oneprovider/data/$FILE_ID/metadata/xattrs\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"
                  }
                }
              }
            }
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli removeXattrs id=$FILE_ID keys=='[\"license\"]'"
          }
        ]
      }
    },
    "/data/register": {
      "post": {
        "operationId": "register_file",
        "x-onedata-parse_body": "as_json_params",
        "x-onedata-gri": {
          "type": "op_file",
          "aspect": "register_file"
        },
        "tags": [
          "File registration"
        ],
        "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 -X POST -H \"X-Auth-Token: $TOKEN\" \\\n-H 'Content-type: application/json' -d \"@./file_spec.json\" \\\n\"https://$HOST/api/v3/oneprovider/data/register\"\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://$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"
          }
        ]
      }
    },
    "/files/{path}": {
      "get": {
        "deprecated": true,
        "operationId": "list_files",
        "x-onedata-gri": {
          "type": "op_file",
          "id": "?PATH_BINDING",
          "aspect": "list"
        },
        "tags": [
          "Deprecated File Api"
        ],
        "summary": "List files and directories (deprecated)",
        "x-bash-codegen-description": "This enpoint is deprecated, please use [this one](#operation/list_dir_children).\n\nReturns the list of directories and files directly under specified path.\n\nIf the path points to a file, the result array will consist only of the\nsingle item with the path to the file requested, confirming it exists.\n",
        "description": "This enpoint is deprecated, please use [this one](#operation/list_dir_children).\n\nReturns the list of directories and files directly under specified path.\n\nIf the path points to a file, the result array will consist only of the\nsingle item with the path to the file requested, confirming it exists.\n\n***Example cURL requests***\n\n**Get files in space subdirectory**\n```bash\ncurl -X GET -H \"X-Auth-Token: $TOKEN\" \\\n\"https://$HOST/api/v3/oneprovider/files/MySpace1/MyDir2\"\n\n[\n  {\n    \"id\": \"c4798eb2-dbd2-486f-ae94-0e6fa0a5071d\",\n    \"path\": \"/MySpace1/MyDir2/File1.txt\"\n  },\n  {\n    \"id\": \"620e1642-4f2d-45f2-b4eb-37f8a958b46f\",\n    \"path\": \"/MySpace1/MyDir2/Dir3\"\n  },\n  {\n    \"id\": \"55ac4ed3-a723-47ab-a892-638578b9cad7\",\n    \"path\": \"/MySpace1/MyDir2/File3.txt\"\n  }\n]\n```\n",
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "The list of files and directories under specified path.",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/FilePath"
              }
            }
          },
          "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": "Directory path (e.g. '/MySpace/testfiles')",
            "type": "string",
            "required": true
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Allows to specify maximum number of files that should be returned. If there are more files, they can be retrieved using `offset` query parameter.\n",
            "type": "integer",
            "required": false,
            "maximum": 1000,
            "minimum": 1,
            "default": 1000
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Index of the partial result, can be used to get subset of the result, when the number of files and directories under given path exceeds 1000.\n",
            "type": "integer",
            "required": false,
            "minimum": 0
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli listFiles path='/MySpace/testfiles' limit=100 offset=300"
          }
        ]
      }
    },
    "/files-id/{id}": {
      "get": {
        "deprecated": true,
        "operationId": "list_files_by_id",
        "x-onedata-gri": {
          "type": "op_file",
          "id": "?OBJECTID_BINDING(id)",
          "aspect": "list"
        },
        "tags": [
          "Deprecated File Api"
        ],
        "summary": "List files and directories by Id (deprecated)",
        "x-bash-codegen-description": "This enpoint is deprecated, please use [this one](#operation/list_dir_children).\n\nReturns the list of directories and files directly under directory specified by Id.\n\nIf the Id points to a file, the result array will consist only of the\nsingle item with the path to the file requested, confirming it exists.\n",
        "description": "This enpoint is deprecated, please use [this one](#operation/list_dir_children).\n\nReturns the list of directories and files directly under directory specified by Id.\n\nIf the Id points to a file, the result array will consist only of the\nsingle item with the path to the file requested, confirming it exists.\n\n***Example cURL requests***\n\n**Get files in space subdirectory**\n```bash\ncurl -X GET -H \"X-Auth-Token: $TOKEN\" \\\n\"https://$HOST/api/v3/oneprovider/files-id/$FILE_ID\"\n\n[\n  {\n    \"id\": \"c4798eb2-dbd2-486f-ae94-0e6fa0a5071d\",\n    \"path\": \"/MySpace1/MyDir2/File1.txt\"\n  },\n  {\n    \"id\": \"620e1642-4f2d-45f2-b4eb-37f8a958b46f\",\n    \"path\": \"/MySpace1/MyDir2/Dir33\"\n  },\n  {\n    \"id\": \"55ac4ed3-a723-47ab-a892-638578b9cad7\",\n    \"path\": \"/MySpace1/MyDir2/File3.txt\"\n  }\n]\n```\n",
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "The list of files and directories under specified path.",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/FilePath"
              }
            }
          },
          "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 file.",
            "type": "string",
            "required": true
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Allows to specify maximum number of files that should be returned. If there are more files, they can be retrieved using `offset` query parameter.\n",
            "type": "integer",
            "required": false,
            "maximum": 1000,
            "minimum": 1,
            "default": 1000
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Index of the partial result, can be used to get subset of the result, when the number of files and directories under given path exceeds 1000.\n",
            "type": "integer",
            "required": false,
            "minimum": 0
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli listFilesById id=$FILE_ID limit=100 offset=300"
          }
        ]
      }
    },
    "/metadata/attrs/{path}": {
      "get": {
        "deprecated": true,
        "operationId": "get_file_attrs",
        "x-onedata-gri": {
          "type": "op_file",
          "id": "?PATH_BINDING",
          "aspect": "attrs"
        },
        "summary": "Get file attributes (deprecated)",
        "tags": [
          "Deprecated File Api"
        ],
        "x-bash-codegen-description": "This enpoint is deprecated, please use [this one](#operation/get_attrs).\n\nThis method returns the selected attributes associated with specified file, directory or space.\n",
        "description": "This enpoint is deprecated, please use [this one](#operation/get_attrs).\n\nThis method returns the selected attributes associated with specified file, directory or space.\n\n***Example cURL requests***\n\n**Get file POSIX mode**\n```bash\ncurl -X GET -H \"X-Auth-Token: $TOKEN\" \\\n\"https://$HOST/api/v3/oneprovider/metadata/attrs/MySpace1/File2.txt?attribute=mode\"\n\n{\n  \"mode\": \"0777\"\n}\n```\n",
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Returns the requested file 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": "path",
            "in": "path",
            "description": "File or directory path or space name (e.g. '/MySpace/testfiles/file1.txt')",
            "type": "string",
            "required": true
          },
          {
            "name": "attribute",
            "in": "query",
            "description": "Type of attribute to query for.",
            "type": "string",
            "required": false,
            "enum": [
              "name",
              "owner_id",
              "type",
              "mode",
              "size",
              "atime",
              "mtime",
              "ctime",
              "storage_group_id",
              "storage_user_id",
              "shares",
              "file_id"
            ]
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli getFileAttrs path='/MySpace/testfiles/file1.txt'"
          }
        ]
      },
      "put": {
        "deprecated": true,
        "operationId": "set_file_attr",
        "x-onedata-parse_body": "as_json_params",
        "x-onedata-gri": {
          "type": "op_file",
          "id": "?PATH_BINDING",
          "aspect": "attrs"
        },
        "summary": "Set file attribute (deprecated)",
        "tags": [
          "Deprecated File Api"
        ],
        "x-bash-codegen-description": "This enpoint is deprecated, please use [this one](#operation/set_attr).\n\nThis method allows to set a value of a regular file attribute.\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 enpoint is deprecated, please use [this one](#operation/set_attr).\n\nThis method allows to set a value of a regular file attribute.\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 -X PUT -H \"X-Auth-Token: $TOKEN\" \\\n-H 'Content-type: application/json' -d '{ \"mode\": \"0777\" }'\n\"https://$HOST/api/v3/oneprovider/metadata/attrs/MySpace1/File2.txt\"\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": "path",
            "in": "path",
            "description": "File or directory path or space name (e.g. '/MySpace/testfiles/file1.txt')",
            "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 setFileAttr path='/MySpace/testfiles/file1.txt' -"
          }
        ]
      }
    },
    "/metadata/xattrs/{path}": {
      "get": {
        "deprecated": true,
        "operationId": "get_file_xattrs",
        "x-onedata-gri": {
          "type": "op_file",
          "id": "?PATH_BINDING",
          "aspect": "xattrs"
        },
        "summary": "Get file extended attributes (deprecated)",
        "tags": [
          "Deprecated File Api"
        ],
        "x-bash-codegen-description": "This enpoint is deprecated, please use [this one](#operation/get_xattrs).\n\nThis method returns the selected extended attributes associated with specified file, directory or space.\n",
        "description": "This enpoint is deprecated, please use [this one](#operation/get_xattrs).\n\nThis method returns the selected extended attributes associated with specified file, directory or space.\n\n***Example cURL requests***\n\n**Get extended file attributes**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" -X GET \\\n\"https://$HOST/api/v3/oneprovider/metadata/xattrs/MySpace1/File2.txt?extended=true&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": "path",
            "in": "path",
            "description": "File or directory path or space name (e.g. '/MySpace/testfiles/file1.txt')",
            "type": "string",
            "required": true
          },
          {
            "name": "attribute",
            "in": "query",
            "description": "Type 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
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli getFileXattrs path='/MySpace/testfiles/file1.txt'"
          }
        ]
      },
      "put": {
        "deprecated": true,
        "operationId": "set_file_xattr",
        "x-onedata-parse_body": "{as_is, <<\"metadata\">>}",
        "x-onedata-gri": {
          "type": "op_file",
          "id": "?PATH_BINDING",
          "aspect": "xattrs"
        },
        "summary": "Set file extended attribute (deprecated)",
        "tags": [
          "Deprecated File Api"
        ],
        "x-bash-codegen-description": "This enpoint is deprecated, please use [this one](#operation/set_xattr).\n\nThis method allows to set a value of a specified extended file attribute\nleaving other ones intact.\n",
        "description": "This enpoint is deprecated, please use [this one](#operation/set_xattr).\n\nThis method allows to set a value of a specified extended file attribute\nleaving other ones intact.\n\n***Example cURL requests***\n\n**Set extended file attribute**\n```bash\ncurl -X PUT -H \"X-Auth-Token: $TOKEN\" \\\n-H 'Content-type: application/json' -d '{ \"license\": \"CC-0\" }' \\\n\"https://$HOST/api/v3/oneprovider/metadata/xattrs/MySpace1/File2.txt?extended=true\"\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": "path",
            "in": "path",
            "description": "File or directory path or space name (e.g. '/MySpace/testfiles/file1.txt')",
            "type": "string",
            "required": true
          },
          {
            "name": "metadata",
            "in": "body",
            "description": "Extended attribute name and value.",
            "schema": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            }
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli setFileXattr path='/MySpace/testfiles/file1.txt' license==CC-0"
          }
        ]
      }
    },
    "/metadata/json/{path}": {
      "get": {
        "deprecated": true,
        "operationId": "get_file_json_metadata",
        "x-onedata-gri": {
          "type": "op_file",
          "id": "?PATH_BINDING",
          "aspect": "json_metadata"
        },
        "summary": "Get file json metadata (deprecated)",
        "tags": [
          "Deprecated File Api"
        ],
        "x-bash-codegen-description": "This enpoint is deprecated, please use [this one](#operation/get_json_metadata).\n\nThis method returns the json metadata associated with specified file, directory or space.\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 enpoint is deprecated, please use [this one](#operation/get_json_metadata).\n\nThis method returns the json metadata associated with specified file, directory or space.\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\n***Example cURL requests***\n\n**Get specific JSON value from metadata document**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" -X GET \\\nhttps://$HOST/api/v3/oneprovider/metadata/json/MySpace1/File2.txt?filter_type=keypath&filter=key1.key2.[2].key3\n```\n",
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "JSON metadata returned successfully.",
            "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": "path",
            "in": "path",
            "description": "File or directory path or space name (e.g. '/MySpace/testfiles/file1.txt')",
            "type": "string",
            "required": true
          },
          {
            "name": "filter_type",
            "in": "query",
            "description": "The type of filter to apply to the metadata document.",
            "type": "string",
            "required": false
          },
          {
            "name": "filter",
            "in": "query",
            "description": "The filter to apply to the metadata document before returning.",
            "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
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli getFileJsonMetadata path='/MySpace/testfiles/file1.txt' inherited=false"
          }
        ]
      },
      "put": {
        "deprecated": true,
        "operationId": "set_file_json_metadata",
        "x-onedata-parse_body": "{as_is, <<\"metadata\">>}",
        "x-onedata-gri": {
          "type": "op_file",
          "id": "?PATH_BINDING",
          "aspect": "json_metadata"
        },
        "summary": "Set file json metadata (deprecated)",
        "tags": [
          "Deprecated File Api"
        ],
        "x-bash-codegen-description": "This enpoint is deprecated, please use [this one](#operation/set_json_metadata).\n\nThis method allows to set json metadata for a file, directory or\nspace specified in the request path.\n\nThis operation will replace the previous json metadata if any.\n",
        "description": "This enpoint is deprecated, please use [this one](#operation/set_json_metadata).\n\nThis method allows to set json metadata for a file, directory or\nspace specified in the request path.\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\" -X PUT \\\n-H \"Content-type: application/json\" \\\n-d '{ \"key1\": { \"key2\": [\"val1\", \"val2\", \"val3\", \"val4\"] } }'\nhttps://$HOST/api/v3/oneprovider/metadata/json/MySpace1/File2.txt\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": "path",
            "in": "path",
            "description": "File or directory path or space name (e.g. '/MySpace/testfiles/file1.txt')",
            "type": "string",
            "required": true
          },
          {
            "name": "filter_type",
            "in": "query",
            "description": "The type of filter to apply to the metadata document.",
            "type": "string",
            "required": false
          },
          {
            "name": "filter",
            "in": "query",
            "description": "The filter allowing to set specific metadata document key. Required if filter_type is specified.",
            "type": "string",
            "required": false
          },
          {
            "name": "metadata",
            "in": "body",
            "description": "The json metadata.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "cat metadata.json | oneprovider-rest-cli setFileJsonMetadata path='/MySpace/testfiles/file1.txt' -"
          }
        ]
      }
    },
    "/metadata/rdf/{path}": {
      "get": {
        "deprecated": true,
        "operationId": "get_file_rdf_metadata",
        "x-onedata-gri": {
          "type": "op_file",
          "id": "?PATH_BINDING",
          "aspect": "rdf_metadata"
        },
        "summary": "Get file rdf metadata (deprecated)",
        "tags": [
          "Deprecated File Api"
        ],
        "x-bash-codegen-description": "This enpoint is deprecated, please use [this one](#operation/get_rdf_metadata).\n\nThis method returns the rdf metadata associated with specified file, directory or space.\n",
        "description": "This enpoint is deprecated, please use [this one](#operation/get_rdf_metadata).\n\nThis method returns the rdf metadata associated with specified file, directory or space.\n\n***Example cURL requests***\n\n**Get complete RDF metadata document for File2.txt**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" -X GET \\\nhttps://$HOST/api/v3/oneprovider/metadata/rdf/MySpace1/File2.txt\n```\n",
        "produces": [
          "application/rdf+xml"
        ],
        "responses": {
          "200": {
            "description": "Rdf metadata returned successfully.",
            "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": "path",
            "in": "path",
            "description": "File or directory path or space name (e.g. '/MySpace/testfiles/file1.txt')",
            "type": "string",
            "required": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli getFileRdfMetadata path='/MySpace/testfiles/file1.txt'"
          }
        ]
      },
      "put": {
        "deprecated": true,
        "operationId": "set_file_rdf_metadata",
        "x-onedata-parse_body": "{as_is, <<\"metadata\">>}",
        "x-onedata-gri": {
          "type": "op_file",
          "id": "?PATH_BINDING",
          "aspect": "rdf_metadata"
        },
        "summary": "Set file rdf metadata (deprecated)",
        "tags": [
          "Deprecated File Api"
        ],
        "x-bash-codegen-description": "This enpoint is deprecated, please use [this one](#operation/set_rdf_metadata).\n\nThis method allows to set specific rdf metadata for a file, directory or\nspace specified in the request path.\n\nThis operation will replace the previous rdf metadata if any.\n",
        "description": "This enpoint is deprecated, please use [this one](#operation/set_rdf_metadata).\n\nThis method allows to set specific rdf metadata for a file, directory or\nspace specified in the request path.\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\" -X PUT \\\n-H \"Content-type: application/rdf+xml\" \\\n-d \"@./space1_dublincore.rdf\"\nhttps://$HOST/api/v3/oneprovider/metadata/rdf/MySpace1\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": "path",
            "in": "path",
            "description": "File or directory path or space name (e.g. '/MySpace/testfiles/file1.txt')",
            "type": "string",
            "required": true
          },
          {
            "name": "metadata",
            "in": "body",
            "description": "The rdf metadata.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "cat metadata.rdf | oneprovider-rest-cli setFileRdfMetadata path='/MySpace/testfiles/file1.txt' -"
          }
        ]
      }
    },
    "/metadata-id/attrs/{id}": {
      "get": {
        "deprecated": true,
        "operationId": "get_file_attrs_by_id",
        "x-onedata-gri": {
          "type": "op_file",
          "id": "?OBJECTID_BINDING(id)",
          "aspect": "attrs"
        },
        "summary": "Get file attributes by Id (deprecated)",
        "tags": [
          "Deprecated File Api"
        ],
        "x-bash-codegen-description": "This enpoint is deprecated, please use [this one](#operation/get_attrs).\n\nThis method returns the selected attributes associated with specified file, directory or space by Id.\n",
        "description": "This enpoint is deprecated, please use [this one](#operation/get_attrs).\n\nThis method returns the selected attributes associated with specified file, directory or space by Id.\n\n***Example cURL requests***\n\n**Get file POSIX mode**\n```bash\ncurl -X GET -H \"X-Auth-Token: $TOKEN\" \\\n\"https://$HOST/api/v3/oneprovider/metadata-id/attrs/$FILE_ID?attribute=mode\"\n\n{\n  \"mode\": \"0777\"\n}\n```\n",
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Returns the requested file 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": "File, directory or space Id",
            "type": "string",
            "required": true
          },
          {
            "name": "attribute",
            "in": "query",
            "description": "Type of attribute to query for.",
            "type": "string",
            "required": false,
            "enum": [
              "name",
              "owner_id",
              "type",
              "mode",
              "size",
              "atime",
              "mtime",
              "ctime",
              "storage_group_id",
              "storage_user_id",
              "shares",
              "file_id"
            ]
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli getFileAttrsById id=$FILE_ID"
          }
        ]
      },
      "put": {
        "deprecated": true,
        "operationId": "set_file_attr_by_id",
        "x-onedata-parse_body": "as_json_params",
        "x-onedata-gri": {
          "type": "op_file",
          "id": "?OBJECTID_BINDING(id)",
          "aspect": "attrs"
        },
        "summary": "Set file attribute by Id (deprecated)",
        "tags": [
          "Deprecated File Api"
        ],
        "x-bash-codegen-description": "This enpoint is deprecated, please use [this one](#operation/set_attr).\n\nThis method allows to set a value of a regular file attribute.\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 enpoint is deprecated, please use [this one](#operation/set_attr).\n\nThis method allows to set a value of a regular file attribute.\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 -X PUT -H \"X-Auth-Token: $TOKEN\" \\\n-H 'Content-type: application/json' -d '{ \"mode\": \"0777\" }'\n\"https://$HOST/api/v3/oneprovider/metadata-id/attrs/$FILE_ID\"\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 setFileAttrById id=$FILE_ID -"
          }
        ]
      }
    },
    "/metadata-id/xattrs/{id}": {
      "get": {
        "deprecated": true,
        "operationId": "get_file_xattrs_by_id",
        "x-onedata-gri": {
          "type": "op_file",
          "id": "?OBJECTID_BINDING(id)",
          "aspect": "xattrs"
        },
        "summary": "Get file extended attributes by Id (deprecated)",
        "tags": [
          "Deprecated File Api"
        ],
        "x-bash-codegen-description": "This enpoint is deprecated, please use [this one](#operation/get_xattrs).\n\nThis method returns the selected extended attributes associated with specified file, directory or space by Id.\n",
        "description": "This enpoint is deprecated, please use [this one](#operation/get_xattrs).\n\nThis method returns the selected extended attributes associated with specified file, directory or space by Id.\n\n***Example cURL requests***\n\n**Get extended file attributes**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" -X GET \\\n\"https://$HOST/api/v3/oneprovider/metadata-id/xattrs/$FILE_ID?extended=true&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": "Type 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
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli getFileXattrsById id=$FILE_ID"
          }
        ]
      },
      "put": {
        "deprecated": true,
        "operationId": "set_file_xattr_by_id",
        "x-onedata-parse_body": "{as_is, <<\"metadata\">>}",
        "x-onedata-gri": {
          "type": "op_file",
          "id": "?OBJECTID_BINDING(id)",
          "aspect": "xattrs"
        },
        "summary": "Set file extended attribute by Id (deprecated)",
        "tags": [
          "Deprecated File Api"
        ],
        "x-bash-codegen-description": "This enpoint is deprecated, please use [this one](#operation/set_xattr).\n\nThis method allows to set a value of a specified extended file attribute\nleaving other ones intact.\n",
        "description": "This enpoint is deprecated, please use [this one](#operation/set_xattr).\n\nThis method allows to set a value of a specified extended file attribute\nleaving other ones intact.\n\n***Example cURL requests***\n\n**Set extended file attribute**\n```bash\ncurl -X PUT -H \"X-Auth-Token: $TOKEN\" \\\n-H 'Content-type: application/json' -d '{ \"license\": \"CC-0\" }' \\\n\"https://$HOST/api/v3/oneprovider/metadata-id/xattrs/$FILE_ID?extended=true\"\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"
              }
            }
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli setFileXattrById id=$FILE_ID license==CC-0"
          }
        ]
      }
    },
    "/metadata-id/json/{id}": {
      "get": {
        "deprecated": true,
        "operationId": "get_file_json_metadata_by_id",
        "x-onedata-gri": {
          "type": "op_file",
          "id": "?OBJECTID_BINDING(id)",
          "aspect": "json_metadata"
        },
        "summary": "Get file json metadata by Id (deprecated)",
        "tags": [
          "Deprecated File Api"
        ],
        "x-bash-codegen-description": "This enpoint is deprecated, please use [this one](#operation/get_json_metadata).\n\nThis method returns the json metadata associated with specified file, directory or space by 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 enpoint is deprecated, please use [this one](#operation/get_json_metadata).\n\nThis method returns the json metadata associated with specified file, directory or space by 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\n***Example cURL requests***\n\n**Get specific JSON value from metadata document**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" -X GET \\\nhttps://$HOST/api/v3/oneprovider/metadata-id/json/$FILE_ID?filter_type=keypath&filter=key1.key2.[2].key3\n```\n",
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "JSON metadata returned successfully.",
            "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",
            "required": false
          },
          {
            "name": "filter",
            "in": "query",
            "description": "The filter to apply to the metadata document before returning.",
            "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
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli getFileJsonMetadataById id=$FILE_ID inherited=false"
          }
        ]
      },
      "put": {
        "deprecated": true,
        "operationId": "set_file_json_metadata_by_id",
        "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 by Id (deprecated)",
        "tags": [
          "Deprecated File Api"
        ],
        "x-bash-codegen-description": "This enpoint is deprecated, please use [this one](#operation/set_json_metadata).\n\nThis method allows to set json metadata for a file, directory or\nspace specified by Id.\n\nThis operation will replace the previous json metadata if any.\n",
        "description": "This enpoint is deprecated, please use [this one](#operation/set_json_metadata).\n\nThis method allows to set json metadata for a file, directory or\nspace specified by 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\" -X PUT \\\n-H \"Content-type: application/json\" \\\n-d '{ \"key1\": { \"key2\": [\"val1\", \"val2\", \"val3\", \"val4\"] } }'\nhttps://$HOST/api/v3/oneprovider/metadata-id/json/$FILE_ID\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",
            "required": false
          },
          {
            "name": "filter",
            "in": "query",
            "description": "The filter allowing to set specific metadata document key. Required if filter_type is specified.",
            "type": "string",
            "required": false
          },
          {
            "name": "metadata",
            "in": "body",
            "description": "The json metadata.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "cat metadata.json | oneprovider-rest-cli setFileJsonMetadataById id=$FILE_ID -"
          }
        ]
      }
    },
    "/metadata-id/rdf/{id}": {
      "get": {
        "deprecated": true,
        "operationId": "get_file_rdf_metadata_by_id",
        "x-onedata-gri": {
          "type": "op_file",
          "id": "?OBJECTID_BINDING(id)",
          "aspect": "rdf_metadata"
        },
        "summary": "Get file rdf metadata by Id (deprecated)",
        "tags": [
          "Deprecated File Api"
        ],
        "x-bash-codegen-description": "This enpoint is deprecated, please use [this one](#operation/get_rdf_metadata).\n\nThis method returns the rdf metadata for specified file, directory or space by Id.\n",
        "description": "This enpoint is deprecated, please use [this one](#operation/get_rdf_metadata).\n\nThis method returns the rdf metadata for specified file, directory or space by Id.\n\n***Example cURL requests***\n\n**Get complete RDF metadata document for file**\n\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" -X GET \\\nhttps://$HOST/api/v3/oneprovider/metadata-id/rdf/$FILE_ID\n```\n",
        "produces": [
          "application/rdf+xml"
        ],
        "responses": {
          "200": {
            "description": "Rdf metadata returned successfully.",
            "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
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli getFileRdfMetadataById id=$FILE_ID"
          }
        ]
      },
      "put": {
        "deprecated": true,
        "operationId": "set_file_rdf_metadata_by_id",
        "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 by Id (deprecated)",
        "tags": [
          "Deprecated File Api"
        ],
        "description": "This enpoint is deprecated, please use [this one](#operation/set_rdf_metadata).\n\nThis method allows to set specific rdf metadata for a file, directory or space specified by Id in the request path.\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\" -X PUT \\\n-H \"Content-type: application/rdf+xml\" \\\n-d \"@./space1_dublincore.rdf\"\nhttps://$HOST/api/v3/oneprovider/metadata-id/rdf/$FILE_ID\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"
            }
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "cat metadata.rdf | oneprovider-rest-cli setFileRdfMetadataById id=$FILE_ID -"
          }
        ]
      }
    },
    "/replicas/{path}": {
      "get": {
        "deprecated": true,
        "operationId": "get_file_replicas",
        "x-onedata-gri": {
          "type": "op_replica",
          "id": "?PATH_BINDING",
          "aspect": "distribution"
        },
        "tags": [
          "Replica"
        ],
        "summary": "Get replicas by path",
        "x-bash-codegen-description": "This enpoint is deprecated, please use [this one](#operation/get_file_distribution).\n\nReturns file distribution information about a specific file.\n",
        "description": "This enpoint is deprecated, please use [this one](#operation/get_file_distribution).\n\nReturns file distribution information about a specific file.\n\n***Example cURL requests***\n\n**Get file distribution map by path**\n```bash\ncurl -X GET -H \"X-Auth-Token: $TOKEN\" \\\n\"https://$HOST/api/v3/oneprovider/replicas/MySpace1/MyFile1.txt\"\n\n[\n  {\n    \"blocks\": [ [ 0, 4 ], [ 10, 20 ] ],\n    \"providerId\": \"784dae9d-34a3-4aef-ab4b-2c6c60b74e27\"\n  },\n  {\n    \"blocks\": [ [ 5, 9 ] ],\n    \"providerId\": \"b296ab05-3d62-4755-be46-c57ced411ff1\"\n  }\n]\n```\n",
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "The list of file blocks stored at each provider.",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/FileDistribution"
              }
            }
          },
          "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": "path",
            "in": "path",
            "description": "File path (e.g. '/MySpace/testfiles/file1.txt')",
            "type": "string",
            "required": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli getFileReplicas path='/MySpace/testfiles/file1.txt' key=value1"
          }
        ]
      },
      "post": {
        "deprecated": true,
        "operationId": "replicate_file",
        "x-onedata-parse_body": "as_json_params",
        "x-onedata-gri": {
          "type": "op_replica",
          "id": "?PATH_BINDING",
          "aspect": "instance"
        },
        "tags": [
          "Replica"
        ],
        "summary": "Replicate file or directory by path",
        "x-bash-codegen-description": "This enpoint is deprecated, please use [this one](#operation/create_transfer).\n\nReplicates a file specified by absolute path in `path` parameter to a specified provider.\nThis operation is asynchronous and it can take a long time depending on the size of the data to move.\n\nIf the `path` parameter specifies a directory, entire directory is replicated to\nrequested provider.\n\nThis operation requires `space_schedule_replication` privilege.\n",
        "description": "This enpoint is deprecated, please use [this one](#operation/create_transfer).\n\nReplicates a file specified by absolute path in `path` parameter to a specified provider.\nThis operation is asynchronous and it can take a long time depending on the size of the data to move.\n\nIf the `path` parameter specifies a directory, entire directory is replicated to requested provider.\n\nThis operation requires `space_schedule_replication` privilege.\n\n***Example cURL requests***\n\n**Replicate file by path to any provider**\n```bash\ncurl -X POST -H \"X-Auth-Token: $TOKEN\" \\\n\"https://$HOST/api/v3/oneprovider/replicas/MySpace1/MyFile1.txt\"\n\n\n{ \"transferId\": \"4f674576-4c63-443b-b3d5-2f74a40724a0\" }\n```\n\n**Replicate file by path to specific storage provider with URL callback**\n```bash\ncurl -X POST -H \"X-Auth-Token: $TOKEN\" \\\n-H 'Content-type: application/json' -d '{ \"url\": \"http://example.com/transfer_complete\" }' \\\n\"https://$HOST/api/v3/oneprovider/replicas/MySpace1/MyFile1.txt?provider_id=$PROVIDER_ID\"\n\n\n{ \"transferId\": \"b3c85b99-44db-4277-8c66-2ccd50888565\" }\n```\n",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "201": {
            "description": "The replication request was accepted and the result is the transfer Id, which can be used for monitoring the transfer status. Also URI of the new transfer in form https://$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": "Transfer 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"
            }
          }
        },
        "parameters": [
          {
            "name": "path",
            "in": "path",
            "description": "File path (e.g. '/MySpace/testfiles/file1.txt')",
            "type": "string",
            "required": true
          },
          {
            "name": "provider_id",
            "in": "query",
            "description": "The Id of the provider to which the file will be replicated. By default the file will be replicated to the provider handling this REST call.\n",
            "required": false,
            "type": "string"
          },
          {
            "name": "callback",
            "in": "body",
            "description": "This parameter allows the user to specify a REST callback URL which will be called when the transfer is complete\n",
            "required": false,
            "schema": {
              "$ref": "#/definitions/Callback"
            }
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli replicateFile path='/MySpace/testfiles/file1.txt' provider_id=$PROVIDER_ID"
          }
        ]
      },
      "delete": {
        "deprecated": true,
        "operationId": "evict_replica",
        "x-onedata-gri": {
          "type": "op_replica",
          "id": "?PATH_BINDING",
          "aspect": "instance"
        },
        "tags": [
          "Replica"
        ],
        "summary": "Evict existing replica by file path",
        "x-bash-codegen-description": "This enpoint is deprecated, please use [this one](#operation/create_transfer).\n\nRemoves a replica of a file specified by absolute path in `path` parameter\nfrom a specified provider.\nThis operation is asynchronous. Optional argument `migration_provider_id`\ncan be used to specify where the repliace has to be replicated before being\nevicted from this provider.\n\nIf the `path` parameter specifies a directory, entire directory is evicted from\nthis provider requested provider.\n\nThis operation requires `space_schedule_eviction` privilege when scheduling eviction\nand also `space_schedule_replication` when scheduling migration.\n",
        "description": "This enpoint is deprecated, please use [this one](#operation/create_transfer).\n\nRemoves a replica of a file specified by absolute path in `path` parameter\nfrom a specified provider.\nThis operation is asynchronous. Optional argument `migration_provider_id`\ncan be used to specify where the repliace has to be replicated before being\nevicted from this provider.\n\nIf the `path` parameter specifies a directory, entire directory is evicted from\nthis provider requested provider.\n\nThis operation requires `space_schedule_eviction` privilege when scheduling eviction\nand also `space_schedule_replication` when scheduling migration.\n\n***Example cURL requests***\n\n**Remove file replica by path from specific storage provider**\n```bash\ncurl -X DELETE -H \"X-Auth-Token: $TOKEN\" -H 'Content-type: application/json' \\\n\"https://$HOST/api/v3/oneprovider/replicas/MySpace1/MyFile1.txt?provider_id=$PROVIDER_ID\"\n\n\n{ \"transferId\": \"b3c85b99-44db-4277-8c66-2ccd50888565\" }\n```\n",
        "produces": [
          "application/json"
        ],
        "responses": {
          "201": {
            "description": "The replica removal has been accepted and the result is the transfer Id, which can be used for monitoring the transfer status. Also URI of the new transfer in form https://$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": "Transfer 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"
            }
          }
        },
        "parameters": [
          {
            "name": "path",
            "in": "path",
            "description": "File path (e.g. '/MySpace/testfiles/file1.txt')",
            "type": "string",
            "required": true
          },
          {
            "name": "provider_id",
            "in": "query",
            "description": "The Id of the provider from which the replica will be evicted. By default the replica will be evicted in the provider handling this REST call.\n",
            "required": false,
            "type": "string"
          },
          {
            "name": "migration_provider_id",
            "in": "query",
            "description": "The Id of the provider to which the file should be replicated before being evicted.\n",
            "required": false,
            "type": "string"
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli evictReplica path='/MySpace/testfiles/file1.txt' migration_provider_id=$MIGRATION_PROVIDER_ID"
          }
        ]
      }
    },
    "/replicas-id/{id}": {
      "get": {
        "deprecated": true,
        "operationId": "get_file_replicas_by_id",
        "x-onedata-gri": {
          "type": "op_replica",
          "id": "?OBJECTID_BINDING(id)",
          "aspect": "distribution"
        },
        "tags": [
          "Replica"
        ],
        "summary": "Get replicas by Id",
        "x-bash-codegen-description": "This enpoint is deprecated, please use [this one](#operation/get_file_distribution).\n\nReturns file distribution information about a specific file.\n",
        "description": "This enpoint is deprecated, please use [this one](#operation/get_file_distribution).\n\nReturns file distribution information about a specific file.\n\n***Example cURL requests***\n\n**Get file distribution map by Id**\n```bash\ncurl -X GET -H \"X-Auth-Token: $TOKEN\" \\\n\"https://$HOST/api/v3/oneprovider/replicas-id/$FILE_ID\"\n\n[\n  {\n    \"blocks\": [ [ 0, 4 ], [ 10, 20 ] ],\n    \"providerId\": \"57ecb305-a097-4243-bd03-a995e78ab206\"\n  },\n  {\n    \"blocks\": [ [ 5, 9 ] ],\n    \"providerId\": \"7dedd2c7-dc58-4e62-925e-94663faa70fc\"\n  }\n]\n```\n",
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "The list of file blocks stored at each provider.",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/FileDistribution"
              }
            }
          },
          "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": "id",
            "in": "path",
            "description": "The Id of the file",
            "type": "string",
            "required": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli getFileReplicasById id=$FILE_ID"
          }
        ]
      },
      "post": {
        "deprecated": true,
        "operationId": "replicate_file_by_id",
        "x-onedata-parse_body": "as_json_params",
        "x-onedata-gri": {
          "type": "op_replica",
          "id": "?OBJECTID_BINDING(id)",
          "aspect": "instance"
        },
        "tags": [
          "Replica"
        ],
        "summary": "Replicate file or directory by Id",
        "x-bash-codegen-description": "This enpoint is deprecated, please use [this one](#operation/create_transfer).\n\nReplicates a file specified by Id in `id` parameter to a specified provider.\nThis operation is asynchronous and it can take a long time depending on\nthe size of the data to move.\n\nIf the `id` parameter specifies a directory, entire directory is replicated to\nrequested provider.\n\nThis operation requires `space_schedule_replication` privilege.\n",
        "description": "This enpoint is deprecated, please use [this one](#operation/create_transfer).\n\nReplicates a file specified by Id in `id` parameter to a specified provider.\nThis operation is asynchronous and it can take a long time depending on the size of the data to move.\n\nIf the `id` parameter specifies a directory, entire directory is replicated to requested provider.\n\nThis operation requires `space_schedule_replication` privilege.\n\n***Example cURL requests***\n\n**Replicate file by Id to any provider**\n```bash\ncurl -X POST -H \"X-Auth-Token: $TOKEN\" \\\n\"https://$HOST/api/v3/oneprovider/replicas-id/$FILE_ID\"\n\n\n{ \"transferId\": \"4f674576-4c63-443b-b3d5-2f74a40724a0\" }\n```\n\n**Replicate file by Id to specific storage provider with URL callback**\n```bash\ncurl -X POST -H \"X-Auth-Token: $TOKEN\" \\\n-H 'Content-type: application/json' -d '{ \"url\": \"http://example.com/transfer_complete\" }' \\\n\"https://$HOST/api/v3/oneprovider/replicas-id/$FILE_ID?provider_id=$PROVIDER_ID\"\n\n\n{ \"transferId\": \"b3c85b99-44db-4277-8c66-2ccd50888565\" }\n```\n",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "201": {
            "description": "The replication request was accepted and the result is the transfer Id, which can be used for monitoring the transfer status. Also URI of the new transfer in form https://$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": "Transfer 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"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Id of the file.",
            "type": "string",
            "required": true
          },
          {
            "name": "provider_id",
            "in": "query",
            "description": "The Id of the provider to which the file will be replicated. By default the file will be replicated to the provided handling this REST call.\n",
            "required": false,
            "type": "string"
          },
          {
            "name": "callback",
            "in": "body",
            "description": "This parameter allows the user to specify a REST callback URL which will be called when the transfer is complete\n",
            "required": false,
            "schema": {
              "$ref": "#/definitions/Callback"
            }
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli replicateFileById id=$FILE_ID provider_id=$PROVIDER_ID"
          }
        ]
      },
      "delete": {
        "deprecated": true,
        "operationId": "evict_replica_by_id",
        "x-onedata-gri": {
          "type": "op_replica",
          "id": "?OBJECTID_BINDING(id)",
          "aspect": "instance"
        },
        "tags": [
          "Replica"
        ],
        "summary": "Evict existing replica by file Id",
        "x-bash-codegen-description": "This enpoint is deprecated, please use [this one](#operation/create_transfer).\n\nEvicts a replica of a file specified by Id in `id` parameter.\nThis operation is asynchronous. Optional argument `migration_provider_id`\ncan be used to specify where the replica has to be replicated before being\nevicted from this provider.\n\nIf the `id` parameter specifies a directory, entire directory is evicted.\n\nThis operation requires `space_schedule_eviction` privilege when scheduling eviction\nand also `space_schedule_replication` when scheduling migration.\n",
        "description": "This enpoint is deprecated, please use [this one](#operation/create_transfer).\n\nEvicts a replica of a file specified by file Id in `id` parameter.\nThis operation is asynchronous. Optional argument `migration_provider_id`\ncan be used to specify where the repliace has to be replicated before being\nevicted from this provider.\n\nIf the `id` parameter specifies a directory, entire directory is evicted.\n\nThis operation requires `space_schedule_eviction` privilege when scheduling eviction\nand also `space_schedule_replication` when scheduling migration.\n\n***Example cURL requests***\n\n**Evict file replica by Id from specific storage provider**\n```bash\ncurl -X DELETE -H \"X-Auth-Token: $TOKEN\" -H 'Content-type: application/json' \\\n\"https://$HOST/api/v3/oneprovider/replicas-id/$FILE_ID?provider_id=$PROVIDER_ID\"\n\n\n{ \"transferId\": \"b3c85b99-44db-4277-8c66-2ccd50888565\" }\n```\n",
        "produces": [
          "application/json"
        ],
        "responses": {
          "201": {
            "description": "The replica removal has been accepted and the result is the transfer Id, which can be used for monitoring the transfer status. Also URI of the new transfer in form https://$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": "Transfer 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"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Id of the file.",
            "type": "string",
            "required": true
          },
          {
            "name": "provider_id",
            "in": "query",
            "description": "The Id of the provider from which the replica will be evicted. By default the replica will be evicted in the provider handling this REST call.\n",
            "required": false,
            "type": "string"
          },
          {
            "name": "migration_provider_id",
            "in": "query",
            "description": "The Id of the provider to which the file should be replicated before being evicted.\n",
            "required": false,
            "type": "string"
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli evictReplicaById id=$FILE_ID migration_provider_id=$MIGRATION_PROVIDER_ID"
          }
        ]
      }
    },
    "/replicas-view/{view_name}": {
      "post": {
        "deprecated": true,
        "operationId": "replicate_files_by_view",
        "x-onedata-parse_body": "as_json_params",
        "x-onedata-gri": {
          "type": "op_replica",
          "id": "?BINDING(view_name)",
          "aspect": "replicate_by_view"
        },
        "summary": "Replicate files by view",
        "tags": [
          "Replica"
        ],
        "x-bash-codegen-description": "This enpoint is deprecated, please use [this one](#operation/create_transfer).\n\nQueries the specified view and replicates the resulting list of files to specified provider.\nThis operation is asynchronous and it can take a long time depending on the size of the data\nto move.\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_schedule_replication` and `space_query_views` privileges.\n",
        "description": "This enpoint is deprecated, please use [this one](#operation/create_transfer).\n\nQueries the specified view and replicates the resulting list of files to specified provider.\nThis operation is asynchronous and it can take a long time depending on the size of the data\nto move.\n\nThis operation supports custom view query attributes as provided by [Couchbase](http://docs.couchbase.com/admin/admin/Views/views-querying.html).\n\nAdditionally, Couchbase [spatial queries](http://docs.couchbase.com/admin/admin/Views/views-geospatial.html) are possible using the `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_schedule_replication` and `space_query_views` privileges.\n\n***Example cURL requests***\n\n**Replicate files returned by view within specified space to any provider**\n```bash\ncurl -X POST -H \"X-Auth-Token: $TOKEN\" \\\n\"https://$HOST/api/v3/oneprovider/replicas-view/$VIEW_NAME?space_id=$SPACE_ID\"\n\n\n{ \"transferId\": \"4f674576-4c63-443b-b3d5-2f74a40724a0\"}\n```\n\n**Replicate 100 files (skipping the first 200) returned by view within specified space to any provider with URL callback**\n```bash\ncurl -X POST -H \"X-Auth-Token: $TOKEN\" \\\n-H 'Content-type: application/json' -d '{ \"url\": \"http://example.com/transfer_complete\" }' \\\n\"https://$HOST/api/v3/oneprovider/replicas-view/$VIEW_NAME?space_id=$SPACE_ID&provider_id=$PROVIDER_ID&skip=200&limit=100\"\n\n\n{ \"transferId\": \"b3c85b99-44db-4277-8c66-2ccd50888565\" }\n```\n",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "201": {
            "description": "The replication request was accepted and the result is the transfer Id, which can be used for monitoring the transfer status.\n",
            "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": "view_name",
            "in": "path",
            "description": "Name of the view.",
            "type": "string",
            "required": true
          },
          {
            "name": "space_id",
            "in": "query",
            "description": "Space Id in which view exist.",
            "type": "string",
            "required": true
          },
          {
            "name": "provider_id",
            "in": "query",
            "description": "The Id of the provider to which the files will be replicated. By default the files will be replicated to the provided handling this REST call.\n",
            "required": false,
            "type": "string"
          },
          {
            "name": "callback",
            "in": "body",
            "description": "This parameter allows the user to specify a REST callback URL which will be called when the transfer is complete\n",
            "required": false,
            "schema": {
              "$ref": "#/definitions/Callback"
            }
          },
          {
            "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": "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 replicateFilesByView space_id=$SPACE_ID view_name=$VIEW_NAME key=value1"
          }
        ]
      },
      "delete": {
        "deprecated": true,
        "operationId": "evict_replicas_by_view",
        "x-onedata-gri": {
          "type": "op_replica",
          "id": "?BINDING(view_name)",
          "aspect": "evict_by_view"
        },
        "summary": "Evict existing replicas by view",
        "tags": [
          "Replica"
        ],
        "x-bash-codegen-description": "This enpoint is deprecated, please use [this one](#operation/create_transfer).\n\nQueries the specified view and evicts the resulting list of replicas in specified provider.\nThis operation is asynchronous. Optional argument `migration_provider_id`\ncan be used to specify where the repliace has to be replicated before being\nevicted from this provider.\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:\n  * `space_query_views` and `space_schedule_eviction` when scheduling eviction\n  * `space_query_views`, `space_schedule_eviction` and `space_schedule_replication` when scheduling migration\n",
        "description": "This enpoint is deprecated, please use [this one](#operation/create_transfer).\n\nQueries the specified view and evicts the resulting list of replicas in specified provider.\nThis operation is asynchronous. Optional argument `migration_provider_id`\ncan be used to specify where the repliace has to be replicated before being\nevicted from this provider.\n\nThis operation supports custom view query attributes as provided by [Couchbase](http://docs.couchbase.com/admin/admin/Views/views-querying.html).\n\nAdditionally, Couchbase [spatial queries](http://docs.couchbase.com/admin/admin/Views/views-geospatial.html) are possible using the `bbox` query parameter.\nThese queries are possible on views which emit values conforming to the [GeoJSON](http://geojson.org/) format.\n\nThis operation requires:\n  * `space_query_views` and `space_schedule_eviction` when scheduling eviction\n  * `space_query_views`, `space_schedule_eviction` and `space_schedule_replication` when scheduling migration\n\n***Example cURL requests***\n\n**Evicts 100 replicas (skipping the first 200) returned by view within specified space from specific provider**\n```bash\ncurl -X DELETE -H \"X-Auth-Token: $TOKEN\" -H 'Content-type: application/json' \\\n\"https://$HOST/api/v3/oneprovider/replicas-view/$VIEW_NAME?space_id=$SPACE_ID&provider_id=$PROVIDER_ID&skip=200&limit=100\"\n\n\n{ \"transferId\": \"b3c85b99-44db-4277-8c66-2ccd50888565\" }\n```\n",
        "produces": [
          "application/json"
        ],
        "responses": {
          "201": {
            "description": "The replication request was accepted and the result is the transfer Id, which can be used for monitoring the transfer status.\n",
            "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": "view_name",
            "in": "path",
            "description": "Name of the view.",
            "type": "string",
            "required": true
          },
          {
            "name": "space_id",
            "in": "query",
            "description": "Space Id in which view exist.",
            "type": "string",
            "required": true
          },
          {
            "name": "provider_id",
            "in": "query",
            "description": "The Id of the provider from which the replica will be evicted. By default the replicas will be evicted in the provider handling this REST call.\n",
            "required": false,
            "type": "string"
          },
          {
            "name": "migration_provider_id",
            "in": "query",
            "description": "The Id of the provider to which the replicas should be synchronized before being evicted.\n",
            "required": false,
            "type": "string"
          },
          {
            "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": "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 evictReplicasByView space_id=$SPACE_ID view_name=$VIEW_NAME key=value1"
          }
        ]
      }
    },
    "/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 is present in the response, 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 is present in the response, 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 -X GET -H \"X-Auth-Token: $TOKEN\" \\\n\"https://$HOST/api/v3/oneprovider/spaces/$SPACE_ID/transfers?state=ongoing&limit=3&page_token=757136151113c2f\"\n\n{\n  \"transfers\": [\n    \"3b6a31fb-ca87-4ea6-8526-fbf5a0773d69\",\n    \"29fa94de-33ad-4347-9cbe-3d8faa9422dd\",\n    \"da426f74-5770-42a1-b799-354a3c4c154b\"\n  ],\n  \"nextPageToken\": \"8471726779817b3a\"\n}\n```\n",
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "The list of transfer IDs, nextPageToken is present when there is more to list.",
            "schema": {
              "type": "object",
              "properties": {
                "transfers": {
                  "type": "array",
                  "description": "The list of transfer Ids.",
                  "items": {
                    "type": "string"
                  }
                },
                "nextPageToken": {
                  "type": "string",
                  "description": "Token which can be used to list next batch of transfer Ids."
                }
              }
            }
          },
          "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,
            "default": 1000
          },
          {
            "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**Creates file replication**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" -X POST \\\n-H \"Content-type: application/json\" \\\n-d '{ \"type\": \"replication\", \"replicatingProviderId\": $PROVIDER_ID, \"dataSourceType\": \"file\", \"fileId\": $FILE_ID }' \\\n\"https://$HOST/api/v3/oneprovider/transfers\"\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://$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 -X GET -H \"X-Auth-Token: $TOKEN\" \\\n\"https://$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  \"path\": \"/space/tmp\",\n  \"filePath\": \"/space/tmp\",\n  \"transferStatus\": \"completed\",\n  \"effectiveJobStatus\": \"completed\",\n  \"replicationStatus\": \"completed\",\n  \"replicaEvictionStatus\": \"skipped\",\n  \"evictionStatus\": \"skipped\",\n  \"replicatingProviderId\": \"HICATChd8wzbFmB6qfGby9VN7MfdXgI1qC4pULGVm8Q\",\n  \"evictingProviderId\": null,\n  \"callback\": null,\n  \"filesToProcess\": 1,\n  \"filesProcessed\": 1,\n  \"filesReplicated\": 1,\n  \"fileReplicasEvicted\": 0,\n  \"filesEvicted\": 0,\n  \"failedFiles\": 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 -X DELETE -H \"X-Auth-Token: $TOKEN\" \\\n\"https://$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 -X POST -H \"X-Auth-Token: $TOKEN\" \\\n\"https://$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://$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 \\\n-H \"Content-type: application/json\" \\\n-d '{ \"expression\": \"country=FR\", \"replicasNum\": 2, \"fileId\": $FILE_ID }' \\\n\"https://$HOST/api/v3/oneprovider/qos_requirements\"\n```\n",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "201": {
            "description": "The request has been accepted and the result is the QoS requirement Id (e.g. 'fc05cfc92eda7a054b835bc1ee4a1372'). Also URI of the QoS requirement in form https://$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 -X GET -H \"X-Auth-Token: $TOKEN\" \\\n\"https://$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 (e.g. 'c84f669f9522c46976fee490d80651f0')",
            "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\" -X DELETE \\\n-H \"Content-type: application/json\" \\\n\"https://$HOST/api/v3/oneprovider/qos-requirements/$QOS_REQ_ID\"\n```\n",
        "consumes": [
          "application/json"
        ],
        "responses": {
          "204": {
            "description": "QoS requirement has been deleted."
          },
          "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 (e.g. 'c84f669f9522c46976fee490d80651f0')",
            "type": "string",
            "required": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli removeQosRequirement qid=$QOS_REQ_ID"
          }
        ]
      }
    },
    "/data/{id}/qos_summary": {
      "get": {
        "operationId": "get_file_qos_summary",
        "x-onedata-gri": {
          "type": "op_file",
          "id": "?OBJECTID_BINDING(id)",
          "aspect": "file_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 -X GET -H \"X-Auth-Token: $TOKEN\" \\\n\"https://$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"
          }
        ]
      }
    },
    "/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",
        "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\n***Example cURL requests***\n\n**Creates share**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" -X POST \\\n-H \"Content-type: application/json\" \\\n-d '{ \"name\": \"MyShare\", \"fileId\": $FILE_ID }' \\\n\"https://$HOST/api/v3/oneprovider/shares\"\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://$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**Returns the basic information about share**\n```bash\ncurl -X GET -H \"X-Auth-Token: $TOKEN\" \\\n\"https://$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  \"fileType\": \"dir\",\n  \"rootFileId\": \"00000000006CB663736861726547756964233339643236366165646365\\\n  6266666164353939663761373734313235363166342336656331613534313362366634653\\\n  2623031613563383561386664373937653223316634623736326231333830393436653733\\\n  6165636135373463373766313463\",\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 (e.g. '1f4b762b1380946e73aeca574c77f14c')",
            "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",
        "description": "Changes name and/or description of the share.\n\n***Example cURL requests***\n\n**Changes name of the share**\n```bash\ncurl -H \"X-Auth-Token: $TOKEN\" -X PATCH \\\n-H \"Content-type: application/json\" \\\n-d '{ \"name\": \"NewShareName\", \"description\": \"# New description\" }' \\\n\"https://$HOST/api/v3/oneprovider/shares/$SHARE_ID\"\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 (e.g. '1f4b762b1380946e73aeca574c77f14c')",
            "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",
        "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\n***Example cURL requests***\n\n**Removes share**\n```bash\ncurl -X DELETE -H \"X-Auth-Token: $TOKEN\" \\\n\"https://$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 (e.g. '1f4b762b1380946e73aeca574c77f14c')",
            "type": "string",
            "required": true
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli removeShare shid=$SHARE_ID"
          }
        ]
      }
    },
    "/metrics/space/{sid}": {
      "get": {
        "operationId": "get_space_metrics",
        "x-onedata-gri": {
          "type": "op_metrics",
          "id": "?BINDING(sid)",
          "aspect": "space"
        },
        "summary": "Get space metrics",
        "tags": [
          "Monitoring"
        ],
        "x-bash-codegen-description": "Returns space related metrics of specified type.\n\nThis operation requires `space_view_statistics` privilege.\n",
        "description": "Returns space related metrics of specified type.\n\nThis operation requires `space_view_statistics` privilege.\n\n***Example cURL requests***\n\n**Get storage space used metrics**\n```bash\ncurl -X GET -H \"X-Auth-Token: $TOKEN\" \\\n\"https://$HOST/api/v3/oneprovider/metrics/space/$SPACE_ID?metric=storage_used\"\n\n{\n  \"providerId\": \"4efc4a0c-0a61-4766-8fe9-c3d7fb414da8\",\n  \"rrd\": {\n      \"about\": \"RRDtool graph JSON output\",\n      \"data\": [[ 5.6435528434 ], [ 2.6435528434 ], [ 4.6435528434 ] ],\n      \"meta\": {\n          \"start\": 1465466700,\n          \"end\": 1465553100,\n          \"legend\": [\"space f4f1799f-4954-4d7a-bc31-630998883296; metric storage_used; oneprovider Id 4efc4a0c-0a61-4766-8fe9-c3d7fb414da8; storage_used[bytes]\"],\n          \"step\": 300\n      }\n    }\n}\n```\n",
        "produces": [
          "application/json",
          "application/xml"
        ],
        "responses": {
          "200": {
            "description": "The monitoring data retrieved in the form of RRD record exported to JSON or XML.",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Metrics"
              }
            }
          },
          "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": "Id of a specific space for which the monitoring metrics should be retrieved",
            "type": "string",
            "required": true
          },
          {
            "name": "metric",
            "in": "query",
            "description": "The type of metrics to retrieve.",
            "type": "string",
            "required": true,
            "enum": [
              "storage_quota",
              "storage_used",
              "data_access",
              "block_access",
              "connected_users",
              "remote_transfer"
            ]
          },
          {
            "name": "step",
            "in": "query",
            "description": "The resolution of the monitoring data to return - default is 5m [5 minutes].",
            "type": "string",
            "required": false,
            "enum": [
              "5m",
              "1h",
              "1d",
              "1m"
            ]
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli -ac json getSpaceMetrics sid=$SPACE_ID metric=storage_quota step=5m"
          }
        ]
      }
    },
    "/metrics/space/{sid}/user/{uid}": {
      "get": {
        "operationId": "get_space_user_metrics",
        "x-onedata-gri": {
          "type": "op_metrics",
          "id": "?BINDING(sid)",
          "aspect": "{user, ?BINDING(uid)}"
        },
        "summary": "Get space user metrics",
        "tags": [
          "Monitoring"
        ],
        "x-bash-codegen-description": "Returns space related metrics of specified type for specific user.\n\nThis operation requires `space_view_statistics` privilege.\n",
        "description": "Returns space related metrics of specified type for specific user.\n\nThis operation requires `space_view_statistics` privilege.\n\n***Example cURL requests***\n\n**Get user storage block access metrics with 1 hour resolution**\n```bash\ncurl -X GET -H \"X-Auth-Token: $TOKEN\" \\\n\"https://$HOST/api/v3/oneprovider/metrics/space/$SPACE_ID/user/$USER_ID?metric=block_access&step=1h\"\n\n{\n  \"providerId\": \"4efc4a0c-0a61-4766-8fe9-c3d7fb414da8\",\n  \"rrd\": {\n      \"about\": \"RRDtool graph JSON output\",\n      \"data\": [[ 5.6435528434 ], [ 2.6435528434 ], [ 4.6435528434 ] ],\n      \"meta\": {\n          \"start\": 1465466700,\n          \"end\": 1465553100,\n          \"legend\": [\"space fe14b4cc-bce0-4220-8394-a911d11a0a53; metric storage_used; oneprovider Id 4efc4a0c-0a61-4766-8fe9-c3d7fb414da8; storage_used[bytes]\"],\n          \"step\": 3600\n      }\n    }\n}\n```\n",
        "produces": [
          "application/json",
          "application/xml"
        ],
        "responses": {
          "200": {
            "description": "The monitoring data retrieved in the form of RRD record exported to JSON or XML.",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Metrics"
              }
            }
          },
          "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": "Id of a specific space for which the monitoring metrics should be retrieved.",
            "type": "string",
            "required": true
          },
          {
            "name": "uid",
            "in": "path",
            "description": "Id of a specific user within a space for which the monitoring metrics should be limited to.",
            "type": "string",
            "required": true
          },
          {
            "name": "metric",
            "in": "query",
            "description": "The type of metrics to retrieve.",
            "type": "string",
            "required": true,
            "enum": [
              "storage_used",
              "data_access",
              "block_access",
              "remote_transfer"
            ]
          },
          {
            "name": "step",
            "in": "query",
            "description": "The resolution of the monitoring data to return - default is 5m [5 minutes].",
            "type": "string",
            "required": false,
            "enum": [
              "5m",
              "1h",
              "1d",
              "1m"
            ]
          }
        ],
        "x-code-samples": [
          {
            "lang": "Shell",
            "source": "oneprovider-rest-cli -ac xml getSpaceUserMetrics sid=$SPACE_ID uid=$USER_ID metric=metadata_access_ops step=1h"
          }
        ]
      }
    },
    "/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 -X POST -d \"@./changes_req.json\" -H \"X-Auth-Token: $TOKEN\" \\\n\"https://$HOST/api/v3/oneprovider/changes/metadata/$SPACE_ID\"\n```\n",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Subscription to events has been successful.",
            "schema": {
              "$ref": "#/definitions/FileMetadataChange"
            }
          },
          "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."
      }
    },
    "DirectoryChildren": {
      "type": "object",
      "properties": {
        "children": {
          "type": "array",
          "description": "The list of directory files and subdirectories.",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Id of the file or subdirectory."
              },
              "name": {
                "type": "string",
                "description": "Name of the file or subdirectory."
              }
            }
          }
        }
      },
      "example": {
        "children": [
          {
            "id": "YzQ3OThlYjItZGJkMi00ODZmLWFlOTQtMGU2ZmEwYTUwNzFk",
            "name": "File1.txt"
          },
          {
            "id": "NjIwZTE2NDItNGYyZC00NWYyLWI0ZWItMzdmOGE5NThiNDZm",
            "name": "Dir2"
          }
        ]
      }
    },
    "FileDistribution": {
      "type": "array",
      "description": "Describes distribution of a single file among different storage providers. For each provider, this data type provides a list of byte ranges (specified as a list of pairs [offset, size]), which describe which blocks of a given file are stored at which provider.\n",
      "items": {
        "type": "object",
        "properties": {
          "providerId": {
            "type": "string",
            "description": "Id of the provider"
          },
          "blocks": {
            "type": "array",
            "description": "The list of blocks in byte ranges stored at that provider.",
            "items": {
              "type": "array",
              "description": "File block specified as a pair [offset, size].",
              "items": {
                "type": "integer"
              },
              "maxItems": 2,
              "minItems": 2
            }
          }
        }
      },
      "example": [
        {
          "providerId": "b4687585-57d5-4edb-a192-0f3b1cab636b",
          "blocks": [
            [
              0,
              4
            ],
            [
              10,
              20
            ]
          ]
        },
        {
          "providerId": "a0274289-6f8a-482f-86f8-4a518760749c",
          "blocks": [
            [
              1024,
              2048
            ],
            [
              4096,
              1048576
            ]
          ]
        }
      ]
    },
    "FilePath": {
      "description": "Mapping between file Id and file path.",
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Id of the file or directory."
        },
        "path": {
          "type": "string",
          "description": "Path to the file or directory."
        }
      }
    },
    "Callback": {
      "type": "object",
      "description": "Callback definition.",
      "properties": {
        "url": {
          "type": "string",
          "description": "The URL which should be called, when requested action completed."
        }
      },
      "example": {
        "url": "http://monitoring.example.com:8080/notifications"
      }
    },
    "FileAttributes": {
      "type": "object",
      "description": "File or directory basic attributes.",
      "properties": {
        "name": {
          "type": "string",
          "description": "File name."
        },
        "type": {
          "type": "string",
          "description": "Type of the file.",
          "enum": [
            "reg",
            "dir",
            "lnk"
          ]
        },
        "mode": {
          "type": "integer",
          "description": "POSIX file permissions in decimal format"
        },
        "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."
        },
        "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"
          }
        }
      },
      "example": {
        "name": "File1.txt",
        "type": "REG",
        "mode": 511,
        "size": 1024,
        "atime": 1464958683054,
        "mtime": 1464958683051,
        "ctime": 1464958681054,
        "owner_id": "MTZjYzc1ZWEtN2ZjNC00Y2QxLTljYzgtMTJmYTMxNTk1YzUw",
        "file_id": "NjIwZTE2NDItNGYyZC00NWYyLWI0ZWItMzdmOGE5NThiNDZm",
        "provider_id": "YzQ3OThlYjItZGJkMi00ODZmLWFlOTQtMGU2ZmEwYTUwNzFk",
        "storage_user_id": 1935313,
        "storage_group_id": 1101841,
        "shares": [
          "1d24c36707d99197c6cd995810a43aca",
          "6825604b0eb6a47b8b7a04b6369eb24d"
        ]
      }
    },
    "FileMetadataChange": {
      "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": {
                  "type": "string",
                  "description": "File type.",
                  "enum": [
                    "REG",
                    "DIR"
                  ]
                },
                "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": {
        "spaceId": {
          "type": "string",
          "description": "Id of the space."
        },
        "name": {
          "type": "string",
          "description": "Name of the space."
        },
        "providers": {
          "type": "array",
          "description": "The list of providers who support this space.",
          "items": {
            "$ref": "#/definitions/Provider"
          }
        }
      },
      "example": {
        "spaceId": "cda5d1bd-ca13-40ef-95e6-51fc1cc3b322",
        "name": "My Space 1",
        "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, nextPageToken is present when there is more to list.",
      "properties": {
        "views": {
          "type": "array",
          "description": "List of space views",
          "items": {
            "type": "string"
          }
        },
        "nextPageToken": {
          "type": "string",
          "description": "Can be used to list views starting after the last on returned list (present only when there is more views to list)\n"
        }
      },
      "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."
        },
        "fileId": {
          "type": "string",
          "description": "Id of file or directory to be shared. The whole space can also be shared."
        }
      },
      "required": [
        "name",
        "fileId"
      ],
      "example": {
        "name": "MyShare",
        "description": "# Top level header\nDescription of the share contents.",
        "fileId": "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."
        },
        "fileType": {
          "type": "string",
          "description": "Denotes the type of the shared element (file or directory)",
          "enum": [
            "file",
            "dir"
          ]
        },
        "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",
        "fileType",
        "rootFileId"
      ],
      "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",
        "fileType": "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"
        ]
      }
    },
    "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"
      }
    },
    "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."
        },
        "path": {
          "type": "string",
          "description": "Path to the file or directory in the virtual file system. This field is `deprecated` and it might be removed in future release. Please refer to `filePath`.\n"
        },
        "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"
          ]
        },
        "replicaEvictionStatus": {
          "type": "string",
          "description": "The status of transfer eviction phase. This field is `deprecated` and it might be removed in future release. Please refer to `evictionStatus`.",
          "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."
        },
        "fileReplicasEvicted": {
          "type": "integer",
          "description": "Number of files already evicted. This field is `deprecated` and it might be removed in future release. Please refer to `filesEvicted`.\n"
        },
        "filesEvicted": {
          "type": "integer",
          "description": "Number of files already evicted."
        },
        "failedFiles": {
          "type": "integer",
          "description": "Number of files for which eviction or replication has failed.\nThis field is `deprecated` and it might be removed in future release.\nPlease refer to `filesFailed`.\n"
        },
        "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",
        "replicaEvictionStatus",
        "evictionStatus",
        "replicatingProviderId",
        "evictingProviderId",
        "callback",
        "filesToProcess",
        "filesProcessed",
        "filesReplicated",
        "fileReplicasEvicted",
        "filesEvicted",
        "failedFiles",
        "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",
        "path": "/My Space 1/Dir2/file3.txt",
        "filePath": "/My Space 1/Dir2/file3.txt",
        "transferStatus": "completed",
        "effectiveJobStatus": "completed",
        "replicationStatus": "completed",
        "replicaEvictionStatus": "skipped",
        "evictionStatus": "skipped",
        "replicatingProviderId": "HICATChd8wzbFmB6qfGby9VN7MfdXgI1qC4pULGVm8Q",
        "evictingProviderId": null,
        "callback": null,
        "filesToProcess": 1,
        "filesProcessed": 1,
        "filesReplicated": 1,
        "fileReplicasEvicted": 0,
        "filesEvicted": 0,
        "failedFiles": 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"
        }
      }
    }
  },
  "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": "File registration",
      "description": "Operations for registering files located on external storages."
    },
    {
      "name": "Deprecated File Api",
      "description": "Files and Directories related operations (deprecated)."
    },
    {
      "name": "QoS",
      "description": "QoS related operations."
    },
    {
      "name": "Share",
      "description": "Shares related operations."
    },
    {
      "name": "Replica",
      "description": "Replication and file distribution control operations."
    },
    {
      "name": "Transfer",
      "description": "Transfers related operations."
    },
    {
      "name": "Monitoring",
      "description": "Metrics and change events monitoring related operations."
    }
  ],
  "x-tagGroups": [
    {
      "name": "Service information",
      "tags": [
        "Oneprovider"
      ]
    },
    {
      "name": "Space management",
      "tags": [
        "Space",
        "View"
      ]
    },
    {
      "name": "File access & management",
      "tags": [
        "File Path Resolution",
        "Basic File Operations",
        "File Distribution",
        "Custom File Metadata",
        "File registration",
        "Deprecated File Api"
      ]
    },
    {
      "name": "Replica & QoS management",
      "tags": [
        "Replica",
        "Transfer",
        "QoS"
      ]
    },
    {
      "name": "Share management",
      "tags": [
        "Share"
      ]
    },
    {
      "name": "Monitoring & metrics",
      "tags": [
        "Monitoring"
      ]
    }
  ],
  "securityDefinitions": {
    "api_key1": {
      "type": "apiKey",
      "name": "X-Auth-Token",
      "in": "header"
    },
    "api_key2": {
      "type": "apiKey",
      "name": "Authorization",
      "in": "header"
    }
  },
  "security": [
    {
      "api_key1": []
    },
    {
      "api_key2": []
    }
  ]
}
