API-Beispiele
Beispiele erstellen
Beispielhafte POST-Anfragen für Projekte, Aufgaben, Zeit, Workflow-Apps, Aktualisierungen und Ausgaben.
Projekt
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'Durch die Verwendung einer Datei:
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'Daten
{ name: "Projekt via API", description: "Details zum Projekt", 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", }Zeitaufwand für eine Aufgabe
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'Durch die Verwendung einer Datei:
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'Daten
{ task: "15984213", date: "2019-09-04", hours: "5.2", timeCode: "109369", isBillable: "t", billRate: "100", comments: "Zeiteintrag über API übermittelt", isCostable: "t", costRate: "50", creator: "Tony Stark", state: "1", }Nicht-Projektzeit
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'Durch die Verwendung einer Datei:
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'Daten
{ date: "2019-09-04", hours: "4", timeCode: "109371", comments: "Nicht-Projekt-Zeiteintrag über API eingereicht", isCostable: "t", costRate: "50", creator: "Tony Stark", state: "1", }Zeiterfassung in einer 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'Durch die Verwendung einer Datei:
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'Daten
{ process: "706315", date: "2019-09-10", hours: "5.2", timeCode: "default", comments: "Zeiteintrag über API übermittelt", creator: "Tony Stark", state: "1", }App
curl -g -X POST \ -H 'Content-Type: application/json' \ -H 'Authorization: bearer YourTokenHere' \ -d '{"app":"110147","description":"App-Element über API v2,","name":"API v2-App,","project":"Projekt 1"}' \ 'https://app.celoxis.com/psa/api/v2/apps'Durch die Verwendung einer Datei:
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'Daten
{ 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", }Aufgabenaktualisierung
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'Durch die Verwendung einer Datei:
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'Daten
{ task: "API-Aufgabe", percentComplete: "20", actualStart: "2019-09-04", comments: "Aufgabenaktualisierung über API erstellt", creator: "Peter Parker", }Aufgabe
Durch die Verwendung einer Datei:
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'Daten
{ 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", }Ausgaben
curl -g -X POST \ -H 'Content-Type: application/json' \ -H 'Authorization: bearer YourTokenHere' \ -d '{"name": "Mittagessen mit Kunden", "task" : "176543", "items" : [{"description" : "Mittagessen mit Kunde XYZ", "date" : "2019-08-12", "expenseCode" : "Mahlzeiten", "amount" : "5000"}, {"description" : "Mittagessen mit Kunde ABC", "date" : "2019-08-13", "expenseCode" : "Mahlzeiten", "amount" : "3500"}]}' \ 'https://app.celoxis.com/psa/api/v2/expenses'Durch die Verwendung einer Datei:
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'Daten
{ name: "Kundengespräch", task: "176543", isBillable: false, isCostable: true, items: [ { description: "Mittagessen mit Peter", date: "2019-08-12", expenseCode: "Mahlzeiten", amount: 5000, reimbursable: "true", }, { description: "Mittagessen mit Mary", date: "2019-08-13", expenseCode: "Mahlzeiten", amount: 3500.4, }, ], }