NAV Navigation
HTTP JavaScript Python Ruby

Overview

Getting started

Welcome to the GanttPRO API Reference. If you’re new to GanttPRO, first create an account at GanttPRO.com

The API allows developers to safely and securely access information from your GanttPRO account. You can use it to integrate GanttPRO into your existing business processes or extend GanttPRO the way specific for your team.

As an example, you can add your own notification channels, sync data with other task management systems, reporting or time tracking tools.

The API is now in Public Beta state

If you find a bug or run into problems using the API, please let us know at [email protected]. We will help you as soon as possible.

Endpoint

All calls to the API need to start with the appropriate base URL: https://api.ganttpro.com/v1.0/

Rate limits

The current rate limit for insert, delete, and update calls is 5 req / sec

Authentication

All requests to the GanttPRO REST API require X-API-KEY HTTP header:

X-API-KEY: YOUR_TEAM_API_KEY_HERE

Example:

X-API-KEY: abc1234aacc640ba803908a9dd668cb2

Security

Make sure to store your API keys somewhere secure and never share them publicly.

Where can I get an API key?

You can create and manage your API Keys in the web interface.
You must be the owner of the GanttPRO team account to be able to generate API keys for your team.

image info

Trusted IP

Trusted IP configuration enhances security by allowing only specified IP addresses or IP ranges access to certain resources, services, or network areas. This approach is crucial for safeguarding sensitive information and systems from unauthorized access.

Trusted IPv4 list:

Trusted IPv6 list:

Examples

As an example let’s:

All code samples in this section are made with curl using the command line You can find samples in Node, Ruby, JavaScript, Python in the description of a particular REST API method.

Get projects list

curl --request GET \
--url https://api.ganttpro.com/v1.0/projects/ \
--header 'accept: application/json' \
--header 'X-API-KEY: YOUR_API_KEY_HERE'

Response:

[
{
"projectId":1598541836426,
"name":"Sample Project 1"
},
{
"projectId":1598541953820,
"name":"Sample project 2"
}
]

Get all tasks from one of the projects

Now let’s get all tasks from the first project projectId=1598541836426

curl --request GET \
--url https://api.ganttpro.com/v1.0/tasks/?projectId=1598541836426 \
--header 'accept: application/json' \
--header 'X-API-KEY: YOUR_API_KEY_HERE'

Response:

[
...
{
"id":20216469,
"projectId":1598541836426,
"name":"Sample subproject 1",
"description":null,
"type":"project",
"progress":0,
"duration":2400,
"estimation":0,
"sortorder":1,
"parent":20216467,
"color":12,
"deadline":null,
"status":1,
"priority":3,
"resources":[

],
"comments":[

],
"attachments":[

],
"links":[

],
"timeLogs":[

],
"customColumns":[

],
"startDate":"2020-08-27 09:00:00",
"endDate":"2020-09-02 18:00:00"
},
{
"id":20216468,
"projectId":1598541836426,
"name":"Sample task1",
"description":null,
"type":"task",
"progress":0,
"duration":2400,
"estimation":60,
"sortorder":1,
"parent":20216469,
"color":1,
"deadline":null,
"status":1,
"priority":3,
"resources":[
{
"resourceValue":40,
"resourceId": 726707
}
],
"comments":[

],
"attachments":[

],
"links":[

],
"timeLogs":[

],
"customColumns":[

],
"startDate":"2020-08-27 09:00:00",
"endDate":"2020-09-02 18:00:00"
},
...
]

Create a new task

Now, let’s add a new task to the subproject 20216469.

curl --request POST \
--url https://api.ganttpro.com/v1.0/tasks \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'x-api-key: YOUR_API_KEY_HERE' \
--data '{"projectId":1598541836426, "name": "My new task created via an API", "parent": 20216469}'

Response:

{
"item":{
"id":20222109,
"projectId":1598541836426,
"name":"My new task created via an API",
"description":null,
"type":"task",
"progress":0,
"duration":1,
"estimation":0,
"sortorder":7,
"parent":20216469,
"color":1,
"deadline":null,
"status":1,
"priority":7,
"resources":[

],
"comments":[

],
"attachments":[

],
"links":[

],
"timeLogs":[

],
"customFields":[

],
"startDate":"2020-09-04 09:00:00",
"endDate":"2020-09-04 09:01:00"
}
}

Notes

Releases

GanttPRO uses webhooks to let your application or service know when events happen, such as creating a task or time log reported.

26-04-2022

GanttPRO API

Team

Operations with team

Get team

Code samples

GET https://api.ganttpro.com/v1.0/team HTTP/1.1
Host: api.ganttpro.com
Accept: application/json

const headers = {
'Accept':'application/json',
'X-API-Key':'API_KEY'
};

fetch('https://api.ganttpro.com/v1.0/team',
{
method: 'GET',

headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json',
'X-API-Key': 'API_KEY'
}

r = requests.get('https://api.ganttpro.com/v1.0/team', headers = headers)

print(r.json())
require 'rest-client'
require 'json'

headers = {
'Accept' => 'application/json',
'X-API-Key' => 'API_KEY'
}

result = RestClient.get 'https://api.ganttpro.com/v1.0/team',
params: {
}, headers: headers

p JSON.parse(result)

GET /team

Get current team

Example responses 200 Response

{
"id": 0,
"ownerId": 0,
"name": "string"
}

Responses

  • 200
  • 401
  • 404

Team is exist

Unauthorized

Team not found

Projects

Operations with projects

Get projects list

Code samples

GET https://api.ganttpro.com/v1.0/projects HTTP/1.1
Host: api.ganttpro.com
Accept: application/json

const headers = {
'Accept':'application/json',
'X-API-Key':'API_KEY'
};

fetch('https://api.ganttpro.com/v1.0/projects',
{
method: 'GET',

headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json',
'X-API-Key': 'API_KEY'
}

r = requests.get('https://api.ganttpro.com/v1.0/projects', headers = headers)

print(r.json())
require 'rest-client'
require 'json'

headers = {
'Accept' => 'application/json',
'X-API-Key' => 'API_KEY'
}

result = RestClient.get 'https://api.ganttpro.com/v1.0/projects',
params: {
}, headers: headers

p JSON.parse(result)

GET /projects

Get projects list

Example responses 200 Response

[
{
"projectId": 0,
"name": "string",
"lastUpdate": "2019-08-24T14:15:22Z"
}
]

Responses

  • 200
  • 400
  • 401

Projects

Bad query parameter

Unauthorized

Add new project

Code samples

POST https://api.ganttpro.com/v1.0/projects HTTP/1.1
Host: api.ganttpro.com
Content-Type: application/json
Accept: application/json
user-id: 0
const inputBody = '{
"name": "string",
"description": "string",
"startProject": "2019-08-24",
"config": {
"durationView": "hour",
"applyResourceCalendar": true,
"estimationMode": 1,
"showTime": [
null
],
"showDay": [
1
]
}
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'user-id':'0',
'X-API-Key':'API_KEY'
};

fetch('https://api.ganttpro.com/v1.0/projects',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'user-id': '0',
'X-API-Key': 'API_KEY'
}

r = requests.post('https://api.ganttpro.com/v1.0/projects', headers = headers)

print(r.json())
require 'rest-client'
require 'json'

headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'user-id' => '0',
'X-API-Key' => 'API_KEY'
}

result = RestClient.post 'https://api.ganttpro.com/v1.0/projects',
params: {
}, headers: headers

p JSON.parse(result)

POST /projects

Add new project

Body parameter

{
"name": "string",
"description": "string",
"startProject": "2019-08-24",
"config": {
"durationView": "hour",
"applyResourceCalendar": true,
"estimationMode": 1,
"showTime": [
null
],
"showDay": [
1
]
}
}

Parameters

Header

user-id
integer

Body

name
string required
description
string
startProject
undefined
»*anonymous*
string
»*anonymous*
integer
config
object
»durationView
string
»applyResourceCalendar
boolean
»estimationMode
integer
»showTime
array
»»start
integer
»»end
integer
»showDay
array

Example responses 200 Response

{
"name": "string",
"templateId": 0,
"config": "string",
"skin": "string",
"userId": 0,
"status": "string",
"applyResources": 0,
"actionHash": 0,
"ganttId": 0
}

Responses

  • 200
  • 400
  • 401

Projects

Bad query parameter

Unauthorized

Get project

Code samples

GET https://api.ganttpro.com/v1.0/projects/{projectId} HTTP/1.1
Host: api.ganttpro.com
Accept: application/json

const headers = {
'Accept':'application/json',
'X-API-Key':'API_KEY'
};

fetch('https://api.ganttpro.com/v1.0/projects/{projectId}',
{
method: 'GET',

headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json',
'X-API-Key': 'API_KEY'
}

r = requests.get('https://api.ganttpro.com/v1.0/projects/{projectId}', headers = headers)

print(r.json())
require 'rest-client'
require 'json'

headers = {
'Accept' => 'application/json',
'X-API-Key' => 'API_KEY'
}

result = RestClient.get 'https://api.ganttpro.com/v1.0/projects/{projectId}',
params: {
}, headers: headers

p JSON.parse(result)

GET /projects/{projectId}

Get project

Parameters

Path

projectId
integer required

Example responses 200 Response

{
"projectId": 0,
"name": "string",
"lastUpdate": "2019-08-24T14:15:22Z"
}

Responses

  • 200
  • 400
  • 401
  • 404

Project

Bad query parameter

Unauthorized

Project not found

Update project

Code samples

PUT https://api.ganttpro.com/v1.0/projects/{projectId} HTTP/1.1
Host: api.ganttpro.com
Content-Type: application/json
Accept: application/json
user-id: 0
const inputBody = '{
"isFavorite": true,
"description": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'user-id':'0',
'X-API-Key':'API_KEY'
};

fetch('https://api.ganttpro.com/v1.0/projects/{projectId}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'user-id': '0',
'X-API-Key': 'API_KEY'
}

r = requests.put('https://api.ganttpro.com/v1.0/projects/{projectId}', headers = headers)

print(r.json())
require 'rest-client'
require 'json'

headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'user-id' => '0',
'X-API-Key' => 'API_KEY'
}

result = RestClient.put 'https://api.ganttpro.com/v1.0/projects/{projectId}',
params: {
}, headers: headers

p JSON.parse(result)

PUT /projects/{projectId}

Body parameter

{
"isFavorite": true,
"description": "string"
}

Parameters

Path

projectId
integer required

Header

user-id
integer

Body

isFavorite
boolean
description
string

Example responses 200 Response

{
"status": "ok"
}

Responses

  • 200
  • 400
  • 401

Ok

Bad query parameter

Unauthorized

Get task fields for project

Code samples

GET https://api.ganttpro.com/v1.0/projects/taskFields?projectId=1 HTTP/1.1
Host: api.ganttpro.com
Accept: application/json

const headers = {
'Accept':'application/json',
'X-API-Key':'API_KEY'
};

