The API methods can be used to handle User administration within a space.


TABLE OF CONTENTS

Get users information: GET /api/v1.1/domains/{domainId}/users

VERB

Header

Resource/Id/Selector

Description

Parameters

Return data

GET

Ticket

/api/v1.1/domains/{domainId}/users

Get all users for a domain

(Skip (int))

(Take (int))

TotalCount (int)

 

Data (array):

userid (int)

firstname (string)

lastname (string)

email (string)

disabled (bool)

lastlogin (datetime)

origin (string)

originkey (string)

title (string)

department (string)

country (string)

telephone (string)

 

Get users information: GET /api/v1.1/domains/{domainId}/usergroups

VERB

Header

Resource/Id/Selector

Description

Parameters

Return data

GET

Ticket

/api/v1.1/domains/{domainId}/usergroups

Get all users for a domain including group membership

(Skip (int))

(Take (int))

TotalCount (int)

 

Data (array):

userid (int)

firstname (string)

lastname (string)

email (string)

disabled (bool)

lastlogin (datetime)

origin (string)

originkey (string)

title (string)

department (string)

country (string)

telephone (string)

groups (array):

Id (int)

Name (string)


  

Create new users and add to a domain POST /api/v1.1/domains/{domainId}/users

 

VERB

Header

Resource/Id/Selector

Description

Parameters

Return data

POST

Ticket

/api/v1.1/domains/{domainId}/users

Creates users to domains contract and adds users to domain.

 

Identifying values are origin and origin key.

 

Post is done using Content-type application/json

JSON Object

{

origin (string),

users

[

{

email (string),

originkey (string)(identifying value),

localizationcode (string),

firstname (string),

lastname (string),

disabled (bool),

title (string),

department (string),

country (string),

telephone (string),

groups (string),

spacepermissions

{

view (bool),

model (bool),

build (bool),

run (bool), admin (bool)

}

}

]

}

JSON Object:

 

{

added (int),

updated (int),

errors (int),

users

[

{

key (string),

status (string)

}

]

}

 

Example HTTP request

POST /api/v1.1/domains/{domainId}/users
 Content-Type: application/json
 Ticket: {Ticket}
 Body: 
 {
 "origin": "11111111-1111-1111-1111-111111111111",
 "users" : [
 {
 "email": "john.doe@barium.se",
 "originkey": "johdoe1",
 "localizationcode": "sv-SE",
 "firstname": "John",
 "lastname": "Doe",
 "disabled": false,
 "title": "",
 "department": "Sales",
 "country": "",
 "telephone": "",
 "groups": [],
 "spacepermissions":
 {
 "view": false,
 "model": false,
 "build": false,
 "run": true,
 "admin": false
 }
 }
 ]
 }
  


Update users in domain: POST /api/v1.1/domains/{domainId}/users

VERB

Header

Resource/Id/Selector

Description

Parameters

Return data

POST

Ticket

/api/v1.1/domains/{domainId}/users

Updates existing users.

 

Identifying values are origin and origin key.

 

Only values that are updated need to be stated in the JSON body.

 

Post is done using Content-type application/json

JSON Object

{

origin (string),

users

[

{

email (string),

originkey (string)(identifying value),

localizationcode (string),

firstname (string),

lastname (string)

description (string),

disabled (bool),

title (string),

department (string),

country (string),

telephone (string),

groups (string),

spacepermissions

{

view (bool),

model (bool),

build (bool),

run (bool)

}

}

]

}

JSON Object:

 

{

added (int),

updated (int),

errors (int),

users

[

{

key (string),

status (string)

}

]

}

 

Example HTTP request

POST /api/v1.1/domains/{domainId}/users
 Content-Type: application/json
 Ticket: {Ticket}
 Body: 
 {
 "origin": "11111111-1111-1111-1111-111111111111",
 "users" : [
 {
 "originkey": "johdoe1",
 "department": "Marketing"
 }
 ]
 }
  


Set groups for user: POST /api/v1.1/domains/{domainId}/users

VERB

Header

Resource/Id/Selector

Description

Parameters

Return data

POST

Ticket

/api/v1.1/domains/{{domainid}}/users

Disables a user in Barium Live.

 

Identifying values are origin and origin key.

 

Post is done using Content-type application/json

JSON Object

{

origin (string),

users

[

{

originkey(string),

groups

[

{

groupid (int)

}

]

}

]

}

JSON Object:

 

{

added (int),

updated (int),

errors (int),

users

[

{

key (string),

status (string)

}

]

}

 

Example HTTP request

POST /api/v1.1/domains/{domainId}/users
 Content-Type: application/json
 Ticket: {Ticket}
 Body: 
 {
 "origin": "11111111-1111-1111-1111-111111111111",
 "users": [
 {
 "originkey": "johdoe1",
 "groups": [
 {
 "groupid": 123
 },
 {
 "groupid": 321
 }
 ]
 }
 ]
 }
  

Disable users: POST /api/v1.1/domains/{domainId}/disableusers

 

VERB

Header

Resource/Id/Selector

Description

Parameters

Return data

POST

Ticket

/domains/{domainId}/disableusers

Disables a user in Barium Live.

 

Identifying values are origin and userid. Userid can be fetched from the GET call.

 

Post is done using Content-type application/json

JSON Object

{

origin (string),

users

[

{

userid (int)

}

]

}

JSON Object:

 

{

deleted (int),

errors (int),

users

[

{

userid (int),

status (string)

}

]

}

 

Example HTTP request

POST /api/v1.1/domains/{domainId}/disableusers
 Content-Type: application/json
 Ticket: {Ticket}
 Body: 
 {
     "origin": "11111111-1111-1111-1111-111111111111",
     "users" : [
         {
             "userid": 123456
         }
     ]
 }