Connections
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 Number
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 ObjectId Array
The instance roles granted by the connection. An objects share ACL defines what roles can be granted and by whom.
context Reference
The connection context. When expanded, imparts the connection’s access level to the caller.
contextSource String
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 Date
The date the connection was initiated.
creator Reference
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 Date
For pending connections. the time at which the connection request will expire.
object String
The context’s object name.
state Number
The connection state (Pending: 0, Active: 1).
target Document
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 Reference
Optional account identifier. A connection can be created using the account identifier is it is known.
token String
The connection token, only visible to the target.
usesRemaining Number
Defaults to null. The number of times the connection can be loaded before it expires.
List
GET
https://api.dev.medable.com/your_org_name/v2/connections
Path Parameters
your_org_name
string
State
Meaning
0
Connection has not yet been accepted by invitee
1
Connection has been accepted by invitee
Read
GET
https://api.dev.medable.com/your_org_name/v2/connections/connection_id
Path Parameters
your_org_name
string
connection_id
string
Read (Token)
GET
https://api.dev.medable.com/your_org_name/v2/connections/token
Path Parameters
your_org_name
string
token
string
Create
POST
https://api.dev.medable.com/your_org_name/v2/object_name/object_id/connections
Path Parameters
your_org_name
string
object_name
string
object_id
string
Request Body
targets
object
An array of connection targets. The caller must have connected access any team targets. For teams, a role array will limit the connections to those members having the specified role(s).
_id
string
Connection target account identifier, if known.
string
Connection target email
object
string
The target object type
access
integer
The access level to impart to the target on the connection's context.
roles
string
A set of roles to impart to the target on the connection's context.
Apply Connection
POST
https://api.dev.medable.com/your_org_name/v2/connections/token
Accepting a connecting request
Path Parameters
your_org_name
string
token
string
Delete
PATCH
https://api.dev.medable.com/your_org_name/v2/connections/connection_id
Path Parameters
your_org_name
string
connection_id
string
Reject Connection
PATCH
https://api.dev.medable.com/your_org_name/v2/connections/token
Path Parameters
your_org_name
string
token
string
Last updated