> ## 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

Endpunkt \[`GET`]:

| Endpunkt                        | Beschreibung            |
| ------------------------------- | ----------------------- |
| **/api/\[app\_id]/graphs.json** | Gibt Graph-Daten zurück |

Parameter:

| Param        | Typ              | Beschreibung                                                          |
| ------------ | ---------------- | --------------------------------------------------------------------- |
| kind         | string           | Aggregat des angegebenen Namespace (web, background oder ein eigener) |
| action\_name | string           | Beispiel: BlogPostsController-hash-show                               |
| from         | string (ISO8601) | Standardmäßig 1 Tag in der Vergangenheit, wenn nicht angegeben        |
| to           | string (ISO8601) | Standardmäßig jetzt, wenn nicht angegeben                             |
| timeframe    | string           | Mögliche Werte: \[hour, day, month, year]                             |
| fields       | array            | Mögliche Werte: \[mean, count, ex\_count, ex\_rate, pct]              |

Geben Sie entweder den Parameter `action_name` oder `kind` an.
Sie können entweder die Werte from und to angeben, **oder** den Wert timeframe.

Gültige Zeitrahmen sind: `hour`, `day`, `month` und `year`

Gültige Felder sind:

| Feld      | Beschreibung                                                 |
| --------- | ------------------------------------------------------------ |
| mean      | mittlere Antwortzeit                                         |
| count     | Durchsatz                                                    |
| ex\_count | Anzahl der Exceptions                                        |
| ex\_rate  | Exception-Rate (prozentualer Anteil der Exceptions an count) |
| pct       | 90. Perzentil (nur für langsame Anfragen)                    |

Wenn Sie eine Action und eine Exception kombinieren möchten, verketten Sie die Strings mit `:|:` als Trennzeichen.

So wird aus `BlogPostsController#show` mit `Mongoid::RecordNotFound`:
`BlogPostsController-hash-show:|:Mongoid::RecordNotFound"`

Beispielanfrage:

```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
```

Dieser Endpunkt gibt ein JSON-Objekt zurück:

<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>
