Skip to content
This repository has been archived by the owner on May 17, 2018. It is now read-only.

Latest commit

 

History

History
518 lines (362 loc) · 13.4 KB

TenantsApi.md

File metadata and controls

518 lines (362 loc) · 13.4 KB

TenantsApi

All URIs are relative to http://localhost/nifi-api

Method HTTP request Description
createUser POST /tenants/users Creates a user
createUserGroup POST /tenants/user-groups Creates a user group
getUser GET /tenants/users/{id} Gets a user
getUserGroup GET /tenants/user-groups/{id} Gets a user group
getUserGroups GET /tenants/user-groups Gets all user groups
getUsers GET /tenants/users Gets all users
removeUser DELETE /tenants/users/{id} Deletes a user
removeUserGroup DELETE /tenants/user-groups/{id} Deletes a user group
searchCluster GET /tenants/search-results Searches the cluster for a node with the specified address
updateUser PUT /tenants/users/{id} Updates a user
updateUserGroup PUT /tenants/user-groups/{id} Updates a user group

createUser

UserEntity createUser(body)

Creates a user

Note: This endpoint is subject to change as NiFi and it's REST API evolve.

Example

// Import classes:
//import io.swagger.client.ApiException;
//import io.swagger.client.api.TenantsApi;


TenantsApi apiInstance = new TenantsApi();
UserEntity body = new UserEntity(); // UserEntity | The user configuration details.
try {
    UserEntity result = apiInstance.createUser(body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling TenantsApi#createUser");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body UserEntity The user configuration details.

Return type

UserEntity

Authorization

No authorization required

HTTP request headers

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

createUserGroup

UserGroupEntity createUserGroup(body)

Creates a user group

Note: This endpoint is subject to change as NiFi and it's REST API evolve.

Example

// Import classes:
//import io.swagger.client.ApiException;
//import io.swagger.client.api.TenantsApi;


TenantsApi apiInstance = new TenantsApi();
UserGroupEntity body = new UserGroupEntity(); // UserGroupEntity | The user group configuration details.
try {
    UserGroupEntity result = apiInstance.createUserGroup(body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling TenantsApi#createUserGroup");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body UserGroupEntity The user group configuration details.

Return type

UserGroupEntity

Authorization

No authorization required

HTTP request headers

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

getUser

UserEntity getUser(id)

Gets a user

Note: This endpoint is subject to change as NiFi and it's REST API evolve.

Example

// Import classes:
//import io.swagger.client.ApiException;
//import io.swagger.client.api.TenantsApi;


TenantsApi apiInstance = new TenantsApi();
String id = "id_example"; // String | The user id.
try {
    UserEntity result = apiInstance.getUser(id);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling TenantsApi#getUser");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id String The user id.

Return type

UserEntity

Authorization

No authorization required

HTTP request headers

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

getUserGroup

UserGroupEntity getUserGroup(id)

Gets a user group

Note: This endpoint is subject to change as NiFi and it's REST API evolve.

Example

// Import classes:
//import io.swagger.client.ApiException;
//import io.swagger.client.api.TenantsApi;


TenantsApi apiInstance = new TenantsApi();
String id = "id_example"; // String | The user group id.
try {
    UserGroupEntity result = apiInstance.getUserGroup(id);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling TenantsApi#getUserGroup");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id String The user group id.

Return type

UserGroupEntity

Authorization

No authorization required

HTTP request headers

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

getUserGroups

UserGroupsEntity getUserGroups()

Gets all user groups

Note: This endpoint is subject to change as NiFi and it's REST API evolve.

Example

// Import classes:
//import io.swagger.client.ApiException;
//import io.swagger.client.api.TenantsApi;


TenantsApi apiInstance = new TenantsApi();
try {
    UserGroupsEntity result = apiInstance.getUserGroups();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling TenantsApi#getUserGroups");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

UserGroupsEntity

Authorization

No authorization required

HTTP request headers

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

getUsers

UsersEntity getUsers()

Gets all users

Note: This endpoint is subject to change as NiFi and it's REST API evolve.

Example

// Import classes:
//import io.swagger.client.ApiException;
//import io.swagger.client.api.TenantsApi;


TenantsApi apiInstance = new TenantsApi();
try {
    UsersEntity result = apiInstance.getUsers();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling TenantsApi#getUsers");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

UsersEntity

Authorization

No authorization required

HTTP request headers

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

removeUser

UserEntity removeUser(id, version, clientId)

Deletes a user

Note: This endpoint is subject to change as NiFi and it's REST API evolve.

Example

// Import classes:
//import io.swagger.client.ApiException;
//import io.swagger.client.api.TenantsApi;


TenantsApi apiInstance = new TenantsApi();
String id = "id_example"; // String | The user id.
String version = "version_example"; // String | The revision is used to verify the client is working with the latest version of the flow.
String clientId = "clientId_example"; // String | If the client id is not specified, new one will be generated. This value (whether specified or generated) is included in the response.
try {
    UserEntity result = apiInstance.removeUser(id, version, clientId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling TenantsApi#removeUser");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id String The user id.
version String The revision is used to verify the client is working with the latest version of the flow. [optional]
clientId String If the client id is not specified, new one will be generated. This value (whether specified or generated) is included in the response. [optional]

Return type

UserEntity

Authorization

No authorization required

HTTP request headers

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

removeUserGroup

UserGroupEntity removeUserGroup(id, version, clientId)

Deletes a user group

Note: This endpoint is subject to change as NiFi and it's REST API evolve.

Example

// Import classes:
//import io.swagger.client.ApiException;
//import io.swagger.client.api.TenantsApi;


TenantsApi apiInstance = new TenantsApi();
String id = "id_example"; // String | The user group id.
String version = "version_example"; // String | The revision is used to verify the client is working with the latest version of the flow.
String clientId = "clientId_example"; // String | If the client id is not specified, new one will be generated. This value (whether specified or generated) is included in the response.
try {
    UserGroupEntity result = apiInstance.removeUserGroup(id, version, clientId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling TenantsApi#removeUserGroup");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id String The user group id.
version String The revision is used to verify the client is working with the latest version of the flow. [optional]
clientId String If the client id is not specified, new one will be generated. This value (whether specified or generated) is included in the response. [optional]

Return type

UserGroupEntity

Authorization

No authorization required

HTTP request headers

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

searchCluster

ClusterSearchResultsEntity searchCluster(q)

Searches the cluster for a node with the specified address

Note: This endpoint is subject to change as NiFi and it's REST API evolve.

Example

// Import classes:
//import io.swagger.client.ApiException;
//import io.swagger.client.api.TenantsApi;


TenantsApi apiInstance = new TenantsApi();
String q = "q_example"; // String | Node address to search for.
try {
    ClusterSearchResultsEntity result = apiInstance.searchCluster(q);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling TenantsApi#searchCluster");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
q String Node address to search for.

Return type

ClusterSearchResultsEntity

Authorization

No authorization required

HTTP request headers

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

updateUser

UserEntity updateUser(id, body)

Updates a user

Note: This endpoint is subject to change as NiFi and it's REST API evolve.

Example

// Import classes:
//import io.swagger.client.ApiException;
//import io.swagger.client.api.TenantsApi;


TenantsApi apiInstance = new TenantsApi();
String id = "id_example"; // String | The user id.
UserEntity body = new UserEntity(); // UserEntity | The user configuration details.
try {
    UserEntity result = apiInstance.updateUser(id, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling TenantsApi#updateUser");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id String The user id.
body UserEntity The user configuration details.

Return type

UserEntity

Authorization

No authorization required

HTTP request headers

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

updateUserGroup

UserGroupEntity updateUserGroup(id, body)

Updates a user group

Note: This endpoint is subject to change as NiFi and it's REST API evolve.

Example

// Import classes:
//import io.swagger.client.ApiException;
//import io.swagger.client.api.TenantsApi;


TenantsApi apiInstance = new TenantsApi();
String id = "id_example"; // String | The user group id.
UserGroupEntity body = new UserGroupEntity(); // UserGroupEntity | The user group configuration details.
try {
    UserGroupEntity result = apiInstance.updateUserGroup(id, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling TenantsApi#updateUserGroup");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id String The user group id.
body UserGroupEntity The user group configuration details.

Return type

UserGroupEntity

Authorization

No authorization required

HTTP request headers

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