docs: add get reports by app section
This commit is contained in:
@@ -52,43 +52,43 @@ A filter expression is a string that is used to filter records returned by the [
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
- `eq`
|
- eq
|
||||||
- Determines if the field equals a value.
|
- Determines if the field equals a value.
|
||||||
- `Text`, `number`, `date`, and `auto-number` fields and formula fields that have an output type of `text`, `number`, or `date`.
|
- `Text`, `number`, `date`, and `auto-number` fields and formula fields that have an output type of `text`, `number`, or `date`.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
- `ne`
|
- ne
|
||||||
- Determines if the field does not equal a value.
|
- Determines if the field does not equal a value.
|
||||||
- `Text`, `number`, `date`, and `auto-number` fields and formula fields that have an output type of `text`, `number`, or `date`.
|
- `Text`, `number`, `date`, and `auto-number` fields and formula fields that have an output type of `text`, `number`, or `date`.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
- `contains`
|
- contains
|
||||||
- Determines if the field contains a list value. List value can be its id or name.
|
- Determines if the field contains a list value. List value can be its id or name.
|
||||||
- `List` fields and formulas with output type of `list`.
|
- `List` fields and formulas with output type of `list`.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
- `isnull`
|
- isnull
|
||||||
- Determines if the field is null.
|
- Determines if the field is null.
|
||||||
- `Text`, `number`, `date`, and `auto-number` fields and formula fields that have an output type of `text`, `number`, or `date`.
|
- `Text`, `number`, `date`, and `auto-number` fields and formula fields that have an output type of `text`, `number`, or `date`.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
- `notnull`
|
- notnull
|
||||||
- Determines if the field is not null.
|
- Determines if the field is not null.
|
||||||
- `Text`, `number`, `date`, and `auto-number` fields and formula fields that have an output type of `text`, `number`, or `date`.
|
- `Text`, `number`, `date`, and `auto-number` fields and formula fields that have an output type of `text`, `number`, or `date`.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
- `lt`
|
- lt
|
||||||
- Determines if the field is less than a value.
|
- Determines if the field is less than a value.
|
||||||
- `Number`, `date`, and `auto-number` fields and formula fields that have an output type of `number` or `date`.
|
- `Number`, `date`, and `auto-number` fields and formula fields that have an output type of `number` or `date`.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
- `gt`
|
- gt
|
||||||
- Determines if the field is greater than a value.
|
- Determines if the field is greater than a value.
|
||||||
- `Number`, `date`, and `auto-number` fields and formula fields that have an output type of `number` or `date`.
|
- `Number`, `date`, and `auto-number` fields and formula fields that have an output type of `number` or `date`.
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1,7 @@
|
|||||||
# Get Reports by App {% #get-reports-by-app %}
|
# Get Reports by App {% #get-reports-by-app %}
|
||||||
|
|
||||||
|
This endpoint returns a [paged](#pagination) collection of [reports](#reports) for the given app.
|
||||||
|
|
||||||
|
## Query Parameters
|
||||||
|
|
||||||
|
**Note:** [Pagination](#pagination) query parameters can be used to control the number of reports returned in the response.
|
||||||
|
|||||||
@@ -1 +1,67 @@
|
|||||||
# Retrieving reports for the given app
|
# Retrieving reports for the given app
|
||||||
|
|
||||||
|
{% code method="GET" heading="/Reports/appId/{appId}" defaultLanguage="bash" %}
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl --location 'https://api.onspring.com/Reports/appId/195' \
|
||||||
|
--header 'X-ApiKey: 000000ffffff000000ffffff/00000000-ffff-0000-ffff-000000000000' \
|
||||||
|
```
|
||||||
|
|
||||||
|
```csharp
|
||||||
|
using Onspring.API.SDK;
|
||||||
|
|
||||||
|
var onspringClient = new OnspringClient(
|
||||||
|
config.BaseUrl,
|
||||||
|
config.ApiKey
|
||||||
|
);
|
||||||
|
|
||||||
|
var getReportsResponse = await onspringClient.GetReportsForAppAsync(195);
|
||||||
|
|
||||||
|
foreach (var report in getReportsResponse.Value.Items)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"{report.Id}, {report.AppId}, {report.Name}");
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
import { OnspringClient } from 'onspring-api-sdk';
|
||||||
|
import dotenv from 'dotenv';
|
||||||
|
dotenv.config();
|
||||||
|
|
||||||
|
const client = new OnspringClient(
|
||||||
|
process.env.BASE_URL,
|
||||||
|
process.env.API_KEY
|
||||||
|
);
|
||||||
|
|
||||||
|
const res = await client.getReportsByAppId(130);
|
||||||
|
const reports = res.data.items;
|
||||||
|
|
||||||
|
for (const report of reports) {
|
||||||
|
console.log(report);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
```python
|
||||||
|
from OnspringApiSdk.OnspringClient import OnspringClient
|
||||||
|
from configparser import ConfigParser
|
||||||
|
|
||||||
|
cfg = ConfigParser()
|
||||||
|
cfg.read('config.ini')
|
||||||
|
|
||||||
|
key = cfg['prod']['key']
|
||||||
|
url = cfg['prod']['url']
|
||||||
|
|
||||||
|
client = OnspringClient(url, key)
|
||||||
|
response = client.GetReportsByAppId(appId=195)
|
||||||
|
|
||||||
|
print(f'Status Code: {response.statusCode}')
|
||||||
|
print(f'App Id: {appId}')
|
||||||
|
print('Reports:')
|
||||||
|
|
||||||
|
for report in response.data.reports:
|
||||||
|
print(f' Id: {report.id}')
|
||||||
|
print(f' Name: {report.name}')
|
||||||
|
print(f' Description: {report.description}')
|
||||||
|
```
|
||||||
|
|
||||||
|
{% /code %}
|
||||||
|
|||||||
Reference in New Issue
Block a user