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

# List Coding Task Usage

> Each coding task usage record represents a successfully completed task and includes
the requesting user, credits used, wall-clock duration, task creation, start, and
completion timestamps, and associated pull requests. When available, the record also
includes the user's SCIM enterprise profile.

Records are returned in ascending creation order. Use the opaque `after` cursor from
the `next` link to retrieve the next page.

**Authentication behavior:**
- **Personal Access Token (PAT) keys**: Team admins can list all coding task
  usage for their team; non-admin members receive 403 Forbidden.
- **Team-wide API keys**: All coding task usage for the team is returned.




## OpenAPI

````yaml https://getunblocked.com/api/v1/public-api.json get /coding-task-usage
openapi: 3.0.3
info:
  contact:
    email: help@getunblocked.com
    name: Unblocked
  description: >
    The Unblocked Public API offers seamless collection for managing custom data
    sources through a structured set of endpoints.

    It allows users to create collections and organize and upload documents.


    # Base URL

    The base URL for all requests is:


    ```jsx

    https://getunblocked.com/api/v1

    ```


    # Authentication

    Authentication requires an API key, obtainable from the web dashboard,

    which must be included in the `Authorization` request header for all
    endpoints.


    ```bash

    curl -X GET https://getunblocked.com/api/v1/collections \
         -H "Authorization: Bearer YOUR_API_KEY"
    ```


    # Rate Limits & Quotas


    **Resource Limits:**

    - Collections: Maximum 25 per team

    - Request Size: Maximum 10MB per request

    - Pagination: 1-200 items per page (default: 100)


    **Answers API:**

    - Daily Limit: 1000 questions per day per team

    - Quota Reset: Midnight PST

    - Exceeding the limit returns a 429 Too Many Requests error


    **Field Constraints:**

    - Collection name: 1-32 characters

    - Collection description: 1-4096 characters
  title: Unblocked Public API Reference
  version: v1
  x-logo:
    url: https://avatars.githubusercontent.com/u/91906527?s=300
    altText: Unblocked
servers:
  - url: https://getunblocked.com/api/v1
security:
  - ApiKeyBearerAuth: []
tags:
  - description: >
      Ask Unblocked questions and retrieve answers asynchronously. Submit a
      question using the PUT endpoint and poll for the response using the GET
      endpoint.
    name: Answers
  - description: >
      A collection in Unblocked allows you to organize related documents from
      various data sources, such as customer support tools, knowledge bases, and
      internal wikis, which are not natively supported by Unblocked.


      You can create multiple collections to manage documents from different
      sources.


      You have the ability to list, create, update, and delete them as needed.


      Deleting a collection will also remove all the associated documents.
    name: Collections
  - description: >
      Retrieve context from the data sources connected to Unblocked, including
      code, pull requests, issues, messages, and documentation.


      Research produces a synthesized answer with supporting sources. Search
      endpoints return relevant sources from a single content space. Query
      endpoints return the issues or pull requests matching a natural-language
      query with optional filters. The get endpoint retrieves URL content
      directly.


      **Authentication behavior:**

      - **Personal Access Token (PAT) keys**: Requests are attributed to the
      key's user

      - **Team-wide API keys**: Requests are attributed to the team
    name: Context
  - description: >
      A document contains content that Unblocked uses to answer questions. Each
      document is associated with a collection, so you must create a collection
      before adding documents. Documents used to provide answers will appear as
      references in the Unblocked interface.


      You can create and delete documents as needed.
    name: Documents
  - description: >
      SCIM (System for Cross-domain Identity Management) is a standard for
      automating the exchange of user identity information between identity
      domains or IT systems.


      You can use the SCIM API to manage users and groups in Unblocked.


      **Authentication behavior:**

      - **Public API and SCIM API keys**: Accepted for SCIM requests

      - **Personal Access Token (PAT) keys**: Only team admins may use the SCIM
      API; non-admin members receive `403 Forbidden`

      - **SAML prerequisite**: The team must have SAML identity provider
      metadata configured; otherwise requests receive `403 Forbidden`
    name: SCIM
  - description: >
      Retrieve a feed of team events for downstream ingestion into a security

      information and event management (SIEM) system. The feed currently
      includes

      audit logs. Poll the feed to collect new events.
    name: Security Events
  - description: |
      Retrieve usage data for Unblocked products and features.
    name: Usage
