WORKSECTION

Projects

Getting the list of projects through API: get_projects

Sample get_projects request

 https://your—domain.com/api/admin/v2/?action=get_projects&hash=HASH 
Returns data on all projects
This request does not require page parameter

Optional parameters:
  • filter=active (pending, archive) — returns data for a project in a specified status (active/sleeping/archived)
  • extrareturns additional project data (can be specified with commas, for example extra=text,options,users):
  • text or html — description in text or html format, respectively
    options —  returns a dataset on project restriction options
    users — returns a dataset on project team members

Returned data on projects :
  • id — unique project identifier
  • name — project name
  • status — status (active/pending/archive — active/sleeping/archived)
  • company — folder name, where the project is located
  • user_from and user_to — information about the author and project manager
  • text — text of the project description in text or html format (if the request contains corresponding extra parameter)
  • date_added — creation date and time
  • date_closed — closing date and time (if the project is archived) or previous closing date and time (if the project is active)
  • date_start — start date (if specified)
  • date_end — due date or end date (if specified)
  • options — dataset on project restriction options with 0/ 1 values — disables/enabled (dataset  is returned if the request contains corresponding extra parameter): 
  • Assignee can:
  • options.allow_close — mark task as done
  • options.allow_give — transfer the responsibility 
  • options.allow_term — change the task terms
  • options.allow_limit — change the estimates
  • New task required fields PRO:
  • options.require_term — terms
  • options.require_tag — stages and labels
  • options.require_limit — estimates
  • options.require_hidden — visibility
  • Users are not permitted PRO:
  • options.deny_comments_edit — edit and delete comments
  • options.deny_task_edit — edit and delete tasks
  • options.deny_task_delete — delete tasks
  • Adding costs PRO:
  • options.time_require — mark as done with costs only
  • options.time_today — add for today only
  • options.timer_only — add from timer only
  • max_time and max_money — time and financial estimates (if specified)
  • tags — array in id: name format for project statuses and labels (if specified)
  • users — list of project team members with information on them (if the request contains corresponding extra parameter)

Sample JSON response
If the request succeeds, the response will contain ok status and the following data:

{
    "status": "ok",
    "data": [  {
         "id": "PROJECT_ID_1",
         "name": "PROJECT_NAME",
         "page": "/project/PROJECT_ID/",
         "status": "active",
         "company": "FOLDER_NAME",
         "user_from": { "id": "USER_ID",
             "email": "USER_EMAIL",
             "name": "USER_NAME"
         },
         "user_to": { "id": "USER_ID",
             "email": "USER_EMAIL",
             "name": "USER_NAME"
         },
         "text": "PROJECT_TEXT",
         "date_added": "YYYY—MM—DD HH:II",
         "date_start": "YYYY—MM—DD",
         "date_end": "YYYY—MM—DD", "date_closed": "YYYY—MM—DD HH:II",
"options": { "allow_close": 0..1, "allow_give": 0..1,
"allow_term": 0..1,
"allow_limit": 0..1,
"require_term": 0..1,
"require_tag": 0..1,
"require_limit": 0..1,
"require_hidden": 0..1,
"deny_comments_edit": 0..1,
"deny_task_edit": 0..1,
"deny_task_delete": 0..1,
"time_require": 0..1,
"time_today": 0..1,
"timer_only": 0..1 },
         "max_time": 100,
         "max_money": 500,
         "users": [
             {
                 "id": "USER_ID", "email": "USER_EMAIL",
                 "name": "USER_NAME"
             },
             {
                 "id": "USER_ID", "email": "USER_EMAIL",
                 "name": "USER_NAME"
             },
             { "id": "USER_ID",
                 "email": "USER_EMAIL",
                 "name": "USER_NAME"
             },
             { "id": "USER_ID",
                 "email": "USER_EMAIL",
                 "name": "USER_NAME"
             }
         ]
     }, { "id": "PROJECT_ID_2",          "name": "PROJECT_NAME", ... ... ... } ]
}

Creating a project through API: post_project

Sample post_project request

https://your-domain.com/api/admin/v2/?action=post_project&
title=TASK_NAME&hash=HASH

Creates a project (only in active status)
This request allows adding files to a project description (see How to add files)

This request does not require page parameter

Required parameters:
  • title — project name

