Samples API
Samples index
Endpoints [GET]:
Endpoint | Description |
---|---|
/api/[app_id]/samples.json | This returns ALL sample types |
/api/[app_id]/samples/performance.json | This returns performance samples |
/api/[app_id]/samples/errors.json | This returns error samples |
Parameters:
Param | Type | Description |
---|---|---|
action_id | string | Example: BlogPostsController-hash-show |
exception | string | Example: NoMethodError |
since | timestamp/integer | All times are UTC |
before | timestamp/integer | All times are UTC |
limit | integer | The amount of entries returned (defaults to 10) |
count_only | boolean | (true/false) To only return a count |
Escape actions by replacing:
#
with-hash-
/
with-slash-
.
with-dot-
So BlogPostsController#show
becomes: BlogPostsController-hash-show
An example of a full request would be:
Shell
https://appsignal.com/api/5114f7e38c5ce90000000011/samples.json?token=HseUe&action_id=AccountsController-hash-index&exception=ActionView::Template::Error&since=1374843246
Result
This endpoint returns the following JSON (a slow sample and an error sample):
Samples show
Endpoint [GET]: /api/[app_id]/samples/[id].json
Parameters:
Param | Type | Description |
---|---|---|
id | string | Sanitized sample id (example: 51f29e7b183d700800150358_SlowController-hash-show_1476962400) |
Result
This is a SLOW log entry:
This is an ERROR log entry: