docs: add examples for relationship section

This commit is contained in:
Stevan Freeborn
2023-04-21 15:57:20 -05:00
parent e309ff6911
commit 35967cc04e
+44 -6
View File
@@ -3,7 +3,8 @@
{% code heading="GET GROUP RECORD" defaultLanguage="bash" %}
```bash
curl --location 'https://api.onspring.com/Records/appId/3/recordId/3' \
--header 'X-ApiKey: 000000ffffff000000ffffff/00000000-ffff-0000-ffff-000000000000'
```
{% /code %}
@@ -11,7 +12,17 @@
{% code heading="GROUP" defaultLanguage="json" %}
```json
{
"appId": 3,
"recordId": 3,
"fieldData": [
{
"type": "IntegerList",
"fieldId": 21, // Users multi select reference field
"value": [2216]
}
]
}
```
{% /code %}
@@ -19,7 +30,8 @@
{% code heading="GET USERS REFERENCE FIELD" defaultLanguage="bash" %}
```bash
curl --location 'https://api.onspring.com/Fields/id/21' \
--header 'X-ApiKey: 000000ffffff000000ffffff/00000000-ffff-0000-ffff-000000000000'
```
{% /code %}
@@ -27,7 +39,17 @@
{% code heading="REFERENCE FIELD" defaultLanguage="json" %}
```json
{
"multiplicity": "MultiSelect",
"referencedAppId": 2, // Users app id
"id": 21,
"appId": 3,
"name": "Users",
"type": "Reference",
"status": "Enabled",
"isRequired": false,
"isUnique": false
}
```
{% /code %}
@@ -35,7 +57,8 @@
{% code heading="GET USER RECORD" defaultLanguage="bash" %}
```bash
curl --location 'https://api.onspring.com/Records/appId/2/recordId/2216' \
--header 'X-ApiKey: 000000ffffff000000ffffff/00000000-ffff-0000-ffff-000000000000'
```
{% /code %}
@@ -43,7 +66,22 @@
{% code heading="USER" defaultLanguage="json" %}
```json
{
"appId": 2,
"recordId": 2216,
"fieldData": [
{
"type": "String",
"fieldId": 36,
"value": "TestUser"
},
{
"type": "String",
"fieldId": 33,
"value": "stevan.freeborn@onspring.com"
}
]
}
```
{% /code %}