Skip to content

Latest commit

 

History

History
142 lines (123 loc) · 4.06 KB

File metadata and controls

142 lines (123 loc) · 4.06 KB

Import Task

List - list import tasks

GET https://platform.api.onesky.io/1/projects/:project_id/import-tasks

Authentication

Required. Details described here

Parameters

Name Required? Default Sample Description
page optional 1 Set page number to retrieve. (min: 1)
per_page optional 50 Set how many groups to retrieve for each time. (max: 100, min: 1)
status optional all in-progress Filter to show only import tasks of specific status with one of the followings:
  • all - All tasks
  • completed - Tasks imported successfully
  • in-progress - Tasks are being handling or waiting for others to finish
  • failed - Tasks failed while processing

Response

{
    "meta": {
        "status": 200,
        "record_count": 65,
        "page_count": 3,
        "next_page": "http://platform.api.onesky.io/1/projects/:project_id/import-tasks?per_page=25&page=3",
        "prev_page": "http://platform.api.onesky.io/1/projects/:project_id/import-tasks?per_page=25&page=1",
        "first_page": "http://platform.api.onesky.io/1/projects/:project_id/import-tasks?per_page=25&page=1",
        "last_page": "http://platform.api.onesky.io/1/projects/:project_id/import-tasks?per_page=25&page=3"
    },
    "data": [
        {
            "id": 177,
            "file": {
                "name": "string2.po"
            },
            "status": "in-progress",
            "created_at": "2013-10-07T15:25:00+0000",
            "created_at_timestamp": 1381159500
        },
        {
            "id": 176,
            "file": {
                "name": "string.po"
            },
            "status": "in-progress",
            "created_at": "2013-10-07T15:27:10+0000",
            "created_at_timestamp": 1381159630
        }
    ]
}

Remark:

  • status can be either completed, in-progress or failed.
  • Response may vary according to the way used to import strings. More response sample here.
  • Assume page = 2 and per_page = 25.
  • Note that next_page, prev_page, first_page and last_page can be null.

Back to top

Show - show an import task

GET https://platform.api.onesky.io/1/projects/:project_id/import-tasks/:import_id

Authentication

Required. Details described here

Parameters

NONE

Response

{
    "meta": {
        "status": 200
    },
    "data": {
        "id": 176,
        "file": {
            "name": "string.po",
            "format": "GNU_PO",
            "locale": {
                "code": "en-US",
                "english_name": "English (United States)",
                "local_name": "English (United States)",
                "locale": "en",
                "region" : "US"
            }
        },
        "string_count": 236,
        "word_count": 1260,
        "status": "in-progress",
        "created_at": "2013-10-07T15:27:10+0000",
        "created_at_timestamp": 1381159630
    }
}

Remark:

  • status can be either completed, in-progress or failed.
  • Response may vary according to the way used to import strings. More response sample here.

Back to top