To facilitate 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. In addition to fixing the underlying data of the objects (e.g. the contents of a file), 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
Users may search through their own data with queries involving these metadata fields.
There are some exceptions to this lifecycle; applets are created in the "closed" state, and there are occasionally cases where it is desirable to leave a data object in the open state in order to have a mutable data object. Note however that only records are accessible in their open state, whereas 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.
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.
id string ID of the manipulated object (i.e. the string "class-xxxx")
If the object is in the
detail string String containing an explanatory message
ResourceNotFound (the specified object in the URL does not exist)
PermissionDenied (UPLOAD access required for the project in which the object was created)