documents
« Previous section Next section »
UCloud Developer Guide / Orchestration of Resources / Storage / Metadata / Metadata Documents
Metadata Documents
Metadata documents form the foundation of data management in UCloud.
Rationale
UCloud supports arbitrary of files. This feature is useful for general data management. It allows users to tag documents at a glance and search through them.
This feature consists of two parts:
Metadata templates (previous section): Templates specify the schema. You can think of this as a way of defining how your documents should look. We use them to generate user interfaces and visual representations of your documents.
Metadata documents (you are here): Documents fill out the values of a template. When you create a document you must attach it to a file also.
Table of Contents
Example: Sensitivity Document
Frequency of use | Common |
---|---|
Actors |
|
Remote Procedure Calls
browse
browse
Browses metadata documents
Request | Response | Error |
---|---|---|
Browses in all accessible metadata documents of a user. These are potentially filtered via the flags provided in the request, such as filtering for specific templates. This endpoint should consider any FileCollection
that the user has access to in the currently active project. Note that this endpoint can only return information about the metadata documents and not the file contents itself. Clients should generally present the output of this has purely metadata documents, they can link to the real files if needed. This should eventually result in either a browse
or retrieve
call in the files API.
retrieveAll
retrieveAll
Request | Response | Error |
---|---|---|
approve
approve
Request | Response | Error |
---|---|---|
create
create
Request | Response | Error |
---|---|---|
delete
delete
Request | Response | Error |
---|---|---|
moveMetadata
moveMetadata
Request | Response | Error |
---|---|---|
reject
reject
Request | Response | Error |
---|---|---|
Data Models
FileMetadataDocument
FileMetadataDocument
A metadata document which conforms to a FileMetadataTemplate
FileMetadataDocument.Spec
FileMetadataDocument.Spec
Specification of a FileMetadataDocument
FileMetadataDocument.Status
FileMetadataDocument.Status
The current status of a metadata document
FileMetadataDocument.ApprovalStatus
FileMetadataDocument.ApprovalStatus
The approval status of a metadata document
FileMetadataDocument.ApprovalStatus.Approved
FileMetadataDocument.ApprovalStatus.Approved
The metadata change has been approved by an admin in the workspace
FileMetadataDocument.ApprovalStatus.Pending
FileMetadataDocument.ApprovalStatus.Pending
The metadata document has not yet been approved
FileMetadataDocument.ApprovalStatus.Rejected
FileMetadataDocument.ApprovalStatus.Rejected
The metadata document has been rejected by an admin of the workspace
FileMetadataDocument.ApprovalStatus.NotRequired
FileMetadataDocument.ApprovalStatus.NotRequired
The metadata document does not require approval
FileMetadataAttached
FileMetadataAttached
FileMetadataTemplate
FileMetadataTemplate
A FileMetadataTemplate
allows users to attach user-defined metadata to any UFile
FileMetadataTemplateNamespaceType
FileMetadataTemplateNamespaceType
Determines how the metadata template is namespaces
FileMetadataAddRequestItem
FileMetadataAddRequestItem
FileMetadataBrowseRequest
FileMetadataBrowseRequest
The base type for requesting paginated content.
Paginated content can be requested with one of the following consistency
guarantees, this greatly changes the semantics of the call:
Consistency | Description |
---|---|
| Consistency is preferred but not required. An inconsistent snapshot might be returned. |
| Consistency is required. A request will fail if consistency is no longer guaranteed. |
The consistency
refers to if collecting all the results via the pagination API are consistent. We consider the results to be consistent if it contains a complete view at some point in time. In practice this means that the results must contain all the items, in the correct order and without duplicates.
If you use the PREFER
consistency then you may receive in-complete results that might appear out-of-order and can contain duplicate items. UCloud will still attempt to serve a snapshot which appears mostly consistent. This is helpful for user-interfaces which do not strictly depend on consistency but would still prefer something which is mostly consistent.
The results might become inconsistent if the client either takes too long, or a service instance goes down while fetching the results. UCloud attempts to keep each next
token alive for at least one minute before invalidating it. This does not mean that a client must collect all results within a minute but rather that they must fetch the next page within a minute of the last page. If this is not feasible and consistency is not required then PREFER
should be used.
📝 NOTE: Services are allowed to ignore extra criteria of the request if the next
token is supplied. This is needed in order to provide a consistent view of the results. Clients should provide the same criterion as they paginate through the results.
FileMetadataDeleteRequestItem
FileMetadataDeleteRequestItem
FileMetadataMoveRequestItem
FileMetadataMoveRequestItem
FileMetadataRetrieveAllRequest
FileMetadataRetrieveAllRequest
FileMetadataRetrieveAllResponse
FileMetadataRetrieveAllResponse
Last updated