-
Notifications
You must be signed in to change notification settings - Fork 8
CompanyManagers
The Company Managers API is a representation of Members who are Managers of a Company within Huddle.
To assign Company Manager permissions to a Member, POST the Member link to the managers link from the Company. The request will return an empty response with the location header indicating the location of the newly-created Manager.
This end point will only add one Manager - to create multiple Managers, use multiple POST requests.
POST .../people/companies/123/managers HTTP/1.1
Content-Type: application/vnd.huddle.data+xml
Authorization: OAuth2 frootymcnooty/vonbootycherooty
<link rel="member" href=".../people/companies/123/members/654" />
If successful the method returns a 201 Created response.
HTTP/1.1 201 Created
POST /people/companies/123/managers HTTP/1.1
Content-Type: application/vnd.huddle.data+json
Authorization: OAuth2 frootymcnooty/vonbootycherooty
{
"rel": "member",
"href": "/people/companies/123/members/654"
}
HTTP/1.1 201 Created
Content-Type: application/vnd.huddle.data+json
Location: /people/companies/123/managers/432
Case | Response |
---|---|
201 Created | Member is already a company manager |
400 Bad Request | Member does not exist |
400 Bad Request | Member is not in that company |
401 Unauthorized | Invalid authorization token |
403 Forbidden | Actor does not have company manager permissions |
404 Not Found | Company does not exist |
To revoke Company Manager permissions from a Member, send a DELETE request to the Company Manager link contained in the Member or Members resources.
If the authenticated user has permissions to remove a member as a company manager, both the Member and Members resources will advertise a link with a @rel value of companyManager. To remove as a company manager, send a DELETE request to the companyManager URI.
DELETE /people/companies/123/managers/256 HTTP/1.1
Authorization: OAuth2 frootymcnooty/vonbootycherooty
If the removal is successful, this method will return an empty response with an 204 No Content status code
HTTP/1.1 204 No Content
Case | Response |
---|---|
401 Unauthorized | Invalid authorization token |
403 Forbidden | Actor does not have company manager permissions |
404 Not Found | Company does not exist |
404 Not Found | Manager does not exist |
- 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