openapi: 3.0.0
info:
  contact:
    email: support@authmind.com
    url: https://www.authmind.com
    name: AuthMind
  description: >
    Welcome to AuthMind API documentation. This guide is designed to help
    developers understand how to integrate and interact with our APIs
    effectively. Here, you will find detailed information on the various
    endpoints, request and response formats, authentication mechanisms, and best
    practices for using our APIs.


    AuthMind APIs are built to provide seamless access to our services, allowing
    you to enhance your applications with powerful features and functionalities.
    Whether you are looking to retrieve data or manage resources, our
    comprehensive API documentation will guide you through each step of the
    process.


    ## Key Sections of this Documentation


    **Getting Started:** Learn how to generate tokens to access the APIs and API
    documentation.


    **Endpoints:** Detailed descriptions of each endpoint, including parameters,
    request, and response structures.


    We are committed to providing a user-friendly API experience. Let's get
    started!


    ## Getting Started

    1. Log in to AuthMind and go to the **Admin** section.

    2. From the left navigation, click **API Tokens**. The **Manage API Tokens**
    page is displayed

    3. From the top-right side, click **Add**. The **Add API** Client dialog is
    displayed.

    4. Enter a name for the client.

    5. By default, a one-year expiration date is set from the creation date of
    the token. You can change this date, as required.

    6. Click **Submit**. A success message is displayed. You can also see a
    **Token Details** dialog that contains the API token (JWT).

    7. Copy the token.

    8. Click OK to close the **Token Details** dialog. You can see the token is
    listed on the **Manage API Tokens** page.
  license:
    name: AuthMind Terms of Use
    url: https://www.authmind.com/saas-term
  title: AuthMind API
  version: 1.0.0
