glean_indexing_api_client.AuthenticationApi

All URIs are relative to https://domain-be.glean.com/api/index/v1

Method HTTP request Description
rotatetoken_post POST /rotatetoken Rotate token

rotatetoken_post

RotateTokenResponse rotatetoken_post()

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.

Example

  • Bearer Authentication (BearerAuth):
Copy
Copied
import time
import glean_indexing_api_client
from glean_indexing_api_client.api import authentication_api
from glean_indexing_api_client.model.rotate_token_response import RotateTokenResponse
from pprint import pprint
# Defining the host is optional and defaults to https://domain-be.glean.com/api/index/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = glean_indexing_api_client.Configuration(
    host = "https://domain-be.glean.com/api/index/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: BearerAuth
configuration = glean_indexing_api_client.Configuration(
    access_token = 'YOUR_BEARER_TOKEN'
)

# Enter a context with an instance of the API client
with glean_indexing_api_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = authentication_api.AuthenticationApi(api_client)

    # example, this endpoint has no required or optional parameters
    try:
        # Rotate token
        api_response = api_instance.rotatetoken_post()
        pprint(api_response)
    except glean_indexing_api_client.ApiException as e:
        print("Exception when calling AuthenticationApi->rotatetoken_post: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

RotateTokenResponse

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -
400 Bad Request -
401 Not Authorized -

[Back to top] [Back to API list] [Back to Model list] [Back to README]