Like what you see? Have a play with our trial version.

Error rendering macro 'rw-search'

null

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

token can be generated with the POST /api/refresh-tokens end-point.
This service initializes a security token, and the access token is also returned in the request response. The access token needs to be provided in the header for all the other REST services mentioned in this document.

Token Generation Code

Section
package rest.code.examples;
import java.util.Random;
import org.apache.hc.client5.http.fluent.Content;
import org.apache.hc.client5.http.fluent.Request;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
/**
 * Request an access token from the Yellowfin refresh-tokens REST end-point
 */
public class GetLoginToken {
    public static void main(String[] args) throws Exception {

        String host = "http://localhost:8080/yellowfinHead";
        String restUsername = "admin@yellowfin.com.au";
        String restPassword = "test";

The following examples illustrate how to fetch an access token in various programming languages.

...