Optional parameters:
  • email_user_from — project author email
  • email_manager — project manager email
  • email_user_to — user email, who will be set as a task executive by default (ANY for "Anyone", NOONE or not specified for "Executive isn't assigned")
  • members — comma separated list of project member emails
  • text — project description
  • company — folder name, where the project will be located
  • datestart — start date in DD.MM.YYYY format
  • dateend — due date or end date in DD.MM.YYYY format
  • list of project restriction options (set 1 to enable): 
  • Assignee can:
  • options.allow_close — mark task as done
  • options.allow_give — transfer the responsibility 
  • options.allow_term — change the task terms
  • options.allow_limit — change the estimates
  • New task required fields PRO:
  • options.require_term — terms
  • options.require_tag — stages and labels
  • options.require_limit — estimates
  • options.require_hidden — visibility
  • Users are not permitted PRO:
  • options.deny_comments_edit — edit and delete comments
  • options.deny_task_edit — edit and delete tasks
  • options.deny_task_delete — delete tasks
  • Adding costs PRO:
    only one parameter can be enabled from this sublist
  • options.time_require — mark as done with costs only
  • options.time_today — add for today only
  • options.timer_only — add from timer only
  • extra=options — returns a dataset on project restriction options
  • max_time — time estimates
  • max_money — financial estimates
  • tags — set project statuses/labels (for example: tags=TAG1,TAG2). You can specify names (if they are unique) or their IDs (can be obtained through get_project_tags method)

Sample JSON response
If the request succeeds, the response will contain ok status and the following data:

{
    "status": "ok",
    "data": {
        "id": "PROJECT_ID",
        "name": "PROJECT_NAME",
        "page": "/project/PROJECT_ID/",
        "status": "active",
        "company": "FOLDER_NAME",
        "user_from": { "id": "USER_ID",
            "email": "USER_EMAIL",
            "name": "USER_NAME"
        },
        "user_to": { "id": "USER_ID",
            "email": "USER_EMAIL",
            "name": "USER_NAME"
        },
        "text": "PROJECT_TEXT",
        "date_added": "YYYY-MM-DD HH:II",
        "date_start": "YYYY-MM-DD",
        "date_end": "YYYY-MM-DD",
"options": { "allow_close": 0..1, "allow_give": 0..1,
"allow_term": 0..1,
"allow_limit": 0..1,
"require_term": 0..1,
"require_tag": 0..1,
"require_limit": 0..1,
"require_hidden": 0..1,
"deny_comments_edit": 0..1,
"deny_task_edit": 0..1,
"deny_task_delete": 0..1,
"time_require": 0..1,
"time_today": 0..1,
"timer_only": 0..1 },
        "max_time": 100,
        "max_money": 500, "tags": { "TAG_ID": "TAG_NAME_1", "TAG_ID": "TAG_NAME_2" }
    }
}

Archiving a project through API: close_project

Sample close_project request

https://your-domain.com/api/admin/v2/?action=close_project&
page=/project/PROJECT_ID/&hash=HASH
Archives the specified project
Response will show corresponding error if the project is already archived

Required parameters:

Sample JSON response
If the request succeeds, the response will contain ok status

{
    "status": "ok"
}

Activating a project through API: activate_project

Sample activate_project request

https://your-domain.com/api/admin/v2/?action=activate_project&
page=/project/PROJECT_ID/&hash=HASH
Activates the specified archived project
Response will show corresponding error if the project is already active

Required parameters:

Sample JSON response
If the request succeeds, the response will contain ok status

{
    "status": "ok"
}

Updating a project through API: update_project

Sample update_project request

https://your-domain.com/api/admin/v2/?action=update_project&
page=/project=ID_PROJECT/&email_user_to=USER_EMAIL&hash=HASH

Updates number of parameters for a specified active project
All optional parameters are available for updating

Required parameters:
  • page — active project link (see link format for details)

