Skip to content

Latest commit

 

History

History
434 lines (317 loc) · 13.2 KB

AdminTenantsApi.md

File metadata and controls

434 lines (317 loc) · 13.2 KB

AdminTenantsApi

All URIs are relative to https://localhost:9080/activiti-app/api

Method HTTP request Description
createTenantUsingPOST POST /enterprise/admin/tenants Create a tenant
deleteTenantUsingDELETE DELETE /enterprise/admin/tenants/{tenantId} Delete a tenant
getTenantEventsUsingGET GET /enterprise/admin/tenants/{tenantId}/events Get tenant events
getTenantLogoUsingGET GET /enterprise/admin/tenants/{tenantId}/logo Get a tenant's logo
getTenantUsingGET GET /enterprise/admin/tenants/{tenantId} Get a tenant
getTenantsUsingGET GET /enterprise/admin/tenants List tenants
updateUsingPUT PUT /enterprise/admin/tenants/{tenantId} Update a tenant
uploadTenantLogoUsingPOST POST /enterprise/admin/tenants/{tenantId}/logo Update a tenant's logo

createTenantUsingPOST

LightTenantRepresentation createTenantUsingPOST(createTenantRepresentation)

Create a tenant

Only a tenant manager may access this endpoint

Example

// Import classes:
//import org.activiti.engine.remote.client.ApiClient;
//import org.activiti.engine.remote.client.ApiException;
//import org.activiti.engine.remote.client.Configuration;
//import org.activiti.engine.remote.client.auth.*;
//import org.activiti.engine.remote.client.api.AdminTenantsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");

