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

# Get segments count

> 
This API provides the current count of segments (progress data).

Every time this API is called, it returns the most up-to-date information. Consequently, these numbers will change
dynamically over time. The data retrieved from this API call is utilized to calculate the progress percentage in the UI.

The call returns the following information:

Counts of characters, words, and segments for each of the locked, confirmed, and completed categories. In this context,
_completed_ is defined as `confirmed` + `locked` - `confirmed and locked`.

The number of added words if the [Update source](https://support.phrase.com/hc/en-us/articles/10825557848220-Job-Tools)
operation has been performed on the job. In this context, added words are defined as the original word count plus the
sum of words added during all subsequent update source operations.

The count of segments where relevant machine translation (MT) was available (machineTranslationRelevantSegmentsCount)
and the number of segments where the MT output was post-edited (machineTranslationPostEditedSegmentsCount).

A breakdown of [Quality assurance](https://support.phrase.com/hc/en-us/articles/5709703799324-Quality-Assurance-QA-TMS-)
results, including the number of segments on which it was performed, the count of warnings found, and the number of
warnings that were ignored.

Additionally, a breakdown of the aforementioned information from the previous
[Workflow step](https://support.phrase.com/hc/en-us/articles/5709717879324-Workflow-TMS-) is also provided.




## OpenAPI

````yaml /openapi/phrase-tms-latest.json post /api2/v1/projects/{projectUid}/jobs/segmentsCount
openapi: 3.0.0
info:
  description: |-
    Welcome to Phrase's TMS API documentation. 

     Please visit our [help center](https://support.phrase.com/hc/en-us/sections/5709662083612) for more information about the APIs. 

     If you have any questions, please contact [Support](https://support.phrase.com/hc/requests/new). 

     Please, include the `User-Agent` header with the name of your application or project. It might be a good idea to include some sort of contact information as well, so that we can get in touch if necessary. Examples of excellent `User-Agent` headers:
     > User-Agent: Example mobile app (example@phrase.com) <br/> User-Agent: ACME Inc Java 1.8 Client (http://acmeinc.com/contact)
  version: Latest
  title: Phrase TMS API
servers:
  - url: https://cloud.memsource.com/web
security:
  - ApiToken: []
  - OAuth2: []
tags:
  - name: Additional Workflow Step
  - name: Analysis
  - name: Async Request
  - name: Authentication
  - name: Automations
  - name: Bilingual File
  - name: Business Unit
  - name: Buyer
  - name: Client
  - name: Connector
  - name: Conversations
  - name: Cost Center
  - name: Custom Fields
  - name: Custom File Type
  - name: Domain
  - name: Due Date Scheme
  - name: Email Template
  - name: File
  - name: Glossary
  - name: Import settings
  - name: Job
  - name: Language AI
  - name: Language Assets
  - name: Language Quality Assessment
  - name: Machine Translation
  - name: Machine Translation Settings
  - name: Mapping
  - name: Net Rate Scheme
  - name: Notifications
  - name: Price List
  - name: Project
  - name: Project Template
  - name: Provider
  - name: Quality Assurance
  - name: Quality Profile
  - name: Quote
  - name: Reference File
  - name: SCIM
  - name: Segment
  - name: Segmentation Rules
  - name: Service
  - name: Spell Check
  - name: SubDomain
  - name: Supported Languages
  - name: Term Base
  - name: Translation
  - name: Translation Memory
  - name: User
  - name: Vendor
  - name: Webhook
  - name: Workflow Step
  - name: Workflow changes
  - name: XML Assistant
paths:
  /api2/v1/projects/{projectUid}/jobs/segmentsCount:
    post:
      tags:
        - Job
        - Segment
      summary: Get segments count
      description: >

        This API provides the current count of segments (progress data).


        Every time this API is called, it returns the most up-to-date
        information. Consequently, these numbers will change

        dynamically over time. The data retrieved from this API call is utilized
        to calculate the progress percentage in the UI.


        The call returns the following information:


        Counts of characters, words, and segments for each of the locked,
        confirmed, and completed categories. In this context,

        _completed_ is defined as `confirmed` + `locked` - `confirmed and
        locked`.


        The number of added words if the [Update
        source](https://support.phrase.com/hc/en-us/articles/10825557848220-Job-Tools)

        operation has been performed on the job. In this context, added words
        are defined as the original word count plus the

        sum of words added during all subsequent update source operations.


        The count of segments where relevant machine translation (MT) was
        available (machineTranslationRelevantSegmentsCount)

        and the number of segments where the MT output was post-edited
        (machineTranslationPostEditedSegmentsCount).


        A breakdown of [Quality
        assurance](https://support.phrase.com/hc/en-us/articles/5709703799324-Quality-Assurance-QA-TMS-)

        results, including the number of segments on which it was performed, the
        count of warnings found, and the number of

        warnings that were ignored.


        Additionally, a breakdown of the aforementioned information from the
        previous

        [Workflow
        step](https://support.phrase.com/hc/en-us/articles/5709717879324-Workflow-TMS-)
        is also provided.
      operationId: getSegmentsCount
      parameters:
        - name: projectUid
          in: path
          required: true
          schema:
            type: string
      requestBody:
        $ref: '#/components/requestBodies/JobPartReadyReferences'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SegmentsCountsResponseListDtoV1'
        '400':
          description: Bad request
        '401':
          description: Not authorized
        '403':
          description: Forbidden
        '404':
          description: Resource not found
        '405':
          description: Method not allowed
        '408':
          description: Timeout
        '410':
          description: Gone
        '415':
          description: Unsupported media type
        '429':
          description: Too many requests
        '500':
          description: Internal server error
        '501':
          description: Not implemented
components:
  requestBodies:
    JobPartReadyReferences:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/JobPartReadyReferences'
  schemas:
    SegmentsCountsResponseListDtoV1:
      type: object
      properties:
        segmentsCountsResults:
          type: array
          items:
            $ref: '#/components/schemas/SegmentsCountsResponseDtoV1'
    JobPartReadyReferences:
      type: object
      required:
        - jobs
      properties:
        jobs:
          type: array
          items:
            $ref: '#/components/schemas/UidReference'
          maxItems: 100
          minItems: 1
    SegmentsCountsResponseDtoV1:
      type: object
      properties:
        counts:
          $ref: '#/components/schemas/SegmentsCountsDtoV1'
        jobPartUid:
          type: string
        previousWorkflow:
          $ref: '#/components/schemas/SegmentsCountsResponseDtoPreviousWorkflowDtoV1'
    UidReference:
      type: object
      required:
        - uid
      properties:
        uid:
          type: string
    SegmentsCountsDtoV1:
      type: object
      properties:
        addedSegments:
          type: integer
          format: int64
        addedWords:
          type: integer
          format: int64
        allConfirmed:
          type: boolean
        charsCount:
          type: integer
          format: int64
        completedCharsCount:
          type: integer
          format: int64
        completedSegmentsCount:
          type: integer
          format: int64
        completedWordsCount:
          type: integer
          format: int64
        confirmedCharsCount:
          type: integer
          format: int64
        confirmedLockedCharsCount:
          type: integer
          format: int64
        confirmedLockedWordsCount:
          type: integer
          format: int64
        confirmedWordsCount:
          type: integer
          format: int64
        lockedCharsCount:
          type: integer
          format: int64
        lockedSegmentsCount:
          type: integer
          format: int64
        lockedWordsCount:
          type: integer
          format: int64
        machineTranslationPostEditedSegmentsCount:
          type: integer
          format: int64
        machineTranslationRelevantSegmentsCount:
          type: integer
          format: int64
        nonEmptySegmentGroupsCount:
          type: integer
          format: int64
        qualityAssurance:
          $ref: '#/components/schemas/QualityAssuranceDtoV1'
        qualityAssuranceResolved:
          type: boolean
        segmentGroupsCount:
          type: integer
          format: int64
        segmentsCount:
          type: integer
          format: int64
        translatedLockedSegmentsCount:
          type: integer
          format: int64
        translatedSegmentsCount:
          type: integer
          format: int64
        wordsCount:
          type: integer
          format: int64
    SegmentsCountsResponseDtoPreviousWorkflowDtoV1:
      type: object
      properties:
        completed:
          type: boolean
        counts:
          $ref: '#/components/schemas/SegmentsCountsDtoV1'
    QualityAssuranceDtoV1:
      type: object
      properties:
        ignoredWarningsCount:
          type: integer
          format: int64
        segmentsCount:
          type: integer
          format: int64
        warningsCount:
          type: integer
          format: int64
  securitySchemes:
    ApiToken:
      description: >-
        Get a token from `auth/login` [endpoint](#operation/login) and then pass
        it in the `Authorization` HTTP header in every subsequent API call. For
        more information visit our [help
        center](https://support.phrase.com/hc/en-us/articles/5709662181404-API-Authentication-TMS-#token-0-0).
      type: apiKey
      name: Authorization
      in: header
    OAuth2:
      description: >-
        A standard OAuth 2.0 authorization code flow. For more information visit
        our [help
        center](https://support.phrase.com/hc/en-us/articles/5709662181404-API-Authentication-TMS-#oauth-2-0-0-1).
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://cloud.memsource.com/web/oauth/authorize
          tokenUrl: https://cloud.memsource.com/web/oauth/token
          scopes: {}

````