Skip to content

Latest commit

 

History

History
244 lines (198 loc) · 5.07 KB

project_group.md

File metadata and controls

244 lines (198 loc) · 5.07 KB

Project Group

List - retrieve all project groups

GET https://platform.api.onesky.io/1/project-groups

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)

Response

status 200 OK
{
    "meta": {
        "status": 200,
        "record_count": 65,
        "page_count": 3,
        "next_page": "http://platform.api.onesky.io/1/project-groups?per_page=25&page=3",
        "prev_page": "http://platform.api.onesky.io/1/project-groups?per_page=25&page=1",
        "first_page": "http://platform.api.onesky.io/1/project-groups?per_page=25&page=1",
        "last_page": "http://platform.api.onesky.io/1/project-groups?per_page=25&page=3"
    },
    "data": [
        {
            "id": 365,
            "name": "Travel Magazine"
        },
        {
            "id": 366,
            "name": "Fashion Magazine"
        },
        ...
    ]
}

Remark:

  • 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 - retrieve details of a project group

GET https://platform.api.onesky.io/1/project-groups/:project_group_id

Authentication

Required. Details described here

Parameters

NONE

Response

status 200 OK
{
    "meta": {
        "status": 200
    },
    "data": {
        "id": 365,
        "name": "Travel Magazine",
        "enabled_language_count": 3,
        "project_count": 6
    }
}

Back to top

Create - create a new project group

POST https://platform.api.onesky.io/1/project-groups

Authentication

Required. Details described here

Parameters

Name Required? Default Sample Description
name required Name of the project group
locale optional en zh-TW Locale code of the project group base language. Please refer to GET locales

Response

status 201 Created
{
    "meta": {
        "status": 201
    },
    "data": {
        "id": 8465,
        "name": "ABC Publications",
        "base_language": {
            "code": "en-US",
            "english_name": "English (United States)",
            "local_name": "English (United States)",
            "locale": "en",
            "region" : "US"
        }
    }
}

Back to top

Delete - remove a project group

DELETE https://platform.api.onesky.io/1/project-groups/:project_group_id

Authentication

Required. Details described here

Parameters

NONE

Response

status 200 OK

Back to top

Languages - list enabled languages of a project group

GET https://platform.api.onesky.io/1/project-groups/:project_group_id/languages

Authentication

Required. Details described here

Parameters

NONE

Response

status 200 OK
{
    "meta": {
        "status": 200,
        "record_count": 3
    },
    "data": [
        {
            "code": "en-US",
            "english_name": "English (United States)",
            "local_name": "English (United States)",
            "locale": "en",
            "region" : "US",
            "is_base_language": true
        },
        {
            "code": "ja-JP",
            "english_name": "Japanese",
            "local_name": "日本語",
            "locale": "ja",
            "region" : "JP",
            "is_base_language": false
        },
        {
            "code": "ko-KR",
            "english_name": "Korean",
            "local_name": "한국어",
            "locale": "ko",
            "region" : "KR",
            "is_base_language": false
        },
        ...
    ]
}

Back to top