AdminTenantsApi apiInstance = new AdminTenantsApi();
CreateTenantRepresentation createTenantRepresentation = new CreateTenantRepresentation(); // CreateTenantRepresentation | createTenantRepresentation
try {
    LightTenantRepresentation result = apiInstance.createTenantUsingPOST(createTenantRepresentation);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AdminTenantsApi#createTenantUsingPOST");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
createTenantRepresentation CreateTenantRepresentation createTenantRepresentation

Return type

LightTenantRepresentation

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

deleteTenantUsingDELETE

deleteTenantUsingDELETE(tenantId)

Delete a tenant

Example

// Import classes:
//import org.activiti.engine.remote.client.ApiClient;
//import org.activiti.engine.remote.client.ApiException;
//import org.activiti.engine.remote.client.Configuration;
//import org.activiti.engine.remote.client.auth.*;
//import org.activiti.engine.remote.client.api.AdminTenantsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");

AdminTenantsApi apiInstance = new AdminTenantsApi();
Long tenantId = 789L; // Long | tenantId
try {
    apiInstance.deleteTenantUsingDELETE(tenantId);
} catch (ApiException e) {
    System.err.println("Exception when calling AdminTenantsApi#deleteTenantUsingDELETE");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
tenantId Long tenantId

Return type

null (empty response body)

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

getTenantEventsUsingGET

List<TenantEvent> getTenantEventsUsingGET(tenantId)

Get tenant events

Example

// Import classes:
//import org.activiti.engine.remote.client.ApiClient;
//import org.activiti.engine.remote.client.ApiException;
//import org.activiti.engine.remote.client.Configuration;
//import org.activiti.engine.remote.client.auth.*;
//import org.activiti.engine.remote.client.api.AdminTenantsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");

AdminTenantsApi apiInstance = new AdminTenantsApi();
Long tenantId = 789L; // Long | tenantId
try {
    List<TenantEvent> result = apiInstance.getTenantEventsUsingGET(tenantId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AdminTenantsApi#getTenantEventsUsingGET");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
tenantId Long tenantId

Return type

List<TenantEvent>

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

getTenantLogoUsingGET

getTenantLogoUsingGET(tenantId)

Get a tenant's logo

Example

// Import classes:
//import org.activiti.engine.remote.client.ApiClient;
//import org.activiti.engine.remote.client.ApiException;
//import org.activiti.engine.remote.client.Configuration;
//import org.activiti.engine.remote.client.auth.*;
//import org.activiti.engine.remote.client.api.AdminTenantsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");

AdminTenantsApi apiInstance = new AdminTenantsApi();
Long tenantId = 789L; // Long | tenantId
try {
    apiInstance.getTenantLogoUsingGET(tenantId);
} catch (ApiException e) {
    System.err.println("Exception when calling AdminTenantsApi#getTenantLogoUsingGET");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
tenantId Long tenantId

Return type

null (empty response body)

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

getTenantUsingGET

TenantRepresentation getTenantUsingGET(tenantId)

Get a tenant

Example

// Import classes:
//import org.activiti.engine.remote.client.ApiClient;
//import org.activiti.engine.remote.client.ApiException;
//import org.activiti.engine.remote.client.Configuration;
//import org.activiti.engine.remote.client.auth.*;
//import org.activiti.engine.remote.client.api.AdminTenantsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");

AdminTenantsApi apiInstance = new AdminTenantsApi();
Long tenantId = 789L; // Long | tenantId
try {
    TenantRepresentation result = apiInstance.getTenantUsingGET(tenantId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AdminTenantsApi#getTenantUsingGET");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
tenantId Long tenantId

Return type

TenantRepresentation

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

getTenantsUsingGET

List<LightTenantRepresentation> getTenantsUsingGET()

List tenants

Only a tenant manager may access this endpoint

Example

// Import classes:
//import org.activiti.engine.remote.client.ApiClient;
//import org.activiti.engine.remote.client.ApiException;
//import org.activiti.engine.remote.client.Configuration;
//import org.activiti.engine.remote.client.auth.*;
//import org.activiti.engine.remote.client.api.AdminTenantsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");

AdminTenantsApi apiInstance = new AdminTenantsApi();
try {
    List<LightTenantRepresentation> result = apiInstance.getTenantsUsingGET();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AdminTenantsApi#getTenantsUsingGET");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

List<LightTenantRepresentation>

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

updateUsingPUT

TenantRepresentation updateUsingPUT(tenantId, createTenantRepresentation)

Update a tenant

Example

// Import classes:
//import org.activiti.engine.remote.client.ApiClient;
//import org.activiti.engine.remote.client.ApiException;
//import org.activiti.engine.remote.client.Configuration;
//import org.activiti.engine.remote.client.auth.*;
//import org.activiti.engine.remote.client.api.AdminTenantsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");

AdminTenantsApi apiInstance = new AdminTenantsApi();
Long tenantId = 789L; // Long | tenantId
CreateTenantRepresentation createTenantRepresentation = new CreateTenantRepresentation(); // CreateTenantRepresentation | createTenantRepresentation
try {
    TenantRepresentation result = apiInstance.updateUsingPUT(tenantId, createTenantRepresentation);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AdminTenantsApi#updateUsingPUT");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
tenantId Long tenantId
createTenantRepresentation CreateTenantRepresentation createTenantRepresentation

Return type

TenantRepresentation

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

uploadTenantLogoUsingPOST

ImageUploadRepresentation uploadTenantLogoUsingPOST(tenantId, file)

Update a tenant's logo

Example

// Import classes:
//import org.activiti.engine.remote.client.ApiClient;
//import org.activiti.engine.remote.client.ApiException;
//import org.activiti.engine.remote.client.Configuration;
//import org.activiti.engine.remote.client.auth.*;
//import org.activiti.engine.remote.client.api.AdminTenantsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");

AdminTenantsApi apiInstance = new AdminTenantsApi();
Long tenantId = 789L; // Long | tenantId
File file = new File("/path/to/file.txt"); // File | file
try {
    ImageUploadRepresentation result = apiInstance.uploadTenantLogoUsingPOST(tenantId, file);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AdminTenantsApi#uploadTenantLogoUsingPOST");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
tenantId Long tenantId
file File file

Return type

ImageUploadRepresentation

Authorization

basicAuth

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json