Bitium

Languages

Admin - Directories

retrieve a list of directories

List the directories associated with an organization.

Required Scopes

  • ORG_READ

Request Parameters

Name Type Required Description
page integer No Page of results to fetch.
Default value: 1
per_page integer No Number of results to return per page.

 

Endpoint Copy

GET https://www.bitium.com/api/v2/organizations/{organization_id}/admin/directories

Example Request

curl -H "Authorization: token {token}" \
-H "X-Device-Id: {unique_id}" \
https://www.bitium.com/api/v2/organizations/{organization_id}/admin/directories 

Example Response

[
  {
    "doppler": true, 
    "id": 696, 
    "name": "Active Directory", 
    "target_type": "AuthStrategy"
  }
]

retrieve a specific directory

Required Scopes

  • ORG_READ

 

Endpoint Copy

GET https://www.bitium.com/api/v2/organizations/{organization_id}/admin/directories/{directory_id}

Example Request

Example Response

{
  "doppler": true, 
  "id": 696, 
  "name": "Active Directory", 
  "target_type": "AuthStrategy"
}

retrieve the external users connected to a directory

List of users in an external directory that is connected with an organization.

Required Scopes

  • ORG_READ

Request Parameters

Name Type Required Description
page integer No Page of results to fetch.
Default value: 1
per_page integer No Number of results to return per page.

 

Endpoint Copy

GET https://www.bitium.com/api/v2/organizations/{organization_id}/admin/directories/{directory_id}/users

Example Request

Example Response

[
  {
    "first_name": null, 
    "last_name": null, 
    "name": "aaron", 
    "id": 63909, 
    "external_id": "CN=aaron,OU=DomainUsers,DC=thedemoco,DC=com", 
    "email": "aaron@thedemoco.com"
  }, 
  {
    "first_name": null, 
    "last_name": null, 
    "name": null, 
    "id": 63888, 
    "external_id": "CN=adam,OU=DomainUsers,DC=thedemoco,DC=com", 
    "email": null
  }, 
  {
    "first_name": null, 
    "last_name": null, 
    "name": "andrew", 
    "id": 63877, 
    "external_id": "CN=andrew,OU=DomainUsers,DC=thedemoco,DC=com", 
    "email": "andrew@thedemoco.com"
  }, 
  {
    "first_name": null, 
    "last_name": null, 
    "name": "benjie", 
    "id": 63907, 
    "external_id": "CN=benjie,OU=DomainUsers,DC=thedemoco,DC=com", 
    "email": "benjie@thedemoco.com"
  }, 
  {
    "first_name": null, 
    "last_name": null, 
    "name": null, 
    "id": 63882, 
    "external_id": "CN=Bob,OU=DomainUsers,DC=thedemoco,DC=com", 
    "email": null
  }, 
  {
    "first_name": null, 
    "last_name": null, 
    "name": null, 
    "id": 63902, 
    "external_id": "CN=britny,OU=DomainUsers,DC=thedemoco,DC=com", 
    "email": null
  }, 
  {
    "first_name": null, 
    "last_name": null, 
    "name": null, 
    "id": 63898, 
    "external_id": "CN=christian,OU=DomainUsers,DC=thedemoco,DC=com", 
    "email": null
  }, 
  {
    "first_name": null, 
    "last_name": null, 
    "name": "chung", 
    "id": 63915, 
    "external_id": "CN=chung,OU=DomainUsers,DC=thedemoco,DC=com", 
    "email": "chung@thedemoco.com"
  }, 
  {
    "first_name": null, 
    "last_name": null, 
    "name": null, 
    "id": 63903, 
    "external_id": "CN=conrad,OU=DomainUsers,DC=thedemoco,DC=com", 
    "email": null
  }, 
  {
    "first_name": null, 
    "last_name": null, 
    "name": null, 
    "id": 63884, 
    "external_id": "CN=debbie,OU=DomainUsers,DC=thedemoco,DC=com", 
    "email": null
  }, 
  {
    "first_name": null, 
    "last_name": null, 
    "name": null, 
    "id": 63886, 
    "external_id": "CN=dhendy,OU=DomainUsers,DC=thedemoco,DC=com", 
    "email": null
  }, 
  {
    "first_name": null, 
    "last_name": null, 
    "name": "dustin", 
    "id": 63872, 
    "external_id": "CN=dustin,OU=DomainUsers,DC=thedemoco,DC=com", 
    "email": "dustin@thedemoco.com"
  }, 
  {
    "first_name": null, 
    "last_name": null, 
    "name": "erik", 
    "id": 63879, 
    "external_id": "CN=erik,OU=DomainUsers,DC=thedemoco,DC=com", 
    "email": "erik@thedemoco.com"
  }, 
  {
    "first_name": null, 
    "last_name": null, 
    "name": "garrett", 
    "id": 63869, 
    "external_id": "CN=garrett,OU=DomainUsers,DC=thedemoco,DC=com", 
    "email": "garrett@thedemoco.com"
  }, 
  {
    "first_name": null, 
    "last_name": null, 
    "name": null, 
    "id": 63894, 
    "external_id": "CN=george,OU=DomainUsers,DC=thedemoco,DC=com", 
    "email": null
  }, 
  {
    "first_name": null, 
    "last_name": null, 
    "name": "ivan", 
    "id": 63875, 
    "external_id": "CN=ivan,OU=DomainUsers,DC=thedemoco,DC=com", 
    "email": "ivan@thedemoco.com"
  }, 
  {
    "first_name": null, 
    "last_name": null, 
    "name": null, 
    "id": 63895, 
    "external_id": "CN=jake,OU=DomainUsers,DC=thedemoco,DC=com", 
    "email": null
  }, 
  {
    "first_name": null, 
    "last_name": null, 
    "name": "jason", 
    "id": 63870, 
    "external_id": "CN=jason,OU=DomainUsers,DC=thedemoco,DC=com", 
    "email": "jason@thedemoco.com"
  }, 
  {
    "first_name": null, 
    "last_name": null, 
    "name": null, 
    "id": 63905, 
    "external_id": "CN=job,OU=DomainUsers,DC=thedemoco,DC=com", 
    "email": null
  }, 
  {
    "first_name": null, 
    "last_name": null, 
    "name": null, 
    "id": 63887, 
    "external_id": "CN=joel,OU=DomainUsers,DC=thedemoco,DC=com", 
    "email": null
  }
]

