Domains

List domains: GET /domains

This method returns the domains of the current user.
The list also contains the domains to which the users has not yet been accepted.

URLhttps://api.sense-os.nl/domains
MethodGET
Need AuthTrue

Request Headers

NameDefaultTypeStyleRequired
Accept*xsd:stringheaderTrue

Request Parameters

NameDescriptionType
totalReturns a count of the total amount of domains xsd:integer
pageThis parameter specifies which page of the results must be retrieved. The page offset starts at 0. xsd:integer
per_pageThis parameter specifies the amount of items that must be received at once. The maximum amount is 1000 items and the default amount is 100 items. xsd:integer
member_typeReturns the domains filtered on the member type of the user. The values "member", "manager" can be used for this parameter. xsd:string
detailsIf this parameter has the value "full", then the extra properties: "member_type", "accepted", and "member_limit" will be returned. xsd:string

Read domain: GET /domains/{domain_id}

This method returns the details of a domain. Only members/managers of a domain can request domain information.

URLhttps://api.sense-os.nl/domains/{domain_id}
MethodGET
Need AuthTrue

Request Headers

NameDefaultTypeStyleRequired
Accept*xsd:stringheaderTrue

Request Parameters

NameDescriptionType

Add domain member: POST /domains/{domain_id}/users

This method adds users to the domain as a domain member.
Domain managers can add users to their domain.
Users who add themselfs to a domain will have the accepted status false until a manager accepts the user by adding a users via this method.
Users with a token can add themselfs to the group as member and will receive the accepted status.
Tokens can only be used one time for one user.

URLhttps://api.sense-os.nl/domains/{domain_id}/users
MethodPOST
Need AuthTrue

Request Headers

NameDefaultTypeStyleRequired
Accept*xsd:stringheaderTrue

Request Parameters

NameDescriptionType

Request Body

The users array.

{
    "users": [
        {
            "id": 1,
            "username": "jan@test.nl"
        },
        {
            "id": 2,
            "username": "kees@test.nl"
        }
    ],
    "token": "16f346ba78296e8775e9493650a400c1"
}

Remove member: DELETE /domains/{domain_id}/users/{user_id}

This method removes a member from a domain.
The user can remove itself from a domain and domain managers can remove other members from a domain.

URLhttps://api.sense-os.nl/domains/{domainid}/users/{userid}
MethodDELETE
Need AuthTrue

Request Headers

NameDefaultTypeStyleRequired
Accept*xsd:stringheaderTrue

Request Parameters

NameDescriptionType

List members: GET /domains/{domain_id}/users

This method returns the members of a domain.
It will also return the members that are not accepted yet.
Only domain managers can list the members of a domain.

URLhttps://api.sense-os.nl/domains/{domain_id}/users
MethodGET
Need AuthTrue

Request Headers

NameDefaultTypeStyleRequired
Accept*xsd:stringheaderTrue

Request Parameters

NameDescriptionType
totalReturns a count of the total amount of users. xsd:integer
pageThis parameter specifies which page of the results must be retrieved. The page offset starts at 0. xsd:integer
per_pageThis parameter specifies the amount of items that must be received at once. The maximum amount is 1000 items and the default amount is 1000 items. xsd:integer
sortThe sort direction, either ASC or DESC. xsd:string
sort_fieldThe field to sort on, can be any of the fields in the object. xsd:string

List domain tokens: GET /domains/{domain_id}/tokens

This method returns the list of tokens which are available for this domain.
Only domain managers can list domain tokens.

URLhttps://api.sense-os.nl/domains/{domain_id}/tokens
MethodGET
Need AuthTrue

Request Headers

NameDefaultTypeStyleRequired
Accept*xsd:stringheaderTrue

Request Parameters

NameDescriptionType

Create domain tokens: POST /domains/{domain_id}/tokens

This method creates tokens that can be used by users who want to join the domain.
Tokens are automatically deleted after usage.
Only domain managers can create tokens.

URLhttps://api.sense-os.nl/domains/{domain_id}/tokens
MethodPOST
Need AuthTrue

Request Headers

NameDefaultTypeStyleRequired
Accept*xsd:stringheaderTrue

Request Parameters

NameDescriptionType
domainThe amount of tokens to created. xsd:integer

Delete domain token: DELETE /domains/{domain_id}/tokens/{token}

This method deletes a domain token.
Only domain managers can delete domain tokens.

URLhttps://api.sense-os.nl/domains/{domain_id}/tokens/{token}
MethodDELETE
Need AuthTrue

Request Headers

NameDefaultTypeStyleRequired
Accept*xsd:stringheaderTrue

Request Parameters

NameDescriptionType