fetch('https://api.ganttpro.com/v1.0/projects/taskFields?projectId=1',
{
method: 'GET',

headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json',
'X-API-Key': 'API_KEY'
}

r = requests.get('https://api.ganttpro.com/v1.0/projects/taskFields', params={
'projectId': [
1
]
}, headers = headers)

print(r.json())
require 'rest-client'
require 'json'

headers = {
'Accept' => 'application/json',
'X-API-Key' => 'API_KEY'
}

result = RestClient.get 'https://api.ganttpro.com/v1.0/projects/taskFields',
params: {
'projectId' => 'array[integer]'
}, headers: headers

p JSON.parse(result)

GET /projects/taskFields

Get task fields for project

Parameters

Query

projectId
array[integer] required

Example responses 200 Response

[
{
"customFieldId": 0,
"name": "string",
"key": "string",
"type": "string",
"options": [
{
"id": 0,
"value": "string",
"color": 1,
"icon": "string",
"sortOrder": 0,
"isDefault": 0
}
],
"writable": 0,
"isCustom": 0
}
]

Responses

  • 200
  • 400
  • 401

Projects

Bad query parameter

Unauthorized

Get a calendars for projects

Code samples

GET https://api.ganttpro.com/v1.0/projects/calendars HTTP/1.1
Host: api.ganttpro.com
Accept: application/json

const headers = {
'Accept':'application/json',
'X-API-Key':'API_KEY'
};

fetch('https://api.ganttpro.com/v1.0/projects/calendars',
{
method: 'GET',

headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json',
'X-API-Key': 'API_KEY'
}

r = requests.get('https://api.ganttpro.com/v1.0/projects/calendars', headers = headers)

print(r.json())
require 'rest-client'
require 'json'

headers = {
'Accept' => 'application/json',
'X-API-Key' => 'API_KEY'
}

result = RestClient.get 'https://api.ganttpro.com/v1.0/projects/calendars',
params: {
}, headers: headers

p JSON.parse(result)

GET /projects/calendars

Get a calendars for projects

Example responses 200 Response

[
{
"projectId": 0,
"worktime": null,
"customDays": [
null
]
}
]

Responses

  • 200
  • 400
  • 401

Projects

Bad query parameter

Unauthorized

Add a custom day

Code samples

POST https://api.ganttpro.com/v1.0/projects/customday HTTP/1.1
Host: api.ganttpro.com
Content-Type: application/json
Accept: application/json
const inputBody = '{
"from": "2019-08-24",
"hours": [
null
],
"to": "2019-08-24",
"projectId": 1,
"repeat": "week",
"repeatTo": "2019-08-24",
"title": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'X-API-Key':'API_KEY'
};

fetch('https://api.ganttpro.com/v1.0/projects/customday',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-API-Key': 'API_KEY'
}

r = requests.post('https://api.ganttpro.com/v1.0/projects/customday', headers = headers)

print(r.json())
require 'rest-client'
require 'json'

headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-API-Key' => 'API_KEY'
}

result = RestClient.post 'https://api.ganttpro.com/v1.0/projects/customday',
params: {
}, headers: headers

p JSON.parse(result)

POST /projects/customday

Add a custom day

Body parameter

{
"from": "2019-08-24",
"hours": [
null
],
"to": "2019-08-24",
"projectId": 1,
"repeat": "week",
"repeatTo": "2019-08-24",
"title": "string"
}

Parameters

Body

from
string required
hours
array
»start
integer
»end
integer
to
string
projectId
integer required
repeat
string
repeatTo
string
title
string

Example responses 200 Response

{
"id": 0,
"from": "2019-08-24",
"hours": [
null
],
"to": "2019-08-24",
"projectId": 0,
"repeat": "week",
"repeatTo": "2019-08-24",
"title": "string",
"isDayOff": true
}

Responses

  • 200
  • 400
  • 401

Projects

Bad query parameter

Unauthorized

Update custom day

Code samples

PUT https://api.ganttpro.com/v1.0/projects/customday/{customDayId} HTTP/1.1
Host: api.ganttpro.com
Content-Type: application/json
Accept: application/json
const inputBody = '{
"from": "2019-08-24",
"hours": [
null
],
"to": "2019-08-24",
"repeat": "week",
"repeatTo": "2019-08-24",
"title": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'X-API-Key':'API_KEY'
};

fetch('https://api.ganttpro.com/v1.0/projects/customday/{customDayId}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-API-Key': 'API_KEY'
}

r = requests.put('https://api.ganttpro.com/v1.0/projects/customday/{customDayId}', headers = headers)

print(r.json())
require 'rest-client'
require 'json'

headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-API-Key' => 'API_KEY'
}

result = RestClient.put 'https://api.ganttpro.com/v1.0/projects/customday/{customDayId}',
params: {
}, headers: headers

p JSON.parse(result)

PUT /projects/customday/{customDayId}

Update custom day

Body parameter

{
"from": "2019-08-24",
"hours": [
null
],
"to": "2019-08-24",
"repeat": "week",
"repeatTo": "2019-08-24",
"title": "string"
}

Parameters

Path

customDayId
integer required

Body

from
string
hours
array
»start
integer
»end
integer
to
string
repeat
string
repeatTo
string
title
string

Example responses 200 Response

{
"status": "ok"
}

Responses

  • 200
  • 400
  • 401

Projects

Bad query parameter

Unauthorized

Delete custom day

Code samples

DELETE https://api.ganttpro.com/v1.0/projects/customday/{customDayId} HTTP/1.1
Host: api.ganttpro.com
Accept: application/json

const headers = {
'Accept':'application/json',
'X-API-Key':'API_KEY'
};

fetch('https://api.ganttpro.com/v1.0/projects/customday/{customDayId}',
{
method: 'DELETE',

headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json',
'X-API-Key': 'API_KEY'
}

r = requests.delete('https://api.ganttpro.com/v1.0/projects/customday/{customDayId}', headers = headers)

print(r.json())
require 'rest-client'
require 'json'

headers = {
'Accept' => 'application/json',
'X-API-Key' => 'API_KEY'
}

result = RestClient.delete 'https://api.ganttpro.com/v1.0/projects/customday/{customDayId}',
params: {
}, headers: headers

p JSON.parse(result)

DELETE /projects/customday/{customDayId}

Delete custom day

Parameters

Path

customDayId
integer required

Example responses 200 Response

{
"status": "ok"
}

Responses

  • 200
  • 400
  • 401

Ok

Bad query parameter

Unauthorized

Users

Operations with users

Get users list

Code samples

GET https://api.ganttpro.com/v1.0/users HTTP/1.1
Host: api.ganttpro.com
Accept: application/json

const headers = {
'Accept':'application/json',
'X-API-Key':'API_KEY'
};

fetch('https://api.ganttpro.com/v1.0/users',
{
method: 'GET',

headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json',
'X-API-Key': 'API_KEY'
}

r = requests.get('https://api.ganttpro.com/v1.0/users', headers = headers)

print(r.json())
require 'rest-client'
require 'json'

headers = {
'Accept' => 'application/json',
'X-API-Key' => 'API_KEY'
}

result = RestClient.get 'https://api.ganttpro.com/v1.0/users',
params: {
}, headers: headers

p JSON.parse(result)

GET /users

Get users list

Example responses 200 Response

[
{
"id": 0,
"teamId": 0,
"email": "[email protected]",
"firstName": "string",
"lastName": "string",
"username": "string",
"registrationTime": "2019-08-24T14:15:22Z",
"photo": "string",
"locale": "string",
"dateFormat": "string",
"timeFormat": 0,
"settings": {
"notifications": {
"mobile": {
"mention": 0,
"assign": 0,
"comment": 0,
"attachment": 0,
"task_start": 0,
"deadline": 0,
"task_end": 0
},
"desktop": {
"mention": 0,
"assign": 0,
"comment": 0,
"attachment": 0,
"task_start": 0,
"deadline": 0,
"task_end": 0
},
"email": {
"mention": 0,
"assign": 0,
"comment": 0,
"attachment": 0,
"task_start": 0,
"deadline": 0,
"task_end": 0
}
}
}
}
]

Responses

  • 200
  • 400
  • 401

Users

Bad query parameter

Unauthorized

Get user

Code samples

GET https://api.ganttpro.com/v1.0/users/{userId} HTTP/1.1
Host: api.ganttpro.com
Accept: application/json

const headers = {
'Accept':'application/json',
'X-API-Key':'API_KEY'
};

fetch('https://api.ganttpro.com/v1.0/users/{userId}',
{
method: 'GET',

headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json',
'X-API-Key': 'API_KEY'
}

r = requests.get('https://api.ganttpro.com/v1.0/users/{userId}', headers = headers)

print(r.json())
require 'rest-client'
require 'json'

headers = {
'Accept' => 'application/json',
'X-API-Key' => 'API_KEY'
}

result = RestClient.get 'https://api.ganttpro.com/v1.0/users/{userId}',
params: {
}, headers: headers

p JSON.parse(result)

GET /users/{userId}

Get user

Parameters

Path

userId
integer required

Example responses 200 Response

{
"id": 0,
"teamId": 0,
"email": "[email protected]",
"firstName": "string",
"lastName": "string",
"username": "string",
"registrationTime": "2019-08-24T14:15:22Z",
"photo": "string",
"locale": "string",
"dateFormat": "string",
"timeFormat": 0,
"settings": {
"notifications": {
"mobile": {
"mention": 0,
"assign": 0,
"comment": 0,
"attachment": 0,
"task_start": 0,
"deadline": 0,
"task_end": 0
},
"desktop": {
"mention": 0,
"assign": 0,
"comment": 0,
"attachment": 0,
"task_start": 0,
"deadline": 0,
"task_end": 0
},
"email": {
"mention": 0,
"assign": 0,
"comment": 0,
"attachment": 0,
"task_start": 0,
"deadline": 0,
"task_end": 0
}
}
}
}

Responses

  • 200
  • 400
  • 401
  • 404

User

Bad query parameter

Unauthorized

User not found

Update user

Code samples

PUT https://api.ganttpro.com/v1.0/users/{userId} HTTP/1.1
Host: api.ganttpro.com
Content-Type: application/json
Accept: application/json
const inputBody = '{
"locale": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'X-API-Key':'API_KEY'
};

fetch('https://api.ganttpro.com/v1.0/users/{userId}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-API-Key': 'API_KEY'
}

r = requests.put('https://api.ganttpro.com/v1.0/users/{userId}', headers = headers)

print(r.json())
require 'rest-client'
require 'json'

headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-API-Key' => 'API_KEY'
}

result = RestClient.put 'https://api.ganttpro.com/v1.0/users/{userId}',
params: {
}, headers: headers

p JSON.parse(result)

PUT /users/{userId}

Update user

Body parameter

{
"locale": "string"
}

Parameters

Path

userId
integer required

Body

locale
string required
  • en
  • ru
  • es
  • in
  • de
  • fr
  • it
  • pt
  • kr

Example responses 200 Response

{
"status": "ok"
}

Responses

  • 200
  • 400
  • 401

Ok

Bad query parameter

Unauthorized

Update notification settings

Code samples

PUT https://api.ganttpro.com/v1.0/users/{userId}/notification HTTP/1.1
Host: api.ganttpro.com
Content-Type: application/json
Accept: application/json
const inputBody = '{
"envType": "string",
"actionType": "string",
"active": 0
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'X-API-Key':'API_KEY'
};

