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

# List asset categories

> Returns the inventory categories and their keys. Requires the `all:read` scope.



## OpenAPI

````yaml /api-reference/openapi.yaml get /v1/inventory/categories
openapi: 3.0.1
info:
  title: Secfix Public API
  description: >-
    Read and manage your Secfix compliance data from your own systems. Get an
    access token from `POST /oauth/token` with the OAuth 2.0 client credentials
    grant, then send it as a bearer token to the `/v1` endpoints. Errors are
    JSON objects with a stable `code` and the `requestId`. Lists use cursor
    pagination.
  contact:
    name: Secfix Support
    url: https://secfix.com
    email: support@secfix.com
  license:
    name: Proprietary
    url: https://secfix.com/license
  version: 1.0.0
servers:
  - url: https://api.secfix.com
    description: Production
  - url: https://api-staging.secfix.com
    description: Staging
security:
  - bearerAuth: []
tags:
  - name: Employees
    description: >-
      Read the people in your workspace, with their employment status, group and
      onboarding progress.
  - name: Inventory
    description: >-
      Read assets in every inventory category. Create, update and delete
      `CUSTOM` and `INFORMATION` assets.
  - name: OAuth
    description: Get an access token with the OAuth 2.0 client credentials grant.
  - name: Groups
    description: >-
      Read employee groups, their member counts and the onboarding tasks
      assigned to them.
  - name: Health
    description: Check that the API is up.
  - name: Computers
    description: Read the computers in your workspace and their security settings.
paths:
  /v1/inventory/categories:
    get:
      tags:
        - Inventory
      summary: List asset categories
      description: >-
        Returns the inventory categories and their keys. Requires the `all:read`
        scope.
      operationId: list
      parameters:
        - name: pageSize
          in: query
          description: Results per page, 1-100. Defaults to 25.
          required: false
          schema:
            type: integer
            format: int32
        - name: pageCursor
          in: query
          description: >-
            The `startCursor` or `endCursor` from a previous page of this list.
            Send the same filters as on that page. Leave it out for the first
            page.
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Asset categories returned.
          headers:
            X-RateLimit-Limit:
              description: Requests allowed in the current rate-limit window.
              style: simple
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: Requests remaining in the current rate-limit window.
              style: simple
              schema:
                type: integer
            X-RateLimit-Reset:
              description: Seconds until the rate-limit window resets.
              style: simple
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CursorPageAssetCategoryDto'
        '401':
          description: >-
            The access token is missing, invalid or replaced by a newer one.
            Code: `unauthorized` or `token_superseded`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
        '403':
          description: >-
            The access token doesn't have the scope this endpoint needs. Code:
            `scope_required`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
        '405':
          description: >-
            This path doesn't support the HTTP method. The `Allow` header lists
            the methods it supports. Code: `method_not_allowed`.
          headers:
            Allow:
              description: Comma-separated list of the HTTP methods this path supports.
              style: simple
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
        '429':
          description: >-
            Too many requests. Wait the number of seconds in `Retry-After`, then
            retry. Code: `rate_limited`.
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              style: simple
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
        '500':
          description: 'Unexpected server error. Code: `internal_error`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
components:
  schemas:
    CursorPageAssetCategoryDto:
      type: object
      properties:
        pageInfo:
          $ref: '#/components/schemas/PageInfo'
        results:
          type: array
          description: The results on this page.
          items:
            $ref: '#/components/schemas/AssetCategoryDto'
      description: A page of results.
    ProblemDetail:
      type: object
      properties:
        code:
          type: string
          description: >-
            Error code for your error handling. It doesn't change between
            releases.
          example: not_found
        detail:
          type: string
          description: What went wrong in this request.
          example: No asset found for the given id.
        instance:
          type: string
          description: URI that identifies this occurrence of the error.
          example: /v1/inventory/assets/3f1c9a2e-8b4d-4e7a-9c1f-2a5b6c7d8e9f
        requestId:
          type: string
          description: >-
            The request's id, also sent in the `X-Request-Id` header. Include it
            when you contact support.
          example: req_01HZY8Q3M4N5P6R7S8T9V0W1X2
        status:
          type: integer
          description: HTTP status code.
          format: int32
          example: 404
        title:
          type: string
          description: Short summary of the error type.
          example: Not Found
        type:
          type: string
          description: URI that identifies the error type.
          example: https://api.secfix.com/problems/not_found
      description: The JSON body of every error response.
    PageInfo:
      type: object
      properties:
        endCursor:
          type: string
          description: >-
            Cursor for the next page. Send it as `pageCursor`, with the same
            filters. Left out when there is no next page.
          example: AgAAAAX0bYb1Q0AAJDNmMWM5YTJlLTk0YjEtNGQ3Mi1hN2Q4LTEyMzQ1Njc4OWFiYw
        hasNextPage:
          type: boolean
          description: Whether there is a next page.
          example: true
        hasPreviousPage:
          type: boolean
          description: Whether there is a previous page.
          example: false
        pageCount:
          type: integer
          description: Number of results on this page.
          format: int32
          example: 25
        startCursor:
          type: string
          description: >-
            Cursor for the previous page. Send it as `pageCursor`, with the same
            filters. Left out when the page is empty and there is no previous
            page.
          example: AgEAAAX0bYb1Q0AAJDNmMWM5YTJlLTk0YjEtNGQ3Mi1hN2Q4LTEyMzQ1Njc4OWFiYw
        totalCount:
          type: integer
          description: >-
            Number of results that match your filters across all pages, at the
            time of the call. It doesn't depend on `pageCursor` or `pageSize`,
            and it changes when results are added or removed between calls.
          format: int64
          example: 312
      description: Pagination details.
    AssetCategoryDto:
      type: object
      properties:
        displayLabel:
          type: string
          description: Category name as shown in Secfix.
          example: Cloud
        key:
          type: string
          description: Category key. It doesn't change.
          example: CLOUD
      description: An inventory category.
  securitySchemes:
    bearerAuth:
      type: http
      description: Access token from `POST /oauth/token`.
      scheme: bearer
      bearerFormat: JWT

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.