components:
  schemas:
    models.RolesResultStruct:
      type: object
      properties:
        error:
          type: string
        result:
          type: array
          items:
            type: string
        success:
          type: boolean
    models.ErrorStruct:
      type: object
      properties:
        message:
          type: string
    models.UserParams:
      type: object
      properties:
        name:
          type: string
          nullable: true
        email:
          type: string
          nullable: true
        role:
          type: string
          nullable: true
        old_password:
          type: string
          nullable: true
        password:
          type: string
          nullable: true
        locale:
          type: string
          nullable: true
    models.User:
      type: object
      required:
        - name
        - email
        - role
      properties:
        name:
          type: string
          nullable: false
        email:
          type: string
          nullable: false
        role:
          type: string
          nullable: false
        password:
          type: string
          nullable: true
        locale:
          type: string
          nullable: true
    models.UserResult:
      type: object
      properties:
        _id:
          type: string
        added_date:
          type: string
        email:
          type: string
        ip:
          description: omitempty because it's not in the second object
          type: string
        is_amops:
          type: boolean
        last_login:
          description: omitempty because it's not in the second object
          type: string
        name:
          type: string
        period:
          type: string
        role:
          type: string
        status:
          type: integer
        locale:
          type: string
    models.ListUsersOutput:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/models.UserResult'
        total:
          type: integer
    models.UsersResultStruct:
      type: object
      properties:
        error:
          type: string
        result:
          $ref: '#/components/schemas/models.ListUsersOutput'
        success:
          type: boolean
    models.IdentitySystem:
      type: object
      properties:
        auth_fail_count:
          type: integer
        auth_success_count:
          type: integer
        auth_failed_percent:
          type: number
        directory_category_list:
          type: array
          items:
            type: string
        failed_auth_list:
          type: array
          items:
            type: string
        is_directory_public:
          type: boolean
        directory_hostname:
          type: string
    models.AccessDetails200FinalResponse:
      type: object
      properties:
        error:
          type: string
        result:
          type: object
          properties:
            _id:
              type: string
            flow_count:
              type: integer
            latest_activity_time:
              type: string
              format: date-time
            score:
              type: number
            asset_protocol:
              type: string
            asset_is_known:
              type: boolean
            identity_is_known:
              type: boolean
            identity_system:
              $ref: '#/components/schemas/models.IdentitySystem'
        success:
          type: boolean
    models.AccessDetailsFinalResponse:
      type: object
      properties:
        error:
          type: string
        result:
          type: object
        success:
          type: boolean
    models.PlaybookDetail:
      type: object
      properties:
        _id:
          type: string
        name:
          type: string
        count:
          type: integer
        severity:
          type: integer
    models.FinalResponsIssueDetails:
      type: object
      properties:
        issue_type:
          type: string
        issue_risk:
          type: integer
        playbook_details:
          type: array
          items:
            $ref: '#/components/schemas/models.PlaybookDetail'
    models.AssetDetails200FinalResponse:
      type: object
      properties:
        error:
          type: string
        result:
          type: object
          properties:
            _id:
              type: string
            score:
              type: number
            latest_activity_time:
              type: string
              format: date-time
            flow_count:
              type: integer
            identity_count:
              type: integer
            is_known:
              type: boolean
            issue_details:
              type: object
              additionalProperties:
                $ref: '#/components/schemas/models.FinalResponsIssueDetails'
        success:
          type: boolean
    models.AssetDetailsFinalResponse:
      type: object
      properties:
        error:
          type: string
        result:
          type: object
        success:
          type: boolean
    models.IdentityDetailsFinalResponse:
      type: object
      properties:
        error:
          type: string
        result:
          type: object
        success:
          type: boolean
    models.DetailResult:
      type: object
      properties:
        full_name:
          type: string
        score:
          type: number
        latest_activity_time:
          type: string
          format: date-time
        flow_count:
          type: integer
        asset_count:
          type: integer
        is_known:
          type: boolean
        issue_count:
          type: integer
        issue_details:
          $ref: '#/components/schemas/models.FinalResponsIssueDetails'
    models.IdentityDetails200FinalResponse:
      type: object
      properties:
        error:
          type: string
        result:
          $ref: '#/components/schemas/models.DetailResult'
        success:
          type: boolean
    models.IdentityHostsMainResultResponseOut:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/models.IdentityHostsResultResponseOut'
        total:
          type: integer
    models.IdentityHostsResponseOut:
      type: object
      properties:
        error:
          type: string
        result:
          $ref: '#/components/schemas/models.IdentityHostsMainResultResponseOut'
        success:
          type: boolean
    models.IdentityHostsResultResponseOut:
      type: object
      properties:
        city:
          type: string
        country:
          type: string
        host_ip:
          type: string
        host_name:
          type: string
        latest_activity_time:
          type: string
        state:
          type: string
    models.IdentitySystemDetailFinalResponse:
      type: object
      properties:
        error:
          type: string
        result:
          type: object
        success:
          type: boolean
    models.IdentitySystemDetailResult:
      type: object
      properties:
        _id:
          type: string
        flow_count:
          type: integer
        latest_activity_time:
          type: string
          format: date-time
        identity_count:
          type: integer
        asset_count:
          type: integer
        auth_failed_percentage:
          type: number
        incident_count:
          type: integer
        score:
          type: number
        issue_details:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/models.FinalResponsIssueDetails'
        category_info_details:
          type: array
          items:
            type: string
        host_names:
          type: array
          items:
            type: string
        services:
          type: array
          items:
            type: string
    models.IdentitySystemDetailFinal200Response:
      type: object
      properties:
        error:
          type: string
        result:
          $ref: '#/components/schemas/models.IdentitySystemDetailResult'
        success:
          type: boolean
    models.OutAccessOutput:
      type: object
      properties:
        _id:
          type: string
        asset:
          type: string
        asset_protocol:
          type: string
        asset_type:
          type: string
        directory_name:
          type: string
        directory_type:
          type: string
        identity:
          type: string
        identity_type:
          type: string
        latest_activity_time:
          type: string
        score:
          type: number
    models.OutAssetHostsMainResultResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/models.OutAssetHostsResultResponse'
        total:
          type: integer
    models.OutAssetHostsResponse:
      type: object
      properties:
        error:
          type: string
        result:
          $ref: '#/components/schemas/models.OutAssetHostsMainResultResponse'
        success:
          type: boolean
    models.OutAssetHostsResultResponse:
      type: object
      properties:
        city:
          type: string
        country:
          type: string
        host_ip:
          type: string
        host_name:
          type: string
        latest_activity_time:
          type: string
        state:
          type: string
    models.OutAssetOutput:
      type: object
      properties:
        _id:
          type: string
        latest_activity_time:
          type: string
        score:
          type: number
        type:
          type: string
    models.FinalUserResponse:
      type: object
      properties:
        errors:
          type: string
        success:
          type: boolean
    models.OutIdentityOutput:
      type: object
      properties:
        _id:
          type: string
        full_name:
          type: string
        identity_statuses:
          type: array
          items:
            type: string
        latest_activity_time:
          type: string
        score:
          type: number
        type:
          type: string
    models.OutIdentitySystemsOutput:
      type: object
      properties:
        _id:
          type: string
        directory_type:
          type: string
        domain:
          type: string
        latest_activity_time:
          type: string
        name:
          type: string
        score:
          type: number
    models.OutListAccessResultResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/models.OutAccessOutput'
        total:
          type: integer
    models.OutListAssetResultResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/models.OutAssetOutput'
        total:
          type: integer
    models.OutListIdentityResultResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/models.OutIdentityOutput'
        total:
          type: integer
    models.OutListIdentitySystemsResultResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/models.OutIdentitySystemsOutput'
        total:
          type: integer
    models.OutputAccessesListResponse:
      type: object
      properties:
        error:
          type: string
        result:
          $ref: '#/components/schemas/models.OutListAccessResultResponse'
        success:
          type: boolean
    models.OutputAssetListResponse:
      type: object
      properties:
        error:
          type: string
        result:
          $ref: '#/components/schemas/models.OutListAssetResultResponse'
        success:
          type: boolean
    models.OutputIdentitiesListResponse:
      type: object
      properties:
        error:
          type: string
        result:
          $ref: '#/components/schemas/models.OutListIdentityResultResponse'
        success:
          type: boolean
    models.OutputIdentitySystemsListResponse:
      type: object
      properties:
        error:
          type: string
        result:
          $ref: '#/components/schemas/models.OutListIdentitySystemsResultResponse'
        success:
          type: boolean
    models.IssuesListResponse:
      type: object
      properties:
        error:
          type: string
        result:
          $ref: '#/components/schemas/models.IssuesListResultResponse'
        success:
          type: boolean
        total:
          type: integer
    models.IssuesListResultResponse:
      type: object
      properties:
        _id:
          type: integer
        _issue:
          type: string
        closure_reason:
          type: string
        company_id:
          type: string
        created_date:
          type: string
        d_all_ips:
          type: string
        dest_is_directory:
          type: boolean
        dest_mac:
          type: string
        destination_hostname:
          type: string
        destination_ip:
          type: string
        destination_name:
          type: string
        destination_port:
          type: integer
        destination_protocol:
          type: string
        destination_statename:
          type: string
        destination_type:
          type: string
        directory_hostname:
          type: string
        directory_ip:
          type: string
        directory_name:
          type: string
        directory_port:
          type: integer
        directory_protocol:
          type: string
        domain:
          type: string
        dst_classification:
          type: string
        entity_name:
          type: string
        entity_type:
          type: string
        first_flow_time:
          type: string
        gen_timestamp:
          type: string
        identity_groups:
          type: array
          items:
            type: string
        identity_pwd_last_set:
          type: string
        identity_status:
          type: string
        incident_summary:
          type: string
        is_dest_known:
          type: boolean
        is_dir_public:
          type: boolean
        is_external_access:
          type: boolean
        is_external_to_external:
          type: boolean
        is_known_identity:
          type: boolean
        is_src_vpn:
          type: boolean
        is_ticket_exist:
          type: boolean
        issue:
          type: string
        issue_access_count:
          type: integer
        issue_flows_count:
          type: integer
        latest_flow_id:
          type: string
        life_cycle_status:
          type: string
        matching_rule_details:
          type: object
          properties:
            first_matched_rule_id:
              type: integer
            matched_rule_config:
              type: object
            matching_field_name:
              type: string
            matching_field_value:
              type: string
        matching_rule_name:
          type: string
        ml_source_type:
          type: string
        modified_date:
          type: string
        pb_rule_ids:
          type: array
          items:
            type: integer
        playbook_id:
          type: string
        playbook_mtime:
          type: string
        playbook_name:
          type: string
        risk:
          type: integer
        sensor_id:
          type: string
        sensor_location:
          type: string
        source_hostname:
          type: string
        source_hostnames:
          type: array
          items:
            type: string
        source_hostnames_list:
          type: array
          items:
            type: string
        source_ip:
          type: string
        source_name:
          type: string
        source_port:
          type: integer
        source_sub_type:
          type: string
        source_type:
          type: string
        src_asn_name:
          type: string
        src_classification:
          type: string
        src_mac:
          type: string
        status:
          type: string
        transport_protocol:
          type: string
        uattr_update_timestamp:
          type: string
        user_agent:
          type: string
        user_mail:
          type: string
  securitySchemes:
    AuthorizationHeader:
      description: >-
        Authenticate with Authmind API token. We can get API token from step 7
        of Getting Started.
      scheme: bearer
      type: http