fetch('https://api.ganttpro.com/v1.0/users/{userId}/notification',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-API-Key': 'API_KEY'
}

r = requests.put('https://api.ganttpro.com/v1.0/users/{userId}/notification', headers = headers)

print(r.json())
require 'rest-client'
require 'json'

headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-API-Key' => 'API_KEY'
}

result = RestClient.put 'https://api.ganttpro.com/v1.0/users/{userId}/notification',
params: {
}, headers: headers

p JSON.parse(result)

PUT /users/{userId}/notification

Update notification settings

Body parameter

{
"envType": "string",
"actionType": "string",
"active": 0
}

Parameters

Path

userId
integer required

Body

envType
string required
  • email
  • desktop
  • mobile
actionType
string required
  • mention
  • assign
  • comment
  • attachment
  • task_start
  • deadline
  • team_invite
  • task_end
active
integer required
  • 0
  • 1

Example responses 200 Response

{
"status": "ok"
}

Responses

  • 200
  • 400
  • 401

Ok

Bad query parameter

Unauthorized

Tasks

Operations with tasks

Get tasks list

Code samples

GET https://api.ganttpro.com/v1.0/tasks?projectId=1 HTTP/1.1
Host: api.ganttpro.com
Accept: application/json

const headers = {
'Accept':'application/json',
'X-API-Key':'API_KEY'
};

fetch('https://api.ganttpro.com/v1.0/tasks?projectId=1',
{
method: 'GET',

headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json',
'X-API-Key': 'API_KEY'
}

r = requests.get('https://api.ganttpro.com/v1.0/tasks', params={
'projectId': [
1
]
}, headers = headers)

print(r.json())
require 'rest-client'
require 'json'

headers = {
'Accept' => 'application/json',
'X-API-Key' => 'API_KEY'
}

result = RestClient.get 'https://api.ganttpro.com/v1.0/tasks',
params: {
'projectId' => 'array[integer]'
}, headers: headers

p JSON.parse(result)

GET /tasks

Get tasks list

Parameters

Query

projectId
array required
status
array
ownerId
array
priority
array
parent
array
color
array
type
array
progress
object
duration
object
estimation
object
startDate
object
endDate
object
createdAt
object
deadline
object
select
array

Example responses 200 Response

[
{
"id": 0,
"projectId": 0,
"ownerId": 0,
"name": "string",
"startDate": "string",
"endDate": "string",
"description": "string",
"status": 1,
"priority": 1,
"parent": 0,
"type": "task",
"progress": 0,
"duration": 0,
"estimation": 0,
"createdAt": "string",
"sortorder": 0,
"deadline": "string",
"color": 1,
"resources": [
{
"resourceId": 0,
"resourceValue": 0
}
],
"comments": [
{
"id": 0,
"projectId": 0,
"taskId": 0,
"userId": 0,
"content": "string",
"comment": "string",
"user": {
"resourceId": 0,
"firstName": "string",
"lastName": "string",
"photo": "string"
},
"createdAt": "string",
"updatedAt": "string"
}
],
"attachments": [
{
"id": 0,
"projectId": 0,
"taskId": 0,
"userId": 0,
"user": {
"resourceId": 0,
"firstName": "string",
"lastName": "string",
"photo": "string"
},
"name": "string",
"attacherExternalAccessToken": "string",
"attachmentType": "file",
"mimeType": "string",
"link": "string",
"size": 0,
"token": "string",
"uploadDate": "string"
}
],
"links": [
{
"id": 0,
"source": 0,
"target": 0,
"type": "0",
"lag": 0
}
],
"timeLogs": [
{
"id": 0,
"taskId": 0,
"resourceId": 0,
"time": 0,
"date": "2019-08-24",
"comment": "string"
}
],
"customFields": [
{
"id": 0,
"name": "string",
"type": "string",
"value": {}
}
]
}
]

Responses

  • 200
  • 400
  • 401

Ok

Bad query parameter

Unauthorized

Create new task

Code samples

POST https://api.ganttpro.com/v1.0/tasks HTTP/1.1
Host: api.ganttpro.com
Content-Type: application/json
Accept: application/json
const inputBody = '{
"projectId": 0,
"name": "string",
"parent": 1,
"startDate": "string",
"endDate": "string",
"description": "string",
"status": 1,
"priority": 1,
"type": "task",
"progress": 1,
"duration": 1,
"estimation": 0,
"deadline": "string",
"color": 1,
"customFields": [
{
"customFieldId": 1,
"value": null
}
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'X-API-Key':'API_KEY'
};

fetch('https://api.ganttpro.com/v1.0/tasks',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-API-Key': 'API_KEY'
}

r = requests.post('https://api.ganttpro.com/v1.0/tasks', headers = headers)

print(r.json())
require 'rest-client'
require 'json'

headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-API-Key' => 'API_KEY'
}

result = RestClient.post 'https://api.ganttpro.com/v1.0/tasks',
params: {
}, headers: headers

p JSON.parse(result)

POST /tasks

Create new task

Defaults values
  • status: 1

  • progress: 0

  • startDate: first working hour of current day

  • duration: 1 working day

  • priority: 3

  • color: 1

  • type: “task”

  • estimation: 0

Dates
  • If you don’t pass a startDate, endDate and duration - startDate will be set as default, duration will be set as default, endDate will be calculated based on duration;

  • If you only pass a startDate (without endDate and duration) - duration will be set as default, endDate will be calculated based on duration;

  • If you only pass a duration (without startDate and endDate) - startDate will be set as default, endDate will be calculated based on duration;

  • If you pass a startDate and endDate (without duration) - duration will be automatically calculated;

  • If you pass a startDate and duration (without endDate) - endDate will be automatically calculated;

  • If you pass endDate and duration (without startDate) - startDate will be set as default, duration and endDate will be calculated;

  • If you pass startDate, endDate and duration - endDate will be ignored and automatically re-calculated based on duration;

Body parameter

{
"projectId": 0,
"name": "string",
"parent": 1,
"startDate": "string",
"endDate": "string",
"description": "string",
"status": 1,
"priority": 1,
"type": "task",
"progress": 1,
"duration": 1,
"estimation": 0,
"deadline": "string",
"color": 1,
"customFields": [
{
"customFieldId": 1,
"value": null
}
]
}

Parameters

Body

projectId
integer required
name
string required
parent
integer
startDate
string
endDate
string
description
string
status
integer
priority
integer
type
string
progress
number
  • min (including): 0
  • max (including): 1
duration
integer
estimation
integer
deadline
string
color
integer
  • min (including): 1
  • max (including): 18
customFields
array
»customFieldId
integer
»value
undefined

Example responses 200 Response

{
"item": {
"id": 0,
"projectId": 0,
"ownerId": 0,
"name": "string",
"startDate": "string",
"endDate": "string",
"description": "string",
"status": 1,
"priority": 1,
"parent": 0,
"type": "task",
"progress": 0,
"duration": 0,
"estimation": 0,
"createdAt": "string",
"sortorder": 0,
"deadline": "string",
"color": 1,
"resources": [
{
"resourceId": 0,
"resourceValue": 0
}
],
"comments": [
{
"id": 0,
"projectId": 0,
"taskId": 0,
"userId": 0,
"content": "string",
"comment": "string",
"user": {
"resourceId": 0,
"firstName": "string",
"lastName": "string",
"photo": "string"
},
"createdAt": "string",
"updatedAt": "string"
}
],
"attachments": [
{
"id": 0,
"projectId": 0,
"taskId": 0,
"userId": 0,
"user": {
"resourceId": 0,
"firstName": "string",
"lastName": "string",
"photo": "string"
},
"name": "string",
"attacherExternalAccessToken": "string",
"attachmentType": "file",
"mimeType": "string",
"link": "string",
"size": 0,
"token": "string",
"uploadDate": "string"
}
],
"links": [
{
"id": 0,
"source": 0,
"target": 0,
"type": "0",
"lag": 0
}
],
"timeLogs": [
{
"id": 0,
"taskId": 0,
"resourceId": 0,
"time": 0,
"date": "2019-08-24",
"comment": "string"
}
],
"customFields": [
{
"id": 0,
"name": "string",
"type": "string",
"value": {}
}
]
}
}

Responses

  • 200
  • 400
  • 401

Ok

Bad query parameter

Unauthorized

Get task

Code samples

GET https://api.ganttpro.com/v1.0/tasks/{taskId} HTTP/1.1
Host: api.ganttpro.com
Accept: application/json

const headers = {
'Accept':'application/json',
'X-API-Key':'API_KEY'
};

fetch('https://api.ganttpro.com/v1.0/tasks/{taskId}',
{
method: 'GET',

headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json',
'X-API-Key': 'API_KEY'
}

r = requests.get('https://api.ganttpro.com/v1.0/tasks/{taskId}', headers = headers)

print(r.json())
require 'rest-client'
require 'json'

headers = {
'Accept' => 'application/json',
'X-API-Key' => 'API_KEY'
}

result = RestClient.get 'https://api.ganttpro.com/v1.0/tasks/{taskId}',
params: {
}, headers: headers

p JSON.parse(result)

GET /tasks/{taskId}

Get tasks list

Parameters

Path

taskId
integer required

Example responses 200 Response

[
{
"id": 0,
"projectId": 0,
"ownerId": 0,
"name": "string",
"startDate": "string",
"endDate": "string",
"description": "string",
"status": 1,
"priority": 1,
"parent": 0,
"type": "task",
"progress": 0,
"duration": 0,
"estimation": 0,
"createdAt": "string",
"sortorder": 0,
"deadline": "string",
"color": 1,
"resources": [
{
"resourceId": 0,
"resourceValue": 0
}
],
"comments": [
{
"id": 0,
"projectId": 0,
"taskId": 0,
"userId": 0,
"content": "string",
"comment": "string",
"user": {
"resourceId": 0,
"firstName": "string",
"lastName": "string",
"photo": "string"
},
"createdAt": "string",
"updatedAt": "string"
}
],
"attachments": [
{
"id": 0,
"projectId": 0,
"taskId": 0,
"userId": 0,
"user": {
"resourceId": 0,
"firstName": "string",
"lastName": "string",
"photo": "string"
},
"name": "string",
"attacherExternalAccessToken": "string",
"attachmentType": "file",
"mimeType": "string",
"link": "string",
"size": 0,
"token": "string",
"uploadDate": "string"
}
],
"links": [
{
"id": 0,
"source": 0,
"target": 0,
"type": "0",
"lag": 0
}
],
"timeLogs": [
{
"id": 0,
"taskId": 0,
"resourceId": 0,
"time": 0,
"date": "2019-08-24",
"comment": "string"
}
],
"customFields": [
{
"id": 0,
"name": "string",
"type": "string",
"value": {}
}
]
}
]

Responses

  • 200
  • 400
  • 401
  • 404

Task

Bad query parameter

Unauthorized

Task not found

Update task

Code samples

PUT https://api.ganttpro.com/v1.0/tasks/{taskId} HTTP/1.1
Host: api.ganttpro.com
Content-Type: application/json
Accept: application/json
const inputBody = '{
"name": "string",
"description": "string",
"status": 0,
"startDate": "string",
"endDate": "string",
"duration": 0,
"priority": 0,
"progress": 1,
"parent": 0,
"estimation": 0,
"deadline": "string",
"color": 1,
"customFields": [
{
"customFieldId": 1,
"value": null
}
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'X-API-Key':'API_KEY'
};

fetch('https://api.ganttpro.com/v1.0/tasks/{taskId}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-API-Key': 'API_KEY'
}

r = requests.put('https://api.ganttpro.com/v1.0/tasks/{taskId}', headers = headers)

print(r.json())
require 'rest-client'
require 'json'

headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-API-Key' => 'API_KEY'
}