paths:
  /coding-task-usage:
    get:
      tags:
        - Usage
      summary: List Coding Task Usage
      description: >
        Each coding task usage record represents a successfully completed task
        and includes

        the requesting user, credits used, wall-clock duration, task creation,
        start, and

        completion timestamps, and associated pull requests. When available, the
        record also

        includes the user's SCIM enterprise profile.


        Records are returned in ascending creation order. Use the opaque `after`
        cursor from

        the `next` link to retrieve the next page.


        **Authentication behavior:**

        - **Personal Access Token (PAT) keys**: Team admins can list all coding
        task
          usage for their team; non-admin members receive 403 Forbidden.
        - **Team-wide API keys**: All coding task usage for the team is
        returned.
      operationId: listCodingTaskUsage
      parameters:
        - description: >
            Limit used to constrain results of list operations. When not
            specified a default limit of 100 is used.


            A maximum limit is applied to the results, so the server may respond
            with fewer results than requested; clients must not use this as a
            signal that this is the final page of results.
          in: query
          name: limit
          required: false
          schema:
            format: int32
            maximum: 200
            minimum: 1
            type: integer
        - description: >
            Opaque cursor for continuing after a previous page. Follow the URL
            marked `rel="next"`

            in the Link response header to obtain it; do not construct or parse
            the cursor.
          in: query
          name: after
          required: false
          schema:
            $ref: '#/components/schemas/Cursor'
      responses:
        '200':
          content:
            application/json:
              schema:
                description: >-
                  Successfully completed coding task usage records in ascending
                  creation order.
                items:
                  $ref: '#/components/schemas/CodingTaskUsage'
                type: array
          description: OK
          headers:
            link:
              $ref: '#/components/headers/Link'
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiError'
          description: Error response
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiError'
          description: Error response
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiError'
          description: Error response
components:
  schemas:
    Cursor:
      description: >
        Opaque cursor to be used for paging in a forward or backward direction.
        Cursors are stateless and so they never expire.
      maxLength: 10000
      minLength: 1
      type: string
    CodingTaskUsage:
      description: Usage for a successfully completed coding task.
      properties:
        taskReference:
          description: User-visible coding task reference.
          example: UNB-123
          type: string
        user:
          $ref: '#/components/schemas/CodingTaskUsageUser'
        creditsUsed:
          description: Marked-up, quantized credits consumed by the coding task.
          example: 12.3
          format: double
          type: number
        wallClockDurationSeconds:
          description: >-
            Elapsed wall-clock time from task start to successful completion, in
            whole seconds.
          example: 842
          format: int64
          type: integer
        createdAt:
          description: >-
            Time the coding task was created, formatted as an RFC 3339 date-time
            with a UTC offset.
          example: '2026-10-15T21:49:30Z'
          format: date-time
          type: string
        startedAt:
          description: >-
            Time the coding task started, formatted as an RFC 3339 date-time
            with a UTC offset.
          example: '2026-10-15T21:50:02Z'
          format: date-time
          type: string
        completedAt:
          description: >-
            Time the coding task completed successfully, formatted as an RFC
            3339 date-time with a UTC offset.
          example: '2026-10-15T22:04:04Z'
          format: date-time
          type: string
        pullRequests:
          description: Pull requests associated with the coding task, in creation order.
          items:
            $ref: '#/components/schemas/CodingTaskUsagePullRequest'
          type: array
      required:
        - completedAt
        - createdAt
        - creditsUsed
        - pullRequests
        - startedAt
        - taskReference
        - user
        - wallClockDurationSeconds
      type: object
    PublicApiError:
      properties:
        status:
          description: The HTTP status code
          example: 400
          type: integer
      required:
        - status
      type: object
    CodingTaskUsageUser:
      description: The user who requested a coding task.
      properties:
        name:
          description: Current display name of the user.
          example: Jane Smith
          type: string
        email:
          description: Current primary email address of the user.
          format: email
          type: string
        enterpriseProfile:
          allOf:
            - $ref: '#/components/schemas/ScimEnterpriseUserExtension'
          description: Current enterprise profile fields for the user, when available.
      required:
        - email
        - name
      type: object
    CodingTaskUsagePullRequest:
      description: A pull request associated with a coding task.
      properties:
        title:
          description: Pull request title.
          example: Update website navigation
          type: string
        number:
          description: Pull request number in its repository.
          format: int32
          minimum: 1
          type: integer
        repository:
          description: Full repository name, including its owner.
          example: org/repo
          type: string
        url:
          description: URL of the pull request in its source control provider.
          example: https://github.com/org/repo/pull/2
          format: uri
          type: string
      required:
        - number
        - repository
        - title
        - url
      type: object
    ScimEnterpriseUserExtension:
      description: >
        SCIM Enterprise User Schema Extension fields as defined in RFC 7643
        section 4.3.
      properties:
        employeeNumber:
          description: >
            A string identifier assigned to a person, typically based on order
            of hire or association with an organization.
          example: '701984'
          type: string
        costCenter:
          description: |
            Identifies the name of a cost center.
          example: '4130'
          type: string
        organization:
          description: |
            Identifies the name of an organization.
          example: Universal Studios
          type: string
        division:
          description: |
            Identifies the name of a division.
          example: Theme Park
          type: string
        department:
          description: |
            Identifies the name of a department.
          example: Tour Operations
          type: string
      type: object
  headers:
    Link:
      description: |
        A link header providing navigation links related to the response.
      example: <https://api.example.com/some/resource>; rel="next"
      schema:
        type: string
  securitySchemes:
    ApiKeyBearerAuth:
      bearerFormat: Unblocked API Key
      description: The API key to authenticate requests. Obtainable from the web dashboard.
      scheme: bearer
      type: http

````