# Nonces

In DNAnexus, a **nonce** is a string that uniquely identifies a request against the DNAnexus API. Using a nonce ensures that regardless of how many times a request is made, the result remains the same as a single successful request. This is particularly useful for handling network failures. If a response is dropped on its way back to the client, the client can reissue the request with the nonce, and DNAnexus API recognizes it as a previous request and returns an exact replica of the dropped response.

The nonce field is used primarily in API methods for project, data object, and job creation. Using a nonce with these API methods prevents a client from creating duplicate items when only one is intended. The API methods are as follows:

* [`/app/new`](/developer/api/running-analyses/apps.md#api-method-app-new)
* [`/app-xxxx/run`](/developer/api/running-analyses/apps.md#api-method-app-xxxx-yyyy-run)
* [`/applet/new`](/developer/api/running-analyses/applets-and-entry-points.md#api-method-applet-new)
* [`/applet-xxxx/run`](/developer/api/running-analyses/applets-and-entry-points.md#api-method-applet-xxxx-run)
* [`/file/new`](/developer/api/introduction-to-data-object-classes/files.md#api-method-file-new)
* [`/job/new`](/developer/api/running-analyses/applets-and-entry-points.md#api-method-job-new)
* [`/org/new`](/developer/api/organizations.md#api-method-org-new)
* [`/record/new`](/developer/api/introduction-to-data-object-classes/records.md#api-method-record-new)
* [`/workflow/new`](/developer/api/running-analyses/workflows-and-analyses.md#api-method-workflow-new)
* [`/workflow-xxxx/run`](/developer/api/running-analyses/workflows-and-analyses.md#api-method-workflow-xxxx-run)

As a nonce is a unique identifier of a request, the input used in a request must remain unchanged when retrying with a nonce. If any change is made to the input, the API considers it a separate and different request and throws an InvalidInput error. The nonce field must not exceed 128 bytes in a UTF-8 encoded string.

Nonces are designed for recovery and retry of dropped requests within a short time period. This behavior is guaranteed only for second requests made within one hour of the original request. After one hour, the second request may create a new object (as if no nonce was supplied).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.dnanexus.com/developer/api/nonces.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