Optional parameters:
  • email_manager — project manager email
  • email_user_to — user email, who will be set as a task executive by default (ANY for "Anyone", NOONE or not specified for "Executive isn't assigned")
  • members — comma separated list of user emails to be added to a project team (use delete_project_members for removal)
  • title — project name
  • datestart — start date in DD.MM.YYYY format
  • dateend — due date or end date in DD.MM.YYYY format
  • list of project restriction options ( 0/ 1 — to enable/disable): 
  • Assignee can:
  • options.allow_close — mark task as done
  • options.allow_give — transfer the responsibility 
  • options.allow_term — change the task terms
  • options.allow_limit — change the estimates
  • New task required fields PRO:
  • options.require_term — terms
  • options.require_tag — stages and labels
  • options.require_limit — estimates
  • options.require_hidden — visibility
  • Users are not permitted PRO:
  • options.deny_comments_edit — edit and delete comments
  • options.deny_task_edit — edit and delete tasks
  • options.deny_task_delete — delete tasks
  • Adding costs PRO:
    only one parameter can be enabled from this sublist
  • options.time_require — mark as done with costs only
  • options.time_today — add for today only
  • options.timer_only — add from timer only
  • extra=options — returns a dataset on project restriction options
  • max_time — time estimates
  • max_money — financial estimates

Parameters unavailable for editing (changing/removing/adding) through the specified method:
  • email_user_from — project author email
  • text — project description
  • company — folder name, where the project is located
  • tags — project statuses/labels (can be updated through update_project_tags method)

Sample JSON response
If the request succeeds, the response will contain ok status and the following data:

{
    "status": "ok",
    "data": {
        "id": "PROJECT_ID",
        "name": "PROJECT_NAME",
        "page": "/project/PROJECT_ID/",
        "status": "active",
        "company": "FOLDER_NAME",
        "user_from": { "id": "USER_ID",
            "email": "USER_EMAIL",
            "name": "USER_NAME"
        },
        "user_to": { "id": "USER_ID",
            "email": "USER_EMAIL",
            "name": "USER_NAME"
        },
        "text": "PROJECT_TEXT",
        "date_added": "YYYY-MM-DD HH:II",
        "date_start": "YYYY-MM-DD",
        "date_end": "YYYY-MM-DD",
"options": { "allow_close": 0..1, "allow_give": 0..1,
"allow_term": 0..1,
"allow_limit": 0..1,
"require_term": 0..1,
"require_tag": 0..1,
"require_limit": 0..1,
"require_hidden": 0..1,
"deny_comments_edit": 0..1,
"deny_task_edit": 0..1,
"deny_task_delete": 0..1,
"time_require": 0..1,
"time_today": 0..1,
"timer_only": 0..1 },
        "max_time": 100,
        "max_money": 500, "tags": { "TAG_ID": "TAG_NAME_1", "TAG_ID": "TAG_NAME_2" }
    }
}

Getting the list of folder names through API: get_project_groups

Sample get_project_groups request

https://your-domain.com/api/admin/v2/?action=get_project_groups&hash=HASH
Returns data with folder names, their IDs and type
This request does not require page parameter

Returned data:
  • id — unique folder identifier
  • title — folder name
  • type — folder type:
folder — folder, created by an account user
company — team folder of the same name, created by default
  • client — company folder team type:
0 — your company team
1 — external client team

Sample JSON response
If the request succeeds, the response will contain ok status and the following data:

{
    "status": "ok",
    "data": [
        {
            "id": "GROUP_ID",
            "title": "GROUP_NAME_1",
            "type": "folder"
        },
        {
            "id": "GROUP_ID",
            "title": "GROUP_NAME_2",
            "type": "company",
            "client": 0
        },
        {
            "id": "GROUP_ID",
            "title": "GROUP_NAME_3",
            "type": "company",
            "client": 1
        }
    ]
}

Creating a project folder through API: add_project_group

Sample add_project_group request

https://your-domain.com/api/admin/v2/?action=add_project_group&
title=PROJECT_GROUP&hash=HASH
Checks for the possible existence of a folder with the specified name and creates a new one if necessary
This request does not require page parameter

Required parameters:
  • title — project folder name

Sample JSON response
If the request succeeds, the response will contain ok status and the following data:

{
    "status": "ok",
    "data": {
        "id": "GROUP_ID",
        "title": "GROUP_NAME",
        "type": "folder"
    }
}

Getting project data through API: get_project

Sample get_project request

https://your-domain.com/api/admin/v2/?action=get_project&page=
/project/PROJECT_ID/&hash=HASH
Returns data on a selected project

Required parameters:
Optional parameters:
  • extra — returns additional project data (can be specified with commas, for example extra=text,options):
  • text or html — description in text or html format, respectively
    options — returns a dataset on project restriction options

