call code iff user is logged in
call code iff user is logged in
Disable a route without having to comment out the entry in the routes file.
Disable a route without having to comment out the entry in the routes file. Useful for when we want to keep the code around but we don't want users to have access to it.
call code iff user has right permission for resource
call code iff user has right permission for resource
Use when you want to require the user to be logged in on a private server or the server is public.
Use when you want to require the user to be logged in on a private server or the server is public.
call code iff user is a server admin
call code iff user is a server admin
get user if logged in
get user if logged in
Add metadata in JSON-LD format.
REST endpoint: POST: Add tags to a dataset.
REST endpoint: POST: Add tags to a dataset. Requires that the request body contains a "tags" field of List[String] type.
Functionality broken out from attachExistingFile, in order to allow the core work of file attachment to be called from multiple API endpoints.
Functionality broken out from attachExistingFile, in order to allow the core work of file attachment to be called from multiple API endpoints.
A UUID that specifies the dataset that will be modified
A UUID that specifies the file to attach to the dataset
Reference to the model of the dataset that is specified
Reference to the model of the file that is specified
Create new dataset with no file required.
Create new dataset with no file required. However if there are comma separated file IDs passed in, add all of those as existing files. This is to facilitate multi-file-uploader usage for new files, as well as to allow multiple existing files to be added as part of dataset creation.
A JSON document is the payload for this endpoint. Required elements are name and description. Optional element is existingfiles, which will be a comma separated String of existing file IDs to be added to the new dataset.
Create new dataset.
Create new dataset. name, file_id are required, description and space, are optional. If the space & file_id is wrong, refuse the request
Create new dataset with no file required.
Create new dataset with no file required. However if there are comma separated file IDs passed in, add all of those as existing files. This is to facilitate multi-file-uploader usage for new files, as well as to allow multiple existing files to be added as part of dataset creation.
A JSON document is the payload for this endpoint. Required elements are name, description, and space. Optional element is existingfiles, which will be a comma separated String of existing file IDs to be added to the new dataset.
List all files withing a dataset and its nested folders.
List all files withing a dataset and its nested folders.
dataset id
max number of files to return, default is
Utility function to consolidate the utility portions of the delete dataset functionality so that it can be easily called from multiple API operations.
Utility function to consolidate the utility portions of the delete dataset functionality so that it can be easily called from multiple API operations.
The id of the dataset that a file is being detached from
The implicit request parameter which is part of the REST API call
REST endpoint: DELETE: detach all files from a dataset and then delete the dataset
REST endpoint: DELETE: detach all files from a dataset and then delete the dataset
Takes one arg, id:
Utility function to consolidate the utility portions of the detach file functionality so that it can be easily called from multiple API operations.
Utility function to consolidate the utility portions of the detach file functionality so that it can be easily called from multiple API operations.
The id of the dataset that a file is being detached from
The id of the file to detach from the dataset
The reference to the model of the dataset being operated on
Enumerator to loop over all files in a dataset and return chunks for the result zip file that will be streamed to the client.
Enumerator to loop over all files in a dataset and return chunks for the result zip file that will be streamed to the client. The zip files are streamed and not stored on disk.
dataset from which to get teh files
chunk size in memory in which to buffer the stream
java built in compression value. Use 0 for no compression.
the root Clowder URL for metadata files, from original request
an optional user to include in metadata
a list of UUIDs of files in the dataset to include (i.e. marked file downloads)
a folder UUID in the dataset to include (i.e. folder download)
Enumerator to produce array of bytes from a zipped stream containing the bytes of each file in the dataset
Enumerator to loop over all files in a dataset and return chunks for the result zip file that will be streamed to the client.
Enumerator to loop over all files in a dataset and return chunks for the result zip file that will be streamed to the client. The zip files are streamed and not stored on disk.
dataset from which to get teh files
chunk size in memory in which to buffer the stream
java built in compression value. Use 0 for no compression.
the root Clowder URL for metadata files, from original request
an optional user to include in metadata
a list of UUIDs of files in the dataset to include (i.e. marked file downloads)
a folder UUID in the dataset to include (i.e. folder download)
Enumerator to produce array of bytes from a zipped stream containing the bytes of each file in the dataset
REST endpoint: GET: get the tag data associated with this section.
REST endpoint: GET: get the tag data associated with this section. Returns a JSON object of multiple fields. One returned field is "tags", containing a list of string values.
Return user based on request object
Return user based on request object
Return whether a dataset is currently being processed.
Create a mapping for each file to their unique location
List all datasets outside a collection.
Recursively submit requests to archive the contents of the given dataset
Recursively submit requests to archive the contents of the given dataset
dataset to archive
Recursively submit requests to unarchive the contents of the given dataset
Recursively submit requests to unarchive the contents of the given dataset
dataset to unarchive
Reindex the given dataset, if recursive is set to true it will also reindex all files in that dataset.
REST endpoint: POST: remove all tags.
REST endpoint: POST: remove tags.
REST endpoint: POST: remove tags. Requires that the request body contains a "tags" field of List[String] type.
List datasets satisfying a general metadata search tree.
List datasets satisfying a user metadata search tree.
REST endpoint: POST: update the administrative information associated with a specific Dataset
REST endpoint: POST: update the administrative information associated with a specific Dataset
Takes one arg, id:
id, the UUID associated with this dataset
The data contained in the request body will contain data to be updated associated by the following String key-value pairs:
description -> The text for the updated description for the dataset name -> The text for the updated name for this dataset
Currently description and owner are the only fields that can be modified, however this api is extensible enough to add other existing fields, or new fields, in the future.
REST endpoint: POST: update the license data associated with a specific Dataset
REST endpoint: POST: update the license data associated with a specific Dataset
Takes one arg, id:
id, the UUID associated with this dataset
The data contained in the request body will be containe the following key-value pairs:
licenseType, currently: license1 - corresponds to Limited license2 - corresponds to Creative Commons license3 - corresponds to Public Domain
rightsHolder, currently only required if licenseType is license1. Reflects the specific name of the organization or person that holds the rights
licenseText, currently tied to the licenseType license1 - Free text that a user can enter to describe the license license2 - 1 of 6 options (or their abbreviations) that reflects the specific set of options associated with the Creative Commons license, these are: Attribution-NonCommercial-NoDerivs (by-nc-nd) Attribution-NoDerivs (by-nd) Attribution-NonCommercial (by-nc) Attribution-NonCommercial-ShareAlike (by-nc-sa) Attribution-ShareAlike (by-sa) Attribution (by) license3 - Public Domain Dedication
licenseUrl, free text that a user can enter to go with the licenseText in the case of license1. Fixed URL's for the other 2 cases.
allowDownload, true or false, whether the file or dataset can be downloaded. Only relevant for license1 type.
Dataset API.