> You are reading the Docusign Developer Documentation. For clean Markdown of any page, append .md to the page URL.
>
> Documentation indexes by section:
> - APIs and SDKs: https://docusign.docs.buildwithfern.com/docs/llms.txt
> - Platform 101: https://docusign.docs.buildwithfern.com/platform/llms.txt
> - Extension Apps: https://docusign.docs.buildwithfern.com/extension-apps/llms.txt
> - Docusign CLI: https://docusign.docs.buildwithfern.com/docusign-cli/llms.txt
>
> Authentication (OAuth, JWT Grant, M2M): https://docusign.docs.buildwithfern.com/platform/auth
> Webhooks and Connect: https://docusign.docs.buildwithfern.com/platform/webhooks
>
> OpenAPI specifications: https://docusign.docs.buildwithfern.com/openapi.json
> MCP server: https://docusign.docs.buildwithfern.com/_mcp/server

# Tracking data and handling alerts

You can get activity tracking information for your organization by calling the Docusign Monitor API [DataSet:stream](/docs/monitor-api/reference/monitor/dataset/stream) endpoint. This endpoint enables you to download your organization’s data in segments specified by a cursor (a bookmark value returned by a previous `DataSet:stream` operation). You can use the resulting dataset to integrate the Monitor API with your existing SIEM software tools and apps.

* In the development (demo) environment, the endpoint is:
  `https://api-d.docusign.com/v1/organizations/{organizationId}/stream?cursor={{cursorValue}}&limit={{queryLimit}}`

* In the production environment, the endpoint is:
  `https://api.docusign.com/v1/organizations/{organizationId}/stream?cursor={{cursorValue}}&limit={{queryLimit}}`

## Using cursor values

When you call the [DataSet:stream](/docs/monitor-api/reference/monitor/dataset/stream) endpoint, you can supply two parameters, `cursor` and `limit`, that determine the subset of the monitoring data that will be returned in the response JSON.

**Note:** To call the Monitor API endpoint, you must have obtained an access token using JWT authentication. See [Authentication](/docs/monitor-api/monitor101/auth) for details.

| Name     | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `cursor` | A `string` query parameter that specifies the place in your monitoring data from which the request will begin gathering records. Your app can use `cursor` to keep its place while iterating through monitoring records in a way similar to how you might use a bookmark to keep your place while reading chapters of a book. Whenever you successfully call the Monitor API endpoint, the response will include an `endCursor` value which you can use to create the `cursor` for your next request, enabling you to chunk your downloads as you examine large numbers of event and alert records. Calls that do not specify a `cursor` will begin retrieving records starting seven days ago. If data is needed beginning at a certain point in time, `cursor` can be specified as an ISO DateTime string value (such as 2022-01-01T00:00:00Z) instead of a cursor query string. In this case, data will be retrieved beginning from that DateTime. The earliest data available in the system is from 2021-01-01. Docusign does not return all available data in response to a single request. Your integration should iterate through the dataset using a series of API calls, with each one requesting data starting from the `cursor` value and the subsequent request starting from the `endCursor` in the response. **Note:** If a request returns no data, your integration should continue iterating using `cursor` and `endCursor` until data is returned. To avoid throttling, do not make requests more frequently than once per minute. Not required. Defaults to 0. |
| `limit`  | An `Int32` query parameter that specifies the maximum number of records (up to 2000) to be returned in the response. Not required. Defaults to 1000. This parameter enforces a maximum number of records returned but does not guarantee a minimum number of records.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |

After a successful call, a set of JSON event and alert records is returned, including an `endCursor` metadata property.

| Name        | Description                                                                                                                                                                                 |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `endCursor` | A `string` value that specifies the place at which the monitoring data in the current response ended. Use the value of `endCursor` to begin your next query from this spot in your records. |

**`Request example`**

```php title="Request example"
declare -a Headers=('--header' "Authorization: Bearer {ACCESS_TOKEN}" \
                    '--header' "Accept: application/json" \
                    '--header' "Content-Type: application/json")

curl --request GET 
https://lens-d.docusign.net/api/v2.0/datasets/monitor/stream?limit=1 \
     "${Headers[@]}" \
```

**`Response example`**

