Archive organization

Content, represented as files/folders + metadata lives inside a Data Container (that are like S3 buckets or Azure containers). Data Containers can be grouped in collections or subcollections, creating a way for users to group and organize datasets and content.

The user is free to organize the content following any desired structure. Some organizations are partitioning the repository by departments, others are grouping the content by type while others create no partitions at all and use a flat structure.

Further considerations related to preservation are described in Planning and Using Additional Information in LABDRIVE

These collections or subcollections conform the Archival Structure in the repository:

Every node of the Archival Structure can have Data Containers or other nodes inside.

As access permissions can be defined per each node, it is easy for the user to assign permissions to certain users to everything that is contained in the node.

Creating or changing an Archive Structure

Using the management interface

1.Go to Configuration and then Archival Structure

2. Create a new node selecting Add Node (1) or edit an existing one with Edit Node (2):

3. If you are creating a new node, indicate the Name (that will be displayed to the users), the Code (handy for the API and for searching, and shown as a prefix for the name, so keep it short) and the Parent Node, that will determine in which other node is contained the new node that you are creating. You can select ROOT to keep it as a first-level node, without any parent node. When finished, select Add.

4. When the node has been created, the permissions section appears below. Here you can select Inherit Parent Node Permissions for this node to inherit the same access permissions than the parent node (only available if the node has a parent node) or to define Custom Permissions, to be able to indicate them for the present node:

5. Select Add to add users or groups and then select permissions for them. If you want for the user or group of users to be able to create subnodes inside the node, make sure you select the Node Admin permission.

Using the API

API examples here are just shown for illustrative purposes. Check the LABDRIVE API documentation for additional information and all available methods.

1. Sign in to the LABDRIVE Management Interface

2. Obtain your LABDRIVE API key by selecting your name and then Access Methods:

3. Then, you need to create the node and then assign permissions. To create the node:

curl --request POST  --url "$your_platform_url/api/archivalstructure" \
     --header 'Content-Type: application/json' \
     --header "authorization: Bearer $your_platform_api_key" \
     --data \
'{
 "name": "New archival structure name",
 "code": "NAC2",
 "content_policy": "INHERIT",
 "parent": 1
}'

Name and code are the two descriptive values for the node, and parent is the id for the parent node in which you want to create this one. You can use "null" to create them in the root of the repository (remember to set "content_policy" to "CUSTOM":

 curl --request POST  --url "$your_platform_url/api/archivalstructure" \
       --header 'Content-Type: application/json' \
       --header "authorization: Bearer $your_platform_api_key" \
       --data \
  '{
   "name": "New archival structure",
   "code": "NAC",
   "content_policy": "CUSTOM",
   "parent": null
  }'

or you can use the following query to get the ids of the existing nodes to use one of them:

	curl --request GET \
      --url "$your_platform_url/api/archivalstructure" \
      --header "authorization: Bearer $your_platform_api_key"

Adjusting permissions

When you create a new node, permissions are defined as custom permissions (and empty) if the node is created without a parent and defined as inherited from the parent node otherwise.

If you want to see current permissions for a node, use the following method:

  curl --request GET \
      --url "$your_platform_url/api/archivalstructure/1/permissions" \
      --header "authorization: Bearer $your_platform_api_key"

If you want to delete permissions entry for a given user group use:

curl --request DELETE \
     --url "$your_platform_url/api/archivalstructure/1/permissions/group/8"\
     --header "authorization: Bearer $your_platform_api_key"

And for assigning them, use:

	curl --request POST \
      --url "$your_platform_url/api/archivalstructure/1/permissions" \
      --header 'Content-Type: application/json' \
      --header "authorization: Bearer $your_platform_api_key" \
      --data '{
               "user_groups": [
   	          {
   		     "type": "group",
   		     "id": "8"
   	          }
               ],
               "permissions": [
                 "CONTAINER_CREATE"
               ]
             }'

These are some of the permissions that are available for assigning to a node/container:

        "CONTAINER_CREATE": true,
        "CONTAINER_READ": true,
        "NODE_ADMIN": false,
        "CONTAINER_UPDATE": true,
        "CONTAINER_DELETE": true,
        "CONTAINER_CONTENT_READ": true,
        "CONTAINER_PERMISSION_READ": true,
        "CONTAINER_LOG_READ": true,
        "FILE_EVENT_TRIGGER": true,
        "CONTAINER_CONTENT_WRITE": true,
        "CONTAINER_CONTENT_METADATA_UPDATE": true,
        "CONTAINER_PERMISSION_WRITE": true,
        "CONTAINER_PERMISSION_DELETE": true

But you can get a full list of permissions using:

curl --request GET \
        --url "$your_platform_url/api/permissions" \
        --header "authorization: Bearer $your_platform_api_key"

Deleting an Archive Structure

Using the management interface

Only nodes without any other sub-node or container can be deleted. Move anything that is inside the one you want to delete in order to proceed.

1.Go to Configuration and then Archival Structure

2. Use the remove button (1) to delete the node:

Using the API

API examples here are just shown for illustrative purposes. Check the LABDRIVE API documentation for additional information and all available methods.

To delete an Archival Node, use the following method:

curl --request DELETE \
     --url "$your_platform_url/api/archivalstructure/1"\
     --header "authorization: Bearer $your_platform_api_key"

Last updated