All URIs are relative to http://localhost/nifi-api
Method | HTTP request | Description |
---|---|---|
createAccessToken | POST /access/token | Creates a token for accessing the REST API via username/password |
createAccessTokenFromTicket | POST /access/kerberos | Creates a token for accessing the REST API via Kerberos ticket exchange / SPNEGO negotiation |
createDownloadToken | POST /access/download-token | Creates a single use access token for downloading FlowFile content. |
createUiExtensionToken | POST /access/ui-extension-token | Creates a single use access token for accessing a NiFi UI extension. |
getAccessStatus | GET /access | Gets the status the client's access |
getLoginConfig | GET /access/config | Retrieves the access configuration for this NiFi |
knoxCallback | GET /access/knox/callback | Redirect/callback URI for processing the result of the Apache Knox login sequence. |
knoxRequest | GET /access/knox/request | Initiates a request to authenticate through Apache Knox. |
oidcCallback | GET /access/oidc/callback | Redirect/callback URI for processing the result of the OpenId Connect login sequence. |
oidcExchange | POST /access/oidc/exchange | Retrieves a JWT following a successful login sequence using the configured OpenId Connect provider. |
oidcRequest | GET /access/oidc/request | Initiates a request to authenticate through the configured OpenId Connect provider. |
String createAccessToken(username, password)
Creates a token for accessing the REST API via username/password
The token returned is formatted as a JSON Web Token (JWT). The token is base64 encoded and comprised of three parts. The header, the body, and the signature. The expiration of the token is a contained within the body. The token can be used in the Authorization header in the format 'Authorization: Bearer <token>'.
// Import classes:
//import com.github.hermannpencole.nifi.swagger.ApiException;
//import com.github.hermannpencole.nifi.swagger.client.AccessApi;
AccessApi apiInstance = new AccessApi();
String username = "username_example"; // String |
String password = "password_example"; // String |
try {
String result = apiInstance.createAccessToken(username, password);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AccessApi#createAccessToken");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
username | String | [optional] | |
password | String | [optional] |
String
No authorization required
- Content-Type: application/x-www-form-urlencoded
- Accept: text/plain
String createAccessTokenFromTicket()
Creates a token for accessing the REST API via Kerberos ticket exchange / SPNEGO negotiation
The token returned is formatted as a JSON Web Token (JWT). The token is base64 encoded and comprised of three parts. The header, the body, and the signature. The expiration of the token is a contained within the body. The token can be used in the Authorization header in the format 'Authorization: Bearer <token>'.
// Import classes:
//import com.github.hermannpencole.nifi.swagger.ApiException;
//import com.github.hermannpencole.nifi.swagger.client.AccessApi;
AccessApi apiInstance = new AccessApi();
try {
String result = apiInstance.createAccessTokenFromTicket();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AccessApi#createAccessTokenFromTicket");
e.printStackTrace();
}
This endpoint does not need any parameter.
String
No authorization required
- Content-Type: text/plain
- Accept: text/plain
String createDownloadToken()
Creates a single use access token for downloading FlowFile content.
The token returned is a base64 encoded string. It is valid for a single request up to five minutes from being issued. It is used as a query parameter name 'access_token'.
// Import classes:
//import com.github.hermannpencole.nifi.swagger.ApiException;
//import com.github.hermannpencole.nifi.swagger.client.AccessApi;
AccessApi apiInstance = new AccessApi();
try {
String result = apiInstance.createDownloadToken();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AccessApi#createDownloadToken");
e.printStackTrace();
}
This endpoint does not need any parameter.
String
No authorization required
- Content-Type: application/x-www-form-urlencoded
- Accept: text/plain
String createUiExtensionToken()
Creates a single use access token for accessing a NiFi UI extension.
The token returned is a base64 encoded string. It is valid for a single request up to five minutes from being issued. It is used as a query parameter name 'access_token'.
// Import classes:
//import com.github.hermannpencole.nifi.swagger.ApiException;
//import com.github.hermannpencole.nifi.swagger.client.AccessApi;
AccessApi apiInstance = new AccessApi();
try {
String result = apiInstance.createUiExtensionToken();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AccessApi#createUiExtensionToken");
e.printStackTrace();
}
This endpoint does not need any parameter.
String
No authorization required
- Content-Type: application/x-www-form-urlencoded
- Accept: text/plain
AccessStatusEntity getAccessStatus()
Gets the status the client's access
Note: This endpoint is subject to change as NiFi and it's REST API evolve.
// Import classes:
//import com.github.hermannpencole.nifi.swagger.ApiException;
//import com.github.hermannpencole.nifi.swagger.client.AccessApi;
AccessApi apiInstance = new AccessApi();
try {
AccessStatusEntity result = apiInstance.getAccessStatus();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AccessApi#getAccessStatus");
e.printStackTrace();
}
This endpoint does not need any parameter.
No authorization required
- Content-Type: /
- Accept: application/json
AccessConfigurationEntity getLoginConfig()
Retrieves the access configuration for this NiFi
// Import classes:
//import com.github.hermannpencole.nifi.swagger.ApiException;
//import com.github.hermannpencole.nifi.swagger.client.AccessApi;
AccessApi apiInstance = new AccessApi();
try {
AccessConfigurationEntity result = apiInstance.getLoginConfig();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AccessApi#getLoginConfig");
e.printStackTrace();
}
This endpoint does not need any parameter.
No authorization required
- Content-Type: /
- Accept: application/json
knoxCallback()
Redirect/callback URI for processing the result of the Apache Knox login sequence.
Note: This endpoint is subject to change as NiFi and it's REST API evolve.
// Import classes:
//import com.github.hermannpencole.nifi.swagger.ApiException;
//import com.github.hermannpencole.nifi.swagger.client.AccessApi;
AccessApi apiInstance = new AccessApi();
try {
apiInstance.knoxCallback();
} catch (ApiException e) {
System.err.println("Exception when calling AccessApi#knoxCallback");
e.printStackTrace();
}
This endpoint does not need any parameter.
null (empty response body)
No authorization required
- Content-Type: /
- Accept: /
knoxRequest()
Initiates a request to authenticate through Apache Knox.
Note: This endpoint is subject to change as NiFi and it's REST API evolve.
// Import classes:
//import com.github.hermannpencole.nifi.swagger.ApiException;
//import com.github.hermannpencole.nifi.swagger.client.AccessApi;
AccessApi apiInstance = new AccessApi();
try {
apiInstance.knoxRequest();
} catch (ApiException e) {
System.err.println("Exception when calling AccessApi#knoxRequest");
e.printStackTrace();
}
This endpoint does not need any parameter.
null (empty response body)
No authorization required
- Content-Type: /
- Accept: /
oidcCallback()
Redirect/callback URI for processing the result of the OpenId Connect login sequence.
Note: This endpoint is subject to change as NiFi and it's REST API evolve.
// Import classes:
//import com.github.hermannpencole.nifi.swagger.ApiException;
//import com.github.hermannpencole.nifi.swagger.client.AccessApi;
AccessApi apiInstance = new AccessApi();
try {
apiInstance.oidcCallback();
} catch (ApiException e) {
System.err.println("Exception when calling AccessApi#oidcCallback");
e.printStackTrace();
}
This endpoint does not need any parameter.
null (empty response body)
No authorization required
- Content-Type: /
- Accept: /
String oidcExchange()
Retrieves a JWT following a successful login sequence using the configured OpenId Connect provider.
Note: This endpoint is subject to change as NiFi and it's REST API evolve.
// Import classes:
//import com.github.hermannpencole.nifi.swagger.ApiException;
//import com.github.hermannpencole.nifi.swagger.client.AccessApi;
AccessApi apiInstance = new AccessApi();
try {
String result = apiInstance.oidcExchange();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AccessApi#oidcExchange");
e.printStackTrace();
}
This endpoint does not need any parameter.
String
No authorization required
- Content-Type: /
- Accept: text/plain
oidcRequest()
Initiates a request to authenticate through the configured OpenId Connect provider.
Note: This endpoint is subject to change as NiFi and it's REST API evolve.
// Import classes:
//import com.github.hermannpencole.nifi.swagger.ApiException;
//import com.github.hermannpencole.nifi.swagger.client.AccessApi;
AccessApi apiInstance = new AccessApi();
try {
apiInstance.oidcRequest();
} catch (ApiException e) {
System.err.println("Exception when calling AccessApi#oidcRequest");
e.printStackTrace();
}
This endpoint does not need any parameter.
null (empty response body)
No authorization required
- Content-Type: /
- Accept: /