Integrator
Table of Contents
Methods
- activateUser() : IntegratorResponse
- Activates superset user
- changeBiconnectorToken() : IntegratorResponse<string|int, Dashboard>
- Change bi token for getting data from apache superset If response is OK - the token was changed successfully.
- changeDashboardOwner() : IntegratorResponse
- Changes dashboard owners
- clearCache() : IntegratorResponse<string|int, null>
- Returns response with result of clear cache superset.
- copyDashboard() : IntegratorResponse
- Returns response with ID of copied dashboard on success request.
- createDataset() : IntegratorResponse
- Adds dataset
- createEmptyDashboard() : IntegratorResponse<string|int, Dashboard>
- Returns response with created dashboard result.
- createUser() : IntegratorResponse
- Creates user in Superset
- deactivateUser() : IntegratorResponse
- Deactivates superset user
- deleteDashboard() : IntegratorResponse<string|int, int>
- Uses external ids of dashboards.
- deleteDataset() : IntegratorResponse
- Deletes dataset
- deleteSuperset() : IntegratorResponse<string|int, null>
- Returns response with result of delete superset.
- exportDashboard() : IntegratorResponse
- Returns stream with file of exported dashboard on success request.
- freezeSuperset() : IntegratorResponse<string|int, null>
- Returns response with result of freeze superset.
- getDashboardById() : IntegratorResponse<string|int, Dashboard>
- Returns response with dashboard with requested id.
- getDashboardEmbeddedCredentials() : IntegratorResponse<string|int, DashboardEmbeddedCredentials>
- Returns response with dashboard credentials to embed on successful request.
- getDashboardList() : IntegratorResponse<string|int, DashboardList>
- Returns response with list of dashboards info on successful request.
- getDatasetById() : IntegratorResponse
- Returns response with dataset info on successful request.
- getDatasetList() : IntegratorResponse
- Returns response with list of dataset info on successful request.
- getDatasetUrl() : IntegratorResponse
- Gets dataset url for creating chart
- getInstance() : self
- getLoginUrl() : IntegratorResponse
- Gets login url with jwt
- importDashboard() : IntegratorResponse<string|int, Dashboard>
- Returns response with dashboard import result.
- importDataset() : IntegratorResponse<string|int, Dashboard>
- Returns response with dataset import result.
- isUserRequired() : bool
- ping() : bool
- Returns status of superset service availability.
- refreshDomainConnection() : IntegratorResponse
- registerPortal() : IntegratorResponse<string|int, string>
- Register new portal on proxy-server. On success - got unique portal ID for authentication in proxy.
- setDashboardOwner() : IntegratorResponse
- Sets owner for dashboard
- setEmptyRole() : IntegratorResponse
- Sets empty role for superset user
- setSender() : void
- startSuperset() : IntegratorResponse<string|int, array<string, string>>
- Returns response with result of start superset.
- syncProfile() : IntegratorResponse
- Sync roles, owners and so on
- unfreezeSuperset() : IntegratorResponse<string|int, null>
- Returns response with result of unfreeze superset.
- updateDashboard() : IntegratorResponse<string|int, array<string|int, string>>
- Update dashboard fields, that allowed in proxy white-list
- updateUser() : IntegratorResponse
- Updates supersetUser
- verifyPortal() : IntegratorResponse
- Verify portal ID on proxy-server, created by <b>registerPortal</b> action.
Methods
activateUser()
Activates superset user
public
activateUser(User $user) : IntegratorResponse
Parameters
- $user : User
Return values
IntegratorResponsechangeBiconnectorToken()
Change bi token for getting data from apache superset If response is OK - the token was changed successfully.
public
changeBiconnectorToken(string $biconnectorToken) : IntegratorResponse<string|int, Dashboard>
Parameters
- $biconnectorToken : string
Return values
IntegratorResponse<string|int, Dashboard>changeDashboardOwner()
Changes dashboard owners
public
changeDashboardOwner(int $dashboardId, User $userFrom, User $userTo) : IntegratorResponse
Parameters
Return values
IntegratorResponseclearCache()
Returns response with result of clear cache superset.
public
clearCache() : IntegratorResponse<string|int, null>
If status code is OK - superset cache was clean.
Return values
IntegratorResponse<string|int, null>copyDashboard()
Returns response with ID of copied dashboard on success request.
public
copyDashboard(int $dashboardId, string $name) : IntegratorResponse
If response code is not OK - returns empty data.
Parameters
- $dashboardId : int
- $name : string
Return values
IntegratorResponsecreateDataset()
Adds dataset
public
createDataset(array<string|int, mixed> $fields) : IntegratorResponse
Parameters
- $fields : array<string|int, mixed>
Return values
IntegratorResponsecreateEmptyDashboard()
Returns response with created dashboard result.
public
createEmptyDashboard(array<string|int, mixed> $fields) : IntegratorResponse<string|int, Dashboard>
If response is OK - dashboard was created successfully.
Parameters
- $fields : array<string|int, mixed>
Return values
IntegratorResponse<string|int, Dashboard>createUser()
Creates user in Superset
public
createUser(User $user) : IntegratorResponse
Parameters
- $user : User
Return values
IntegratorResponsedeactivateUser()
Deactivates superset user
public
deactivateUser(User $user) : IntegratorResponse
Parameters
- $user : User
Return values
IntegratorResponsedeleteDashboard()
Uses external ids of dashboards.
public
deleteDashboard(array<string|int, mixed> $dashboardIds) : IntegratorResponse<string|int, int>
Returns response with result of deleting dashboards. If response code is not OK - returns empty data.
Parameters
- $dashboardIds : array<string|int, mixed>
-
External ids of dashboards.
Return values
IntegratorResponse<string|int, int>deleteDataset()
Deletes dataset
public
deleteDataset(int $id) : IntegratorResponse
Parameters
- $id : int
Return values
IntegratorResponsedeleteSuperset()
Returns response with result of delete superset.
public
deleteSuperset() : IntegratorResponse<string|int, null>
If status code is OK/IN_PROGRESS - superset was deleted.
Return values
IntegratorResponse<string|int, null>exportDashboard()
Returns stream with file of exported dashboard on success request.
public
exportDashboard(int $dashboardId[, array<string|int, mixed> $dashboardSettings = [] ]) : IntegratorResponse
If response code is not OK - returns empty data.
Parameters
- $dashboardId : int
- $dashboardSettings : array<string|int, mixed> = []
Return values
IntegratorResponsefreezeSuperset()
Returns response with result of freeze superset.
public
freezeSuperset([array<string|int, mixed> $params = [] ]) : IntegratorResponse<string|int, null>
$params['reason'] - reason of freezing superset. If the reason is "TARIFF" - instanse won't activate automatically. Use unfreezeSuperset method with same reason to unfreeze instance.
Parameters
- $params : array<string|int, mixed> = []
Return values
IntegratorResponse<string|int, null>getDashboardById()
Returns response with dashboard with requested id.
public
getDashboardById(int $dashboardId) : IntegratorResponse<string|int, Dashboard>
Parameters
- $dashboardId : int
Return values
IntegratorResponse<string|int, Dashboard>getDashboardEmbeddedCredentials()
Returns response with dashboard credentials to embed on successful request.
public
getDashboardEmbeddedCredentials(int $dashboardId) : IntegratorResponse<string|int, DashboardEmbeddedCredentials>
If response code is not OK - returns empty data.
Parameters
- $dashboardId : int
Return values
IntegratorResponse<string|int, DashboardEmbeddedCredentials>getDashboardList()
Returns response with list of dashboards info on successful request.
public
getDashboardList(array<string|int, mixed> $ids) : IntegratorResponse<string|int, DashboardList>
If response code is not OK - returns empty data.
Parameters
- $ids : array<string|int, mixed>
-
External ids of dashboards.
Return values
IntegratorResponse<string|int, DashboardList>getDatasetById()
Returns response with dataset info on successful request.
public
getDatasetById(int $id) : IntegratorResponse
Parameters
- $id : int
Return values
IntegratorResponsegetDatasetList()
Returns response with list of dataset info on successful request.
public
getDatasetList(array<string|int, mixed> $ids) : IntegratorResponse
If response code is not OK - returns empty data.
Parameters
- $ids : array<string|int, mixed>
-
External ids of dashboards.
Return values
IntegratorResponsegetDatasetUrl()
Gets dataset url for creating chart
public
getDatasetUrl(int $id) : IntegratorResponse
Parameters
- $id : int
Return values
IntegratorResponsegetInstance()
public
static getInstance() : self
Return values
selfgetLoginUrl()
Gets login url with jwt
public
getLoginUrl() : IntegratorResponse
Return values
IntegratorResponseimportDashboard()
Returns response with dashboard import result.
public
importDashboard(string $filePath, string $appCode) : IntegratorResponse<string|int, Dashboard>
If response is OK - dashboard was imported successfully.
Parameters
- $filePath : string
- $appCode : string
Return values
IntegratorResponse<string|int, Dashboard>importDataset()
Returns response with dataset import result.
public
importDataset(string $filePath) : IntegratorResponse<string|int, Dashboard>
If response is OK - dataset was imported successfully.
Parameters
- $filePath : string
Return values
IntegratorResponse<string|int, Dashboard>isUserRequired()
public
static isUserRequired(string $action) : bool
Parameters
- $action : string
Tags
Return values
boolping()
Returns status of superset service availability.
public
ping() : bool
If service available - returns true, false otherwise
Return values
boolrefreshDomainConnection()
public
refreshDomainConnection() : IntegratorResponse
Return values
IntegratorResponseregisterPortal()
Register new portal on proxy-server. On success - got unique portal ID for authentication in proxy.
public
registerPortal() : IntegratorResponse<string|int, string>
On request save unique ID from response to config by Client middleware, after that portal make verify request to proxy-server, for verify this portal ID
Tags
Return values
IntegratorResponse<string|int, string>setDashboardOwner()
Sets owner for dashboard
public
setDashboardOwner(int $dashboardId, User $user) : IntegratorResponse
Parameters
- $dashboardId : int
- $user : User
Return values
IntegratorResponsesetEmptyRole()
Sets empty role for superset user
public
setEmptyRole(User $user) : IntegratorResponse
Parameters
- $user : User
Return values
IntegratorResponsesetSender()
public
setSender(Sender $sender) : void
Parameters
- $sender : Sender
startSuperset()
Returns response with result of start superset.
public
startSuperset([string $biconnectorToken = '' ]) : IntegratorResponse<string|int, array<string, string>>
If status code is OK/IN_PROGRESS - superset was started.
Parameters
- $biconnectorToken : string = ''
Return values
IntegratorResponse<string|int, array<string, string>>syncProfile()
Sync roles, owners and so on
public
syncProfile(User $user, array<string|int, mixed> $data) : IntegratorResponse
Parameters
- $user : User
- $data : array<string|int, mixed>
Return values
IntegratorResponseunfreezeSuperset()
Returns response with result of unfreeze superset.
public
unfreezeSuperset([array<string|int, mixed> $params = [] ]) : IntegratorResponse<string|int, null>
$params['reason'] - reason of previous freezing superset. If the reason is "TARIFF" - instance will be activated if it was freezed only with TARIFF reason.
Parameters
- $params : array<string|int, mixed> = []
Return values
IntegratorResponse<string|int, null>updateDashboard()
Update dashboard fields, that allowed in proxy white-list
public
updateDashboard(int $dashboardId, array<string|int, mixed> $editedFields) : IntegratorResponse<string|int, array<string|int, string>>
Parameters
- $dashboardId : int
-
external id of edited dashboard
- $editedFields : array<string|int, mixed>
-
fields for edit in superset. Format: field_name_in_superset -> new_value
Return values
IntegratorResponse<string|int, array<string|int, string>> —return array of fields that changed
updateUser()
Updates supersetUser
public
updateUser(User $user) : IntegratorResponse
Parameters
- $user : User
Return values
IntegratorResponseverifyPortal()
Verify portal ID on proxy-server, created by <b>registerPortal</b> action.
public
verifyPortal() : IntegratorResponse
On request proxy-server make verify request to verify.php endpoint and return verify result in this method
Method for portal ID verify