Wasabi JSON Object Definition

Example:

{
  "attributes": {
    "guid": "FEB0BD13-AEF7-41F7-AAAC-397ED487603E",
    "testString": "foo"
  },
  "relationships": {
    "bar": [
      "0956e6af-6f4d-4207-abff-23835a3e693a"
    ]
  }
}

Discussion

A Wasabi Sync JSON object consists of a dictionary containing two keys: "attributes", a dictionary which contains the name/value pairs representing the attributes of the object in question; and "relationships" which contains a dictionary of of relationships from this object to other objects in the system. The relationships dictionary is defined such that its keys represent the names of the relationships, and its values are lists of guids for the objects to which the relationship is connected.

In the example above, this data represents an object with two attributes. First, the required guid attribute. Second, a user-defined attribute called testString which contains the value foo. the subject further has a relationship with another object which has a guid of 0956e6af-6f4d-4207-abff-23835a3e693a. This relationship is called bar.

It should be noted, that attempting to create, access or form a relationship with an object that has a guid of an object that already exists in the system and which does not belong to the user for whom you are attempting the operation is an invalid condition and will result in an error.


News & Information