Statistics Resource

Fetch different translation statistics

GET /stats/proj/{projectSlug}/iter/{iterationSlug}

Get translation statistics for a Project iteration and (optionally) it's underlying documents.

Request Parameters
name type description default constraints multivalued
iterationSlug path Project Iteration identifier.     no
projectSlug path Project identifier.     no
detail query Indicates whether to include detailed statistics for the project iteration's documents. false boolean no
locale query Locale statistics to be fetched. If this is empty, all locale statistics will be returned. This parameter may be specified multiple times if multiple locales are to be fetched.     yes
word query Indicates whether to include word-level statistics. Default is only message level stats. false boolean no
Response Codes
code condition
200 Contains translation statistics for the specified parameters
404 A project iteration could not be found for the given parameters
500 If there is an unexpected error in the server while performing this operation
Response Body
media type data type
application/json Container Translation Statistics (JSON)
application/xml Container Translation Statistics (XML)

Example

Request
GET /stats/proj/{projectSlug}/iter/{iterationSlug}
Accept: application/json

              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "id" : "my-project",
  "refs" : [ { }, { } ],
  "stats" : [ {
    "total" : 12345,
    "untranslated" : 25,
    "approved" : 80,
    "rejected" : 10,
    "fuzzy" : 50,
    "unit" : "MESSAGE",
    "locale" : "es-ES",
    "lastTranslated" : "31/12/15 23:59 by homer",
    "translatedOnly" : 30
  }, {
    "total" : 12345,
    "untranslated" : 12345,
    "approved" : 12345,
    "rejected" : 12345,
    "fuzzy" : 12345,
    "unit" : "WORD",
    "locale" : "...",
    "lastTranslated" : "...",
    "translatedOnly" : 12345
  } ],
  "detailedStats" : [ {
    "id" : "my-project",
    "refs" : [ { }, { } ],
    "stats" : [ {
      "total" : 12345,
      "untranslated" : 25,
      "approved" : 80,
      "rejected" : 10,
      "fuzzy" : 50,
      "unit" : "WORD",
      "locale" : "es-ES",
      "lastTranslated" : "31/12/15 23:59 by homer",
      "translatedOnly" : 30
    }, {
      "total" : 12345,
      "untranslated" : 12345,
      "approved" : 12345,
      "rejected" : 12345,
      "fuzzy" : 12345,
      "unit" : "WORD",
      "locale" : "...",
      "lastTranslated" : "...",
      "translatedOnly" : 12345
    } ],
    "detailedStats" : [ { }, { } ]
  }, {
    "id" : "...",
    "refs" : [ { }, { } ],
    "stats" : [ {
      "total" : 12345,
      "untranslated" : 12345,
      "approved" : 12345,
      "rejected" : 12345,
      "fuzzy" : 12345,
      "unit" : "WORD",
      "locale" : "...",
      "lastTranslated" : "...",
      "translatedOnly" : 12345
    }, {
      "total" : 12345,
      "untranslated" : 12345,
      "approved" : 12345,
      "rejected" : 12345,
      "fuzzy" : 12345,
      "unit" : "WORD",
      "locale" : "...",
      "lastTranslated" : "...",
      "translatedOnly" : 12345
    } ],
    "detailedStats" : [ { }, { } ]
  } ]
}
                
              

GET /stats/proj/{projectSlug}/iter/{iterationSlug}/doc

Get translation statistics for a Document.

Request Parameters
name type description default constraints multivalued
iterationSlug path Project Iteration identifier.     no
projectSlug path Project identifier.     no
docId query Document identifier.     no
locale query Locale statistics to be fetched. If this is empty, all locale statistics will be returned. This parameter may be specified multiple times if multiple locales are to be fetched.     yes
word query Indicates whether to include word-level statistics. Default is only message level stats. false boolean no
Response Codes
code condition
200 Contains translation statistics for the specified parameters
404 A document could not be found for the given parameters
500 If there is an unexpected error in the server while performing this operation
Response Body
media type data type
application/json Container Translation Statistics (JSON)
application/xml Container Translation Statistics (XML)

