Metadata¶
Support for the legacy Tapis meta service is provided by the meta command set. New, and of note, is support for directly storing and retrieving values using the metadata service, making its usage modality more like that of a key-value store. See usage examples below:
General Commands¶
meta create¶
Store Metadata in a new document
tapis meta create
[-V Record value]
[-N Record name]
[-F FILEPATH]
[--ini FILEPATH]
-
-V
Record value
,
--value
Record value
¶ Value for the document
-
-N
Record name
,
--name
Record name
¶ Optional name for the document
-
-F
FILEPATH
,
--file
FILEPATH
¶ JSON payload file
-
--ini
FILEPATH
¶ .ini file (project.ini)
Replaces legacy CLI command “metadata-addupdate”
meta update¶
Update an existing Metadata document by UUID
tapis meta update
[-V VALUE]
[-N NEW_NAME]
[-F FILEPATH]
[--ini FILEPATH]
[METADATA_UUID]
-
-V
VALUE
,
--value
VALUE
¶ Value for the document
-
-N
NEW_NAME
,
--rename
NEW_NAME
¶ Rename document
-
-F
FILEPATH
,
--file
FILEPATH
¶ JSON payload file
-
--ini
FILEPATH
¶ .ini file (project.ini)
-
METADATA_UUID
¶
Optional Metadata unique identifer
Replaces legacy CLI command “metadata-addupdate”
meta list¶
List Metadata documents
tapis meta list
[--sort-ascending | --sort-descending]
[-l INT]
[-o INT]
-
--sort-ascending
¶
sort the column(s) in ascending order
-
--sort-descending
¶
sort the column(s) in descending order
-
-l
INT
,
--limit
INT
¶ Limit to N records (default: 100)
-
-o
INT
,
--offset
INT
¶ Skip first N records
Replaces legacy CLI command “metadata-list”
Sharing Commands¶
Manage access by other users to Tapis metadata that you control.
meta pems drop¶
Drop all granted Permissions from a Metadata document
tapis meta pems drop
[--sort-ascending | --sort-descending]
[-l INT]
[-o INT]
METADATA_UUID
-
--sort-ascending
¶
sort the column(s) in ascending order
-
--sort-descending
¶
sort the column(s) in descending order
-
-l
INT
,
--limit
INT
¶ Limit to N records (default: 100)
-
-o
INT
,
--offset
INT
¶ Skip first N records
-
METADATA_UUID
¶
Metadata unique identifer
Replaces legacy CLI command “metadata-pems-update”
meta pems grant¶
Grant Permissions on a Metadata document to a User
tapis meta pems grant
[--sort-ascending | --sort-descending]
[-l INT]
[-o INT]
METADATA_UUID
USERNAME
PERMISSION
-
--sort-ascending
¶
sort the column(s) in ascending order
-
--sort-descending
¶
sort the column(s) in descending order
-
-l
INT
,
--limit
INT
¶ Limit to N records (default: 100)
-
-o
INT
,
--offset
INT
¶ Skip first N records
-
METADATA_UUID
¶
Metadata unique identifer
-
USERNAME
¶
Tapis username
-
PERMISSION
¶
Permission string (ALL| READ| WRITE| READ_WRITE| EXECUTE| READ_EXECUTE| WRITE_EXECUTE| NONE)
Replaces legacy CLI command “metadata-pems-update”
meta pems list¶
List Permissions for a Metadata document
tapis meta pems list
[--sort-ascending | --sort-descending]
[-l INT]
[-o INT]
METADATA_UUID
-
--sort-ascending
¶
sort the column(s) in ascending order
-
--sort-descending
¶
sort the column(s) in descending order
-
-l
INT
,
--limit
INT
¶ Limit to N records (default: 100)
-
-o
INT
,
--offset
INT
¶ Skip first N records
-
METADATA_UUID
¶
Metadata unique identifer
Replaces legacy CLI command “metadata-pems-list”
meta pems revoke¶
Revoke Permissions on a Metadata document for a User
tapis meta pems revoke
[--sort-ascending | --sort-descending]
[-l INT]
[-o INT]
METADATA_UUID
USERNAME
-
--sort-ascending
¶
sort the column(s) in ascending order
-
--sort-descending
¶
sort the column(s) in descending order
-
-l
INT
,
--limit
INT
¶ Limit to N records (default: 100)
-
-o
INT
,
--offset
INT
¶ Skip first N records
-
METADATA_UUID
¶
Metadata unique identifer
-
USERNAME
¶
Tapis username
Replaces legacy CLI command “metadata-pems-update”
Search Commands¶
Search for Tapis metadata by several criteria. Please consult
tapis meta search -h
for guidance.
Usage Examples¶
Metadata records have historically been written in Tapis by specifying a
complete, schema-compliant JSON document. This has been considered by some
users to be burdensome, so the CLI simplifies these operations. A JSON file
can be specified, but it is also possible to specify -name
and --value
or even just a --value
.
Example 1¶
# Store a simple value
#
# --name is not provided, causing one to be autogenerated
$ tapis meta create --value "This is a test"
+-------------+----------------------------------------+
| Field | Value |
+-------------+----------------------------------------+
| uuid | 7811051068989444586-242ac11a-0001-012 |
| owner | vaughn |
| name | vaughn.f16204ef7ed05949.191107T183550Z |
| value | This is a test |
| created | just now |
| lastUpdated | just now |
+-------------+----------------------------------------+
# Search by the document's name
$ tapis meta search --name eq vaughn.f16204ef7ed05949.191107T183550Z
+---------------------------------------+--------+----------------------------------------+
| uuid | owner | name |
+---------------------------------------+--------+----------------------------------------+
| 7811051068989444586-242ac11a-0001-012 | vaughn | vaughn.f16204ef7ed05949.191107T183550Z |
+---------------------------------------+--------+----------------------------------------+
# Display the document using its UUID
$ tapis meta show 7811051068989444586-242ac11a-0001-012
+-------------+----------------------------------------+
| Field | Value |
+-------------+----------------------------------------+
| uuid | 7811051068989444586-242ac11a-0001-012 |
| owner | vaughn |
| name | vaughn.f16204ef7ed05949.191107T183550Z |
| value | This is a test |
| created | 2 minutes ago |
| lastUpdated | 2 minutes ago |
+-------------+----------------------------------------+
# Update a document's value.
# (Note that the name doesn't change)
$ tapis meta update -V "This value was changed" 1111886352317476375-242ac11a-0001-012
+-------------+----------------------------------------+
| Field | Value |
+-------------+----------------------------------------+
| uuid | 7811051068989444586-242ac11a-0001-012 |
| owner | vaughn |
| name | vaughn.f16204ef7ed05949.191107T183550Z |
| value | This value was changed |
| created | 3 minutes ago |
| lastUpdated | just now |
+-------------+----------------------------------------+
Example 2¶
# Store a value with a defined name
$ tapis meta create --value "Another test" --name "key_name_101"
+-------------+---------------------------------------+
| Field | Value |
+-------------+---------------------------------------+
| uuid | 8195591104591958506-242ac11a-0001-012 |
| owner | vaughn |
| name | key_name_101 |
| value | Another test |
| created | just now |
| lastUpdated | just now |
+-------------+---------------------------------------+
# Rename the record
$ tapis meta update --name "renamed_key_101" 8195591104591958506-242ac11a-0001-012
+-------------+---------------------------------------+
| Field | Value |
+-------------+---------------------------------------+
| uuid | 8195591104591958506-242ac11a-0001-012 |
| owner | vaughn |
| name | renamed_key_101 |
| value | Another test |
| created | 2 minutes ago |
| lastUpdated | just now |
+-------------+---------------------------------------+
# Delete the record
$ tapis meta delete 8195591104591958506-242ac11a-0001-012
+----------+-------+
| Field | Value |
+----------+-------+
| deleted | 1 |
| messages | 0 |
+----------+-------+
Example 3¶
# Display the full JSON API response, including the document
$ tapis meta show -v 4405227902607364586-242ac11a-0001-012
{
"uuid": "4405227902607364586-242ac11a-0001-012",
"schemaId": null,
"internalUsername": null,
"owner": "vaughn",
"associationIds": [],
"name": "vaughn.f16204ef7ed05949.191107T183431Z",
"value": "This is a test",
"created": "2019-11-07T12:34:31.591-06:00",
"lastUpdated": "2019-11-07T12:34:31.591-06:00",
"_links": {
"self": {
"href": "https://api.tacc.utexas.edu/meta/v2/data/4405227902607364586-242ac11a-0001-012"
},
"permissions": {
"href": "https://api.tacc.utexas.edu/meta/v2/data/4405227902607364586-242ac11a-0001-012/pems"
},
"owner": {
"href": "https://api.tacc.utexas.edu/profiles/v2/vaughn"
},
"associationIds": []
}
}