result = RestClient.put 'https://api.ganttpro.com/v1.0/tasks/{taskId}',
params: {
}, headers: headers

p JSON.parse(result)

PUT /tasks/{taskId}

Update task

Dates
  • If you only pass a startDate (without endDate and duration) - endDate will be automatically re-calculated;

  • If you only pass a duration (without startDate and endDate) - endDate will be automatically re-calculated;

  • If you only pass an endDate (without startDate and duration) - duration will be automatically re-calculated;

  • If you pass startDate and endDate (without duration) - duration will be automatically re-calculated;

  • If you pass startDate and duration (without endDate) - endDate will be automatically re-calculated;

  • If you pass endDate and duration (without startDate) - endDate will be automatically re-calculated;

  • If you pass startDate, endDate and duration - endDate will be ignored and automatically re-calculated based on duration;

Body parameter

{
"name": "string",
"description": "string",
"status": 0,
"startDate": "string",
"endDate": "string",
"duration": 0,
"priority": 0,
"progress": 1,
"parent": 0,
"estimation": 0,
"deadline": "string",
"color": 1,
"customFields": [
{
"customFieldId": 1,
"value": null
}
]
}

Parameters

Path

taskId
integer required

Body

name
string
description
string
status
integer
  • 1 - Open
  • 2 - In progress
  • 3 - Done
  • 4 - Closed
startDate
string
endDate
string
duration
integer
priority
integer
  • 1 - Lowest
  • 2 - Low
  • 3 - Medium
  • 4 - High
  • 5 - Highest
progress
number
  • min (including): 0
  • max (including): 1
parent
integer
estimation
integer
deadline
string
color
integer
  • min (including): 1
  • max (including): 18
customFields
array
»customFieldId
integer
»value
undefined

Example responses 200 Response

{
"status": "ok"
}

Responses

  • 200
  • 400
  • 401

Ok

Bad query parameter

Unauthorized

Delete task

Code samples

DELETE https://api.ganttpro.com/v1.0/tasks/{taskId} HTTP/1.1
Host: api.ganttpro.com
Accept: application/json

const headers = {
'Accept':'application/json',
'X-API-Key':'API_KEY'
};

fetch('https://api.ganttpro.com/v1.0/tasks/{taskId}',
{
method: 'DELETE',

headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json',
'X-API-Key': 'API_KEY'
}

r = requests.delete('https://api.ganttpro.com/v1.0/tasks/{taskId}', headers = headers)

print(r.json())
require 'rest-client'
require 'json'

headers = {
'Accept' => 'application/json',
'X-API-Key' => 'API_KEY'
}

result = RestClient.delete 'https://api.ganttpro.com/v1.0/tasks/{taskId}',
params: {
}, headers: headers

p JSON.parse(result)

DELETE /tasks/{taskId}

Delete task

Parameters

Path

taskId
integer required

Example responses 200 Response

{
"status": "ok"
}

Responses

  • 200
  • 400
  • 401
  • 404

Ok

Bad query parameter

Unauthorized

Task not found

Update task resource

Code samples

PUT https://api.ganttpro.com/v1.0/tasks/{taskId}/assignResource HTTP/1.1
Host: api.ganttpro.com
Content-Type: application/json
Accept: application/json
const inputBody = '{
"resources": [
{
"resourceId": 0,
"resourceValue": 0
}
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'X-API-Key':'API_KEY'
};

fetch('https://api.ganttpro.com/v1.0/tasks/{taskId}/assignResource',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-API-Key': 'API_KEY'
}

r = requests.put('https://api.ganttpro.com/v1.0/tasks/{taskId}/assignResource', headers = headers)

print(r.json())
require 'rest-client'
require 'json'

headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-API-Key' => 'API_KEY'
}

result = RestClient.put 'https://api.ganttpro.com/v1.0/tasks/{taskId}/assignResource',
params: {
}, headers: headers

p JSON.parse(result)

PUT /tasks/{taskId}/assignResource

Body parameter

{
"resources": [
{
"resourceId": 0,
"resourceValue": 0
}
]
}

Parameters

Path

taskId
integer required

Body

resources
array required
»resourceId
integer
»resourceValue
integer

Example responses 200 Response

{
"status": "ok"
}

Responses

  • 200
  • 400
  • 401

Ok

Bad query parameter

Unauthorized

Assign resources to task

Code samples

POST https://api.ganttpro.com/v1.0/tasks/{taskId}/assignResource HTTP/1.1
Host: api.ganttpro.com
Content-Type: application/json
Accept: application/json
const inputBody = '{
"resources": [
{
"resourceId": 0,
"resourceValue": 0
}
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'X-API-Key':'API_KEY'
};

fetch('https://api.ganttpro.com/v1.0/tasks/{taskId}/assignResource',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-API-Key': 'API_KEY'
}

r = requests.post('https://api.ganttpro.com/v1.0/tasks/{taskId}/assignResource', headers = headers)

print(r.json())
require 'rest-client'
require 'json'

headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-API-Key' => 'API_KEY'
}

result = RestClient.post 'https://api.ganttpro.com/v1.0/tasks/{taskId}/assignResource',
params: {
}, headers: headers

p JSON.parse(result)

POST /tasks/{taskId}/assignResource

Assign resources to task

Body parameter

{
"resources": [
{
"resourceId": 0,
"resourceValue": 0
}
]
}

Parameters

Path

taskId
integer required

Body

resources
array required
»resourceId
integer
»resourceValue
integer

Example responses 200 Response

{
"status": "ok"
}

Responses

  • 200
  • 400
  • 401

Ok

Bad query parameter

Unauthorized

Delete resource from task

Code samples

DELETE https://api.ganttpro.com/v1.0/tasks/{taskId}/assignResource?resourceId=0 HTTP/1.1
Host: api.ganttpro.com
Accept: application/json

const headers = {
'Accept':'application/json',
'X-API-Key':'API_KEY'
};

fetch('https://api.ganttpro.com/v1.0/tasks/{taskId}/assignResource?resourceId=0',
{
method: 'DELETE',

headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json',
'X-API-Key': 'API_KEY'
}

r = requests.delete('https://api.ganttpro.com/v1.0/tasks/{taskId}/assignResource', params={
'resourceId': [
0
]
}, headers = headers)

print(r.json())
require 'rest-client'
require 'json'

headers = {
'Accept' => 'application/json',
'X-API-Key' => 'API_KEY'
}

result = RestClient.delete 'https://api.ganttpro.com/v1.0/tasks/{taskId}/assignResource',
params: {
'resourceId' => 'array[integer]'
}, headers: headers

p JSON.parse(result)

DELETE /tasks/{taskId}/assignResource

Delete assign from task

Parameters

Path

taskId
integer required

Query

resourceId
array required

Example responses 200 Response

{
"status": "ok"
}

Responses

  • 200
  • 400
  • 401

Ok

Bad query parameter

Unauthorized

Resources

Operations with resources

Get resources list

Code samples

GET https://api.ganttpro.com/v1.0/resources HTTP/1.1
Host: api.ganttpro.com
Accept: application/json

const headers = {
'Accept':'application/json',
'X-API-Key':'API_KEY'
};

fetch('https://api.ganttpro.com/v1.0/resources',
{
method: 'GET',

headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json',
'X-API-Key': 'API_KEY'
}

r = requests.get('https://api.ganttpro.com/v1.0/resources', headers = headers)

print(r.json())
require 'rest-client'
require 'json'

headers = {
'Accept' => 'application/json',
'X-API-Key' => 'API_KEY'
}

result = RestClient.get 'https://api.ganttpro.com/v1.0/resources',
params: {
}, headers: headers

p JSON.parse(result)

GET /resources

Get resources list

Example responses 200 Response

[
{
"id": 0,
"photo": "string",
"name": "string",
"email": "[email protected]",
"userId": 0,
"colorId": 0,
"description": "string",
"teamId": 0,
"accountRoleId": 0,
"resourceProjects": [
{
"projectId": 0,
"projectRoleId": 0,
"cost": 0,
"type": 0,
"rights": null
}
],
"customDays": [
null
],
"workingHours": 0,
"workingDays": [
1
]
}
]

Responses

  • 200
  • 400
  • 401

Ok

Bad query parameter

Unauthorized

Comments

Operations with comments

Get comments list for tasks

Code samples

GET https://api.ganttpro.com/v1.0/comments?taskId=0 HTTP/1.1
Host: api.ganttpro.com
Accept: application/json

const headers = {
'Accept':'application/json',
'X-API-Key':'API_KEY'
};

fetch('https://api.ganttpro.com/v1.0/comments?taskId=0',
{
method: 'GET',

headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json',
'X-API-Key': 'API_KEY'
}

r = requests.get('https://api.ganttpro.com/v1.0/comments', params={
'taskId': [
0
]
}, headers = headers)

print(r.json())
require 'rest-client'
require 'json'

headers = {
'Accept' => 'application/json',
'X-API-Key' => 'API_KEY'
}

result = RestClient.get 'https://api.ganttpro.com/v1.0/comments',
params: {
'taskId' => 'array[integer]'
}, headers: headers

p JSON.parse(result)

GET /comments

Get comments list

Parameters

Query

taskId
array required

Example responses 200 Response

[
{
"id": 0,
"projectId": 0,
"taskId": 0,
"userId": 0,
"content": "string",
"comment": "string",
"user": {
"resourceId": 0,
"firstName": "string",
"lastName": "string",
"photo": "string"
},
"createdAt": "string",
"updatedAt": "string"
}
]

Responses

  • 200
  • 400
  • 401

Ok

Bad query parameter

Unauthorized

Add comments to task

Code samples

POST https://api.ganttpro.com/v1.0/comments HTTP/1.1
Host: api.ganttpro.com
Content-Type: application/json
Accept: application/json
const inputBody = '{
"taskId": 1,
"userId": 1,
"content": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'X-API-Key':'API_KEY'
};

fetch('https://api.ganttpro.com/v1.0/comments',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-API-Key': 'API_KEY'
}

r = requests.post('https://api.ganttpro.com/v1.0/comments', headers = headers)

print(r.json())
require 'rest-client'
require 'json'

headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-API-Key' => 'API_KEY'
}

result = RestClient.post 'https://api.ganttpro.com/v1.0/comments',
params: {
}, headers: headers

p JSON.parse(result)

POST /comments

Add comments to task

Body parameter

{
"taskId": 1,
"userId": 1,
"content": "string"
}

Parameters

Body

taskId
integer required
userId
integer required
content
string required

Example responses 200 Response

{
"item": {
"id": 0,
"projectId": 0,
"taskId": 0,
"userId": 0,
"content": "string",
"comment": "string",
"user": {
"resourceId": 0,
"firstName": "string",
"lastName": "string",
"photo": "string"
},
"createdAt": "string",
"updatedAt": "string"
}
}

Responses

  • 200
  • 400
  • 401

Ok

Bad query parameter

Unauthorized

Update comment

Code samples

PUT https://api.ganttpro.com/v1.0/comments/{commentId} HTTP/1.1
Host: api.ganttpro.com
Content-Type: application/json
Accept: application/json
const inputBody = '{
"content": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'X-API-Key':'API_KEY'
};

