> ## Documentation Index
> Fetch the complete documentation index at: https://syteca.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# List Endpoint Access Requests

> Syteca Data Connector REST API endpoint returning processed Endpoint Access Control access requests with full audit details — requester, session duration, status, approver, comments. Paginated.

Returns processed Endpoint Access Control access requests with the complete audit trail per request — who requested access, who approved or denied it, when, what comment was left, and how long the resulting session lasted. **Paginated** with up to 1000 requests per call.

```http theme={"system"}
GET https://<hostname>/ekranapi/AccessRequests/GetEndpointAccessRequests
```

## Authentication

<ParamField header="ApiKey" type="string" required>
  Your Active API Key from the Management Tool.
</ParamField>

## Query parameters

<ParamField query="start" type="string">
  Access requests processed **after this time** are included.

  Accepted formats: `2021-04-01`, `2021-04-01T12:00`, `2021-04-01T12:00:00`.
</ParamField>

<ParamField query="end" type="string">
  Access requests processed **before this time** are included.
</ParamField>

<ParamField query="count" type="int" default="1000">
  Number of access requests to return per request.

  Default: `1000`. Maximum: `1000`.
</ParamField>

<ParamField query="afterId" type="int">
  Cursor for pagination — the ID after which to start returning records. Use the `afterId` from a previous response to fetch the next batch.
</ParamField>

<Warning>
  Requesting more than 1000 access requests (`count > 1000`) returns **HTTP 400 Bad Request**.
</Warning>

<Note>
  If both `start` and `end` are omitted, all access requests in the database are returned (subject to pagination).
</Note>

## Response (200 OK)

<ResponseField name="afterId" type="int">
  The ID of the first access request in the batch — pass it as `afterId` on the next request to fetch the next page. **`null`** indicates the last page.
</ResponseField>

<ResponseField name="requests" type="array">
  Array of access request objects:

  <Expandable title="Access request">
    <ResponseField name="id" type="int">
      A service field required for pagination.
    </ResponseField>

    <ResponseField name="requestedAt" type="date">
      When the access request was made.
    </ResponseField>

    <ResponseField name="userName" type="string">
      The user name of the user requesting access.
    </ResponseField>

    <ResponseField name="sessionDuration" type="timespan">
      Total session time after access was granted — format `hh:mm:ss.fffffff`.
    </ResponseField>

    <ResponseField name="sessionProductiveDuration" type="timespan">
      Total session time excluding idle time.
    </ResponseField>

    <ResponseField name="status" type="string">
      The access request status — `Approved`, `Denied`, or `Expired`.
    </ResponseField>

    <ResponseField name="remoteIp" type="string">
      The IP address of the user requesting access.
    </ResponseField>

    <ResponseField name="statusChangedAt" type="date">
      When the request status was changed (when it was approved, denied, or expired).
    </ResponseField>

    <ResponseField name="statusChangedBy" type="string">
      The user name of the user who changed the status of the request.
    </ResponseField>

    <ResponseField name="statusChangeComment" type="string">
      The comment left by the user who changed the status.
    </ResponseField>
  </Expandable>
</ResponseField>

## Example

<RequestExample>
  ```bash cURL theme={"system"}
  curl -X GET "https://<hostname>/ekranapi/AccessRequests/GetEndpointAccessRequests?start=2023-02-01&end=2023-02-28&count=1000" \
    -H "ApiKey: xJ)tsCNcpj)l+]}(@_|lt!t………"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={"system"}
  {
    "afterId": null,
    "requests": [
      {
        "id": 1,
        "requestedAt": "2023-02-08T13:26:37.763",
        "userName": "windev2210eval\\user",
        "sessionDuration": "00:40:34.4150000",
        "sessionProductiveDuration": "00:28:02.8690000",
        "status": "Approved",
        "remoteIp": "172.31.240.1",
        "statusChangedAt": "2023-02-08T13:32:34.437",
        "statusChangedBy": "admin",
        "statusChangeComment": "approve message"
      },
      {
        "id": 2,
        "requestedAt": "2023-02-08T14:30:55.527",
        "userName": "windev2210eval\\user",
        "sessionDuration": "00:04:15.2660000",
        "sessionProductiveDuration": "00:04:12.2760000",
        "status": "Approved",
        "remoteIp": "172.31.240.1",
        "statusChangedAt": "2023-02-08T14:31:05.187",
        "statusChangeBy": "admin",
        "statusChangeComment": "approve 2 message"
      }
    ]
  }
  ```
</ResponseExample>

<Tip>
  **Pagination loop**: call the endpoint with `count=1000` and no `afterId`. From the response, take `afterId` and pass it as the parameter in the next call. When the response contains `afterId: null`, you've reached the last page.
</Tip>

<Tip>
  **For compliance reporting** (SOC 2, PCI DSS, audit evidence), this endpoint provides the complete access-request audit trail in a single call: who requested, who approved, when, why, and what they did with the access. Pipe it into your compliance dashboard or evidence-collection pipeline.
</Tip>

## Errors

See [Status codes](/docs/api/data-connector/api-reference#status-codes). Common errors:

* **400 Bad Request** — invalid time format, or `count > 1000`.
* **403 Forbidden** — Data Connector not registered.

## Related

<CardGroup cols={2}>
  <Card title="Endpoint Access Control" icon="shield" href="/docs/administration/access/endpoint-access-control">
    The Management Tool feature that produces these requests.
  </Card>

  <Card title="Audit log" icon="scroll-text" href="/docs/administration/audit-log">
    Complementary audit data for administrative actions.
  </Card>

  <Card title="List alerts" icon="bell-ring" href="/docs/api/data-connector/endpoints/get-alerts">
    Alert events triggered during access-granted sessions.
  </Card>

  <Card title="API reference" icon="square-code" href="/docs/api/data-connector/api-reference">
    Base URL, authentication, status codes.
  </Card>
</CardGroup>
