Connection enable access to objects. Once connected, each Object has a number of feeds that can be read and posted to, depending on configured access. Each object property has a minimum required CRUD access level. These are listed in the property table for each object.
Those with Share access to an object can invite others to connect. The level of access you can grant to those you invite depends on the type of object and the level of access you have. We call this the Share Chain.
To disconnect from an object, simply call the Delete route. To remove others from a context, the caller must have Share access to the context for which the connection was created and have more access than the user you are removing. These basic rules apply across all objects.
For more details on using connections, see Using Connections
_id String | The connection identifier |
access | The access level granted by the connection. In the case of an ownership transfer, the access level is the object’s default owner access. An objects share chain or share ACL defines what access levels can be granted and by whom. |
roles | The instance roles granted by the connection. An objects share ACL defines what roles can be granted and by whom. |
context | The connection context. When expanded, imparts the connection’s access level to the caller. |
contextSource | A dot syntax property path context in the invitation context. For example, when the account property of the Patient File is set, the resulting Connection “contextSource” is set to “account”. This enables clients to discern the nature of the Connection. In the case of Patient File, “account” means the target is being asked to act as the patient. |
created | The date the connection was initiated. |
creator | The account id of the connection creator. Expansion paths are fixed at name an image; The caller can only retrieve the connection creator’s name and profile image. |
expiresAt | For pending connections. the time at which the connection request will expire. |
object | The context’s object name. |
state | The connection state (Pending: 0, Active: 1). |
target | The connection target recipient. The email property will only be present if the connection was created using an email address. Conversely, the account property will only be present if the connection was created using an account id. The name property will only be present if the connection creator added one. |
account | Optional account identifier. A connection can be created using the account identifier is it is known. |
token | The connection token, only visible to the target. |
usesRemaining | Defaults to null. The number of times the connection can be loaded before it expires. |
"_id": "5524165d65a7158820f4c022",
"access": 4,
"context": {
"_id": "5519c01aae2fd2b02915c81f",
"object": "c_example",
"path": "/c_examples/5519c01aae2fd2b02915c81f"
},
"created": "2015-04-07T17:39:41.000Z",
"creator": {
"_id": "5516ee2634d8d93428169c0e",
"object": "account",
"path": "/accounts/5516ee2634d8d93428169c0e"
},
"expiresAt": "2015-04-14T17:39:41.246Z",
"object": "connection",
"state": 0,
"target": {
"email": "[email protected]",
"name": {
"first": "Frederick",
"last": "Banting"
}
}