Transtats APIsΒΆ

  1. Ping Server : <transtats_server>/api/ping

    Returns server version.

    GET /api/ping HTTP/1.1
    
  2. Package Status : <transtats_server>/api/package/<package_name>

    Returns translation stats of package for enabled languages, for example abrt.

    GET /api/package/abrt HTTP/1.1
    
  3. Package Health : <transtats_server>/api/package/<package_name>/health

    Returns health of package w.r.t out-of-sync, for example abrt.

    GET /api/package/abrt/health HTTP/1.1
    
  4. Add Package : <transtats_server>/api/package/create

    Registers a new package with Transtats, for example dnf.

    POST /api/package/create HTTP/1.1
    
    example:
    $ curl -d '{"package_name": "dnf", "upstream_url": "https://github.com/rpm-software-management/dnf", "transplatform_slug": "WLTEFED", "release_streams": "fedora,RHEL"}' -H "Authorization: Token <your-transtats-api-token>" -H "Content-Type: application/json" -X POST http://localhost:8080/api/package/create
    
    output:
    {"dnf":"Package added Successfully."}
    
  5. Graph Rule Coverage : <transtats_server>/api/coverage/<graph_rule_name>

    Returns translation coverage according to graph rule, for example rhinstaller.

    GET /api/coverage/rhinstaller HTTP/1.1
    
  6. Release Status : <transtats_server>/api/release/<release_branch_name>

    Returns translation stats of packages which are being tracked for a given release, for example fedora-29.

    GET /api/release/fedora-29 HTTP/1.1
    
    1. Release Status Detail : <transtats_server>/api/release/<release_branch_name>/detail

      Returns per language translation stats of packages for a release.

      GET /api/release/fedora-29/detail HTTP/1.1
      
    2. Release Status Locale : <transtats_server>/api/release/<release_branch_name>/locale/<locale>

      Returns translation stats of packages for a release of a single language.

      GET /api/release/fedora-29/locale/ja_JP HTTP/1.1
      
  7. Job Details : <transtats_server>/api/job/<job-id>/log

    Returns job log against given job id, for example 2a6d4b23-6a6b-4d0e-b617-a0ece01d790f.

    GET /api/job/2a6d4b23-6a6b-4d0e-b617-a0ece01d790f/log  HTTP/1.1
    
  8. Run a Job : <transtats_server>/api/job/run

    Returns the job_id against given job_type: syncupstream or syncdownstream or stringchange

    POST /api/job/run  HTTP/1.1
    
    example:
    $ curl -d '{"job_type": "syncdownstream", "package_name": "anaconda", "build_system": "koji", "build_tag": "f33"}' -H 'Content-Type: application/json' -H 'Authorization: Token <your-transtats-api-token>' -X POST http://localhost:8080/api/job/run
    
    output:
    {"Success":"Job created and logged. URL: http://localhost:8080/jobs/log/2a5966a9-3e5e-4ad1-b89e-1ee0e3b1651b/detail","job_id":"2a5966a9-3e5e-4ad1-b89e-1ee0e3b1651b"}