Get view
This method returns a JSON describing specific view.
This operation requires space_view_views privilege.
Example cURL requests
Get information about specific view
curl -H "X-Auth-Token: $TOKEN" \
-X GET https://$PROVIDER_HOST/api/v3/oneprovider/spaces/$SPACE_ID/views/$VIEW_NAME
{
"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 }"
"reduceFunction": null,
"viewOptions": {
"update_min_changes": 100
},
"providers": [
"6b9bc70630547d925861a27e1f050dfe"
]
}
Path parameters
| Parameter | Type & Description |
|---|---|
| sid required | string Space Id in which view exist. |
| view_name required | string Name of the view. |
Request Examples
oneprovider-rest-cli getSpaceView sid=$SPACE_ID view_name=$VIEW_NAMEResponses
Information about view.
Whether given view is spatial or not.
View mapping function.
View reduce function or null if there is none.
viewOptions object (ViewOptions) Options specified during creation or update of view conforming to the
automated view update description.
Options specified during creation or update of view conforming to the automated view update description.
Minimum number of document changes to trigger re-viewing.
Minimum number of document changes to trigger re-viewing of a replica index.
List of providers on which view can be queried.
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"
]
}Invalid request.
error object (ErrorJson) Object describing an error.
Object describing an error.
String identifying the error type. Does not change between error instances.
Human readable error description. May contain information specific to given error instance.
Details about the error instance. The object schema is specific to each error type.
ctx required object (ErrorJsonCtx) Technical information about error.
Technical information about error.
Timestamp in milliseconds.
Release version of a product, for example "25.1".
Identifier of a service instance — either Oneprovider Id or "onezone".
Domain of the service.
Build version of the service.
Short name of service.
Revision of onedata-errors repo, where the error is defined.
Module where the error occurred.
Line number in the module where the error occurred.
Example
{
"error": {
"id": "example",
"description": "This is an example error.",
"ctx": {
"timestamp": 1750762637248,
"serviceReleaseVersion": "25.1",
"serviceId": "a7ee2722915b8bf7fb064eb65087cc61ch9357",
"serviceDomain": "dev-oneprovider-krakow.default.svc.cluster.local",
"serviceBuildVersion": "231-g8d26f953c3",
"service": "opw",
"onedataErrorsRevision": "ca3af8cb",
"module": "metadata_req",
"line": 45
}
}
}Forbidden request.
error object (ErrorJson) Object describing an error.
Object describing an error.
String identifying the error type. Does not change between error instances.
Human readable error description. May contain information specific to given error instance.
Details about the error instance. The object schema is specific to each error type.
ctx required object (ErrorJsonCtx) Technical information about error.
Technical information about error.
Timestamp in milliseconds.
Release version of a product, for example "25.1".
Identifier of a service instance — either Oneprovider Id or "onezone".
Domain of the service.
Build version of the service.
Short name of service.
Revision of onedata-errors repo, where the error is defined.
Module where the error occurred.
Line number in the module where the error occurred.
Example
{
"error": {
"id": "example",
"description": "This is an example error.",
"ctx": {
"timestamp": 1750762637248,
"serviceReleaseVersion": "25.1",
"serviceId": "a7ee2722915b8bf7fb064eb65087cc61ch9357",
"serviceDomain": "dev-oneprovider-krakow.default.svc.cluster.local",
"serviceBuildVersion": "231-g8d26f953c3",
"service": "opw",
"onedataErrorsRevision": "ca3af8cb",
"module": "metadata_req",
"line": 45
}
}
}File not found.
error object (ErrorJson) Object describing an error.
Object describing an error.
String identifying the error type. Does not change between error instances.
Human readable error description. May contain information specific to given error instance.
Details about the error instance. The object schema is specific to each error type.
ctx required object (ErrorJsonCtx) Technical information about error.
Technical information about error.
Timestamp in milliseconds.
Release version of a product, for example "25.1".
Identifier of a service instance — either Oneprovider Id or "onezone".
Domain of the service.
Build version of the service.
Short name of service.
Revision of onedata-errors repo, where the error is defined.
Module where the error occurred.
Line number in the module where the error occurred.
Example
{
"error": {
"id": "example",
"description": "This is an example error.",
"ctx": {
"timestamp": 1750762637248,
"serviceReleaseVersion": "25.1",
"serviceId": "a7ee2722915b8bf7fb064eb65087cc61ch9357",
"serviceDomain": "dev-oneprovider-krakow.default.svc.cluster.local",
"serviceBuildVersion": "231-g8d26f953c3",
"service": "opw",
"onedataErrorsRevision": "ca3af8cb",
"module": "metadata_req",
"line": 45
}
}
}Internal server error.
error object (ErrorJson) Object describing an error.
Object describing an error.
String identifying the error type. Does not change between error instances.
Human readable error description. May contain information specific to given error instance.
Details about the error instance. The object schema is specific to each error type.
ctx required object (ErrorJsonCtx) Technical information about error.
Technical information about error.
Timestamp in milliseconds.
Release version of a product, for example "25.1".
Identifier of a service instance — either Oneprovider Id or "onezone".
Domain of the service.
Build version of the service.
Short name of service.
Revision of onedata-errors repo, where the error is defined.
Module where the error occurred.
Line number in the module where the error occurred.
Example
{
"error": {
"id": "example",
"description": "This is an example error.",
"ctx": {
"timestamp": 1750762637248,
"serviceReleaseVersion": "25.1",
"serviceId": "a7ee2722915b8bf7fb064eb65087cc61ch9357",
"serviceDomain": "dev-oneprovider-krakow.default.svc.cluster.local",
"serviceBuildVersion": "231-g8d26f953c3",
"service": "opw",
"onedataErrorsRevision": "ca3af8cb",
"module": "metadata_req",
"line": 45
}
}
}