servers:
  - url: '{{.Host}}/amapi/v1'
paths:
  /roles:
    get:
      tags:
        - Users
      security:
        - AuthorizationHeader: []
      description: >-
        Fetches list of roles. User must have a valid token with required
        permissions.
      summary: ListRoles
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.RolesResultStruct'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                type: string
                example: 'Access denied: missing required permissions'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.RolesResultStruct'
              example:
                error: Internal Server Error
                success: false
                result: []
  /users:
    get:
      tags:
        - Users
      security:
        - AuthorizationHeader: []
      description: >-
        Fetches list of active users associated with a company. User must have a
        valid token with required permissions.
      summary: ListUsers
      parameters:
        - name: from
          in: query
          description: Page number
          schema:
            type: integer
        - name: size
          in: query
          description: Records per page. By default no of records per page is 50.
          schema:
            type: integer
        - name: identifier
          in: query
          description: Name or email Id of the user to search
          schema:
            type: string
        - name: sort_by
          in: query
          description: Sort by field name
          schema:
            type: string
            enum:
              - name
              - email
              - added_date
              - last_login
              - status
              - ip
              - role
        - name: order
          in: query
          description: Order by asc or desc
          schema:
            type: string
            enum:
              - asc
              - desc
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.UsersResultStruct'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.UsersResultStruct'
              example:
                result:
                  total: 0
                  data: []
                success: false
                error: from must be >= 1
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                type: string
                example: 'Access denied: missing required permissions'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.UsersResultStruct'
  /user:
    post:
      description: >-
        Add user by specifying relevant fields. User must have a valid token
        with required permissions.
      summary: AddUser
      tags:
        - Users
      security:
        - AuthorizationHeader: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/models.User'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.FinalUserResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.FinalUserResponse'
              example:
                errors: Either id or email is required
                success: false
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                type: string
                example: 'Access denied: missing required permissions'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.FinalUserResponse'
              example:
                errors: Internal Server Error
                success: false
    delete:
      description: >-
        Delete user by specifying id or email. Either id or email is required.
        If both are provided then an error is returned. The user must have a
        token with valid permissions.
      summary: DeleteUser
      tags:
        - Users
      security:
        - AuthorizationHeader: []
      parameters:
        - description: Email of the user to delete
          name: email
          in: query
          schema:
            type: string
        - description: Id of the user to delete
          name: id
          in: query
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.FinalUserResponse'
              example:
                success: true
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.FinalUserResponse'
              example:
                errors: Either id or email is required
                success: false
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                type: string
                example: 'Access denied: missing required permissions'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.FinalUserResponse'
              example:
                errors: Internal Server Error
                success: false
    patch:
      description: >-
        Update user by specifying id or email. Either id or email is required.
        If both are provided then an error is returned. The user must have a
        token with valid permissions.
      summary: UpdateUser
      tags:
        - Users
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/models.UserParams'
      security:
        - AuthorizationHeader: []
      parameters:
        - description: Email of the user to update
          name: email
          in: query
          schema:
            type: string
        - description: Id of the user to be updated
          name: id
          in: query
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.FinalUserResponse'
              example:
                success: true
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.FinalUserResponse'
              example:
                errors: >-
                  An error occurred while processing your request. Please ensure
                  the input format is correct and try again.
                success: false
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                type: string
                example: 'Access denied: missing required permissions'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.FinalUserResponse'
              example:
                errors: Internal Server Error
                success: false
  /accesses:
    get:
      description: >-
        Returns list of accesses sorted by latest activity time in descending
        order.
      tags:
        - Accesses
      security:
        - AuthorizationHeader: []
      summary: GetAccessesList
      parameters:
        - description: >-
            Returns list of accesses having latest activity time greater than
            the specified time if provided. The format of time is 'YYYY-MM-DD
            HH:MM:SS'.
          name: latest_activity_time_gt
          in: query
          schema:
            type: string
        - description: Identity type
          name: identity_type
          in: query
          schema:
            type: string
        - description: Directory Type
          name: directory_type
          in: query
          schema:
            type: string
            enum:
              - On-premise
              - Cloud IDP
        - description: Directory Name
          name: directory_name
          in: query
          schema:
            type: string
        - description: Identity Name
          name: identity
          in: query
          schema:
            type: string
        - description: Asset Name
          name: asset
          in: query
          schema:
            type: string
        - description: Asset Type
          name: asset_type
          in: query
          schema:
            type: string
        - description: Page number
          name: from
          in: query
          schema:
            type: integer
        - description: >-
            Record per page. Default no of records per page is 50. Maximum
            allowed records per page is 1000.
          name: size
          in: query
          schema:
            type: integer
        - description: >-
            Filters accesses to include only those with a posture score greater
            than or equal to the specified value. Score must be greater than or
            equal to 0.0
          name: score
          in: query
          schema:
            type: number
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.OutputAccessesListResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.OutputAccessesListResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.OutputAccessesListResponse'
  /access/details:
    get:
      description: Returns access details
      security:
        - AuthorizationHeader: []
      tags:
        - Accesses
      summary: GetAccessDetails
      parameters:
        - description: Identity Name
          name: identity_name
          in: query
          required: true
          schema:
            type: string
        - description: Identity Type
          name: identity_type
          in: query
          required: true
          schema:
            type: string
        - description: Asset Name
          name: asset_name
          in: query
          required: true
          schema:
            type: string
        - description: Asset Type
          name: asset_type
          in: query
          required: true
          schema:
            type: string
        - description: Directory Name if present
          name: directory_name
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.AccessDetails200FinalResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.AccessDetailsFinalResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.AccessDetailsFinalResponse'
  /access/sourcehosts:
    get:
      description: >-
        Returns list of source hosts associated with an access, sorted by latest
        activity time in descending order.
      tags:
        - Accesses
      security:
        - AuthorizationHeader: []
      summary: ListAccessSourceHosts
      parameters:
        - description: Access ID
          name: identifier
          in: query
          required: true
          schema:
            type: string
        - description: Page number.
          name: from
          in: query
          schema:
            type: integer
        - description: >-
            Record per page. Default no of records per page is 50. Maximum
            allowed records per page is 100.
          name: size
          in: query
          schema:
            type: integer
        - description: >-
            Returns list of access source hosts having latest activity time
            greater than the specified time if provided. The format of time is
            'YYYY-MM-DD HH:MM:SS'.
          name: latest_activity_time_gt
          in: query
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.IdentityHostsResponseOut'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.IdentityHostsResponseOut'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.IdentityHostsResponseOut'
  /access/destinationhosts:
    get:
      description: >-
        Returns a list of destination hosts associated with an access sorted by
        latest activity time in descending order.
      security:
        - AuthorizationHeader: []
      tags:
        - Accesses
      summary: ListAccessDestHosts
      parameters:
        - description: Access ID
          name: identifier
          in: query
          required: true
          schema:
            type: string
        - description: Page number
          name: from
          in: query
          schema:
            type: integer
        - description: >-
            Record per page. Default no of records per page is 50. Maximum
            allowed records per page is 100.
          name: size
          in: query
          schema:
            type: integer
        - description: >-
            Returns list of access destination hosts having latest activity time
            greater than the specified time if provided. The format of time is
            'YYYY-MM-DD HH:MM:SS'.
          name: latest_activity_time_gt
          in: query
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.OutAssetHostsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.OutAssetHostsResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.OutAssetHostsResponse'
  /assets:
    get:
      description: >-
        Returns list of assets sorted by latest activity time in descending
        order.
      tags:
        - Assets
      security:
        - AuthorizationHeader: []
      summary: ListAssets
      parameters:
        - description: Page number
          name: from
          in: query
          schema:
            type: integer
        - description: >-
            Record per page. Default no of records per page is 50. Maximum
            allowed records per page is 1000.
          name: size
          in: query
          schema:
            type: integer
        - name: latest_activity_time_gt
          description: >-
            Returns list of assets having latest activity time greater than the
            specified time. The format of time is 'YYYY-MM-DD HH:MM:SS'.
          in: query
          schema:
            type: string
        - description: >-
            Filters assets to include only those with a posture score greater
            than or equal to the specified value. Score must be greater than or
            equal to 0.0
          name: score
          in: query
          schema:
            type: number
        - description: Asset type
          name: asset_type
          in: query
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.OutputAssetListResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.OutputAssetListResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.OutputAssetListResponse'
  /asset/details:
    get:
      description: Returns asset details
      tags:
        - Assets
      security:
        - AuthorizationHeader: []
      summary: GetAssetDetails
      parameters:
        - description: Asset Name
          name: asset_name
          in: query
          required: true
          schema:
            type: string
        - description: Asset Type
          name: asset_type
          in: query
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.AssetDetails200FinalResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.AssetDetailsFinalResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.AssetDetailsFinalResponse'
  /asset/hosts:
    get:
      description: >-
        Returns a list of hosts associated with an asset sorted by latest
        activity time in descending order.
      tags:
        - Assets
      security:
        - AuthorizationHeader: []
      summary: ListAssetHosts
      parameters:
        - description: Asset Name
          name: asset_name
          in: query
          required: true
          schema:
            type: string
        - description: Asset Type
          name: asset_type
          in: query
          required: true
          schema:
            type: string
        - description: Page number
          name: from
          in: query
          schema:
            type: integer
        - description: >-
            Record per page. Default no of records per page is 50. Maximum
            allowed records per page is 100.
          name: size
          in: query
          schema:
            type: integer
        - description: >-
            Returns list of asset hosts having latest activity time greater than
            the specified time if provided. The format of time is 'YYYY-MM-DD
            HH:MM:SS'.
          name: latest_activity_time_gt
          in: query
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.OutAssetHostsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.OutAssetHostsResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.OutAssetHostsResponse'
  /identities:
    get:
      description: >-
        Returns a list of identities sorted by latest activity time in
        descending order.
      tags:
        - Identities
      security:
        - AuthorizationHeader: []
      summary: ListIdentities
      parameters:
        - description: Page number
          name: from
          in: query
          schema:
            type: integer
        - description: >-
            Record per page. Default no of records per page is 50. Maximum
            allowed records per page is 1000.
          name: size
          in: query
          schema:
            type: integer
        - description: >-
            Returns list of identities having latest activity time greater than
            the specified time if provided. The format of time is 'YYYY-MM-DD
            HH:MM:SS'.
          name: latest_activity_time_gt
          in: query
          schema:
            type: string
        - description: >-
            Filters identities to include only those with a posture score
            greater than or equal to the specified value. Score must be greater
            than or equal to 0.0
          name: score
          in: query
          schema:
            type: number
        - description: Identity type
          name: type
          in: query
          schema:
            type: string
        - description: Identity status
          name: identity_status
          in: query
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.OutputIdentitiesListResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.OutputIdentitiesListResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.OutputIdentitiesListResponse'
  /identity/details:
    get:
      description: Returns identity details
      tags:
        - Identities
      security:
        - AuthorizationHeader: []
      summary: GetIdentityDetail
      parameters:
        - description: Identity type
          name: identifier
          in: query
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.IdentityDetails200FinalResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.IdentityDetailsFinalResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.IdentityDetailsFinalResponse'
  /identity/hosts:
    get:
      description: >-
        Returns a list of hosts associated with an identity sorted by latest
        activity time in descending order.
      tags:
        - Identities
      security:
        - AuthorizationHeader: []
      summary: ListIdentityHosts
      parameters:
        - description: Identity Name
          name: identifier
          in: query
          required: true
          schema:
            type: string
        - description: Page number
          name: from
          in: query
          schema:
            type: integer
        - description: >-
            Record per page. Default no of records per page is 50. Maximum
            allowed records per page is 100.
          name: size
          in: query
          schema:
            type: integer
        - description: >-
            Returns list of identity hosts having latest activity time greater
            than the specified time if provided. The format of time is
            'YYYY-MM-DD HH:MM:SS'.
          name: latest_activity_time_gt
          in: query
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.IdentityHostsResponseOut'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.IdentityHostsResponseOut'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.IdentityHostsResponseOut'
  /identitysystems:
    get:
      description: >-
        Returns List of identity systems sorted by latest activity time in
        descending order.
      tags:
        - IdentitySystems
      security:
        - AuthorizationHeader: []
      summary: GetIdentitySystemsList
      parameters:
        - description: Directory Type
          name: directory_type
          in: query
          schema:
            type: string
            enum:
              - On-premise
              - Cloud IDP
        - description: Page number
          name: from
          in: query
          schema:
            type: integer
        - description: >-
            Record per page. Default no of records per page is 50. Maximum
            allowed records per page is 1000.
          name: size
          in: query
          schema:
            type: integer
        - description: >-
            Returns list of identitysystems having latest activity time greater
            than the specified time if provided. The format of time is
            'YYYY-MM-DD HH:MM:SS'.
          name: latest_activity_time_gt
          in: query
          schema:
            type: string
        - description: >-
            Filters identity system to include only those with a posture score
            greater than or equal to the specified value. Score must be greater
            than or equal to 0.0
          name: score
          in: query
          schema:
            type: number
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.OutputIdentitySystemsListResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.OutputIdentitySystemsListResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.OutputIdentitySystemsListResponse'
  /identitysystem/details:
    get:
      description: Returns identity system details
      tags:
        - IdentitySystems
      security:
        - AuthorizationHeader: []
      summary: GetIdentitySystemDetails
      parameters:
        - description: Identity Systems ID
          name: identifier
          in: query
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/models.IdentitySystemDetailFinal200Response
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.IdentitySystemDetailFinalResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.IdentitySystemDetailFinalResponse'
  /getIssues:
    get:
      summary: GetIssueList
      description: >-
        Get a list of issue to import into your SIEM.  Issues are one or more
        incidents that have been grouped by the Issue Keys. To receive a stream
        of the latest issues, save the issue id as bookmark and query on some
        interval for the latest issues that > this bookmark, ie the latest issue
        id you have previously queried. For additional details about each issue,
        you can query the GetIssueDetails API for the specific issue id
      security:
        - AuthorizationHeader: []
      tags:
        - Issues
      parameters:
        - name: issue_type
          in: query
          schema:
            type: string
            enum:
              - Access from Anonymous IP
              - Access from Public VPN
              - Access from Unauthorized Countries
              - Access to Anonymous IP
              - Access to Public VPN
              - Access to Unauthorized Countries
              - Auth Hash Quality
              - Auth Hash Security
              - Auth Protocol Quality
              - Compromised Password
              - Compromised User
              - Deviation in Daily Asset Activity
              - Enumeration of AD Admins
              - Enumeration of AD Users
              - Exposed Assets
              - Lack of MFA
              - Identity No MFA
              - Asset No MFA
              - Repeated AD Login Attempts at Invalid Time
              - Repeated Login Attempts at Invalid Device
              - Shadow Access
              - Shadow Assets
              - Shadow Identity Systems
              - Suspected AD NTLM Relay Attack
              - Suspected Attack on Disabled AD Account
              - Suspected Attack on Expired AD Account
              - Suspected Attack on Locked AD Account
              - Suspected AD Brute-force Attack
              - Suspected Identity Brute-force Attack
              - Suspected Directory/IdP Bot Attack
              - Suspected Directory/IdP Password Spray Attack
              - Suspicious Inbound Access
              - Suspicious Outbound Access
              - Unauthorized Asset Access
              - Unknown SaaS Access
              - Weak Password
              - Unauthorized Identity Access
              - Impossible Travel
              - Suspected Access Token Sharing
          description: >-
            Used to retrieve only a specific issue type. If left empty, the
            issues will be retrieved for all the types.(recommended)
        - name: issue_id_gt
          in: query
          schema:
            type: string
          description: >-
            Used to retrieve latest issues by issue id.  All issues > this
            parameter will be returned (recommended)
        - name: issue_time_gt
          in: query
          schema:
            type: string
            format: date-time
          description: ' Used to retrieve latest issues by Date / Time.  All issues > this parameter will be returnedIf neither the issue_id_gt parameter field or this field is provided as parameter, the returns will default to the last 7 days. e.g. ''2024-01-02 15:04:05'''
        - name: sort_order
          in: query
          schema:
            type: string
            enum:
              - ASC
              - DESC
          description: Sorting order, Default value is DESC.
        - name: sort_by
          in: query
          schema:
            type: string
            enum:
              - issue_id
              - issue_time
              - flow_count
              - incident_count
              - risk
          description: Field to sort by, Default value is issue_time.
        - name: from
          in: query
          schema:
            type: integer
          description: Starting point for pagination, Default value 0.
        - name: size
          in: query
          schema:
            type: integer
          description: >-
            Maximum number of records to return for pagination, Default value
            1000.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Indicates if the request was successful.
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        issue_time:
                          type: string
                          format: date-time
                          description: First timestamp when issue was captured.
                          example: '2024-08-01T10:31:42.000Z'
                        issue_id:
                          type: string
                          description: Issue Id.
                          example: 17263-1722579276407
                        issue_type:
                          type: string
                          description: Type of the issue.
                          example: Auth Hash Security
                        playbook_name:
                          type: string
                          description: Playbook name associated with the issue.
                          example: Auth Hash Security Playbook
                        issue_keys:
                          type: object
                          description: >-
                            Field name(s) on which the related Incidents were
                            grouped to create the issue.
                          example:
                            domain: example.com
                            hash_algo: sha256
                        message:
                          type: string
                          description: Description of the issue.
                          example: >-
                            The directory on example.com uses a weak hash
                            algorithm md4 which is not secure and easy to crack.
                        risk:
                          type: string
                          description: Risk associated with the issue.
                          enum:
                            - Low
                            - Medium
                            - High
                            - Critical
                        flow_count:
                          type: integer
                          description: Total number of flows for the issue.
                          example: 500
                        incident_count:
                          type: integer
                          description: Total number of incidents for the issue.
                          example: 20
                        incidents_url:
                          type: string
                          description: URL link for the oldest issue incident on console.
                          example: https://console.authmind.com/issues?q=id%3A3817066
                        issue_details_api:
                          type: string
                          description: URL link for fetching the issue details.
                          example: >-
                            https://console.authmind.com/amapi/v1/getIssueDetails?issue_id=17263-1722579276407
                  metadata:
                    type: object
                    description: Response metadata
        '400':
          description: Invalid params or missing params.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error string if request fails.
                  success:
                    type: boolean
                    description: Indicates if the request was successful.
                  results:
                    type: string
                    nullable: true
                    example: null
        '401':
          description: Authorization information is missing or invalid.
  /getIssueDetails:
    get:
      summary: GetIssueDetails
      description: >-
        Get specific details about an issue and all related incidents for the
        issue.
      security:
        - AuthorizationHeader: []
      tags:
        - Issues
      parameters:
        - name: issue_id
          in: query
          required: true
          schema:
            type: string
          description: Issue Id to fetch issue details. e.g. 17263-1722579276407
        - name: sort_order
          in: query
          schema:
            type: string
            enum:
              - ASC
              - DESC
          description: Sorting order, Default value is DESC.
        - name: sort_by
          in: query
          schema:
            type: string
            enum:
              - incident_id
              - incident_risk
              - flow_count
              - last_seen
              - first_seen
          description: Sort by field for incidents, Default value is last_seen.
        - name: from
          in: query
          schema:
            type: integer
          description: Starting point for pagination, Default value 0.
        - name: size
          in: query
          schema:
            type: integer
          description: >-
            Maximum number of records to return for pagination, Default value
            1000.
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Indicates if the request was successful.
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        first_seen:
                          type: string
                          format: date-time
                          description: Timestamp when the issue was first seen.
                          example: '2024-07-01T10:31:42.000Z'
                        last_seen:
                          type: string
                          format: date-time
                          description: Timestamp when the issue was last seen.
                          example: '2024-08-01T10:31:42.000Z'
                        risk:
                          type: string
                          description: Risk associated with the issue.
                          enum:
                            - Low
                            - Medium
                            - High
                            - Critical
                        message:
                          type: string
                          description: Description of the issue.
                          example: >-
                            The directory on example.com uses a weak hash
                            algorithm md4 which is not secure and easy to crack.
                        issue_type:
                          type: string
                          description: The issue type associated with the incident.
                          example: Auth Hash Security
                        issue_keys:
                          type: object
                          description: >-
                            Field name(s) on which the related Incidents were
                            grouped to create the issue.
                          example:
                            domain: example.com
                            hash_algo: sha256
                        incidents_url:
                          type: string
                          description: URL link for the oldest issue incident on console.
                          example: https://console.authmind.com/issues?q=id%3A3817066
                        total_flow_count:
                          type: integer
                          description: Total number of flows for the issue.
                          example: 100
                        total_incident_count:
                          type: integer
                          description: Total number of incidents for the issue.
                          example: 1
                        incidents:
                          type: array
                          items:
                            type: object
                            properties:
                              asset_hostname:
                                type: string
                                description: Hostname of the asset.
                                example: example.auto.local
                              asset_name:
                                type: string
                                description: Name of the asset.
                                example: Kerberos App
                              asset_port:
                                type: integer
                                description: Port associated with the asset.
                                example: 88
                              asset_protocol:
                                type: string
                                description: Protocol associated with the asset.
                                example: Kerberos
                              asset_type:
                                type: string
                                description: Type of the asset.
                                example: App
                              first_seen:
                                type: string
                                format: date-time
                                description: Timestamp when the incident was first seen.
                                example: '2024-08-01T10:31:42.000Z'
                              flow_count:
                                type: integer
                                description: Total number of flows for the incidents.
                                example: 100
                              identity_hostname:
                                type: string
                                description: Hostname of the identity.
                                example: example.auto.local
                              identity_name:
                                type: string
                                description: Name of the identity.
                                example: xyz@example.com
                              identity_type:
                                type: string
                                description: Type of the identity.
                                example: User
                              incident_id:
                                type: string
                                description: Incident id.
                                example: 3830559
                              incident_risk:
                                type: string
                                enum:
                                  - Low
                                  - Medium
                                  - High
                                  - Critical
                                description: Risk associated with the incident
                              incident_url:
                                type: string
                                description: URL for searching the incident
                                example: >-
                                  https://console.authmind.com/issues?q=id%3A3830559
                              incident_highlights:
                                type: string
                                description: Highlights associated with the incident.
                                example: >-
                                  <i><b>xyz.example.com</i></b> uses a weak
                                  password hash algorithm - <i><b>md4</i></b>
                              last_seen:
                                type: string
                                format: date-time
                                description: Timestamp when the incident was last seen.
                                example: '2024-08-01T10:31:42.000Z'
                              playbook_name:
                                type: string
                                description: Playbook name corresponding to the incident.
                                example: Auth Hash Security Playbook
                              site_code:
                                type: string
                                description: Code associated with the incident site.
                                example: AD01
                              status:
                                type: string
                                description: Status of the incident.
                                enum:
                                  - Open
                                  - Closed
                                  - Resolved
                  metadata:
                    type: object
                    description: Response metadata.
        '400':
          description: Invalid params or missing params.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error string if request fails.
                  success:
                    type: boolean
                    description: Indicates if the request was successful.
                  results:
                    type: string
                    nullable: true
                    example: null
        '401':
          description: Authorization information is missing or invalid.