add an external user to a directory

Create a new user in the specified external directory.

Required Scopes

  • ORG

Form Parameters

Name Type Required Description
users[][email] string No Email of the user, must be in the organization's allowed domains
users[][external_id] string No External identifier for the user
users[][name] string No Name of the user
users[][employee_id] string No Internal employee id

 

Endpoint Copy

POST https://www.bitium.com/api/v2/organizations/{organization_id}/admin/directories/{directory_id}/users

Example Request

Example Response

retrieve an external user

Required Scopes

  • ORG_READ

 

Endpoint Copy

GET https://www.bitium.com/api/v2/organizations/{organization_id}/admin/directories/{directory_id}/users/{external_id}

Example Request

curl -H "Authorization: token {token}" \
-H "X-Device-Id: {unique_id}" \
https://www.bitium.com/api/v2/organizations/{organization_id}/admin/directories/{directory_id}/users/{external_id} 

Example Response

{
  "first_name": "John”, 
  "last_name": “Smith”, 
  "name": null, 
  "id": 220734, 
  "external_id": "1", 
  "email": "john@bitium.com"
}

update an external user

Edit the name and/or email of a user in an external directory.

Required Scopes

  • ORG

Form Parameters

Name Type Required Description
email string No Email of the user, must be in the organization's allowed domains
name string No Name of the user

 

Endpoint Copy

PATCH https://www.bitium.com/api/v2/organizations/{organization_id}/admin/directories/{directory_id}/users/{external_id}

Example Request

curl -H "Authorization: token {token}" \
-H "X-Device-Id: {unique_id}" \
https://www.bitium.com/api/v2/organizations/{organization_id}/admin/directories/{directory_id}/users/{external_id} \
-X PATCH \
-d email=1 \ 
-d name=1

Example Response

remove an external user

Remove a user from an external directory.

Required Scopes

  • ORG

 

Endpoint Copy

DELETE https://www.bitium.com/api/v2/organizations/{organization_id}/admin/directories/{directory_id}/users/{external_id}

Example Request

curl -H "Authorization: token {token}" \
-H "X-Device-Id: {unique_id}" \
https://www.bitium.com/api/v2/organizations/{organization_id}/admin/directories/{directory_id}/users/{external_id} \
-X DELETE

Example Response

retrieve the external groups connected to a directory

List the external groups in an organization's directory (ex. Google Apps, Active Directory, Jumpcloud).

Required Scopes

  • ORG_READ

Request Parameters

Name Type Required Description
page integer No Page of results to fetch.
Default value: 1
per_page integer No Number of results to return per page.

 

Endpoint Copy

GET https://www.bitium.com/api/v2/organizations/{organization_id}/admin/directories/{directory_id}/groups

Example Request

Example Response

