This endpoint is deprecated. Please see the latest version.
Creates a relationship between two private data records.
URL: /data/v1/createRelationship
Method: POST
Method Parameters
Name |
Type |
Required |
Description |
apiKey |
string |
Yes |
The API Key for your Organisation. |
model |
object |
Yes |
The object detailing the specified values. See Model Object Properties. |
Model Object Properties
Name |
Type |
Required |
Description |
recordKey |
string |
Yes |
The key of a record. |
dataFieldKey |
string |
Yes |
The ClientKey matching the DataField in which the recordKey value is stored. The specified DataField should be of SystemLink type. |
relationship | object | Yes |
See Relationship Object Properties. |
Relationship Object Properties
Name |
Type |
Required |
Description |
recordKey |
string |
Yes |
The key of another record to create a relationship with. |
dataFieldKey |
string |
Yes |
The ClientKey matching the DataField in which the recordKey parameter value is stored. The specified DataField should be of SystemLink type. |
Response
The following responses may be returned in addition to the standard ones specified under Common Information.
Code |
Error Message |
Description |
200 |
The request for the following DataField Key and Value combinations could not be met: [{"key":"","value":""}] |
Indicates partial success. The request was carried out successfully for all Keys provided with the exception of the Keys returned in the error message. For any keys returned, either:
|
Relationships could not be created. No Relationship hierarchies for the MapLayer were found. |
The MapLayer of the record being created had no links to any other MapLayers. If you receive this error, see Creating a new Layer Relationship for further help. |
|
Note: You may receive more than one of the above response messages indicating partial success. | ||
400 |
The relationship parameter object must be provided. |
The relationship parameter was null. |
The relationship cannot be created between a record and itself. |
The record specified by a Relationship Object is the same as the record specified by the recordKey and dataFieldKey parameters. |
Example call
URL: https://api.vision-mapping.com/data/v1/createRelationship?apiKey=INSERT_YOUR_KEY_HERE
Body:
{"recordKey":"abc","dataFieldKey":"abc","relationship":{"recordKey":"abc","dataFieldKey":"abc"}}
Comments
0 comments
Article is closed for comments.