Records
A record object stores no additional data nor has any additional routes beyond those described for all entities and classes. A record object can be used to store data in its details, that is, as a base object containing only metadata and links to other objects.
Record API Method Specifications
API method: /record/new
/record/newSpecification
Creates a new record object. If initializeFrom is set to a hash specifying a record object, then all metadata fields of the new record created are initialized to be the same as the specified record (except for any other specified fields).
Inputs
projectstring ID of the project or container to which the record should belong, such as the string "project-xxxx"namestring (optional, default is the new ID) The name of the objecttagsarray of strings (optional) Tags to associate with the objecttypesarray of strings (optional) Types to associate with the object. See the Types page for details on valid inputhiddenboolean (optional, default false) Whether the object should be hiddenpropertiesmapping (optional) Properties to associate with the objectkey Property name
value string Property value
detailsmapping or array (optional, default { }) JSON object or array that is to be associated with the object. See the Object Details section for details on valid inputfolderstring (optional, default "/") Full path of the folder that is to contain the new objectcloseboolean (optional, default false) Whether the record should be closed immediately after creationparentsboolean (optional, default false) Whether all folders in the path provided infoldershould be created if they do not existinitializeFrommapping (optional) Indicate an existing record from which to use the metadata as default values for all fields that are not given:projectstring ID of the project or container containing the record to useidstring ID of the record to use
noncestring (optional) Unique identifier for this request. Ensures that even if multiple requests fail and are retried, only a single record is created. For more information, see Nonces.
Outputs
idstring ID of the created record object, for example, a string in the form "record-xxxx"
Errors
InvalidInput
A reserved linking string ("$dnanexus_link") appears as a key in a hash in
detailsbut is not the only key in the hashA reserved linking string ("$dnanexus_link") appears as the only key in a hash in
detailsbut has value other than a stringThe
idgiven underinitializeFromis not a valid record IDFor each property key-value pair, the size, encoded in UTF-8, of the property key may not exceed 100 bytes and the property value may not exceed 700 bytes
A
noncewas reused in a request but other inputs had changed signifying a new and different requestA
noncemay not exceed 128 bytes
InvalidType (
projectis not a project ID)PermissionDenied (UPLOAD access required, VIEW access required for the project specified under
initializeFromif a record was specified)ResourceNotFound (the specified project is not found, the route in
folderdoes not exist whileparentsis false, or the specified project and/or record ID specified ininitializeFromare not found)
API method: /record-xxxx/describe
/record-xxxx/describeSpecification
Describes a record. A project ID can be given to request user-provided metadata from a particular project and serves as a hint. If the specified project doesn't contain the object but another accessible project does (with user having VIEW permissions), that other project's metadata is returned instead. The response includes the project ID used for the metadata, whether it matches the hint or not. Details can also be requested via this method, but require VIEW access to be returned.
Alternatively, you can use the /system/describeDataObjects method to describe many data objects at once.
Inputs
projectstring (optional) Project or container ID to be used as a hint for finding the object in an accessible projectdefaultFieldsboolean (optional, default false iffieldsis supplied, true otherwise) Whether to include the default set of fields in the output (the default fields are described in the "Outputs" section below). The selections are overridden by any fields explicitly named infields.fieldsmapping (optional) Include or exclude the specified fields from the output. These selections override the settings indefaultFields.key Desired output field. See the "Outputs" section below for valid values here
value boolean Whether to include the field
The following options are deprecated (and are ignored if fields is present):
propertiesboolean (optional, default false) Whether the properties should be returneddetailsboolean (optional, default false) Whether the details should also be returned
Outputs
idstring The object ID, such as "record-xxxx"
The following fields are included by default (but can be disabled using fields or defaultFields):
projectstring ID of the project or container in which the object was foundclassstring The value "record"typesarray of strings Types associated with the objectcreatedtimestamp Time at which this object was createdstatestring Either "open" or "closed"hiddenboolean Whether the object is hidden or notlinksarray of strings The object IDs that are pointed to from this objectnamestring The name of the objectfolderstring The full path to the folder containing the objectsponsoredboolean Whether the object is sponsored by DNAnexustagsarray of strings Tags associated with the objectmodifiedtimestamp Time at which the user-provided metadata of the object was last modifiedcreatedBymapping How the object was createduserstring ID of the user who created the object or launched an execution which created the objectjobstring present if a job created the object ID of the job that created the objectexecutablestring present if a job created the object ID of the app or applet that the job was running
The following field (included by default) is available if the object is sponsored by a third party:
sponsoredUntiltimestamp Indicates the expiration time of data sponsorship. This field exists only for sponsored objects and specifies a future timestamp.
The following fields are only returned if the corresponding field in the fields input is set to true:
propertiesmapping Properties associated with the objectkey Property name
value string Property value
detailsmapping or array Contents of the object's details
Errors
ResourceNotFound (the specified object does not exist or the specified
projectdoes not exist)InvalidInput (the input is not a hash,
project(if supplied) is not a string, or the value ofproperties(if supplied) is not a boolean)PermissionDenied (VIEW access required for the
projectprovided (if any), and VIEW access required for some project containing the specified object (not necessarily the same as the hint provided))
Last updated
Was this helpful?