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

# Get Asset Stats

> Returns active assets under test (in scope for a listing) and total active assets for the supplied organization and listings.




## OpenAPI

````yaml /asset-v2-openapi.yaml get /v2/asset-stats
openapi: 3.0.3
info:
  title: Asset Service
  version: 2.1.020
  contact:
    name: Synack Engineering
    email: engineering@synack.com
servers:
  - url: https://client.synack.com/api/asset
    description: Commercial
  - url: https://client.synack.us/api/asset
    description: FedRAMP (Medium)
security: []
tags:
  - name: asset-relationships
    description: Relationships between assets.
  - name: Assets
    description: Assets managed by Synack.
  - name: cloudaccounts
    description: Cloud account assets.
  - name: credentials
    description: Credentials are restricted to authorized users.
  - name: Hosts
    description: Host assets.
  - name: Assessments
    description: Assets are associated with listings.
  - name: mobileapps
    description: Mobile application assets.
  - name: networks
    description: Network assets.
  - name: ports
    description: Ports for single host assets.
  - name: scoperules
    description: >-
      Scope-rules provide fine grained control for what is in and out of scope
      for an asset.
  - name: scripts
    description: Scripts for mobile and web applications.
  - name: userroles
    description: Defines persona-specific user roles for asset credential management.
  - name: users
    description: Users of credentials.
  - name: webapps
    description: Web application assets.
paths:
  /v2/asset-stats:
    get:
      tags:
        - Assets
        - cloudaccounts
        - Hosts
        - mobileapps
        - webapps
      description: >
        Returns active assets under test (in scope for a listing) and total
        active assets for the supplied organization and listings.
      operationId: getAssetStats
      parameters:
        - $ref: '#/components/parameters/SingleOrganizationUIDQuery'
        - $ref: '#/components/parameters/ListingUIDQuery'
      responses:
        '200':
          $ref: '#/components/responses/SingleAssetStat'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
      security:
        - OAuth2:
            - asset_gr
            - asset_or
            - asset_lr
components:
  parameters:
    SingleOrganizationUIDQuery:
      name: organizationUid
      in: query
      explode: true
      schema:
        $ref: '#/components/schemas/OrganizationUID'
      required: true
      description: >-
        Unique identifier for an organization. If not supplied the request will
        apply to all organizations the user is authorized to access.
    ListingUIDQuery:
      name: listingUid[]
      in: query
      explode: true
      schema:
        type: array
        items:
          $ref: '#/components/schemas/ListingUID'
      required: false
      description: >-
        Unique identifier for an listing. If not supplied the request will apply
        to all listings the user is authorized to access.
  responses:
    SingleAssetStat:
      description: Response containing a single asset stat.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AssetStat'
    400BadRequest:
      description: Bad Request
    401Unauthorized:
      description: Unauthorized.
    403Forbidden:
      description: Forbidden
    500InternalServerError:
      description: Internal Server Error.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetails'
    503ServiceUnavailable:
      description: Service Unavailable.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetails'
  schemas:
    OrganizationUID:
      type: string
      pattern: ^[-_0-9a-z]{1,50}
      description: Unique identifier for an organization.
    ListingUID:
      type: string
      pattern: ^[-_0-9a-z]{1,50}
      description: Unique identifier for an listing.
      readOnly: true
    AssetStat:
      type: object
      description: Stats for assets within a single organization.
      properties:
        activeAssets:
          type: array
          description: Totals for active assets.
          items:
            $ref: '#/components/schemas/AssetTypeTotal'
    ProblemDetails:
      type: object
      description: >-
        See [RFC 7807: Problem Details for HTTP
        APIs](https://tools.ietf.org/html/rfc7807)
      properties:
        type:
          type: string
          readOnly: true
        title:
          type: string
          readOnly: true
        status:
          type: integer
          format: int32
          minimum: 100
          maximum: 511
          description: HTTP Status code.
          readOnly: true
        detail:
          type: string
          description: Message detailing the problem.
          readOnly: true
        instance:
          type: string
          description: generated problem instance number to correlate with logs
          readOnly: true
        failedValidation:
          type: array
          description: Array of failed validation rules.
          readOnly: true
          items:
            $ref: '#/components/schemas/FailedValidation'
        failedValidations:
          type: array
          description: Array of indexed failed validation rules.
          readOnly: true
          items:
            $ref: '#/components/schemas/IndexedFailedValidations'
        maxBatchSize:
          type: integer
          description: Maximum processable batch size.
          readOnly: true
        batchSize:
          type: integer
          description: Batch size sent when batch is too large.
          readOnly: true
    AssetTypeTotal:
      type: object
      required:
        - assetType
        - underTest
        - underManagement
      properties:
        assetType:
          $ref: '#/components/schemas/AssetType'
        underTest:
          type: integer
          description: Total of assets that are assigned to a listing with a scope of 'in'.
        underManagement:
          type: integer
          description: Total of assets owned by the organization.
    FailedValidation:
      type: object
      required:
        - message
      properties:
        property:
          type: string
          readOnly: true
        value:
          type: string
          readOnly: true
        message:
          type: string
          readOnly: true
    IndexedFailedValidations:
      type: object
      properties:
        index:
          type: integer
          description: >-
            Zero-based index indicating the which item in request containing an
            array of items has failed validation.
          readOnly: true
        failedValidation:
          type: array
          description: Array of failed validation rules.
          readOnly: true
          items:
            $ref: '#/components/schemas/FailedValidation'
    AssetType:
      type: string
      enum:
        - cloudaccount
        - host
        - network
        - mobileapp
        - webapp
  securitySchemes:
    OAuth2:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: login.synack.com
          scopes:
            asset_lr: Grants per-listing read access for all types of assets.
            asset_srt_lr: Grants per-listing read access to assets that may be read by SRTs.
            asset_or: >-
              Grants organization-level read access for all types of assets
              owned by a particular organization.
            asset_boss_ow: >-
              Grants organization-level access to assets owned by a particular
              organization that may be modified by BOSS users.
            asset_boss_lw: >-
              Grants per-listing write access to assets that may be modified by
              BOSS users.
            asset_client_ow: >-
              Grants organization-level access to assets owned by a particular
              organization that may be modified by Client users.
            asset_client_lw: >-
              Grants per-listing write access to assets that may be modified by
              Client users.
            asset_user_or: >-
              Grants user-level read access to asset stats that owned by a
              particular organization.
            asset_gr: >-
              Grants unrestricted read access to all assets. Except for
              credential data of cloud accout assets.
            asset_gw: Grants unrestricted write access to all assets.
            asset_scan_gr: >-
              Grants unrestricted read access to all assets. Including
              credential data of cloud account assets.

````