openapi: 3.2.0 info: description: 'This API list provides operations for interfacing with the Cohesity Cluster.' title: Cohesity REST Access Tokens API version: '1.0' servers: - url: https:///irisservices/api/v1 tags: - name: Access Tokens paths: /public/accessTokens: post: description: 'Before making other REST API requests, your REST client must make a ''POST /public/accessToken'' request with a valid Cohesity username and password. This POST request returns an access token and type in the response that is generated by the Cohesity Cluster. Subsequent requests to other Cohesity REST API operations must specify the returned access token and type by setting ''Authorization'' in the http header in the following format: Authorization: token_type access_token The generated token is valid for 24 hours. If a request is made with an expired token, the ''Token expired'' error message is returned. Add code to your REST client to check for this error and request another access token before reissuing the request.' tags: - Access Tokens summary: Generate an Access Token operationId: GenerateAccessToken responses: '201': $ref: '#/components/responses/GenerateAccessTokenResponse' default: $ref: '#/components/responses/Error' requestBody: content: application/json: schema: $ref: '#/components/schemas/AccessTokenCredential' description: Request to generate access token. required: true components: responses: Error: description: Error content: application/json: schema: $ref: '#/components/schemas/RequestError' GenerateAccessTokenResponse: description: Success content: application/json: schema: $ref: '#/components/schemas/AccessToken' schemas: RequestError: description: Details about the Error. type: object title: Error properties: errorCode: description: Operation response error code. type: - integer - 'null' format: int64 x-go-name: ErrorCode message: description: Description of the error. type: - string - 'null' x-go-name: Message x-go-package: cohesity/iris/server/data/public AccessToken: description: 'Specifies an Access Token that provides permissions for a client to access the Cohesity REST API available from a Cohesity Cluster.' type: object title: Access Token. properties: accessToken: description: Generated access token. type: - string - 'null' x-go-name: AccessToken privileges: description: Privileges for the user. type: - array - 'null' items: type: string x-go-name: Privileges tokenType: description: Access token type. type: - string - 'null' x-go-name: TokenType x-go-package: cohesity/iris/server/data/public AccessTokenCredential: description: Specifies the Cohesity credentials required for generating an access token. type: object title: Create Access Token Credential Request. required: - username - password properties: domain: description: 'Specifies the domain the user is logging in to. For a Local user model, the domain is always LOCAL. For LDAP/AD user models, the domain will map to an LDAP connection string. A user is uniquely identified by a combination of username and domain. If this is not set, LOCAL is assumed.' type: - string - 'null' x-go-name: Domain password: description: Specifies the password of the Cohesity user account. type: - string - 'null' x-go-name: Password username: description: Specifies the login name of the Cohesity user. type: - string - 'null' x-go-name: Username x-go-package: cohesity/iris/server/data/public