docs: add get reports by app section
This commit is contained in:
@@ -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 %}
|
||||||
Reference in New Issue
Block a user