This repository was archived by the owner on Jun 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Invitation Management
Marek Tomczewski edited this page Apr 8, 2015
·
5 revisions
This API handles Invitations related operations. Invitation to the account can be created by user who is an account administrator. After created, invitation notification will be send as an email message to the specific email account. Invited user has to login into IoT dashboard and the accept/decline received invitation.
Get a list of users invited to the specific account.
Param | Type | Description | Value |
---|---|---|---|
Authorization | HTTP Header | Access Token | Authorization: Bearer eyJ0eX... |
accountId | URL Slug | The ID of an Account | 534da46c820cb9f74a0d3de6 |
Request
GET /accounts/{accountId}/invites
Response 200 OK
[
"test@example.com",
"test2@example.com"
]
Get details about invitations send to specific user. User is identified by his email address.
Param | Type | Description | Value |
---|---|---|---|
Authorization | HTTP Header | Access Token | Authorization: Bearer eyJ0eX... |
URL Slug | The ID of an Account | test@example.com |
Request
GET /invites/{email}
Response 200 OK
[
{
"email": "test@example.com",
"accountId": "0d66c8b6-9f4d-4551-a9c8-d356c2dd033d",
"accountName": "Name",
"domainId": "0d66c8b6-9f4d-4551-a9c8-d356c2dd033d",
"_id": "541c4bcc6600b5129892ce7d"
},
{
"email": "test@example.com",
"accountId": "be3c1939-ab6d-47de-80a7-6a4261386f6d",
"accountName": "account1",
"domainId": "be3c1939-ab6d-47de-80a7-6a4261386f6d",
"_id": "541fdefbc86e0eb48a9f2bfe"
}
]
Creation of invitation to the account for specific user (identified by email) can be done only in Dashboard because of recaptcha requirements.
Accept pending invitation for the specific account.
Param | Type | Description | Value |
---|---|---|---|
Authorization | HTTP Header | Access Token | Authorization: Bearer eyJ0eX... |
inviteId | URL Slug | The ID of an Invitation | 54afb5b5bee99b947441ae31 |
Request
PUT /invites/{inviteId}/status
{
"accept": true
}
Response 200 OK
{
"test@example.com",
"domainId": "0d66c8b6-9f4d-4551-a9c8-d356c2dd033d",
"accountId": "0d66c8b6-9f4d-4551-a9c8-d356c2dd033d",
"accountName": "Account",
"_id": "54afb5b5bee99b947441ae31"
}
Delete invitations to an account for a specific user (identified by email).
Param | Type | Description | Value |
---|---|---|---|
Authorization | HTTP Header | Access Token | Authorization: Bearer eyJ0eX... |
accountId | URL Slug | The ID of an Account, to which invitations were send | 534da46c820cb9f74a0d3de6 |
URL Slug | The email of invitations receiver. His invitations will be removed | 534da46c820cb9f74a0d3de6 |
Request
DELETE /accounts/{accountId}/invites/{email}
Response 200
{
"n": 1
}