AdminApi
CLASS in nl.bimbase.bimworks.client.apis.
API catalogue · nl.bimbase.bimworks.client.apis · CLASS
Administrator API calls, generally require elevated privileges
Inheritance and interfaces#
Members#
| Member | Kind | Description |
|---|---|---|
| AdminApi(BimWorksClient) | CONSTRUCTOR | |
| createApiToken(UUID, String, Set<String>, Set<String>, Set<ApiTokenCredential>) | METHOD | |
| createApiToken(UUID, String, Set<String>, Set<String>, Set<ApiTokenCredential>, LocalDate) | METHOD | |
| createApiToken(UUID, String, EnumSet<Scope>, LocalDate) | METHOD | Create an API token restricted to the given scopes (the preferred variant — see nl.bimbase.bimworks.client.Scope). The token value is returned once and never… |
| listFolderApiTokens(UUID) | METHOD | API tokens rooted at the given folder (secret redacted). |
| updateApiToken(UUID, String, EnumSet<Scope>, LocalDate) | METHOD | Update name, scopes and/or expiry of an API token; null leaves a property unchanged. |
| rotateApiTokenSecret(UUID) | METHOD | Replace the secret of an API token; the old secret stops working immediately. @return the new token value |
| deleteApiToken(UUID) | METHOD | |
| listAccounts() | METHOD | Accounts visible to the caller (its organization; every organization for a super admin). |
| listOrganizations() | METHOD | |
| listAccountUserFeatures(UUID) | METHOD | Every user feature with its enabled flag for the account (own account, or super admin). |
| setUserFeature(UUID, String, boolean) | METHOD | Super admin only: switch a user feature for an account. |
AdminApi(BimWorksClient)#
public AdminApi(nl.bimbase.bimworks.client.BimWorksClient bimWorksClient)Parameters#
| Name | Type | Description |
|---|---|---|
bimWorksClient |
BimWorksClient |
createApiToken(UUID, String, Set<String>, Set<String>, Set<ApiTokenCredential>)#
public java.lang.String createApiToken(java.util.UUID nodeUuid, java.lang.String name, java.util.Set<java.lang.String> allowedCorsDomains, java.util.Set<java.lang.String> whiteListedIpAddresses, java.util.Set<nl.bimbase.bimworks.client.ApiTokenCredential> credentials) throws nl.sascom.backplane.common.ExecuteException, java.lang.InterruptedException, nl.bimbase.bimworks.client.BimWorksExceptionParameters#
| Name | Type | Description |
|---|---|---|
nodeUuid |
java.util.UUID |
|
name |
java.lang.String |
|
allowedCorsDomains |
java.util.Set<java.lang.String> |
|
whiteListedIpAddresses |
java.util.Set<java.lang.String> |
|
credentials |
java.util.Set<nl.bimbase.bimworks.client.ApiTokenCredential> |
createApiToken(UUID, String, Set<String>, Set<String>, Set<ApiTokenCredential>, LocalDate)#
public java.lang.String createApiToken(java.util.UUID nodeUuid, java.lang.String name, java.util.Set<java.lang.String> allowedCorsDomains, java.util.Set<java.lang.String> whiteListedIpAddresses, java.util.Set<nl.bimbase.bimworks.client.ApiTokenCredential> credentials, java.time.LocalDate expiresOn) throws nl.sascom.backplane.common.ExecuteException, java.lang.InterruptedException, nl.bimbase.bimworks.client.BimWorksExceptionParameters#
| Name | Type | Description |
|---|---|---|
nodeUuid |
java.util.UUID |
|
name |
java.lang.String |
|
allowedCorsDomains |
java.util.Set<java.lang.String> |
|
whiteListedIpAddresses |
java.util.Set<java.lang.String> |
|
credentials |
java.util.Set<nl.bimbase.bimworks.client.ApiTokenCredential> |
|
expiresOn |
java.time.LocalDate |
the day the token stops working (usable through the whole of that UTC day); null for the server's default (one month ahead). The server refuses a date further ahead than its configured maximum (three years). |
createApiToken(UUID, String, EnumSet<Scope>, LocalDate)#
public com.fasterxml.jackson.databind.node.ObjectNode createApiToken(java.util.UUID nodeUuid, java.lang.String name, java.util.EnumSet<nl.bimbase.bimworks.client.Scope> scopes, java.time.LocalDate expiresOn) throws nl.bimbase.bimworks.client.BimWorksExceptionCreate an API token restricted to the given scopes (the preferred variant — see nl.bimbase.bimworks.client.Scope). The token value is returned once and never again.
Parameters#
| Name | Type | Description |
|---|---|---|
nodeUuid |
java.util.UUID |
|
name |
java.lang.String |
|
scopes |
java.util.EnumSet<nl.bimbase.bimworks.client.Scope> |
|
expiresOn |
java.time.LocalDate |
Returns#
{token, expires_on}
listFolderApiTokens(UUID)#
public com.fasterxml.jackson.databind.node.ArrayNode listFolderApiTokens(java.util.UUID nodeUuid) throws nl.bimbase.bimworks.client.BimWorksExceptionAPI tokens rooted at the given folder (secret redacted).
Parameters#
| Name | Type | Description |
|---|---|---|
nodeUuid |
java.util.UUID |
updateApiToken(UUID, String, EnumSet<Scope>, LocalDate)#
public void updateApiToken(java.util.UUID uuid, java.lang.String name, java.util.EnumSet<nl.bimbase.bimworks.client.Scope> scopes, java.time.LocalDate expiresOn) throws nl.bimbase.bimworks.client.BimWorksExceptionUpdate name, scopes and/or expiry of an API token; null leaves a property unchanged.
Parameters#
| Name | Type | Description |
|---|---|---|
uuid |
java.util.UUID |
|
name |
java.lang.String |
|
scopes |
java.util.EnumSet<nl.bimbase.bimworks.client.Scope> |
|
expiresOn |
java.time.LocalDate |
rotateApiTokenSecret(UUID)#
public java.lang.String rotateApiTokenSecret(java.util.UUID uuid) throws nl.bimbase.bimworks.client.BimWorksExceptionReplace the secret of an API token; the old secret stops working immediately. @return the new token value
Parameters#
| Name | Type | Description |
|---|---|---|
uuid |
java.util.UUID |
deleteApiToken(UUID)#
public void deleteApiToken(java.util.UUID uuid) throws nl.bimbase.bimworks.client.BimWorksExceptionParameters#
| Name | Type | Description |
|---|---|---|
uuid |
java.util.UUID |
listAccounts()#
public com.fasterxml.jackson.databind.JsonNode listAccounts() throws nl.bimbase.bimworks.client.BimWorksExceptionAccounts visible to the caller (its organization; every organization for a super admin).
listOrganizations()#
public com.fasterxml.jackson.databind.JsonNode listOrganizations() throws nl.bimbase.bimworks.client.BimWorksExceptionlistAccountUserFeatures(UUID)#
public com.fasterxml.jackson.databind.node.ArrayNode listAccountUserFeatures(java.util.UUID accountUuid) throws nl.bimbase.bimworks.client.BimWorksExceptionEvery user feature with its enabled flag for the account (own account, or super admin).
Parameters#
| Name | Type | Description |
|---|---|---|
accountUuid |
java.util.UUID |
setUserFeature(UUID, String, boolean)#
public void setUserFeature(java.util.UUID accountUuid, java.lang.String feature, boolean enabled) throws nl.bimbase.bimworks.client.BimWorksExceptionSuper admin only: switch a user feature for an account.
Parameters#
| Name | Type | Description |
|---|---|---|
accountUuid |
java.util.UUID |
|
feature |
java.lang.String |
|
enabled |
boolean |
Inherited members#
java.lang.Object#equals(java.lang.Object)java.lang.Object#toString()java.lang.Object#wait(long)java.lang.Object#wait(long,int)java.lang.Object#wait()java.lang.Object#finalize()java.lang.Object#getClass()java.lang.Object#hashCode()java.lang.Object#clone()java.lang.Object#notify()java.lang.Object#notifyAll()- getBimWorksClient()