Example

Request
GET /stats/proj/{projectSlug}/iter/{iterationSlug}/doc
Accept: application/json

              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "id" : "my-project",
  "refs" : [ { }, { } ],
  "stats" : [ {
    "total" : 12345,
    "untranslated" : 25,
    "approved" : 80,
    "rejected" : 10,
    "fuzzy" : 50,
    "unit" : "MESSAGE",
    "locale" : "es-ES",
    "lastTranslated" : "31/12/15 23:59 by homer",
    "translatedOnly" : 30
  }, {
    "total" : 12345,
    "untranslated" : 12345,
    "approved" : 12345,
    "rejected" : 12345,
    "fuzzy" : 12345,
    "unit" : "MESSAGE",
    "locale" : "...",
    "lastTranslated" : "...",
    "translatedOnly" : 12345
  } ],
  "detailedStats" : [ {
    "id" : "my-project",
    "refs" : [ { }, { } ],
    "stats" : [ {
      "total" : 12345,
      "untranslated" : 25,
      "approved" : 80,
      "rejected" : 10,
      "fuzzy" : 50,
      "unit" : "WORD",
      "locale" : "es-ES",
      "lastTranslated" : "31/12/15 23:59 by homer",
      "translatedOnly" : 30
    }, {
      "total" : 12345,
      "untranslated" : 12345,
      "approved" : 12345,
      "rejected" : 12345,
      "fuzzy" : 12345,
      "unit" : "MESSAGE",
      "locale" : "...",
      "lastTranslated" : "...",
      "translatedOnly" : 12345
    } ],
    "detailedStats" : [ { }, { } ]
  }, {
    "id" : "...",
    "refs" : [ { }, { } ],
    "stats" : [ {
      "total" : 12345,
      "untranslated" : 12345,
      "approved" : 12345,
      "rejected" : 12345,
      "fuzzy" : 12345,
      "unit" : "MESSAGE",
      "locale" : "...",
      "lastTranslated" : "...",
      "translatedOnly" : 12345
    }, {
      "total" : 12345,
      "untranslated" : 12345,
      "approved" : 12345,
      "rejected" : 12345,
      "fuzzy" : 12345,
      "unit" : "MESSAGE",
      "locale" : "...",
      "lastTranslated" : "...",
      "translatedOnly" : 12345
    } ],
    "detailedStats" : [ { }, { } ]
  } ]
}
                
              

GET /stats/project/{projectSlug}/version/{versionSlug}/{dateRangeParam}

Return accumulated daily translation statistics including history for a project version in given date range.

Request Parameters
name type description
dateRangeParam path from..to (yyyy-mm-dd..yyyy-mm-dd), date range maximum: 365 days
projectSlug path Project identifier
versionSlug path Version identifier
timeZoneID query optional user time zone ID. Will use system default in absence or GMT zone if provided time zone ID can not be understood.
Response Body
media type data type
application/json array of ProjectStatisticsMatrix (JSON)

Example

Request
GET /stats/project/{projectSlug}/version/{versionSlug}/{dateRangeParam}
Accept: application/json

              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
[ {
  "savedDate" : "...",
  "localeId" : "...",
  "localeDisplayName" : "...",
  "savedState" : "NeedReview",
  "wordCount" : 12345
} ]
                
              

GET /stats/proj/{projectSlug}/iter/{iterationSlug}/doc/{docId}

This method has been deprecated.

Get translation statistics for a Document.

Request Parameters
name type description default constraints multivalued
docId path Document identifier.   regex: .* no
iterationSlug path Project Iteration identifier.     no
projectSlug path Project identifier.     no
locale query Locale statistics to be fetched. If this is empty, all locale statistics will be returned. This parameter may be specified multiple times if multiple locales are to be fetched. Deprecated. Use #getStatisticsWithDocId     yes
word query Indicates whether to include word-level statistics. Default is only message level stats. false boolean no
Response Codes
code condition
200 Contains translation statistics for the specified parameters
404 A document could not be found for the given parameters
500 If there is an unexpected error in the server while performing this operation
Response Body
media type data type
application/json Container Translation Statistics (JSON)
application/xml Container Translation Statistics (XML)

