docs: add separate data format sections for report and record in both versions
This commit is contained in:
@@ -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',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
|
||||
+4
-5
@@ -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 %}
|
||||
|
||||
@@ -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 %}
|
||||
@@ -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",
|
||||
"<p>This is a test</p>",
|
||||
"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 %}
|
||||
Reference in New Issue
Block a user