docs: add get reports by app section

This commit is contained in:
Stevan Freeborn
2023-04-24 06:48:49 -05:00
parent a64eb9a524
commit 863e6205fc
3 changed files with 63 additions and 0 deletions
+6
View File
@@ -76,6 +76,12 @@ export const versionOne: DocsStructure = {
copy: 'copy.md', copy: 'copy.md',
example: 'example.md', example: 'example.md',
}, },
{
title: 'Get Reports by App',
folder: 'get_reports_by_app',
copy: 'copy.md',
example: 'example.md',
},
], ],
}, },
{ {
@@ -0,0 +1,19 @@
# Get Reports by App {% #get-reports-by-app %}
This endpoint returns an array of [reports](#reports) for the given app.
## Query Parameters
{% table %}
- Parameter Name
- Data Type
- Description
---
- appId
- `number`
- The id of the app to retrieve reports for.
{% /table %}
@@ -0,0 +1,38 @@
# Retrieving reports for the given app
{% code method="GET" heading="/Reports" defaultLanguage="bash" %}
```bash
curl --location 'https://api.onspring.com/v1/Reports?appId=195' \
--header 'X-ApiKey: 000000ffffff000000ffffff/00000000-ffff-0000-ffff-000000000000' \
```
```csharp
using Onspring.API.SDK.Helpers;
var httpHelper = new HttpHelper(
config.baseUrl,
config.apiKey
);
foreach (var report in httpHelper.GetAppReports(5))
{
Console.WriteLine($"{report.Id}, {report.AppId}, {report.Name}");
}
```
{% /code %}
{% code heading="RESPONSE" defaultLanguage="json" %}
```json
[
{
"AppId": 195,
"Id": 613,
"Name": "Test 1"
}
]
```
{% /code %}