- rotateToken - Rotate token
Rotates the secret value inside the Indexing API token and returns the new raw secret. All other properties of the token are unchanged. In order to rotate the secret value, include the token as the bearer token in the /rotatetoken request. Please refer to Token rotation documentation for more information.
package hello.world;
import com.glean.api_client.glean_api_client.Glean;
import com.glean.api_client.glean_api_client.models.operations.PostApiIndexV1RotatetokenResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
Glean sdk = Glean.builder()
.apiToken(System.getenv().getOrDefault("GLEAN_API_TOKEN", ""))
.build();
PostApiIndexV1RotatetokenResponse res = sdk.indexing().authentication().rotateToken()
.call();
if (res.rotateTokenResponse().isPresent()) {
// handle response
}
}
}PostApiIndexV1RotatetokenResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/APIException | 4XX, 5XX | */* |