From fa200495221cc5a2f273d566138a32044dc0145a Mon Sep 17 00:00:00 2001 From: StevanFreeborn <65925598+StevanFreeborn@users.noreply.github.com> Date: Mon, 24 Apr 2023 13:34:27 -0500 Subject: [PATCH] docs: add separate data format sections for report and record in both versions --- src/docs/version_001/docsStructure.ts | 18 +- .../records/record_data_format}/copy.md | 9 +- .../records/record_data_format}/example.md | 0 .../reports/report_data_format/copy.md | 175 ++++++++++++++++++ .../reports/report_data_format/example.md | 81 ++++++++ .../records/record_data_format/copy.md | 4 +- .../reports/report_data_format/copy.md | 92 ++++++++- .../reports/report_data_format/example.md | 81 ++++++++ 8 files changed, 437 insertions(+), 23 deletions(-) rename src/docs/version_001/{data_format => resources/records/record_data_format}/copy.md (84%) rename src/docs/version_001/{data_format => resources/records/record_data_format}/example.md (100%) create mode 100644 src/docs/version_001/resources/reports/report_data_format/copy.md create mode 100644 src/docs/version_001/resources/reports/report_data_format/example.md diff --git a/src/docs/version_001/docsStructure.ts b/src/docs/version_001/docsStructure.ts index b35498b..3f6c3f7 100644 --- a/src/docs/version_001/docsStructure.ts +++ b/src/docs/version_001/docsStructure.ts @@ -16,12 +16,6 @@ export const versionOne: DocsStructure = { copy: 'copy.md', example: 'example.md', }, - { - title: 'Data Format', - folder: 'data_format', - copy: 'copy.md', - example: 'example.md', - }, { title: 'Dates', folder: 'dates', @@ -76,6 +70,12 @@ export const versionOne: DocsStructure = { copy: 'copy.md', example: 'example.md', }, + { + title: 'Report Data Format', + folder: 'report_data_format', + copy: 'copy.md', + example: 'example.md', + }, { title: 'Get Reports by App', folder: 'get_reports_by_app', @@ -146,6 +146,12 @@ export const versionOne: DocsStructure = { copy: 'copy.md', example: 'example.md', }, + { + title: 'Record Data Format', + folder: 'record_data_format', + copy: 'copy.md', + example: 'example.md', + }, ], }, { diff --git a/src/docs/version_001/data_format/copy.md b/src/docs/version_001/resources/records/record_data_format/copy.md similarity index 84% rename from src/docs/version_001/data_format/copy.md rename to src/docs/version_001/resources/records/record_data_format/copy.md index 414e5aa..62900ce 100644 --- a/src/docs/version_001/data_format/copy.md +++ b/src/docs/version_001/resources/records/record_data_format/copy.md @@ -1,14 +1,13 @@ -# 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 in a query parameter. These endpoints are: - [Get Records by App](#get-records-by-app) - [Get Record by Id](#get-record-by-id) -- [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 %} +## Raw Format {% table %} @@ -56,7 +55,7 @@ The format values can be either `Raw` or `Formatted`. If the format is not speci {% /table %} -## Formatted Format {% #formatted-format %} +## Formatted Format {% table %} diff --git a/src/docs/version_001/data_format/example.md b/src/docs/version_001/resources/records/record_data_format/example.md similarity index 100% rename from src/docs/version_001/data_format/example.md rename to src/docs/version_001/resources/records/record_data_format/example.md diff --git a/src/docs/version_001/resources/reports/report_data_format/copy.md b/src/docs/version_001/resources/reports/report_data_format/copy.md new file mode 100644 index 0000000..274dbdc --- /dev/null +++ b/src/docs/version_001/resources/reports/report_data_format/copy.md @@ -0,0 +1,175 @@ +# 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 + +--- + +- Attachment +- `string` +- A pipe (|) separated list of file names. + +--- + +- 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 `m/d/yyyy h:mm tt`. + +--- + +- Image +- `string` +- A pipe (|) separated list of file names. + +--- + +- List +- `string` +- A pipe (|) separated list of list value names. + +--- + +- Matrix +- `string` +- A pipe (|) separated list of matrix values in the format "row list value name / column list value name". + +--- + +- Number +- `number` +- The field value will be returned as a number. + +--- + +- Reference +- `string` +- A pipe (|) separated list of display link field values. + +--- + +- Survey Campaign +- `string` +- The campaign name. + +--- + +- Survey Group Scoring +- `string` +- A pipe (|) separated list of survey scoring groups in the format "group name: group value" + +--- + +- Text +- `string` +- The field value will be returned as a string including any HTML markup. + +--- + +- Time Span +- `string` +- The field value will be returned as a string which represents the time span entered. + +--- + +{% /table %} + +## Formatted Format {% #formatted-format %} + +{% table %} + +- Field Type +- Return Data Type +- Description + +--- + +- Attachment +- `string` +- A newline (\r\n) separated list of file names. + +--- + +- 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. + +--- + +- Image +- `string` +- A newline (\r\n) separated list of file names. + +--- + +- List +- `string` +- A newline (\r\n) separated list of list value names. + +--- + +- Matrix +- `string` +- A newline (\r\n) separated list of matrix values in the format "row list value name / column list value name". + +--- + +- Number +- `string` +- The field value will be returned as a string including any configured formatting. + +--- + +- Reference +- `string` +- A newline (\r\n) separated list of display link field values. + +--- + +- Survey Campaign +- `string` +- The campaign name. + +--- + +- Survey Group Scoring +- `string` +- A newline (\r\n) separated list of survey scoring groups in the format "group name: group value" + +--- + +- Text +- `string` +- The field value will be returned as a string excluding 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_001/resources/reports/report_data_format/example.md b/src/docs/version_001/resources/reports/report_data_format/example.md new file mode 100644 index 0000000..5c29f0c --- /dev/null +++ b/src/docs/version_001/resources/reports/report_data_format/example.md @@ -0,0 +1,81 @@ +# The Values in a Raw Response + +{% code heading="RAW" defaultLanguage="json" %} + +```json +{ + "Columns": [ + "attachment_field", + "Record Id", + "Created Date", + "image_field", + "multi_select_list_field", + "matrix_survey_answer_field", + "number_field", + "multi_select_reference_field", + "Survey Campaign", + "Group Scoring", + "multi_line_text_field", + "time_span_field_with_recurrence" + ], + "Rows": [ + [ + "test-attachment.txt|odin-project-timestamps.txt|test-attachment.txt|test-attachment.txt|test-attachment.txt|test-attachment.txt|test-attachment.txt|test-attachment.txt|test-attachment.txt", + 1, + "2/16/2023 5:14 AM", + "test-image.png|test-image.jpg", + "list_value_1|list_value_2", + "thing_1 / no|thing_2 / no", + 100.0, + "Changed|Test", + "targeted_recipient_campaign", + "scoring_group_list_1: 5|scoring_group_list_2: 3|scoring_group_list_3: 7", + "
This is a test
", + "Every 11 Second(s) End After 1 Occurrences" + ] + ] +} +``` + +{% /code %} + +# The Values in a Formatted Response + +{% code heading="FORMATTED" defaultLanguage="json" %} + +```json +{ + "Columns": [ + "attachment_field", + "Record Id", + "Created Date", + "image_field", + "multi_select_list_field", + "matrix_survey_answer_field", + "number_field", + "multi_select_reference_field", + "Survey Campaign", + "Group Scoring", + "multi_line_text_field", + "time_span_field_with_recurrence" + ], + "Rows": [ + [ + "test-attachment.txt\r\nodin-project-timestamps.txt\r\ntest-attachment.txt\r\ntest-attachment.txt\r\ntest-attachment.txt\r\ntest-attachment.txt\r\ntest-attachment.txt\r\ntest-attachment.txt\r\ntest-attachment.txt", + "recordId-1", + "2/16/2023 5:14 AM", + "test-image.png\r\ntest-image.jpg", + "list_value_1\r\nlist_value_2", + "thing_1 / no\r\nthing_2 / no", + "$100 dollars", + "Changed\r\nTest", + "targeted_recipient_campaign", + "scoring_group_list_1: 5\r\nscoring_group_list_2: 3\r\nscoring_group_list_3: 7", + "This is a test", + "Every 11 Second(s) End After 1 Occurrences" + ] + ] +} +``` + +{% /code %} diff --git a/src/docs/version_002/resources/records/record_data_format/copy.md b/src/docs/version_002/resources/records/record_data_format/copy.md index b35d9fb..f06f9d5 100644 --- a/src/docs/version_002/resources/records/record_data_format/copy.md +++ b/src/docs/version_002/resources/records/record_data_format/copy.md @@ -9,7 +9,7 @@ When retrieving data for [records](#records) via the Onspring API using certain 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 %} +## Raw Format {% table %} @@ -57,7 +57,7 @@ The format values can be either `Raw` or `Formatted`. If the format is not speci {% /table %} -## Formatted Format {% #formatted-format %} +## Formatted Format {% table %} 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 index cd1225c..698485c 100644 --- a/src/docs/version_002/resources/reports/report_data_format/copy.md +++ b/src/docs/version_002/resources/reports/report_data_format/copy.md @@ -6,7 +6,7 @@ When retrieving data for [reports](#reports) via the Onspring API using certain 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 %} +## Raw Format {% table %} @@ -16,6 +16,12 @@ The format values can be either `Raw` or `Formatted`. If the format is not speci --- +- Attachment +- `string` +- A pipe (|) separated list of file names. + +--- + - AutoNumber - `number` - The field value will be returned as a number. @@ -24,13 +30,25 @@ The format values can be either `Raw` or `Formatted`. If the format is not speci - Date/Time - `string` -- The field value will be returned as a string in the format `YYYY-MM-DDTHH:MM:SSZ`. +- The field value will be returned as a string in the format `m/d/yyyy h:mm tt`. + +--- + +- Image +- `string` +- A pipe (|) separated list of file names. --- - 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. +- `string` +- A pipe (|) separated list of list value names. + +--- + +- Matrix +- `string` +- A pipe (|) separated list of matrix values in the format "row list value name / column list value name". --- @@ -40,6 +58,24 @@ The format values can be either `Raw` or `Formatted`. If the format is not speci --- +- Reference +- `string` +- A pipe (|) separated list of display link field values. + +--- + +- Survey Campaign +- `string` +- The campaign name. + +--- + +- Survey Group Scoring +- `string` +- A pipe (|) separated list of survey scoring groups in the format "group name: group value" + +--- + - Text - `string` - The field value will be returned as a string including any HTML markup. @@ -47,14 +83,14 @@ The format values can be either `Raw` or `Formatted`. If the format is not speci --- - Time Span -- `object` -- The field value will be returned as a [Time Span](#time-span-field-value) object. +- `string` +- The field value will be returned as a string which represents the time span entered. --- {% /table %} -## Formatted Format {% #formatted-format %} +## Formatted Format {% table %} @@ -64,6 +100,12 @@ The format values can be either `Raw` or `Formatted`. If the format is not speci --- +- Attachment +- `string` +- A newline (\r\n) separated list of file names. + +--- + - AutoNumber - `string` - The field value will be returned as a string including any configured formatting. @@ -76,9 +118,21 @@ The format values can be either `Raw` or `Formatted`. If the format is not speci --- +- Image +- `string` +- A newline (\r\n) separated list of file names. + +--- + - 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. +- `string` +- A newline (\r\n) separated list of list value names. + +--- + +- Matrix +- `string` +- A newline (\r\n) separated list of matrix values in the format "row list value name / column list value name". --- @@ -88,9 +142,27 @@ The format values can be either `Raw` or `Formatted`. If the format is not speci --- +- Reference +- `string` +- A newline (\r\n) separated list of display link field values. + +--- + +- Survey Campaign +- `string` +- The campaign name. + +--- + +- Survey Group Scoring +- `string` +- A newline (\r\n) separated list of survey scoring groups in the format "group name: group value" + +--- + - Text - `string` -- The field value will be returned as a string without any HTML markup. +- The field value will be returned as a string excluding any HTML markup. --- 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 index e69de29..bf2dbce 100644 --- a/src/docs/version_002/resources/reports/report_data_format/example.md +++ b/src/docs/version_002/resources/reports/report_data_format/example.md @@ -0,0 +1,81 @@ +# The Values in a Raw Response + +{% code heading="RAW" defaultLanguage="json" %} + +```json +{ + "columns": [ + "attachment_field", + "Record Id", + "Created Date", + "image_field", + "multi_select_list_field", + "matrix_survey_answer_field", + "number_field", + "multi_select_reference_field", + "Survey Campaign", + "Group Scoring", + "multi_line_text_field", + "time_span_field_with_recurrence" + ], + "rows": [ + [ + "test-attachment.txt|odin-project-timestamps.txt|test-attachment.txt|test-attachment.txt|test-attachment.txt|test-attachment.txt|test-attachment.txt|test-attachment.txt|test-attachment.txt", + 1, + "2/16/2023 5:14 AM", + "test-image.png|test-image.jpg", + "list_value_1|list_value_2", + "thing_1 / no|thing_2 / no", + 100.0, + "Changed|Test", + "targeted_recipient_campaign", + "scoring_group_list_1: 5|scoring_group_list_2: 3|scoring_group_list_3: 7", + "This is a test
", + "Every 11 Second(s) End After 1 Occurrences" + ] + ] +} +``` + +{% /code %} + +# The Values in a Formatted Response + +{% code heading="FORMATTED" defaultLanguage="json" %} + +```json +{ + "columns": [ + "attachment_field", + "Record Id", + "Created Date", + "image_field", + "multi_select_list_field", + "matrix_survey_answer_field", + "number_field", + "multi_select_reference_field", + "Survey Campaign", + "Group Scoring", + "multi_line_text_field", + "time_span_field_with_recurrence" + ], + "rows": [ + [ + "test-attachment.txt\r\nodin-project-timestamps.txt\r\ntest-attachment.txt\r\ntest-attachment.txt\r\ntest-attachment.txt\r\ntest-attachment.txt\r\ntest-attachment.txt\r\ntest-attachment.txt\r\ntest-attachment.txt", + "recordId-1", + "2/16/2023 5:14 AM", + "test-image.png\r\ntest-image.jpg", + "list_value_1\r\nlist_value_2", + "thing_1 / no\r\nthing_2 / no", + "$100 dollars", + "Changed\r\nTest", + "targeted_recipient_campaign", + "scoring_group_list_1: 5\r\nscoring_group_list_2: 3\r\nscoring_group_list_3: 7", + "This is a test", + "Every 11 Second(s) End After 1 Occurrences" + ] + ] +} +``` + +{% /code %}