docs: add separate sections for report and record data format

This commit is contained in:
Stevan Freeborn
2023-04-24 07:23:42 -05:00
parent 77fb97e4af
commit 938dd877e6
10 changed files with 122 additions and 13 deletions
+12 -6
View File
@@ -16,12 +16,6 @@ export const versionTwo: DocsStructure = {
copy: 'copy.md',
example: 'example.md',
},
{
title: 'Data Format',
folder: 'data_format',
copy: 'copy.md',
example: 'example.md',
},
{
title: 'Dates',
folder: 'dates',
@@ -108,6 +102,12 @@ export const versionTwo: DocsStructure = {
},
],
},
{
title: 'Report Data Format',
folder: 'report_data_format',
copy: 'copy.md',
example: 'example.md',
},
{
title: 'Get Reports by App',
folder: 'get_reports_by_app',
@@ -198,6 +198,12 @@ export const versionTwo: DocsStructure = {
copy: 'copy.md',
example: 'example.md',
},
{
title: 'Record Data Format',
folder: 'record_data_format',
copy: 'copy.md',
example: 'example.md',
},
{
title: 'Get Records by App',
folder: 'get_records_by_app',
@@ -42,6 +42,6 @@ This endpoint returns a single [record](#records) based on the given record id.
- dataFormat
- `string`
- The [format](#data-format) of the field data in the response. Valid values are `Raw` and `Formatted`. If not specified, `Raw` will be used.
- The [format](#record-data-format) of the field data in the response. Valid values are `Raw` and `Formatted`. If not specified, `Raw` will be used.
{% /table %}
@@ -38,6 +38,6 @@ This endpoint returns a [paged](#pagination) collection of [records](#records) f
- dataFormat
- `string`
- The [format](#data-format) of the field data in the response. Valid values are `Raw` and `Formatted`. If not specified, `Raw` will be used.
- The [format](#record-data-format) of the field data in the response. Valid values are `Raw` and `Formatted`. If not specified, `Raw` will be used.
{% /table %}
@@ -32,7 +32,7 @@ This endpoint returns a batch of [records](#records) that match the given ids. T
- dataFormat
- `string`
- The [format](#data-format) of the field data in the response. Valid values are `Raw` and `Formatted`. If not specified, `Raw` will be used.
- The [format](#record-data-format) of the field data in the response. Valid values are `Raw` and `Formatted`. If not specified, `Raw` will be used.
{% /table %}
@@ -36,7 +36,7 @@ This endpoint returns a [paged](#pagination) collection of [records](#records) f
- dataFormat
- `string`
- The [format](#data-format) of the field data in the response. Valid values are `Raw` and `Formatted`. If not specified, `Raw` will be used.
- The [format](#record-data-format) of the field data in the response. Valid values are `Raw` and `Formatted`. If not specified, `Raw` will be used.
{% /table %}
@@ -1,6 +1,6 @@
# Data Format {% #data-format %}
# Record Data Format {% #record-data-format %}
When retrieving data via the Onspring API using certain endpoints you can specify the format of the data being retrieved. The format will be specified either in a query parameter or in the request body. These endpoints are:
When retrieving data for [records](#records) via the Onspring API using certain endpoints you can specify the format of the data being retrieved. The format will be specified either in a query parameter or in the request body. These endpoints are:
- [Get Records by App](#get-records-by-app)
- [Get Record by Id](#get-record-by-id)
@@ -30,7 +30,7 @@ This endpoint returns the [Report Data](#report-data) for the given report.
- apiDataFormat
- `string`
- The [format](#data-format) of the field data in the response. Valid values are `Raw` and `Formatted`. If not specified, `Raw` will be used.
- The [format](#report-data-format) of the field data in the response. Valid values are `Raw` and `Formatted`. If not specified, `Raw` will be used.
---
@@ -0,0 +1,103 @@
# Report Data Format {% #report-data-format %}
When retrieving data for [reports](#reports) via the Onspring API using certain endpoints you can specify the format of the data being retrieved. The format will be specified in a query parameter. These endpoints are:
- [Get Report by Id](#get-report-by-id)
The format values can be either `Raw` or `Formatted`. If the format is not specified then the default format is `Raw`. The format specified will be applied to all the data being retrieved. The impact of the format on the data retrieve will depend on the type of field. The following tables shows the impact of the format on the data retrieved for each field type.
## Raw Format {% #raw-format %}
{% table %}
- Field Type
- Return Data Type
- Description
---
- AutoNumber
- `number`
- The field value will be returned as a number.
---
- Date/Time
- `string`
- The field value will be returned as a string in the format `YYYY-MM-DDTHH:MM:SSZ`.
---
- List
- `string` or `string[]`
- The field value will be returned as a string or an array of strings where the strings are the GUID ids of the selected list items.
---
- Number
- `number`
- The field value will be returned as a number.
---
- Text
- `string`
- The field value will be returned as a string including any HTML markup.
---
- Time Span
- `object`
- The field value will be returned as a [Time Span](#time-span-field-value) object.
---
{% /table %}
## Formatted Format {% #formatted-format %}
{% table %}
- Field Type
- Return Data Type
- Description
---
- AutoNumber
- `string`
- The field value will be returned as a string including any configured formatting.
---
- Date/Time
- `string`
- The field value will be returned as a string including any configured formatting.
---
- List
- `string` or `string[]`
- The field value will be returned as a string or an array of strings where the strings are the names of the selected list items.
---
- Number
- `string`
- The field value will be returned as a string including any configured formatting.
---
- Text
- `string`
- The field value will be returned as a string without any HTML markup.
---
- Time Span
- `string`
- The field value will be returned as a string which represents the time span entered.
---
{% /table %}