This endpoint has been deprecated. There is no newer version.
This endpoint is available from 22nd May 2018.
Creates a relationship between two organisation records.
URL: /data/v2/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 |
uniqueKey |
string |
Yes |
The unique key of a record. |
layerKey |
string |
Yes |
The API key matching the Layer in which the record is stored. |
relationship | object | Yes |
See Relationship Object Properties. |
Relationship Object Properties
Name |
Type |
Required |
Description |
uniqueKey |
string |
Yes |
The unique key of another record to create a relationship with. |
layerKey |
string |
Yes |
The API key matching the Layer in which the record specified by this objects uniqueKey property value is stored. |
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 Layer of the record being created had no links to any other Layers. 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 the Relationship Object is the same as the record specified by the uniqueKey and layerKey parameters. |
Example call
URL: https://api.vision-mapping.com/data/v2/createRelationship?apiKey=INSERT_YOUR_KEY_HERE
Body:
{"uniqueKey":"abc","layerKey":"abc","relationship":{"uniqueKey":"abc","layerKey":"abc"}}
Comments
0 comments
Article is closed for comments.