[
  {
    "external_member_ids": [], 
    "external_id": "CN=Account Operators,CN=Builtin,DC=thedemoco,DC=com", 
    "name": "Account Operators"
  }, 
  {
    "external_member_ids": [], 
    "external_id": "CN=Administrators,CN=Builtin,DC=thedemoco,DC=com", 
    "name": "Administrators"
  }, 
  {
    "external_member_ids": [], 
    "external_id": "CN=Admins,DC=thedemoco,DC=com", 
    "name": "Admins"
  }, 
  {
    "external_member_ids": [], 
    "external_id": "CN=Allowed RODC Password Replication Group,CN=Users,DC=thedemoco,DC=com", 
    "name": "Allowed RODC Password Replication Group"
  }, 
  {
    "external_member_ids": [], 
    "external_id": "CN=Backup Operators,CN=Builtin,DC=thedemoco,DC=com", 
    "name": "Backup Operators"
  }, 
  {
    "external_member_ids": [], 
    "external_id": "CN=Certificate Service DCOM Access,CN=Builtin,DC=thedemoco,DC=com", 
    "name": "Certificate Service DCOM Access"
  }, 
  {
    "external_member_ids": [], 
    "external_id": "CN=Cert Publishers,CN=Users,DC=thedemoco,DC=com", 
    "name": "Cert Publishers"
  }, 
  {
    "external_member_ids": [], 
    "external_id": "CN=Cryptographic Operators,CN=Builtin,DC=thedemoco,DC=com", 
    "name": "Cryptographic Operators"
  }, 
  {
    "external_member_ids": [], 
    "external_id": "CN=Denied RODC Password Replication Group,CN=Users,DC=thedemoco,DC=com", 
    "name": "Denied RODC Password Replication Group"
  }, 
  {
    "external_member_ids": [], 
    "external_id": "CN=Distributed COM Users,CN=Builtin,DC=thedemoco,DC=com", 
    "name": "Distributed COM Users"
  }, 
  {
    "external_member_ids": [], 
    "external_id": "CN=DnsAdmins,CN=Users,DC=thedemoco,DC=com", 
    "name": "DnsAdmins"
  }, 
  {
    "external_member_ids": [], 
    "external_id": "CN=DnsUpdateProxy,CN=Users,DC=thedemoco,DC=com", 
    "name": "DnsUpdateProxy"
  }, 
  {
    "external_member_ids": [], 
    "external_id": "CN=Domain Admins,CN=Users,DC=thedemoco,DC=com", 
    "name": "Domain Admins"
  }, 
  {
    "external_member_ids": [], 
    "external_id": "CN=Domain Computers,CN=Users,DC=thedemoco,DC=com", 
    "name": "Domain Computers"
  }, 
  {
    "external_member_ids": [], 
    "external_id": "CN=Domain Controllers,CN=Users,DC=thedemoco,DC=com", 
    "name": "Domain Controllers"
  }, 
  {
    "external_member_ids": [], 
    "external_id": "CN=Domain Guests,CN=Users,DC=thedemoco,DC=com", 
    "name": "Domain Guests"
  }, 
  {
    "external_member_ids": [], 
    "external_id": "CN=Domain Users,CN=Users,DC=thedemoco,DC=com", 
    "name": "Domain Users"
  }, 
  {
    "external_member_ids": [], 
    "external_id": "CN=Enterprise Admins,CN=Users,DC=thedemoco,DC=com", 
    "name": "Enterprise Admins"
  }, 
  {
    "external_member_ids": [], 
    "external_id": "CN=Enterprise Read-only Domain Controllers,CN=Users,DC=thedemoco,DC=com", 
    "name": "Enterprise Read-only Domain Controllers"
  }, 
  {
    "external_member_ids": [], 
    "external_id": "CN=Event Log Readers,CN=Builtin,DC=thedemoco,DC=com", 
    "name": "Event Log Readers"
  }
]

add an external group to a directory

Create a new group in the specified external directory.

Required Scopes

  • ORG

Form Parameters

Name Type Required Description
groups[][external_id] string Yes External identifier for the user
groups[][name] string Yes Name of the group

 

Endpoint Copy

POST https://www.bitium.com/api/v2/organizations/{organization_id}/admin/directories/{directory_id}/groups

Example Request

Example Response

retrieve an external group

Information about a group in an external directory including the name, member users, and external id.

Required Scopes

  • ORG_READ

 

Endpoint Copy

GET https://www.bitium.com/api/v2/organizations/{organization_id}/admin/directories/{directory_id}/groups/{external_id}

Example Request

curl -H "Authorization: token {token}" \
-H "X-Device-Id: {unique_id}" \
https://www.bitium.com/api/v2/organizations/{organization_id}/admin/directories/{directory_id}/groups/{external_id} 

Example Response

{
    "external_member_ids": [], 
    "external_id": "55a83535092a473519138584", 
    "name": "Design"
}

remove an external group

Remove a group from an external directory.

Required Scopes

  • ORG

 

Endpoint Copy

DELETE https://www.bitium.com/api/v2/organizations/{organization_id}/admin/directories/{directory_id}/groups/{external_id}

Example Request

curl -H "Authorization: token {token}" \
-H "X-Device-Id: {unique_id}" \
https://www.bitium.com/api/v2/organizations/{organization_id}/admin/directories/{directory_id}/groups/{external_id} \
-X DELETE

Example Response

update an external group

Update the name of a group in an external directory.

Required Scopes

  • ORG

Form Parameters

Name Type Required Description
name string Yes Name of the group

 

Endpoint Copy

PATCH https://www.bitium.com/api/v2/organizations/{organization_id}/admin/directories/{directory_id}/groups/{external_id}

Example Request

curl -H "Authorization: token {token}" \
-H "X-Device-Id: {unique_id}" \
https://www.bitium.com/api/v2/organizations/{organization_id}/admin/directories/{directory_id}/groups/{external_id} \
-X PATCH \
-d name=1

Example Response