Authentication Company Settings - Huddle/huddle-apis GitHub Wiki
The Company Settings API allows company managers to enable or disable authentication company settings for the company. Note this endpoint does not go via the apigateway
As a company manager, I can get the settings of my company.
In this example we are asking for the settings from the company with id 123
GET /identity/companies/123/settings HTTP/1.1
Accept: application/vnd.huddle.data+xml
Authorization: OAuth2 frootymcnooty/vonbootycherooty
HTTP/1.1 200 OK
Content-Type: application/xml
<companysettings>
<link rel="self" href="..." />
<link rel="edit" href="..." />
<settings>
<setting>
<name>TwoFactorAuth</name>
<enabled>true</enabled>
</setting>
</settings>
</companysettings>
In this example we are asking for a company's settings whilst specifying json in the accept header.
GET /identity/companies/123/settings HTTP/1.1
Accept: application/vnd.huddle.data+json
Authorization: OAuth2 frootymcnooty/vonbootycherooty
{
"links": [
{
"rel": "self",
"href": ".../companies/123/settings"
},
{
"rel": "edit",
"href": ".../companies/123/settings/edit"
}
],
"settings": [
{
"links": [
{
"rel": "self",
"href": ".../companies/123/settings/twofactorauth"
}
],
"name": "TwoFactorAuth",
"enabled": true
}
]
}
Name | Description | Methods |
---|---|---|
self | The current URI of this company's settings | GET |
edit | The URI to update the settings for the company | PUT |
Case | Response |
---|---|
401 Unauthorized | Invalid authorization token |
403 Not Found | Not a company manager |