fetch('https://api.ganttpro.com/v1.0/comments/{commentId}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-API-Key': 'API_KEY'
}

r = requests.put('https://api.ganttpro.com/v1.0/comments/{commentId}', headers = headers)

print(r.json())
require 'rest-client'
require 'json'

headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-API-Key' => 'API_KEY'
}

result = RestClient.put 'https://api.ganttpro.com/v1.0/comments/{commentId}',
params: {
}, headers: headers

p JSON.parse(result)

PUT /comments/{commentId}

Body parameter

{
"content": "string"
}

Parameters

Path

commentId
integer required

Body

content
string required

Example responses 200 Response

{
"status": "ok"
}

Responses

  • 200
  • 400
  • 401

Ok

Bad query parameter

Unauthorized

Delete comment

Code samples

DELETE https://api.ganttpro.com/v1.0/comments/{commentId} HTTP/1.1
Host: api.ganttpro.com
Accept: application/json

const headers = {
'Accept':'application/json',
'X-API-Key':'API_KEY'
};

fetch('https://api.ganttpro.com/v1.0/comments/{commentId}',
{
method: 'DELETE',

headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json',
'X-API-Key': 'API_KEY'
}

r = requests.delete('https://api.ganttpro.com/v1.0/comments/{commentId}', headers = headers)

print(r.json())
require 'rest-client'
require 'json'

headers = {
'Accept' => 'application/json',
'X-API-Key' => 'API_KEY'
}

result = RestClient.delete 'https://api.ganttpro.com/v1.0/comments/{commentId}',
params: {
}, headers: headers

p JSON.parse(result)

DELETE /comments/{commentId}

Delete comment

Parameters

Path

commentId
integer required

Example responses 200 Response

{
"status": "ok"
}

Responses

  • 200
  • 400
  • 401

Ok

Bad query parameter

Unauthorized

Get comments list for tasks by project id

Code samples

GET https://api.ganttpro.com/v1.0/comments/getByProjectId?projectId=0 HTTP/1.1
Host: api.ganttpro.com
Accept: application/json

const headers = {
'Accept':'application/json',
'X-API-Key':'API_KEY'
};

fetch('https://api.ganttpro.com/v1.0/comments/getByProjectId?projectId=0',
{
method: 'GET',

headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json',
'X-API-Key': 'API_KEY'
}

r = requests.get('https://api.ganttpro.com/v1.0/comments/getByProjectId', params={
'projectId': '0'
}, headers = headers)

print(r.json())
require 'rest-client'
require 'json'

headers = {
'Accept' => 'application/json',
'X-API-Key' => 'API_KEY'
}

result = RestClient.get 'https://api.ganttpro.com/v1.0/comments/getByProjectId',
params: {
'projectId' => 'integer'
}, headers: headers

p JSON.parse(result)

GET /comments/getByProjectId

Get comments list for tasks by project id

Parameters

Query

projectId
integer required

Example responses 200 Response

[
{
"id": 0,
"projectId": 0,
"taskId": 0,
"userId": 0,
"content": "string",
"comment": "string",
"user": {
"resourceId": 0,
"firstName": "string",
"lastName": "string",
"photo": "string"
},
"createdAt": "string",
"updatedAt": "string"
}
]

Responses

  • 200
  • 400
  • 401

Ok

Bad query parameter

Unauthorized

Attachments

Operations with attachments

Get attachments list for tasks

Code samples

GET https://api.ganttpro.com/v1.0/attachments?taskId=1 HTTP/1.1
Host: api.ganttpro.com
Accept: application/json

const headers = {
'Accept':'application/json',
'X-API-Key':'API_KEY'
};

fetch('https://api.ganttpro.com/v1.0/attachments?taskId=1',
{
method: 'GET',

headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json',
'X-API-Key': 'API_KEY'
}

r = requests.get('https://api.ganttpro.com/v1.0/attachments', params={
'taskId': [
1
]
}, headers = headers)

print(r.json())
require 'rest-client'
require 'json'

headers = {
'Accept' => 'application/json',
'X-API-Key' => 'API_KEY'
}

result = RestClient.get 'https://api.ganttpro.com/v1.0/attachments',
params: {
'taskId' => 'array[integer]'
}, headers: headers

p JSON.parse(result)

GET /attachments

Get attachments list

Parameters

Query

taskId
array required

Example responses 200 Response

[
{
"id": 0,
"projectId": 0,
"taskId": 0,
"userId": 0,
"user": {
"resourceId": 0,
"firstName": "string",
"lastName": "string",
"photo": "string"
},
"name": "string",
"attacherExternalAccessToken": "string",
"attachmentType": "file",
"mimeType": "string",
"link": "string",
"size": 0,
"token": "string",
"uploadDate": "string"
}
]

Responses

  • 200
  • 400
  • 401

Ok

Bad query parameter

Unauthorized

Add attachment to task

Code samples

POST https://api.ganttpro.com/v1.0/attachments HTTP/1.1
Host: api.ganttpro.com
Content-Type: multipart/form-data
Accept: application/json
const inputBody = '{
"taskId": 0,
"userId": 0,
"file": "string"
}';
const headers = {
'Content-Type':'multipart/form-data',
'Accept':'application/json',
'X-API-Key':'API_KEY'
};

fetch('https://api.ganttpro.com/v1.0/attachments',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'multipart/form-data',
'Accept': 'application/json',
'X-API-Key': 'API_KEY'
}

r = requests.post('https://api.ganttpro.com/v1.0/attachments', headers = headers)

print(r.json())
require 'rest-client'
require 'json'

headers = {
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
'X-API-Key' => 'API_KEY'
}

result = RestClient.post 'https://api.ganttpro.com/v1.0/attachments',
params: {
}, headers: headers

p JSON.parse(result)

POST /attachments

Add attachment to task

Body parameter

taskId: 0
userId: 0
file: string

Parameters

Body

taskId
integer required
userId
integer required
file
string

Example responses 200 Response

{
"item": {
"id": 0,
"projectId": 0,
"taskId": 0,
"userId": 0,
"user": {
"resourceId": 0,
"firstName": "string",
"lastName": "string",
"photo": "string"
},
"name": "string",
"attacherExternalAccessToken": "string",
"attachmentType": "file",
"mimeType": "string",
"link": "string",
"size": 0,
"token": "string",
"uploadDate": "string"
},
"items": [
{
"id": 0,
"projectId": 0,
"taskId": 0,
"userId": 0,
"user": {
"resourceId": 0,
"firstName": "string",
"lastName": "string",
"photo": "string"
},
"name": "string",
"attacherExternalAccessToken": "string",
"attachmentType": "file",
"mimeType": "string",
"link": "string",
"size": 0,
"token": "string",
"uploadDate": "string"
}
]
}

Responses

  • 200
  • 400
  • 401

Ok

Bad query parameter

Unauthorized

Delete attachment

Code samples

DELETE https://api.ganttpro.com/v1.0/attachments/{attachmentId} HTTP/1.1
Host: api.ganttpro.com
Accept: application/json

const headers = {
'Accept':'application/json',
'X-API-Key':'API_KEY'
};

fetch('https://api.ganttpro.com/v1.0/attachments/{attachmentId}',
{
method: 'DELETE',

headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json',
'X-API-Key': 'API_KEY'
}

r = requests.delete('https://api.ganttpro.com/v1.0/attachments/{attachmentId}', headers = headers)

print(r.json())
require 'rest-client'
require 'json'

headers = {
'Accept' => 'application/json',
'X-API-Key' => 'API_KEY'
}

result = RestClient.delete 'https://api.ganttpro.com/v1.0/attachments/{attachmentId}',
params: {
}, headers: headers

p JSON.parse(result)

DELETE /attachments/{attachmentId}

Delete attachment

Parameters

Path

attachmentId
integer required

Example responses 200 Response

{
"status": "ok"
}

Responses

  • 200
  • 400
  • 401

Ok

Bad query parameter

Unauthorized

Delete attachments by ids

Code samples

DELETE https://api.ganttpro.com/v1.0/attachments/delete/byIds HTTP/1.1
Host: api.ganttpro.com
Content-Type: application/json
Accept: application/json
const inputBody = '{
"attachmentIds": [
0
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'X-API-Key':'API_KEY'
};

fetch('https://api.ganttpro.com/v1.0/attachments/delete/byIds',
{
method: 'DELETE',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-API-Key': 'API_KEY'
}

r = requests.delete('https://api.ganttpro.com/v1.0/attachments/delete/byIds', headers = headers)

print(r.json())
require 'rest-client'
require 'json'

headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-API-Key' => 'API_KEY'
}

result = RestClient.delete 'https://api.ganttpro.com/v1.0/attachments/delete/byIds',
params: {
}, headers: headers

p JSON.parse(result)

DELETE /attachments/delete/byIds

Delete attachment by ids

Body parameter

{
"attachmentIds": [
0
]
}

Parameters

Body

attachmentIds
array required

Example responses 200 Response

{
"status": "ok"
}

Responses

  • 200
  • 400
  • 401

Ok

Bad query parameter

Unauthorized

Get attachments list for tasks by project id

Code samples

GET https://api.ganttpro.com/v1.0/attachments/getByProjectId?projectId=0 HTTP/1.1
Host: api.ganttpro.com
Accept: application/json

const headers = {
'Accept':'application/json',
'X-API-Key':'API_KEY'
};

fetch('https://api.ganttpro.com/v1.0/attachments/getByProjectId?projectId=0',
{
method: 'GET',

headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json',
'X-API-Key': 'API_KEY'
}

r = requests.get('https://api.ganttpro.com/v1.0/attachments/getByProjectId', params={
'projectId': '0'
}, headers = headers)

print(r.json())
require 'rest-client'
require 'json'

headers = {
'Accept' => 'application/json',
'X-API-Key' => 'API_KEY'
}

result = RestClient.get 'https://api.ganttpro.com/v1.0/attachments/getByProjectId',
params: {
'projectId' => 'integer'
}, headers: headers

p JSON.parse(result)

GET /attachments/getByProjectId

Get attachments list for tasks by project id

Parameters

Query

projectId
integer required

Example responses 200 Response

[
{
"id": 0,
"projectId": 0,
"taskId": 0,
"userId": 0,
"user": {
"resourceId": 0,
"firstName": "string",
"lastName": "string",
"photo": "string"
},
"name": "string",
"attacherExternalAccessToken": "string",
"attachmentType": "file",
"mimeType": "string",
"link": "string",
"size": 0,
"token": "string",
"uploadDate": "string"
}
]

Responses

  • 200
  • 400
  • 401

Ok

Bad query parameter

Unauthorized

Languages

Operations with languages

Get languages

Code samples

GET https://api.ganttpro.com/v1.0/languages HTTP/1.1
Host: api.ganttpro.com
Accept: application/json

const headers = {
'Accept':'application/json',
'X-API-Key':'API_KEY'
};

fetch('https://api.ganttpro.com/v1.0/languages',
{
method: 'GET',

headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json',
'X-API-Key': 'API_KEY'
}

r = requests.get('https://api.ganttpro.com/v1.0/languages', headers = headers)

print(r.json())
require 'rest-client'
require 'json'

headers = {
'Accept' => 'application/json',
'X-API-Key' => 'API_KEY'
}

result = RestClient.get 'https://api.ganttpro.com/v1.0/languages',
params: {
}, headers: headers

p JSON.parse(result)

GET /languages

Get languages

Example responses 200 Response

[
{
"key": "string",
"code": "string",
"title": "string"
}
]

Responses

  • 200
  • 400
  • 401

Ok

Bad query parameter

Unauthorized

Links

Operations with links

Code samples

POST https://api.ganttpro.com/v1.0/links HTTP/1.1
Host: api.ganttpro.com
Content-Type: application/json
Accept: application/json
const inputBody = '{
"source": 1,
"target": 1,
"type": "0",
"lag": 0
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'X-API-Key':'API_KEY'
};

fetch('https://api.ganttpro.com/v1.0/links',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-API-Key': 'API_KEY'
}

r = requests.post('https://api.ganttpro.com/v1.0/links', headers = headers)

print(r.json())
require 'rest-client'
require 'json'

headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-API-Key' => 'API_KEY'
}

result = RestClient.post 'https://api.ganttpro.com/v1.0/links',
params: {
}, headers: headers

p JSON.parse(result)

POST /links

Create new link

Body parameter

{
"source": 1,
"target": 1,
"type": "0",
"lag": 0
}

Body

source
integer required
target
integer required
type
string required
lag
integer

Example responses 200 Response

{
"id": 0,
"source": 0,
"target": 0,
"type": "0",
"lag": 0
}
  • 200
  • 400
  • 401

Ok

Bad query parameter

Unauthorized

Code samples

GET https://api.ganttpro.com/v1.0/links/{linkId} HTTP/1.1
Host: api.ganttpro.com
Accept: application/json

const headers = {
'Accept':'application/json',
'X-API-Key':'API_KEY'
};

fetch('https://api.ganttpro.com/v1.0/links/{linkId}',
{
method: 'GET',

headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json',
'X-API-Key': 'API_KEY'
}

r = requests.get('https://api.ganttpro.com/v1.0/links/{linkId}', headers = headers)

print(r.json())
require 'rest-client'
require 'json'

headers = {
'Accept' => 'application/json',
'X-API-Key' => 'API_KEY'
}

result = RestClient.get 'https://api.ganttpro.com/v1.0/links/{linkId}',
params: {
}, headers: headers

p JSON.parse(result)

GET /links/{linkId}

Get link

Path

linkId
integer required

Example responses 200 Response

{
"id": 0,
"source": 0,
"target": 0,
"type": "0",
"lag": 0
}
  • 200
  • 400
  • 401

Ok

Bad query parameter

Unauthorized

Code samples

PUT https://api.ganttpro.com/v1.0/links/{linkId} HTTP/1.1
Host: api.ganttpro.com
Content-Type: application/json
Accept: application/json
const inputBody = '{
"type": "0",
"lag": 0
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'X-API-Key':'API_KEY'
};

fetch('https://api.ganttpro.com/v1.0/links/{linkId}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-API-Key': 'API_KEY'
}

r = requests.put('https://api.ganttpro.com/v1.0/links/{linkId}', headers = headers)

print(r.json())
require 'rest-client'
require 'json'

headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-API-Key' => 'API_KEY'
}

result = RestClient.put 'https://api.ganttpro.com/v1.0/links/{linkId}',
params: {
}, headers: headers

p JSON.parse(result)

PUT /links/{linkId}

Update link

Body parameter

{
"type": "0",
"lag": 0
}

Path

linkId
integer required

Body

type
string
lag
integer

Example responses 200 Response

{
"status": "ok"
}
  • 200
  • 400
  • 401

Ok

Bad query parameter

Unauthorized

Code samples

DELETE https://api.ganttpro.com/v1.0/links/{linkId} HTTP/1.1
Host: api.ganttpro.com
Accept: application/json

const headers = {
'Accept':'application/json',
'X-API-Key':'API_KEY'
};

fetch('https://api.ganttpro.com/v1.0/links/{linkId}',
{
method: 'DELETE',

headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json',
'X-API-Key': 'API_KEY'
}

r = requests.delete('https://api.ganttpro.com/v1.0/links/{linkId}', headers = headers)

print(r.json())
require 'rest-client'
require 'json'

headers = {
'Accept' => 'application/json',
'X-API-Key' => 'API_KEY'
}

result = RestClient.delete 'https://api.ganttpro.com/v1.0/links/{linkId}',
params: {
}, headers: headers

p JSON.parse(result)

DELETE /links/{linkId}

Delete link

Path

linkId
integer required

Example responses 200 Response

{
"status": "ok"
}
  • 200
  • 400
  • 401

Ok

Bad query parameter

Unauthorized

Roles

Get account roles

Code samples

GET https://api.ganttpro.com/v1.0/roles/account HTTP/1.1
Host: api.ganttpro.com
Accept: application/json

const headers = {
'Accept':'application/json'
};

fetch('https://api.ganttpro.com/v1.0/roles/account',
{
method: 'GET',

headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}

r = requests.get('https://api.ganttpro.com/v1.0/roles/account', headers = headers)

print(r.json())
require 'rest-client'
require 'json'

headers = {
'Accept' => 'application/json'
}

result = RestClient.get 'https://api.ganttpro.com/v1.0/roles/account',
params: {
}, headers: headers

p JSON.parse(result)

GET /roles/account

Get account roles

Example responses 200 Response

[
{
"id": 0,
"teamId": 0,
"title": "string",
"rights": [
{
"id": 0,
"title": "string",
"bit": 0,
"bitKey": "string",
"accountRightId": 0,
"status": true
}
],
"defaultType": "string"
}
]

Responses

  • 200
  • 400
  • 401

Get list of account roles

Bad query parameter

Unauthorized

Get project roles

Code samples

GET https://api.ganttpro.com/v1.0/roles/project HTTP/1.1
Host: api.ganttpro.com
Accept: application/json

const headers = {
'Accept':'application/json',
'X-API-Key':'API_KEY'
};

fetch('https://api.ganttpro.com/v1.0/roles/project',
{
method: 'GET',

headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json',
'X-API-Key': 'API_KEY'
}

r = requests.get('https://api.ganttpro.com/v1.0/roles/project', headers = headers)

print(r.json())
require 'rest-client'
require 'json'

headers = {
'Accept' => 'application/json',
'X-API-Key' => 'API_KEY'
}

result = RestClient.get 'https://api.ganttpro.com/v1.0/roles/project',
params: {
}, headers: headers

p JSON.parse(result)

GET /roles/project

Get project roles

Example responses 200 Response

[
{
"id": 0,
"teamId": 0,
"title": "string",
"rights": [
{
"id": 0,
"title": "string",
"bit": 0,
"bitKey": "string",
"projectRightId": 0,
"status": true
}
],
"defaultType": "string"
}
]

Responses

  • 200
  • 400
  • 401

Get list of a project roles

Bad query parameter

Unauthorized

Time Logs

Get time log list for tasks

Code samples

GET https://api.ganttpro.com/v1.0/timeLogs?taskId=0 HTTP/1.1
Host: api.ganttpro.com
Accept: application/json

const headers = {
'Accept':'application/json',
'X-API-Key':'API_KEY'
};

fetch('https://api.ganttpro.com/v1.0/timeLogs?taskId=0',
{
method: 'GET',

headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json',
'X-API-Key': 'API_KEY'
}

r = requests.get('https://api.ganttpro.com/v1.0/timeLogs', params={
'taskId': [
0
]
}, headers = headers)

print(r.json())
require 'rest-client'
require 'json'

headers = {
'Accept' => 'application/json',
'X-API-Key' => 'API_KEY'
}

result = RestClient.get 'https://api.ganttpro.com/v1.0/timeLogs',
params: {
'taskId' => 'array[integer]'
}, headers: headers

p JSON.parse(result)

GET /timeLogs

Get time log list

Parameters

Query

taskId
array required

Example responses 200 Response

[
{
"id": 0,
"taskId": 0,
"resourceId": 0,
"time": 0,
"date": "2019-08-24",
"comment": "string"
}
]

Responses

  • 200
  • 400
  • 401

Ok

Bad query parameter

Unauthorized

Add time log to task

Code samples

POST https://api.ganttpro.com/v1.0/timeLogs HTTP/1.1
Host: api.ganttpro.com
Content-Type: application/json
Accept: application/json
const inputBody = '{
"taskId": 1,
"resourceId": 1,
"time": 1,
"date": "2019-08-24",
"comment": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'X-API-Key':'API_KEY'
};

fetch('https://api.ganttpro.com/v1.0/timeLogs',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-API-Key': 'API_KEY'
}

r = requests.post('https://api.ganttpro.com/v1.0/timeLogs', headers = headers)

print(r.json())
require 'rest-client'
require 'json'

headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-API-Key' => 'API_KEY'
}

result = RestClient.post 'https://api.ganttpro.com/v1.0/timeLogs',
params: {
}, headers: headers

p JSON.parse(result)

POST /timeLogs

Add time log to task

Body parameter

{
"taskId": 1,
"resourceId": 1,
"time": 1,
"date": "2019-08-24",
"comment": "string"
}

Parameters

Body

taskId
integer required
resourceId
integer required
time
integer required
date
string
comment
string

Example responses 200 Response

{
"status": "ok"
}

Responses

  • 200
  • 400
  • 401

Ok

Bad query parameter

Unauthorized

Get time log

Code samples

GET https://api.ganttpro.com/v1.0/timeLogs/{timeLogId} HTTP/1.1
Host: api.ganttpro.com
Accept: application/json

const headers = {
'Accept':'application/json',
'X-API-Key':'API_KEY'
};

fetch('https://api.ganttpro.com/v1.0/timeLogs/{timeLogId}',
{
method: 'GET',

headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json',
'X-API-Key': 'API_KEY'
}

r = requests.get('https://api.ganttpro.com/v1.0/timeLogs/{timeLogId}', headers = headers)

print(r.json())
require 'rest-client'
require 'json'

headers = {
'Accept' => 'application/json',
'X-API-Key' => 'API_KEY'
}

result = RestClient.get 'https://api.ganttpro.com/v1.0/timeLogs/{timeLogId}',
params: {
}, headers: headers

p JSON.parse(result)

GET /timeLogs/{timeLogId}

Get time log

Parameters

Path

timeLogId
integer required

Example responses 200 Response

{
"id": 0,
"taskId": 0,
"resourceId": 0,
"time": 0,
"date": "2019-08-24",
"comment": "string"
}

Responses

  • 200
  • 400
  • 401

Ok

Bad query parameter

Unauthorized

Update time log

Code samples

PUT https://api.ganttpro.com/v1.0/timeLogs/{timeLogId} HTTP/1.1
Host: api.ganttpro.com
Content-Type: application/json
Accept: application/json
const inputBody = '{
"resourceId": 1,
"time": 1,
"date": "2019-08-24",
"comment": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'X-API-Key':'API_KEY'
};

fetch('https://api.ganttpro.com/v1.0/timeLogs/{timeLogId}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-API-Key': 'API_KEY'
}

r = requests.put('https://api.ganttpro.com/v1.0/timeLogs/{timeLogId}', headers = headers)

print(r.json())
require 'rest-client'
require 'json'

headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-API-Key' => 'API_KEY'
}

result = RestClient.put 'https://api.ganttpro.com/v1.0/timeLogs/{timeLogId}',
params: {
}, headers: headers

p JSON.parse(result)

PUT /timeLogs/{timeLogId}

Update time log

Body parameter

{
"resourceId": 1,
"time": 1,
"date": "2019-08-24",
"comment": "string"
}

Parameters

Path

timeLogId
integer required

Body

resourceId
integer
time
integer
date
string
comment
string

Example responses 200 Response

{
"status": "ok"
}

Responses

  • 200
  • 400
  • 401

Ok

Bad query parameter

Unauthorized

Delete time log

Code samples

DELETE https://api.ganttpro.com/v1.0/timeLogs/{timeLogId} HTTP/1.1
Host: api.ganttpro.com
Accept: application/json

const headers = {
'Accept':'application/json',
'X-API-Key':'API_KEY'
};

fetch('https://api.ganttpro.com/v1.0/timeLogs/{timeLogId}',
{
method: 'DELETE',

headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json',
'X-API-Key': 'API_KEY'
}

r = requests.delete('https://api.ganttpro.com/v1.0/timeLogs/{timeLogId}', headers = headers)

print(r.json())
require 'rest-client'
require 'json'

headers = {
'Accept' => 'application/json',
'X-API-Key' => 'API_KEY'
}

result = RestClient.delete 'https://api.ganttpro.com/v1.0/timeLogs/{timeLogId}',
params: {
}, headers: headers

p JSON.parse(result)

DELETE /timeLogs/{timeLogId}

Delete time log

Parameters

Path

timeLogId
integer required

Example responses 200 Response

{
"status": "ok"
}

Responses

  • 200
  • 400
  • 401

Ok

Bad query parameter

Unauthorized

Get time log by projectId

Code samples

GET https://api.ganttpro.com/v1.0/timeLogs/getByProjectId?projectId=0 HTTP/1.1
Host: api.ganttpro.com
Accept: application/json

const headers = {
'Accept':'application/json',
'X-API-Key':'API_KEY'
};

fetch('https://api.ganttpro.com/v1.0/timeLogs/getByProjectId?projectId=0',
{
method: 'GET',

headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json',
'X-API-Key': 'API_KEY'
}

r = requests.get('https://api.ganttpro.com/v1.0/timeLogs/getByProjectId', params={
'projectId': '0'
}, headers = headers)

print(r.json())
require 'rest-client'
require 'json'

headers = {
'Accept' => 'application/json',
'X-API-Key' => 'API_KEY'
}

result = RestClient.get 'https://api.ganttpro.com/v1.0/timeLogs/getByProjectId',
params: {
'projectId' => 'integer'
}, headers: headers

p JSON.parse(result)

GET /timeLogs/getByProjectId

Get time log by projectId

Parameters

Query

projectId
integer required

Example responses 200 Response

{
"id": 0,
"taskId": 0,
"resourceId": 0,
"time": 0,
"date": "2019-08-24",
"comment": "string"
}

Responses

  • 200
  • 400
  • 401

Ok

Bad query parameter

Unauthorized

Colors

Get colors

Code samples

GET https://api.ganttpro.com/v1.0/colors HTTP/1.1
Host: api.ganttpro.com
Accept: application/json

const headers = {
'Accept':'application/json',
'X-API-Key':'API_KEY'
};

fetch('https://api.ganttpro.com/v1.0/colors',
{
method: 'GET',

headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json',
'X-API-Key': 'API_KEY'
}

r = requests.get('https://api.ganttpro.com/v1.0/colors', headers = headers)

print(r.json())
require 'rest-client'
require 'json'

headers = {
'Accept' => 'application/json',
'X-API-Key' => 'API_KEY'
}

result = RestClient.get 'https://api.ganttpro.com/v1.0/colors',
params: {
}, headers: headers

p JSON.parse(result)

GET /colors

Get colors

Example responses 200 Response

[
{
"id": 0,
"hex": "string",
"hex2": "string",
"hex3": "string",
"hex4": "string"
}
]

Responses

  • 200
  • 400
  • 401

Ok

Bad query parameter

Unauthorized

Webhooks

Setup

GanttPRO uses webhooks to let your application or service know when events happen, such as creating a task or time log reported.

When the event occurs, GanttPRO makes a POST HTTP request to the URL(s) you configured for the webhook. GanttPRO’s request will include details of the event such as the task data or time log data.

Where can I setup webhook url?

You can create and manage your API Keys in the web interface.
You must be the owner of the GanttPRO team account to be able to generate API keys for your team.

This URL(URLs) will receive POST-request each time something happens with tasks, resources, etc. in your GanttPRO account.

The response status for POST-request should be 2xx. Otherwise, we will block URL (you can view the URL status in the account settings).

image info

ProjectCreated

{
"event": "ProjectCreated",
"data": {
"userId": "uuid",
"project": {
"projectId": "uuid",
"name": "string",
"projectStatusOptionId": "uuid",
"projectStatusId": "uuid",
"lastUpdate": "string"
}
},
"teamId": "uuid"
}

ProjectDeleted

{
"event": "ProjectDeleted",
"data": {
"userId": "uuid",
"project": {
"projectId": "uuid"
}
},
"teamId": "uuid"
}

ProjectUpdated

{
"event": "ProjectUpdated",
"data": {
"userId": "uuid",
"updated": [
{
"projectId": "uuid",
"updatedFields": {
"name": "string",
"lastUpdate": "string",
"projectStatusOptionId": "uuid",
"projectStatusId": "uuid"
}
}
]
},
"teamId": "uuid"
}

ProjectArchived

{
"event": "ProjectArchived",
"data": {
"userId": "uuid",
"project": {
"projectId": "uuid"
}
},
"teamId": "uuid"
}

ProjectCalendarUpdated

{
"event": "ProjectCalendarUpdated",
"data": {
"userId": "uuid",
"updated": [
{
"projectId": "uuid",
"worktime": {
"hours": [
{
"start": "int",
"end": "int"
}
],
"days": [
{
"isWorkingDay": "boolean",
"name": "string"
}
]
},
"customDays": [
{
"action": "string",
"data": [
{
"id": "uuid",
"from": "string",
"to": "string",
"hours": "array",
"repeat": "string",
"repeatFrom": "string",
"repeatTo": "string",
"title": "string",
"isDayOff": "boolean"
}
]
}
]
}
]
},
"teamId": "uuid"
}

ProjectCalendarUpdated

{
"event": "ProjectCalendarUpdated",
"data": {
"userId": "uuid",
"updated": [
{
"projectId": "uuid",
"worktime": {
"hours": [
{
"start": "int",
"end": "int"
}
],
"days": [
{
"isWorkingDay": "boolean",
"name": "string"
}
]
},
"customDays": [
{
"action": "string",
"data": [
{
"id": "uuid",
"from": "string",
"to": "string",
"hours": "array",
"repeat": "string",
"repeatFrom": "string",
"repeatTo": "string",
"title": "string",
"isDayOff": "boolean"
}
]
}
]
}
]
},
"teamId": "uuid"
}

ProjectRestored

{
"event": "ProjectRestored",
"data": {
"userId": "uuid",
"project": {
"projectId": "uuid"
}
},
"teamId": "uuid"
}

ProjectStatusOptionCreated

{
"event": "ProjectStatusOptionCreated",
"data": {
"userId": "uuid",
"projectStatusId": "uuid",
"items": [
{
"id": "int",
"color": "string",
"value": "string",
"order": "string",
"isDefault": "int"
}
]
},
"teamId": "uuid"
}

ProjectStatusOptionUpdated

{
"event": "ProjectStatusOptionUpdated",
"data": {
"userId": "uuid",
"projectStatusId": "uuid",
"updated": [
{
"id": "int",
"color": "string",
"value": "string",
"order": "string",
"isDefault": "int"
}
]
},
"teamId": "uuid"
}

RoleAccountCreated

{
"event": "RoleAccountCreated",
"data": {
"userId": "uuid",
"id": "int",
"title": "string",
"defaultType": "int | null",
"isDefault": "int",
"rights": [
{
"id": "int",
"title": "string",
"bit": "int",
"rightId": "int",
"bitKey": "string",
"status": "boolean"
}
]
},
"teamId": "uuid"
}

RoleProjectCreated

{
"event": "RoleProjectCreated",
"data": {
"userId": "uuid",
"id": "int",
"title": "string",
"defaultType": "int | null",
"isDefault": "int",
"rights": [
{
"id": "int",
"title": "string",
"bit": "int",
"rightId": "int",
"bitKey": "string",
"status": "boolean"
}
]
},
"teamId": "uuid"
}

RoleAccountDeleted

{
"event": "RoleAccountDeleted",
"data": {
"userId": "uuid",
"ids": "array"
},
"teamId": "uuid"
}

RoleProjectDeleted

{
"event": "RoleProjectDeleted",
"data": {
"userId": "uuid",
"ids": "array"
},
"teamId": "uuid"
}

RoleProjectUpdated

{
"event": "RoleProjectUpdated",
"data": {
"userId": "uuid",
"updated": [
{
"id": "int",
"title": "string",
"defaultType": "int | null",
"isDefault": "int",
"rights": [
{
"id": "int",
"title": "string",
"bit": "int",
"rightId": "int",
"bitKey": "string",
"status": "boolean"
}
]
}
]
},
"teamId": "uuid"
}

RoleAccountUpdated

{
"event": "RoleAccountUpdated",
"data": {
"userId": "uuid",
"updated": [
{
"id": "int",
"title": "string",
"defaultType": "int | null",
"isDefault": "int",
"rights": [
{
"id": "int",
"title": "string",
"bit": "int",
"rightId": "int",
"bitKey": "string",
"status": "boolean"
}
]
}
]
},
"teamId": "uuid"
}

ProjectStatusOptionDeleted

{
"event": "ProjectStatusOptionDeleted",
"data": {
"userId": "uuid",
"items": [
{
"projectStatusId": "int",
"id": "int"
}
]
},
"teamId": "uuid"
}

TaskCreated

{
"event": "TaskCreated",
"data": {
"userId": "uuid",
"tasks": [
"< TaskSchema >"
]
},
"teamId": "uuid"
}

TaskUpdated

{
"event": "TaskUpdated",
"data": {
"userId": "uuid",
"updated": [
{
"taskId": "uuid",
"updatedFields": {
"name": "string",
"startDate": "date",
"endDate": "date",
"description": "string",
"status": "int",
"priority": "int",
"parent": "int",
"type": "string",
"progress": "float",
"duration": "int",
"estimation": "int",
"deadline": "date",
"color": "int"
}
}
]
},
"teamId": "uuid"
}

TaskDeleted

{
"event": "TaskDeleted",
"data": {
"userId": "uuid",
"ids": [
"uuid"
],
"projectIds": [
"uuid"
]
},
"teamId": "uuid"
}

TaskTimeLogsCreated

{
"event": "TaskTimeLogsCreated",
"data": {
"userId": "uuid",
"timeLogs": [
"< TimeLogScheme >"
]
},
"teamId": "uuid"
}

TaskTimeLogUpdated

{
"event": "TaskTimeLogUpdated",
"data": {
"userId": "uuid",
"updated": [
{
"timeLogId": "uuid",
"updatedFields": {
"date": "string",
"time": "int",
"comment": "string"
}
}
]
},
"teamId": "uuid"
}

TaskTimeLogDeleted

{
"event": "TaskTimeLogDeleted",
"data": {
"userId": "uuid",
"ids": [
"uuid"
]
},
"teamId": "uuid"
}

TaskCommentCreated

{
"event": "TaskCommentCreated",
"data": {
"userId": "uuid",
"comments": [
"< CommentSchema >"
]
},
"teamId": "uuid"
}

TaskCommentUpdated

{
"event": "TaskCommentUpdated",
"data": [
{
"commentId": "uuid",
"updatedFields": {
"content": "string",
"updatedAt": "date"
}
}
],
"teamId": "uuid"
}

TaskCommentDeleted

{
"event": "TaskCommentDeleted",
"data": {
"userId": "uuid",
"ids": [
"uuid"
]
},
"teamId": "uuid"
}

TaskAttachementCreated

{
"event": "TaskAttachementCreated",
"data": {
"attachments": [
"< AttachmentSchema >"
]
},
"teamId": "uuid"
}

TaskAttachementDeleted

{
"event": "TaskAttachementDeleted",
"data": {
"userId": "uuid",
"ids": [
"uuid"
]
},
"teamId": "uuid"
}

TaskLinkCreated

{
"event": "TaskLinkCreated",
"data": {
"userId": "uuid",
"links": [
"< LinkSchema >"
]
},
"teamId": "uuid"
}

TaskLinkUpdated

{
"event": "TaskLinkUpdated",
"data": {
"userId": "uuid",
"updated": [
{
"linkId": "uuid",
"updatedFields": {
"lag": "int"
}
}
]
},
"teamId": "uuid"
}

TaskLinkDeleted

{
"event": "TaskLinkDeleted",
"data": {
"userId": "uuid",
"id": [
"uuid"
]
},
"teamId": "uuid"
}

TaskResourceAssigned

{
"event": "TaskResourceAssigned",
"data": {
"userId": "uuid",
"assignedResources": [
{
"taskId": "uuid",
"resources": [
{
"resourceValue": "float",
"resourceId": "uuid"
}
]
}
]
},
"teamId": "uuid"
}

TaskResourceUpdated

{
"event": "TaskResourceUpdated",
"data": {
"userId": "uuid",
"updated": [
{
"taskId": "uuid",
"resources": [
{
"resourceId": "uuid",
"resourceValue": "float"
}
]
}
]
},
"teamId": "uuid"
}

TaskResourceUnassigned

{
"event": "TaskResourceUnassigned",
"data": {
"userId": "uuid",
"unassignedResources": [
{
"taskId": "uuid",
"unassignedResourcesIds": [
"uuid"
]
}
]
},
"teamId": "uuid"
}

TaskCustomFieldUpdated

{
"event": "TaskCustomFieldUpdated",
"data": {
"userId": "uuid",
"customFields": [
{
"taskId": "uuid",
"customFieldId": "uuid",
"value": "uuid | int | float | string | array | boolean"
}
]
},
"teamId": "uuid"
}

TeamUpdated

{
"event": "TeamUpdated",
"data": {
"userId": "uuid",
"updated": [
{
"teamId": "uuid",
"updatedFields": {
"name": "string"
}
}
]
},
"teamId": "uuid"
}

ResourceCreated

{
"event": "ResourceCreated",
"data": {
"userId": "uuid",
"resources": [
"< ResourceSchema >"
]
},
"teamId": "uuid"
}

ResourceUpdated

{
"event": "ResourceUpdated",
"data": {
"userId": "uuid",
"updated": [
{
"resourceId": "uuid",
"updatedFields": {
"name": "string",
"photo": "string",
"resourcePhoto": "string",
"roleId": "int"
}
}
]
},
"teamId": "uuid"
}

ResourceDeleted

{
"event": "ResourceDeleted",
"data": {
"userId": "uuid",
"ids": [
"uuid"
]
},
"teamId": "uuid"
}

ResourceToProjectsAssigned

{
"event": "ResourceToProjectsAssigned",
"data": {
"userId": "uuid",
"resourcesToProjects": [
{
"projectId": "int",
"resourceId": "int",
"projectRoleId": "int",
"rights": {
"view": "boolean",
"edit": "boolean",
"viewCost": "boolean"
},
"cost": "int",
"type": "int"
}
]
},
"teamId": "uuid"
}

ResourceOnProjectsUpdated

{
"event": "ResourceOnProjectsUpdated",
"data": {
"userId": "uuid",
"updated": [
{
"resourceId": "uuid",
"projectId": "uuid",
"updatedFields": {
"projectRoleId": "int",
"rights": {
"view": "boolean",
"edit": "boolean",
"viewCost": "boolean"
},
"cost": "int",
"type": "int"
}
}
]
},
"teamId": "uuid"
}

ResourceFromProjectsUnassigned

{
"event": "ResourceFromProjectsUnassigned",
"data": {
"userId": "uuid",
"resourcesFromProjects": [
{
"projectId": "int",
"resourceId": "int"
}
],
"resourcesToTasks": [
{
"projectId": "int",
"resourcesToTasks": {
"[taskId]": [
{
"custom_days": [
{
"estimation": "int",
"day_part": "int"
}
],
"id": "int",
"resource_id": "int",
"task_id": "int",
"value": "int",
"resource_tasks_id": "int"
}
]
}
}
]
},
"teamId": "uuid"
}

ResourceCalendarUpdated

{
"event": "ResourceCalendarUpdated",
"data": {
"userId": "uuid",
"updated": [
{
"resourceId": "uuid",
"worktime": {
"hours": "int",
"days": [
{
"isWorkingDay": "boolean",
"name": "string"
}
]
},
"customDays": [
{
"action": "string",
"data": [
{
"id": "uuid",
"from": "string",
"to": "string",
"workingHours": "int",
"repeat": "string",
"repeatFrom": "string",
"repeatTo": "string",
"title": "string",
"type": "string",
"isDayOff": "boolean"
}
]
}
]
}
]
},
"teamId": "uuid"
}

CustomFieldCreated

{
"event": "CustomFieldCreated",
"data": {
"userId": "uuid",
"customFields": [
{
"id": "uuid",
"name": "uuid",
"options": [
{
"id": "uuid",
"value": "uuid | int | float | string",
"color": "string",
"icon": "string",
"sortOrder": "int",
"isDefault": "int"
}
],
"type": "string"
}
]
},
"teamId": "uuid"
}

CustomFieldUpdated

{
"event": "CustomFieldUpdated",
"data": {
"userId": "uuid",
"updated": [
{
"customFieldId": "uuid",
"updatedFields": {
"name": "string",
"options": [
{
"id": "uuid",
"event": "string",
"color": "string",
"icon": "string",
"resourceId": "uuid",
"value": "uuid | int | float | string",
"sortOrder": "int",
"isDefault": "boolean"
}
]
}
}
]
},
"teamId": "uuid"
}

CustomFieldDeleted

{
"event": "CustomFieldDeleted",
"data": {
"userId": "uuid",
"ids": [
"uuid"
]
},
"teamId": "uuid"
}

CustomFieldToProjectAssigned

{
"event": "CustomFieldToProjectAssigned",
"data": {
"userId": "uuid",
"assignedCustomFields": [
{
"customFieldId": "uuid",
"projectIds": [
"uuid"
]
}
]
},
"teamId": "uuid"
}

CustomFieldFromProjectUnassigned

{
"event": "CustomFieldFromProjectUnassigned",
"data": {
"userId": "uuid",
"unassignedCustomFields": [
{
"customFieldId": "uuid",
"projectIds": [
"uuid"
]
}
]
},
"teamId": "uuid"
}

Errors

Codes

Code Description
1000 You do not have access to the required item
1001 The resource is not assigned to the project specified in the request
1002 The project doesn't contain the parent task ID specified in the request
1003 Team subscription has expired
1004 Team trial has expired
1005 Use other endpoints to change owner role
1006 Api key is invalid or it's not exist
1007 Handler does not exist
2000 Can't find one of the requested field
2001 Can not find item
2002 Invalid array bits for roles and permissions
3000 Field value with the type Int cannot be less than described in the method description
3001 Field value with the type Int cannot be more than described in the method description
3002 Field value should be one of the values described in the method description
3003 Length of the field value with the type String cannot be less than described in the method description
3004 Field value should be less than the max value
3005 You missed one or a few required fields
3007 Conflict between status and progress in the Create or Update task methods
3008 The resource is already assigned on this task
3009 Task isn't a project type
3010 You cannot create tasks in the "Total estimate" task
3011 Field value should be more than the min value and less than the max value. See min and max values in the method description
3012 In the Create or Update task methods end date can't be earlier than start date
3013 It's not possible to use only end date (without start date or duration) in the Create task method
3014 Based on the working calendar, duration between start date and end date is 0
3015 Unexpected field
3016 One or more resources are not assigned on the task
3017 You can’t change the estimation, duration, or endDate for a milestone
3018 Parent cannot be the current task
3019 Milestone can't has subtasks
3020 Header is required for updating field
3022 The nesting level is limited to 12 parent tasks
3023 Template isn't exist
3024 Email is already in a team
3025 You should use estimationMode = 1 for using apply calendar resource
4000 ID is invalid
4001 Field is invalid
4002 Invalid type of field
4003 Date format is invalid
4004 Header is invalid
5001 The source task id and the target task id are the same. Choose different tasks to create a link
5002 You can create only one link between two tasks
5003 The source task id and the target task id are from different projects. Choose tasks from the same project
5004 The link is circular
6002 Not allowed use `To` field with `Repeat` field
6003 Invalid intersect for days or hours