docs: add separate data format sections for report and record in both versions
This commit is contained in:
@@ -0,0 +1,104 @@
|
||||
# Record Data Format {% #record-data-format %}
|
||||
|
||||
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)
|
||||
|
||||
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
|
||||
|
||||
{% 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
|
||||
|
||||
{% 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 %}
|
||||
@@ -0,0 +1,108 @@
|
||||
# The Values in a Raw Response
|
||||
|
||||
{% code heading="RAW" defaultLanguage="json" %}
|
||||
|
||||
```json
|
||||
{
|
||||
"AppId": 130,
|
||||
"RecordId": 11,
|
||||
"FieldData": [
|
||||
{
|
||||
"Type": 1,
|
||||
"FieldId": 4745, // AutoNumber Field
|
||||
"Value": 11
|
||||
},
|
||||
{
|
||||
"Type": 3,
|
||||
"FieldId": 4800, // Date/Time Field
|
||||
"Value": "2023-04-22T05:00:00Z"
|
||||
},
|
||||
{
|
||||
"Type": 5,
|
||||
"FieldId": 4801, // Single Select List Field
|
||||
"Value": "2c1af5b1-0f90-4378-b9a5-8b7e22f2bc84"
|
||||
},
|
||||
{
|
||||
"Type": 15,
|
||||
"FieldId": 4802, // Multi Select List Field
|
||||
"Value": [
|
||||
"71afe161-34f9-49d0-b45e-968b764c884c",
|
||||
"d40a74dd-abb5-4fbb-82c0-5766e871e2a4"
|
||||
]
|
||||
},
|
||||
{
|
||||
"Type": 2,
|
||||
"FieldId": 4803, // Number Field
|
||||
"Value": 10.0
|
||||
},
|
||||
{
|
||||
"Type": 0,
|
||||
"FieldId": 4805, // Text Field
|
||||
"Value": "<p>This is a test</p>"
|
||||
},
|
||||
{
|
||||
"Type": 4,
|
||||
"FieldId": 4810, // TimeSpan Field
|
||||
"Value": {
|
||||
"Quantity": 1.0,
|
||||
"Increment": 2,
|
||||
"Recurrence": 2,
|
||||
"EndByDate": null,
|
||||
"EndAfterOccurrences": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
{% /code %}
|
||||
|
||||
# The Values in a Formatted Response
|
||||
|
||||
{% code heading="RAW" defaultLanguage="json" %}
|
||||
|
||||
```json
|
||||
{
|
||||
"AppId": 130,
|
||||
"RecordId": 11,
|
||||
"FieldData": [
|
||||
{
|
||||
"Type": 0,
|
||||
"FieldId": 4745, // AutoNumber Field
|
||||
"Value": "recordId-11"
|
||||
},
|
||||
{
|
||||
"Type": 0,
|
||||
"FieldId": 4800, // Date/Time Field
|
||||
"Value": "Saturday, April 22, 2023 5:00 AM"
|
||||
},
|
||||
{
|
||||
"Type": 0,
|
||||
"FieldId": 4801, // Single Select List Field
|
||||
"Value": "list_value_1"
|
||||
},
|
||||
{
|
||||
"Type": 10,
|
||||
"FieldId": 4802, // Multi Select List Field
|
||||
"Value": ["list_value_1", "list_value_2"]
|
||||
},
|
||||
{
|
||||
"Type": 0,
|
||||
"FieldId": 4803, // Number Field
|
||||
"Value": "$10 dollars"
|
||||
},
|
||||
{
|
||||
"Type": 0,
|
||||
"FieldId": 4805, // Text Field
|
||||
"Value": "This is a test"
|
||||
},
|
||||
{
|
||||
"Type": 0,
|
||||
"FieldId": 4810, // TimeSpan Field
|
||||
"Value": "Every 1 Second(s) End After 1 Occurrences"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
{% /code %}
|
||||
@@ -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