diff --git a/src/docs/version_002/docsStructure.ts b/src/docs/version_002/docsStructure.ts index 1f5b46c..605b575 100644 --- a/src/docs/version_002/docsStructure.ts +++ b/src/docs/version_002/docsStructure.ts @@ -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', diff --git a/src/docs/version_002/resources/records/get_record_by_id/copy.md b/src/docs/version_002/resources/records/get_record_by_id/copy.md index e39c44e..e3adbc4 100644 --- a/src/docs/version_002/resources/records/get_record_by_id/copy.md +++ b/src/docs/version_002/resources/records/get_record_by_id/copy.md @@ -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 %} diff --git a/src/docs/version_002/resources/records/get_records_by_app/copy.md b/src/docs/version_002/resources/records/get_records_by_app/copy.md index 0cbfd06..c1c670f 100644 --- a/src/docs/version_002/resources/records/get_records_by_app/copy.md +++ b/src/docs/version_002/resources/records/get_records_by_app/copy.md @@ -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 %} diff --git a/src/docs/version_002/resources/records/get_records_by_ids/copy.md b/src/docs/version_002/resources/records/get_records_by_ids/copy.md index 278a979..8063423 100644 --- a/src/docs/version_002/resources/records/get_records_by_ids/copy.md +++ b/src/docs/version_002/resources/records/get_records_by_ids/copy.md @@ -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 %} 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 927641a..813935a 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 @@ -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 %} diff --git a/src/docs/version_002/data_format/copy.md b/src/docs/version_002/resources/records/record_data_format/copy.md similarity index 88% rename from src/docs/version_002/data_format/copy.md rename to src/docs/version_002/resources/records/record_data_format/copy.md index 3a80118..9c0b2e9 100644 --- a/src/docs/version_002/data_format/copy.md +++ b/src/docs/version_002/resources/records/record_data_format/copy.md @@ -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) diff --git a/src/docs/version_002/data_format/example.md b/src/docs/version_002/resources/records/record_data_format/example.md similarity index 100% rename from src/docs/version_002/data_format/example.md rename to src/docs/version_002/resources/records/record_data_format/example.md diff --git a/src/docs/version_002/resources/reports/get_report_by_id/copy.md b/src/docs/version_002/resources/reports/get_report_by_id/copy.md index b4058b5..7908f1a 100644 --- a/src/docs/version_002/resources/reports/get_report_by_id/copy.md +++ b/src/docs/version_002/resources/reports/get_report_by_id/copy.md @@ -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. --- diff --git a/src/docs/version_002/resources/reports/report_data_format/copy.md b/src/docs/version_002/resources/reports/report_data_format/copy.md new file mode 100644 index 0000000..cd1225c --- /dev/null +++ b/src/docs/version_002/resources/reports/report_data_format/copy.md @@ -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 %} diff --git a/src/docs/version_002/resources/reports/report_data_format/example.md b/src/docs/version_002/resources/reports/report_data_format/example.md new file mode 100644 index 0000000..e69de29