> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cyrisma.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Partner Login Endpoint

> Endpoint for partners to login and receive an access token.

The 'grant_type' key indicates this is a password request in compliance with OAuth 2.0 principles. 

The access token is important and is used to continue all future interaction with the API. 

The optional refresh token is used to refresh the expiration time remaining back to the original value. The expiration value is generally 600 seconds (10 minutes). 

Tokens can be renewed as often as needed by re-issuing the call to the 'login' endpoint using valid credentials if your API is not set up to handle refresh tokens.

Once a token has been returned, this 'session' token is used as authorization granting access to all of the API capabilities. The following endpoints access and manage the provisioning process through the primary URL: 
https://api.cyrisma.com/app



## OpenAPI

````yaml openapi.json post /partner/login
openapi: 3.1.0
info:
  title: Cyrisma Partner API
  description: >-
    Cyrisma partner API assists organizations that use the Cyrisma risk
    management platform to further automate and enhance overall risk management.
    The API provides provisioning and reporting features meaning that
    deployments can be automated and scan data can be retrieved for further
    aggregation and reporting. The API will enable the setup of new partners and
    instances, review of partner and instance status and utilization, and
    management of partners through their lifecycle.  Access to Cyrisma risk
    management is based on a foundation of secure API access token
    authentication and identity management.
  version: v1
servers: []
security: []
paths:
  /partner/login:
    post:
      tags:
        - Login
      summary: Partner Login Endpoint
      description: "Endpoint for partners to login and receive an access token.\r\n\r\nThe 'grant_type' key indicates this is a password request in compliance with OAuth 2.0 principles. \r\n\r\nThe access token is important and is used to continue all future interaction with the API. \r\n\r\nThe optional refresh token is used to refresh the expiration time remaining back to the original value. The expiration value is generally 600 seconds (10 minutes). \r\n\r\nTokens can be renewed as often as needed by re-issuing the call to the 'login' endpoint using valid credentials if your API is not set up to handle refresh tokens.\r\n\r\nOnce a token has been returned, this 'session' token is used as authorization granting access to all of the API capabilities. The following endpoints access and manage the provisioning process through the primary URL: \r\nhttps://api.cyrisma.com/app"
      operationId: PartnerLogin
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PartnerLoginWithGrantTypeRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthenticationJson'
        '400':
          description: Bad Request
        '500':
          description: Internal Server Error
components:
  schemas:
    PartnerLoginWithGrantTypeRequest:
      title: Partner Login Form
      required:
        - GrantType
        - Password
        - Username
      type: object
      properties:
        Username:
          title: Username
          minLength: 1
          type: string
          description: The username for partner login.
        Password:
          title: Password
          minLength: 1
          type: string
          description: The password for partner login.
        GrantType:
          title: Grant Type
          minLength: 1
          type: string
          description: The grant type for partner login.
        Scope:
          title: Grant Type
          type:
            - string
            - 'null'
          description: The grant type for partner login.
        SecondsUntilExpire:
          title: Seconds Until Expire
          type:
            - string
            - 'null'
          description: The number of seconds until the token expires.
        ClientId:
          title: Client ID
          type:
            - string
            - 'null'
          description: The client ID for partner login.
      additionalProperties: false
      description: Form data for partner login.
    AuthenticationJson:
      title: Baselines Top Five
      type: object
      properties:
        access_token:
          title: Access Token
          type:
            - string
            - 'null'
          description: Access token for authentication.
        token_type:
          title: Token Type
          type:
            - string
            - 'null'
          description: Type of the token.
        expires_in:
          title: Expires In
          type: integer
          description: Expiration time of the token in seconds.
          format: int32
        refresh_token:
          title: Refresh Token
          type:
            - string
            - 'null'
          description: Refresh token for obtaining new access tokens.
        client_id:
          title: Scope
          type:
            - string
            - 'null'
          description: Scope of the access token.
      additionalProperties: false
      description: Represents a baseline target with its name and grade.

````