Example

Request
GET /stats/proj/{projectSlug}/iter/{iterationSlug}/doc/{docId}
Accept: application/json

              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "id" : "my-project",
  "refs" : [ { }, { } ],
  "stats" : [ {
    "total" : 12345,
    "untranslated" : 25,
    "approved" : 80,
    "rejected" : 10,
    "fuzzy" : 50,
    "unit" : "MESSAGE",
    "locale" : "es-ES",
    "lastTranslated" : "31/12/15 23:59 by homer",
    "translatedOnly" : 30
  }, {
    "total" : 12345,
    "untranslated" : 12345,
    "approved" : 12345,
    "rejected" : 12345,
    "fuzzy" : 12345,
    "unit" : "MESSAGE",
    "locale" : "...",
    "lastTranslated" : "...",
    "translatedOnly" : 12345
  } ],
  "detailedStats" : [ {
    "id" : "my-project",
    "refs" : [ { }, { } ],
    "stats" : [ {
      "total" : 12345,
      "untranslated" : 25,
      "approved" : 80,
      "rejected" : 10,
      "fuzzy" : 50,
      "unit" : "WORD",
      "locale" : "es-ES",
      "lastTranslated" : "31/12/15 23:59 by homer",
      "translatedOnly" : 30
    }, {
      "total" : 12345,
      "untranslated" : 12345,
      "approved" : 12345,
      "rejected" : 12345,
      "fuzzy" : 12345,
      "unit" : "MESSAGE",
      "locale" : "...",
      "lastTranslated" : "...",
      "translatedOnly" : 12345
    } ],
    "detailedStats" : [ { }, { } ]
  }, {
    "id" : "...",
    "refs" : [ { }, { } ],
    "stats" : [ {
      "total" : 12345,
      "untranslated" : 12345,
      "approved" : 12345,
      "rejected" : 12345,
      "fuzzy" : 12345,
      "unit" : "MESSAGE",
      "locale" : "...",
      "lastTranslated" : "...",
      "translatedOnly" : 12345
    }, {
      "total" : 12345,
      "untranslated" : 12345,
      "approved" : 12345,
      "rejected" : 12345,
      "fuzzy" : 12345,
      "unit" : "MESSAGE",
      "locale" : "...",
      "lastTranslated" : "...",
      "translatedOnly" : 12345
    } ],
    "detailedStats" : [ { }, { } ]
  } ]
}
                
              

GET /stats/project/{projectSlug}/version/{versionSlug}/contributor/{username}/{dateRange}

Get contribution statistic from project-version within given date range.

Request Parameters
name type description default constraints
dateRange path date range from..to (yyyy-mm-dd..yyyy-mm-dd)    
projectSlug path project identifier    
username path username of contributor    
versionSlug path version identifier    
includeAutomatedEntry query whether to include automatic entries of translation into statistic false boolean
Response Codes
code condition
200 Contains contribution statistics for the specified parameters
404 A project version could not be found for the given parameters
500 If there is an unexpected error in the server while performing this operation
Response Body
media type data type
application/json Contribution Statistics (JSON)

Example

Request
GET /stats/project/{projectSlug}/version/{versionSlug}/contributor/{username}/{dateRange}
Accept: application/json

              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "username" : "bart",
  "contributions" : [ {
    "locale" : "es-ES",
    "translation-stats" : {
      "approved" : 12345,
      "rejected" : 12345,
      "translated" : 12345,
      "needReview" : 12345
    },
    "review-stats" : {
      "approved" : 12345,
      "rejected" : 12345,
      "translated" : 12345,
      "needReview" : 12345
    }
  }, {
    "locale" : "ja",
    "translation-stats" : {
      "approved" : 12345,
      "rejected" : 12345,
      "translated" : 12345,
      "needReview" : 12345
    },
    "review-stats" : {
      "approved" : 12345,
      "rejected" : 12345,
      "translated" : 12345,
      "needReview" : 12345
    }
  } ]
}