API examples
Create examples
Sample POST requests for projects, tasks, time, Workflow Apps, updates and expenses.
Project
curl -g -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: bearer YourTokenHere' \
-d '{"manager":"Tony Stark","name":"API Project","plannedStart":"2019-08-29","state":"77306","type":"48673"}' \
'https://app.celoxis.com/psa/api/v2/projects'By using a file:
curl -g -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: bearer YourTokenHere' \
-d@create-project.json \
'https://app.celoxis.com/psa/api/v2/projects'Data
{
name: "Project via API",
description: "Details related to the project",
code: "apiproject",
creator: "Tony Stark",
plannedStart: "2019-09-01",
deadline: "2019-09-30",
manager: "Tony Stark",
priority: "3",
state: "77307",
type: "Implementation",
workspace: "Default",
budget: "500000",
billingType: "1",
clients: "Acme International",
fixedPrice: "44500",
alignment: "75",
benefit: "25",
risk: "3",
}Time logged on a task
curl -g -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: bearer YourTokenHere' \
-d '{"date":"2019-07-15","hours":"8","timeCode":"109369", "task":"15984213","isBillable":"f"}' \
'https://app.celoxis.com/psa/api/v2/timeEntries'By using a file:
curl -g -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: bearer YourTokenHere' \
-d@create-time.json \
'https://app.celoxis.com/psa/api/v2/timeEntries'Data
{
task: "15984213",
date: "2019-09-04",
hours: "5.2",
timeCode: "109369",
isBillable: "t",
billRate: "100",
comments: "time entry submitted through api",
isCostable: "t",
costRate: "50",
creator: "Tony Stark",
state: "1",
}Non-project Time
curl -g -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: bearer YourTokenHere' \
-d '{"date":"2019-08-29","hours":"8","timeCode":"109372"}' \
'https://app.celoxis.com/psa/api/v2/timeEntries'By using a file:
curl -g -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: bearer YourTokenHere' \
-d@create-time-non-project.json \
'https://app.celoxis.com/psa/api/v2/timeEntries'Data
{
date: "2019-09-04",
hours: "4",
timeCode: "109371",
comments: "non-project time entry submitted through api",
isCostable: "t",
costRate: "50",
creator: "Tony Stark",
state: "1",
}Time logged on an app
curl -g -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: bearer YourTokenHere' \
-d '{"process":"706315","date":"2019-08-29","hours":"8","timeCode":"109372"}' \
'https://app.celoxis.com/psa/api/v2/timeEntries'By using a file:
curl -g -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: bearer YourTokenHere' \
-d@create-time-non-project.json \
'https://app.celoxis.com/psa/api/v2/timeEntries'Data
{
process: "706315",
date: "2019-09-10",
hours: "5.2",
timeCode: "default",
comments: "time entry submitted through api",
creator: "Tony Stark",
state: "1",
}App
curl -g -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: bearer YourTokenHere' \
-d '{"app":"110147","description":"app item through api v2","name":"api v2 app","project":"Project 1"}' \
'https://app.celoxis.com/psa/api/v2/apps'By using a file:
curl -g -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: bearer YourTokenHere' \
-d@create-app.json \
'https://app.celoxis.com/psa/api/v2/apps'Data
{
name: "App via API",
app: "110147",
description: "Details related to the app",
creator: "Tony Stark",
priority: "3",
risk: "3",
custom_bug_affects_version: "1.0",
custom_status_budget: "Green",
custom_bug_type: "Improvement",
custom_multi_select: "one",
custom_bug_component: "Component 1",
custom_status_date: "2019-08-30",
dueDate: "2019-09-05",
custom_bug_fix_version: "2.0",
workspace: "Default",
custom_bug_severity: "Major",
project: "Project via API",
assignee: "Mark",
}Task Update
curl -g -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: bearer YourTokenHere' \
-d '{"task":"API Task","percentComplete":"50"}' \
'https://app.celoxis.com/psa/api/v2/taskUpdates'By using a file:
curl -g -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: bearer YourTokenHere' \
-d @create-task-update.json \
'https://app.celoxis.com/psa/api/v2/taskUpdates'Data
{
task: "API Task",
percentComplete: "20",
actualStart: "2019-09-04",
comments: "task update created via api",
creator: "Peter Parker",
}Task
By using a file:
curl -g -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: bearer YourTokenHere' \
-d @create-task.json \
'https://app.celoxis.com/psa/api/v2/tasks'Data
{
name: "API Task",
project: "API Project",
description: "Task Description added",
plannedStart: "2019-09-05",
plannedFinish: "2019-09-16",
actualStart: "2019-09-05",
plannedEffort: "64",
scheduleType: "FIXED_WORK",
duration: "8d",
constraintType: "SNLT",
constraintDate: "2019-09-05",
priority: "NORMAL",
resources: "Executive[20%], Peter Parker",
externalKey: "AF-123",
custom_kanban_state: "In Progress",
custom_single_select: "two",
custom_text: "single line text custom field",
billingType: "2",
creator: "Tony Stark",
}Expense
curl -g -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: bearer YourTokenHere' \
-d '{"name": "Lunch Meeting with Clients", "task" : "176543", "items" : [{"description" : "Lunch with client XYZ", "date" : "2019-08-12", "expenseCode" : "Meals", "amount" : "5000"}, {"description" : "Lunch with client ABC", "date" : "2019-08-13", "expenseCode" : "Meals", "amount" : "3500"}]}' \
'https://app.celoxis.com/psa/api/v2/expenses'By using a file:
curl -g -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: bearer YourTokenHere' \
-d@create-expense.json \
'https://app.celoxis.com/psa/api/v2/expenses'Data
{
name: "Client Meeting",
task: "176543",
isBillable: false,
isCostable: true,
items: [
{
description: "Lunch with Peter",
date: "2019-08-12",
expenseCode: "Meals",
amount: 5000,
reimbursable: "true",
},
{
description: "Lunch with Mary",
date: "2019-08-13",
expenseCode: "Meals",
amount: 3500.4,
},
],
}