```json title="Response example"
{
  "resultData": [
    {
      "Timestamp": "2022-02-26T21:05:13.4926967Z",
      "EventId": "4ab9fd4c-xxxx-xxxx-xxxx-7809f6b330ac",
      "Site": "HQTEST0",
      "AccountId": "a64a8b46-xxxx-xxxx-xxxx-18ba43dd0cce",
      "OrganizationId": "",
      "UserId": "d5fd7f48-xxxx-xxxx-xxxx-4c1adde0eadd",
      "IntegratorKey": "QTES-f79957b2-xxxx-xxxx-xxxx-80e57adfbb8e",
      "UserAgent": "Faraday v0.17.3",
      "UserAgentClientInfo": {
        "Browser": {
          "Family": "Faraday",
          "Version": {
            "Major": "0",
            "Minor": "17",
            "Patch": "3"
          }
        },
        "Device": {
          "Family": "Other",
          "Brand": "",
          "Model": ""
        },
        "Os": null
      },
      "IpAddress": "208.184.224.11",
      "IpAddressLocation": {
        "Latitude": 37.77,
        "Longitude": -122.44,
        "Country": "united states",
        "State": "california",
        "City": "san francisco"
      },
      "Object": "Envelope",
      "Action": "Sent",
      "Property": "",
      "Field": "",
      "Result": "",
      "Source": "API",
      "IsUserMemberOfDomain": null,
      "ReferencedUserIsMemberOfDomain": null,
      "ReferencedUserId": "",
      "ProxyStatus": "",
      "ProxyType": "",
      "ProxyLevel": "",
      "Latitude": 37.77000045776367,
      "Longitude": -122.44000244140625,
      "City": "san francisco",
      "State": "california",
      "Country": "united states",
      "Device": "",
      "Browser": "",
      "OS": "",
      "AffectedUserId": "",
      "AffectedUserIsMemberOfDomain": null,
      "Data": {
        "EnvelopeId": "3ecfa2fb-xxxx-xxxx-xxxx-353b98951d67",
        "RecipientList": [
          {
            "RecipientId": "0521b4ce-xxxx-xxxx-xxxx-4a6f0a8a0da7",
            "UserId": "369cd41d-xxxx-xxxx-xxxx-dada37c8afdf",
            "RecipientType": "Signer",
            "IDCheckRequired": "False",
            "DeliveryMethod": "Email"
          }
        ]
      }
    },
    {
      "Timestamp": "2022-02-26T21:05:17.9769915Z",
      "EventId": "69254827-xxxx-xxxx-xxxx-4295c56caed5",
      "Site": "HQTEST0",
      "AccountId": "a64a8b46-xxxx-xxxx-xxxx-18ba43dd0cce",
      "OrganizationId": "",
      "UserId": "d5fd7f48-f1ae-4436-aec7-4c1adde0eadd",
      "IntegratorKey": "QTES-f79957b2-xxxx-xxxx-xxxx-80e57adfbb8e",
      "UserAgent": "Faraday v0.17.3",
      "UserAgentClientInfo": {
        "Browser": {
          "Family": "Faraday",
          "Version": {
            "Major": "0",
            "Minor": "17",
            "Patch": "3"
          }
        },
        "Device": {
          "Family": "Other",
          "Brand": "",
          "Model": ""
        },
        "Os": null
      },
      "IpAddress": "208.184.224.11",
      "IpAddressLocation": {
        "Latitude": 37.77,
        "Longitude": -122.44,
        "Country": "united states",
        "State": "california",
        "City": "san francisco"
      },
      "Object": "Envelope",
      "Action": "Sent",
      "Property": "",
      "Field": "",
      "Result": "",
      "Source": "API",
      "IsUserMemberOfDomain": null,
      "ReferencedUserIsMemberOfDomain": null,
      "ReferencedUserId": "",
      "ProxyStatus": "",
      "ProxyType": "",
      "ProxyLevel": "",
      "Latitude": 37.77000045776367,
      "Longitude": -122.44000244140625,
      "City": "san francisco",
      "State": "california",
      "Country": "united states",
      "Device": "",
      "Browser": "",
      "OS": "",
      "AffectedUserId": "",
      "AffectedUserIsMemberOfDomain": null,
      "Data": {
        "EnvelopeId": "4f4b0b65-a03b-4fcc-91dc-f92b47155b08",
        "RecipientList": [
          {
            "RecipientId": "2f76c852-xxxx-xxxx-xxxx-135ce5413305",
            "UserId": "f3375bbb-xxxx-xxxx-xxxx-dc6125125a6c",
            "RecipientType": "Signer",
            "IDCheckRequired": "False",
            "DeliveryMethod": "Email"
          }
        ]
      }
    }
  ],
  "endCursor": 637815096000000000
}
```

## Next steps

* Review the event and alert objects in the [API reference](/docs/monitor-api/reference)
* See [best practices for handling alerts](/docs/monitor-api/monitor101/best-practices-handling-alerts)
* See [how to get monitoring data](/docs/monitor-api/how-to/get-monitoring-data)