System Methods
Learn about miscellaneous system methods that are part of the DNAnexus Platform API.
System API Method Specifications
API method: /system/bulkRankUpdate
/system/bulkRankUpdateSpecification
Given a list of root executions (either jobs or analyses) and a new rank, update the rank of all executions related to the provided root executions. The following restrictions apply:
A valid rank field must be provided.
At least one execution ID must be present.
A maximum of 100 root executions can be provided at once.
All execution IDs must be valid executions.
All executions must belong to a singular billTo.
The organization associated with the executions must have the license feature
executionRankEnabledactive.The user must be the original launcher of the executions or is an administrator of the organization.
A maximum of 1000 executions total can be updated at once.
A dry-run flag can be provided to skip the final update call.
Inputs
execIdsarray of strings Must be a list of root executions (either jobs or analyses).rankinteger The rank to set all executions to.dryRunboolean (optional) If set to true, the final update call is not performed.
Outputs
updatedCountinteger The amount of execution trees that were updated.
Errors
InvalidInput
input is not a hash
Expected input to have property "rank"
Expected key "rank" of input to be an integer
Expected key "rank" of input to be in range [-1024, 1023]
Expected input to be an array of nonempty strings
Expected key
dryRunof input to be a booleanAt least one execution ID must be provided
The max number of root executions updated at once is 100
All input executions must have the same billTo
The execution IDs were not root executions
ResourceNotFound
The execution IDs were not found
PermissionDenied
billTo does not have license feature executionRankEnabled
The execution IDs were not allowed to have their rank updated
API method: /system/describeDataObjects
/system/describeDataObjectsSpecification
Describes data objects in bulk, providing functionality equivalent to the describe routes, but for multiple data objects at a time. The describe options, for example, the mapping that would be supplied as input to file-xxxx/describe, for each object are determined from the following sources, in decreasing order of priority:
If the object is specified as a mapping that has the
describefield set, rather than as just a bare string, this value is used as the describe options (or, if set to the valuetrue, empty describe options are given).Otherwise, if the
classDescribeOptionsfield contains an entry for the class of the data object such as"file", this value is used as the describe options (or, if set to the valuetrue, empty describe options are given).Otherwise, if the
classDescribeOptionsfield contains an entry for the key"*", this value is used as the describe options (or, if set to the valuetrue, empty describe options are given).Otherwise, empty describe options are given.
Inputs
objectsarray of strings or mappings array of items, each representing a data object to be described. The array may contain up to 1000 elements. Each item is one of the following:a string indicating a data object ID to be described, such as "file-xxxx"
a mapping with the following fields, indicating that the data object is to be described with the specified options:
idstring ID of the data object to be describeddescribemapping or boolean (optional) a mapping containing describe options. Or the boolean valuetrue, indicating that empty describe options are to be supplied.
classDescribeOptionsmapping of strings to mappings or booleans (optional) specifies default describe options for each data object class (which may be overridden on a per-object basis). If supplied, this mapping should contain the following keys/values:The keys may be the names of any data object class, such as
"file", indicating a default value to be supplied for all data objects of that class. Or the string"*", indicating a default value to be supplied for all data objects that are of classes not otherwise named. For a list of data object classes, see the Data Object Classes reference.The values are mappings containing the describe options that are supplied, or the boolean value
true, indicating that empty describe options are to be supplied.
Outputs
resultsarray of mappings the results. This is an array of the same length as theobjectsfield of the input, containing the corresponding describe call results in the same order. For each item in the input, the corresponding item is a mapping with the following fields:describe: mapping (only present if the item was successfully described) the output hash from the describe routeerror: mapping (only present if the item was NOT successfully described) a mapping, containing at leasttypeandmessagefields, that indicates the nature of the error. See Errors (Protocols)statusCode: int (only present if the item was NOT successfully described) the HTTP status code that would have been returned if the describe route had been invoked in a standalone way
Errors
InvalidInput
objectsis not an array, contains elements that are neither strings nor hashes of the form described above, contains more than 1000 elements, or contains IDs that are not of a data object class.classDescribeOptionscontains values that are neither hashes nor the valuetrue
API method: /system/describeExecutions
/system/describeExecutionsSpecification
Describes executions in bulk (providing functionality equivalent to the describe routes, but for multiple executions at once). The describe options (the mapping that would be supplied as input to job-xxxx/describe and/or /analysis-xxxx/describe) for each execution are determined from the following sources, in decreasing order of priority:
If the execution is specified as a mapping that has the
describefield set, rather than as just a bare ID string, the describe field is used as the describe options (or, if set to the valuetrue, empty describe options are given).Otherwise, if the
classDescribeOptionsfield contains an entry for the class of the execution, either"job"or"analysis", this value is used as the describe options (or, if set to the valuetrue, empty describe options are given).Otherwise, if the
classDescribeOptionsfield contains an entry for the key"*", this value is used as the describe options (or, if set to the valuetrue, empty describe options are given).Otherwise, the empty hash as the describe options is given which would then return the default describe fields of each execution.
Inputs
executionsarray of strings or mappings array of items, each representing an execution to be described. The array may contain up to 1000 elements. Each item is one of the following:a string indicating an execution ID, such as "job-xxxx", to be described
a mapping with the following fields, indicating that the execution is to be described with the specified options:
idstring ID of the execution to be describedtrynon-negative integer (optional) The specific jobtryto fetch. Applies to jobs only. Defaults to the largest availabletry. See Restartable Jobs section for context.describemapping or boolean (optional) a mapping containing the describe options to use for the corresponding execution ortrue, which is equivalent to specifying the empty hash as the describe options
classDescribeOptionsmapping of strings to mappings or booleans (optional) specifies default describe options for each execution class (which may be overridden on a per-object basis). If supplied, this mapping should contain the following keys/values:The keys may be the names of any execution class (either
"job"or"analysis"), indicating a default value to be supplied for all executions of that class. Or the string"*", indicating a default value to be supplied for all executions that are of classes not otherwise named.The values are mappings containing the describe options that are supplied, or the boolean value
true, indicating that empty describe options are to be supplied.
Outputs
resultsarray of mappings an array of the same length as theexecutionsfield of the input, containing the corresponding describe call results in the same order. For each item in the input, the corresponding item is a mapping with the following fields:If the execution was successfully described:
describe: mapping the output hash from the describe route
If the execution was not successfully described (see the protocol errors for more information):
error: mapping a mapping, containing at leasttypeandmessagefields, that indicates the nature of the error.statusCode: int the HTTP status code that would have been returned if the describe route had been invoked in a standalone way.
Errors
InvalidInput
executionsis not an arrayexecutionscontains elements that are neither strings nor hashes of the form described aboveexecutionscontains more than 1000 elements, or contains IDs that are not of an execution class ("job"or"analysis")classDescribeOptionscontains values that are neither hashes nor the valuetrue
API method: /system/describeProjects
/system/describeProjectsSpecification
Describes all specified projects. This method provides similar functionality to that of the /project-xxxx/describe method but is used to describe multiple projects at once. Describe options (the mapping normally provided as input to /project-xxxx/describe to customize its output) may be specified for all projects and/or overridden on a per-project basis. The project descriptions and/or error descriptions (for cases in which projects cannot be successfully described) are returned in the SAME order in which the projects were specified in the input.
Inputs
projectsarray of strings or mappings array of items representing the projects to be described. The array may contain up to 1000 elements. Each element may be one of the following:a string indicating the ID of the project to be described. The describe options for the corresponding project default to
defaultDescribeOptionsa mapping with the following fields:
idstring ID of the project to be describeddescribemapping or boolean (optional, defaultdefaultDescribeOptions) Mapping containing the describe options to use for the corresponding project ortrue, which is equivalent to specifying the empty hash as the describe options
defaultDescribeOptionsmapping or boolean (optional, defaulttrue) mapping containing describe options ortrue.defaultDescribeOptionsis used as the describe options for each project inprojectsspecified as a string or specified as a mapping without thedescribefield.
Outputs
resultsarray of mappings results of invoking/project-xxxx/describeon each project inprojectswith its corresponding describe options. This is an array of the same length as theprojectsinput, and it contains the results of/project-xxxx/describein the same order in which the projects were specified inprojects. Each result is a mapping with the following fields:If the project was successfully described:
describemapping the output of invoking/project-xxxx/describe
If the project was not successfully described. See Errors (Protocols) for more information
errormapping a mapping containing thetypeandmessagefields to indicate the nature of the error. May contain additional fieldsstatusCodeint the HTTP status code that would have been returned had/project-xxxx/describebeen individually invoked for the project
Errors
InvalidInput
projectsis not an array.projectscontains elements that are neither strings nor mappings.projectscontains more than 1000 elements.projectscontains project ids that do not match the project ID syntax/
API method: /system/findDrives
/system/findDrivesSpecification
Find drives accessible to a user.
Inputs
name- string or mapping (optional): If a string, the exact case-sensitive name that the results must have. If a mapping, then it can have a subset of the following fields:regexpstring (mutually exclusive withglob, required ifglobis not present) A PCRE regular expression that the name of all results must matchflagsstring (optional). Can only be present ifregexpis present. This field can only have value "i", which denotes that case-insensitive matching should be performed with the regular expressionglobstring (mutually exclusive withregexp, required ifregexpis not present) A wildcard pattern that the name of all results must match. The valid wildcard characters are '*' (0 or more characters) and '?' (1 character)
cloud- string (optional): If provided, the result set contains only drives whose cloud matches the given string.disabled- boolean (optional): If true, the result set contains only drives which have been disabled. If false, the results contain drives which have not been disabled. If not specified, both disabled and live drives are returned.describe- mapping (optional): If specified, the results contain descriptive metadata about the found drives. The mapping is equivalent to the input used for calling/drive-xxxx/describe.created- mapping (optional): If at least one of the following keys is specified, the resulting drives must have been created in the indicated time period. If not specified, there is no constraint on drive creation time. The created hash should contain at least one of the following keys:aftertimestamp (optional) If specified, only return results created at or after this time. The value should be a positive number and should be less than or equal to the before value if specifiedbeforetimestamp (optional) If specified, only return results created at or before this time. The value should be a positive number.
Outputs
results- array of mappings: List of results, each with the following fields:id- string ID: of the result If describe was set to a mappingdescribe- mapping The output of the result's corresponding describe method
Errors
Unauthorized
Must supply authentication token
InvalidInput
The input is not a hash
name- (if provided) is not a string or does not conform to the expected input mappingcloud- (if provided) is not a stringdisabled- (if provided) is not a booleandescribe- (if provided) does not conform to the input format of/drive-xxxx/describecreated- (if provided) does not conform to the expected input mappingmodified- (if provided) does not conform to the expected input mapping
API method: /system/findGlobalWorkflows
/system/findGlobalWorkflowsSpecification
This route provides functionality to search for workflows. The ordering of results is arbitrary. Only workflows for which the requesting user has access to are returned. This includes workflows where the user is on the authorized users list.
Inputs
namestring or mapping (optional) If a string, the exact case-sensitive name that the results must have. If a mapping, then it can have a subset of the following fields:regexpstring (mutually exclusive withglob, required ifglobis not present) A PCRE regular expression that the name of all results must matchflagsstring (optional, can only be present if regexp is present) This field can only have value "i", which denotes that case-insensitive matching should be performed with the regular expressionglobstring (mutually exclusive withregexp, required ifregexpis not present) A wildcard pattern that the name of all results must match. The valid wildcard characters are '*' (0 or more characters) and '?' (1 character).
categorystring or mapping (optional) Specifies the category or categories that matching workflows must have. Can be provided in the following ways:A simple string to match a single category exactly, for example,
"Alignment".An AND condition requiring all specified categories to match, for example,
{"$and": ["Alignment", "NGS"]}.An OR condition requiring at least one specified category to match, for example,
{"$or": ["Alignment", "Variant Calling"]}.Complex nested conditions:
{"$or": ["Alignment", {"$and": ["NGS", "RNA-Seq"]}]}.
allVersionsboolean (optional, default false) Whether to remove the restriction that only workflow versions tagged with "default" are returnedpublishedboolean (optional) If true, only published workflows are returned. If false, only unpublished workflows are returnedbillTostring or array of strings (optional) If a string, then the result set contains only workflows whosebillTomatches the string. If an array, then the result set contains only workflows whosebillTois one of the specified entities.createdBystring (optional) ID of the user who created the workflowdeveloperstring (optional) ID of a developer the workflow must haveauthorizedUserstring (optional) userID, orgID or "PUBLIC" that must exist in each workflow'sauthorizedUserslistmodifiedmapping (optional) If at least one of the following keys is specified, the resulting workflows must have been last modified in the indicated time period. If not specified, there is no constraint on when the workflow was last modified. If amodifiedhash does not contain at least one of the following keys, an error is thrown.aftertimestamp (optional) If specified, only return results that were last modified at or after this timebeforetimestamp (optional) If specified, only return results that were last modified at or before this time
createdmapping (optional) If at least one of the following keys is specified, the resulting workflows must have been created in the indicated time period. If not specified, there is no constraint on workflow creation time. If acreatedhash does not contain at least one of the following keys, an error is thrown.aftertimestamp (optional) If specified, only return results created at or after this timebeforetimestamp (optional) If specified, only return results created at or before this time
describeboolean or mapping (optional, default false) False indicates that no extra metadata should be retrieved with the results. A mapping represents the input that would be used for calling/globalworkflow-xxxx/describeon each of the returned results. A value of true is equivalent to the empty hash input.startingstring (optional) Continue a previous query that had reached its limit. The value that was returned as next in the query's output should be provided herelimitint (optional, default 1000) Maximum number of results that may be returned. Must be between 1 and 1000 (inclusive)
Outputs
resultsarray of mappings List of results, each with the following fields:idstring ID of the resultdescribemapping The output of the result's correspondingdescribemethod if thedescribemethod was set as an input
nextstring or null If null, all results were reported inresults. If a string, represents the next result that could not be returned becauselimitresults have already been returned. This value should be passed directly tostartingin a subsequent query if more results are desired.
Errors
API method: /system/generateBatchInputs
/system/generateBatchInputsSpecification
Generate inputs for a batch execution given a project-id, folder, and a mapping of input names and regular expressions.
Inputs
projectstring project IDfolderstring folder path inprojectto recursively queryinputsmapping where each item is a mapping with the following format:inputName: regexpwhereinputNameis name of an input for an applet and regexp is the query. At least one group must be providedinputNamestring the name of the inputregexpstring regular expression to query for files
Outputs
batchInputsarray of mappings array of results for eachbatchPatterninputsmapping eachinputNamefound for thebatchPattern.inputNamenamestring filenameidsarray a list of file IDs
errorboolean (optional) true if multiple files are found for a single regexp or not all inputs are satisfied for abatchPatternbatchPatternstring Pattern of first group matched by the regular expression
Errors
InvalidInput
projectis not a project ID.regexpis not a valid regular expressionregexpquery returns greater than 100,000 results
PermissionDenied
At least VIEW access to the specified
projectis required
API method: /system/resolveDataObjects
/system/resolveDataObjectsSpecification
Resolves data objects in bulk. This method takes as input a list of object specifications, which may include the project id, folder path, and object name. Each object specification is processed in the following way: a search is performed for all data objects that exist in the specified project and folder and have the specified name. An array is returned containing all the matching results, where each element in the array is a mapping with keys project and id and values being the respective DNAnexus IDs for the project and object.
Inputs
projectstring (required unless everyobjectsentry containsproject) The ID of the default project contextfolderstring (optional, default "/") Folder path inprojectthat is used as the default folder for objects that do not explicitly specify a folder pathobjectsarray of mappings array of object specifications, each representing a data object to be resolved. The array may contain up to 1000 elements. Each item is a mapping with the following fields:namestring the name of the data object to be resolvedfolderstring (required ifprojectis specified. Otherwise optional, defaults to top levelfolderinput) folder path of the data object to be resolvedprojectstring (optional, defaults to top levelprojectinput) ID of the project in which to resolve this data object. If specified,foldermust also be specified in this mapping.
Outputs
resultsarray of array of mappings the results. This is an array that is parallel to theobjectsinput. Specifically, this means that this array has the same length asobjects, andresults[i]corresponds toobjects[i]. Each entry inresultscontains zero or more mappings, each with the following fields:project: The project ID in which the data object was resolvedid: The data object ID
Errors
InvalidInput
projectis not a project ID. This applies to both the top levelprojectand also to theprojectinput in each element ofobjects.objectscontains more than 1000 elementsfolderif specified, must be a valid folder pathWithin each element of
objects,foldermust be specified ifprojectis specified
PermissionDenied
At least VIEW access to the specified
projectis required, as well as at least VIEW access to the project IDs specified in theobjectsmappings.
API method: /system/whoami
/system/whoamiSpecification
Returns the user ID based on the authentication token.
Inputs
fieldsmapping (optional) specifies the optional fields to include in the output of this method.key string
"clientIp"value boolean the value true.
Outputs
idstring ID of the user. The following fields are only returned if the corresponding field in the fields input is set to true:"clientIp"string IP address as seen by the API server.
Errors
InvalidAuthentication
The request is not from a legal, validated user
Search-Related Methods
See Search for additional system methods related to finding objects based on certain criteria.
Last updated
Was this helpful?