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

# Graphs API

Endpoint \[`GET`]:

| Endpoint                        | Beschrijving            |
| ------------------------------- | ----------------------- |
| **/api/\[app\_id]/graphs.json** | Geeft grafiekdata terug |

Parameters:

| Param        | Type             | Beschrijving                                                 |
| ------------ | ---------------- | ------------------------------------------------------------ |
| kind         | string           | Aggregaat van opgegeven namespace (web, background of eigen) |
| action\_name | string           | Voorbeeld: BlogPostsController-hash-show                     |
| from         | string (ISO8601) | Standaard 1 dag geleden indien nil                           |
| to           | string (ISO8601) | Standaard nu indien nil                                      |
| timeframe    | string           | Kan zijn: \[hour, day, month, year]                          |
| fields       | array            | Kan zijn: \[mean, count, ex\_count, ex\_rate, pct]           |

Geef ofwel de parameter `action_name` ofwel `kind` op.
U kunt of de waarden voor from en to opgeven, **of** de waarde voor timeframe.

Geldige timeframes zijn: `hour`, `day`, `month` en `year`

Geldige fields zijn:

| Field     | Beschrijving                                     |
| --------- | ------------------------------------------------ |
| mean      | gemiddelde responstijd                           |
| count     | doorvoer                                         |
| ex\_count | aantal exceptions                                |
| ex\_rate  | exception rate (percentage exceptions van count) |
| pct       | 90e percentiel (alleen voor trage requests)      |

Als u een action en exception wilt, voeg de strings dan samen met `:|:` als scheidingsteken.

Dus `BlogPostsController#show` met `Mongoid::RecordNotFound` wordt:
`BlogPostsController-hash-show:|:Mongoid::RecordNotFound"`

Voorbeeldrequest:

```shell Shell theme={null}
/api/5534f7e38c5ce90000000000/graphs.json?action_name=BlogPostsController-hash-show&fields[]=mean&fields[]=pct&timeframe=month&token=aaa&from=2013-09-03T22:00:00+01:00&to=2013-10-04T00:00:00+01:00
```

Dit endpoint geeft een JSON-object terug:

<CodeGroup>
  ```json JSON theme={null}
  {
    "from": "2013-09-03T22:00:00Z",
    "to": "2013-10-04T00:00:00Z",
    "resolution": "hourly",
    "data": [
      {
        "timestamp": 1378245600,
        "mean": 13.51942822948383,
        "pct": 13.213056043635918
      }
    ]
  }
  ```
</CodeGroup>
