Data Object Lifecycle

To help reproducibility and ease of collaboration, data objects on the DNAnexus Platform have a lifecycle of starting in an open state when the underlying data can be modified, and ending in the closed state where the data can be accessed and shared reliably. Some classes, such as records, may be created and closed in the same operation (see the "close" option in the new record method). When shared, the data object ID does not change though some metadata fields are allowed to change which should not affect how the data is interpreted. When the data object is closed, the underlying data of the objects becomes fixed. This includes content such as the contents of files. The following metadata fields are also fixed when the data object is closed:

  • Types: a list of type conventions that the data object adheres to.

  • Details and Links: the details field stores arbitrary JSON that can contain links to other existing data objects.

  • Visibility: a boolean indicating whether the object is "visible" or not. A linked hidden object is (almost) always removed or cloned with its closest visible ancestor. See the section on cloning for more information.

Users may search through their own data with queries involving these metadata fields.

Some exceptions to this lifecycle exist. Applets are created in the "closed" state. Occasionally, it is desirable to leave a data object in the open state to have a mutable data object. Note however that only records are accessible in their open state. Files must be closed in order for their underlying data to be accessed. Unless specified otherwise, the following is the specification for the API method to close a data object.

API method: /class-xxxx/close

Specification

Initiates the process of closing the specified object if the object is not already in the "closing" or "closed" state.

If the object is a file or record in the "closing" or "closed" state, this call will have no effect. The call will report success, and the detail field will be set as shown in "Outputs" below.

Inputs

  • None

Outputs

  • id string ID of the manipulated object, such as "class-xxxx"

If the object is in the closing or closed state:

  • detail string An explanatory message.

Errors

  • ResourceNotFound (the specified object in the URL does not exist).

  • PermissionDenied (UPLOAD access required for the project in which the object was created).

Last updated

Was this helpful?