Returned project data:
  • id — unique project identifier
  • name — project name
  • status — status (active/pending/archive — active/sleeping/archived)
  • company — folder name, where the project is located
  • user_from and user_to — information about the author and project manager
  • text — text of the project description in text or html format (if the request contains corresponding extra parameter)
  • date_added — creation date and time
  • date_closed — closing date and time (if the project is archived) or previous closing date and time (if the project is active)
  • date_start — start date (if specified)
  • date_end — due date or end date (if specified)
  • options — dataset on project restriction options with 0/ 1 values — disabled/enabled (dataset  is returned if the request contains corresponding extra parameter): 
  • Assignee can:
  • options.allow_close — mark task as done
  • options.allow_give — transfer the responsibility 
  • options.allow_term — change the task terms
  • options.allow_limit — change the estimates
  • New task required fields PRO:
  • options.require_term — terms
  • options.require_tag — stages and labels
  • options.require_limit — estimates
  • options.require_hidden — visibility
  • Users are not permitted PRO:
  • options.deny_comments_edit — edit and delete comments
  • options.deny_task_edit — edit and delete tasks
  • options.deny_task_delete — delete tasks
  • Adding costs PRO:
  • options.time_require — mark as done with costs only
  • options.time_today — add for today only
  • options.timer_only — add from timer only
  • max_time and max_money — time and financial estimates (if specified)
  • tags — array in id: name format for project statuses and labels (if specified)
  • users — list of project team members with information on them

Sample JSON response
If the request succeeds, the response will contain ok status and the following data:

{
    "status": "ok",
    "data": {
        "id": "PROJECT_ID",
        "name": "PROJECT_NAME",
        "page": "/project/PROJECT_ID/",
        "status": "active",
        "company": "FOLDER_NAME",
        "user_from": { "id": "USER_ID",
            "email": "USER_EMAIL",
            "name": "USER_NAME"
        },
        "user_to": { "id": "USER_ID",
            "email": "USER_EMAIL",
            "name": "USER_NAME"
        },
        "text": "PROJECT_TEXT",
        "date_added": "YYYY-MM-DD HH:II",
        "date_start": "YYYY-MM-DD",
        "date_end": "YYYY-MM-DD", "date_closed": "YYYY-MM-DD HH:II",
"options": { "allow_close": 0..1, "allow_give": 0..1,
"allow_term": 0..1,
"allow_limit": 0..1,
"require_term": 0..1,
"require_tag": 0..1,
"require_limit": 0..1,
"require_hidden": 0..1,
"deny_comments_edit": 0..1,
"deny_task_edit": 0..1,
"deny_task_delete": 0..1,
"time_require": 0..1,
"time_today": 0..1,
"timer_only": 0..1 },
        "max_time": 100,
        "max_money": 500, "tags": { "TAG_ID": "TAG_NAME_1", "TAG_ID": "TAG_NAME_2" },
        "users": [
            {
                "id": "USER_ID", "email": "USER_EMAIL",
                "name": "USER_NAME_1"
            },
            {
                "id": "USER_ID", "email": "USER_EMAIL",
                "name": "USER_NAME_2"
            },
            { "id": "USER_ID",
                "email": "USER_EMAIL",
                "name": "USER_NAME_3"
            }
        ]
    }
}

Adding people to the project team through API: add_project_members

Sample add_project_members request

https://your-domain.com/api/admin/v2/?action=add_project_members&page=
/project/PROJECT_ID/&members=USER_EMAIL_1,USER_EMAIL_2&hash=HASH
Adds account users to the project team

Required parameters:
  • page — project link (see link format for details)
  • members — comma separated list of user emails to be added

Sample JSON response
If the request succeeds, the response will contain ok status

{
"status": "ok"
}

Removing people from the project team through API: delete_project_members

Sample delete_project_members request

https://your-domain.com/api/admin/v2/?action=delete_project_members&page=
/project/PROJECT_ID/&members=USER_EMAIL_1,USER_EMAIL_2&hash=HASH
Removes account users from the project team

Required parameters:
  • page — project link (see link format for details)
  • members — comma separated list of user emails to be removed

Sample JSON response
If the request succeeds, the response will contain ok status

{
"status": "ok"
}
esc
или
Print