POST
/
api
/
index
/
v1
/
rotatetoken
from glean import Glean
import os


with Glean(
    api_token=os.getenv("GLEAN_API_TOKEN", ""),
) as g_client:

    res = g_client.indexing.authentication.rotate_token()

    # Handle response
    print(res)
{
  "rawSecret": "<string>",
  "createdAt": 123,
  "rotationPeriodMinutes": 123
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Response

200
application/json
OK

Describes the response body of the /rotatetoken API call