diff --git a/src/docs/version_002/resources/records/get_records_by_query/copy.md b/src/docs/version_002/resources/records/get_records_by_query/copy.md index 6a8c4c8..0a10c8d 100644 --- a/src/docs/version_002/resources/records/get_records_by_query/copy.md +++ b/src/docs/version_002/resources/records/get_records_by_query/copy.md @@ -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. - `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. - `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. - `List` fields and formulas with output type of `list`. --- -- `isnull` +- isnull - 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`. --- -- `notnull` +- notnull - 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`. --- -- `lt` +- lt - 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`. --- -- `gt` +- gt - 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`. diff --git a/src/docs/version_002/resources/reports/get_reports_by_app/copy.md b/src/docs/version_002/resources/reports/get_reports_by_app/copy.md index e647043..d45ec6e 100644 --- a/src/docs/version_002/resources/reports/get_reports_by_app/copy.md +++ b/src/docs/version_002/resources/reports/get_reports_by_app/copy.md @@ -1 +1,7 @@ # 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. diff --git a/src/docs/version_002/resources/reports/get_reports_by_app/example.md b/src/docs/version_002/resources/reports/get_reports_by_app/example.md index a7b7487..8d41c22 100644 --- a/src/docs/version_002/resources/reports/get_reports_by_app/example.md +++ b/src/docs/version_002/resources/reports/get_reports_by_app/example.md @@ -1 +1,67 @@ # 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 %}