-
Notifications
You must be signed in to change notification settings - Fork 8
Accounts
Ivan Taghavi Espinosa edited this page Nov 5, 2020
·
9 revisions
The Membership Accounts API is a representation of a given Account within Huddle.
Operation |
---|
Retrieve an Account |
Remove a user from an account |
Retrieving account managers |
You can GET a given Account by its ID.
Example request, asking for the Account with ID 123:
GET /accounts/123 HTTP/1.1
Accept: application/vnd.huddle.data+json
Authorization: Bearer frootymcnooty/vonbootycherooty
Example response:
HTTP/1.1 200 OK
Content-Type: application/vnd.huddle.data+json
{
"links": [
{ "rel": "self", "href": "..." },
{ "rel": "parent", "href": "..." },
{ "rel": "owner", "href": "..." },
{ "rel": "managers", "href": "..."},
{ "rel": "create-workspace", "href": "..." }
],
"name": "My Account"
}
Name | Description |
---|---|
name | The name of the account |
Name | Description | Methods |
---|---|---|
self | The URI of this account. | GET |
parent | The URI to request the company that this account belongs to. | GET |
owner | The URI to request the owner of the account. | GET |
create-workspace | The URI to create a workspace in the account | POST |
Case | Response |
---|---|
Invalid authorization token | 401 Unauthorized |
Actor is not an authorised user | 403 Forbidden |
Account does not exist | 404 Not Found |
You can get the required URL from Retrieve workspace users response link for remove-from-account
Example request, asking to remove a user from an account:
DELETE /accounts/123/users/456 HTTP/1.1
Authorization: Bearer frootymcnooty/vonbootycherooty
Example response:
HTTP/1.1 204 No Content
Case | Response |
---|---|
Invalid authorization token | 401 Unauthorized |
Actor is not an authorised user | 403 Forbidden |
Account does not exist | 404 Not Found |
You can GET all account managers and the metadata of the managers in a account.
Example request, asking for the Account managers from the Account with ID 123:
GET /accounts/123/managers HTTP/1.1
Content-Type: application/vnd.huddle.data+json
Authorization: Bearer frootymcnooty/vonbootycherooty
Example response:
HTTP/1.1 200 OK
Content-Type: application/vnd.huddle.data+json
{
"links" : [
{ "rel" : "self", "href" : "..." },
{ "rel" : "parent", "href" : "..." },
{ "rel" : "first", "href" : "..." },
{ "rel" : "previous", "href" : "..." },
{ "rel" : "next", "href" : "..." }
],
"managers" : [
{
"name" : "Clark Ken",
"email" : "[email protected]",
"links" : [
{ "rel" : "self", "href" : "..." },
{ "rel" : "avatar", "href" : "..." },
{ "rel" : "alternate", "href": "..." }
]
},
...
]
}
Name | Description |
---|---|
managers | The list of managers for the given account |
Property | Name | Description | Methods |
---|---|---|---|
self | The URI of the account managers collection. | GET | |
parent | The URI of the account that the managers belongs to. | GET | |
first | The URI of the first page of managers. | GET | |
previous | The URI of the previous page of managers. | GET | |
next | The URI of the next page of managers. | GET | |
managers | self | The URI of the user | GET |
managers | avatar | The URI of the user's avatar | GET |
managers | alternate | The URI of the user's profile | GET |
Case | Response |
---|---|
Invalid authorization token | 401 Unauthorized |
Actor is not an authorised user | 403 Forbidden |
Account does not exist | 404 Not Found |
Query string parameters are used to filter the managers in a account. Returns empty list of managers if no managers were found that match your query.
Request:
GET /accounts/123/managers?q=jon&pagesize=20&skip=0&sort=email&order=asc HTTP/1.1
Accept: application/vnd.huddle.data+json
Authorization: Bearer frootymcnooty/vonbootycherooty
Parameter | Default value | Additional notes |
---|---|---|
q |
Match an account manager on firstname , lastname , email
|
|
pagesize |
20 |
|
skip |
0 |
|
sort |
email |
Sort account managers by email or by name
|
order |
asc |
Order the account managers ascending (asc ) or descending (desc ) |
Response shape is the same as in Retrieve Account Managers
- Basic concepts
-
Resources
- Actor
- Approvals
- BulkProcess
- Calendar
- Membership
- Company
- Document
- Document library settings
- Folder
- Paged Folder
- Pins
- Integrations
- Form
- Friends
- Invitation
- Link
- Document Lock
- Folder Lock
- Localisation
- MemberAutocomplete
- Notifications
- Offline item
- PeopleBulkProcess
- Permissions
- Presence
- PublishedDocuments
- Recents
- Recommendations
- Recycle Bin
- Search
- Share
- Tasks (Todos), File Requests, Approvals
- Tasks on Documents
- Actions
- UserApprovals
- User
- VersionHistory
- Workspace
- Workspaces
- SamlPartners
- Logout
- Impersonation
- Administration
- WebHooks