Vefþjónustur API

Allar upplýsingar um vefþjónusturnar eru á ensku eða þýsku.

CrewBrain REST-API Reference  

The CrewBrain REST API allows you to access the system data from outside and create new data or modify existing data. Many different functions are available for this, with which you can access base data (employees, freelancers, categories, etc.) as well as transaction data (jobs, etc.).

Table of content  

Authentification  

Communication with CrewBrain is only possible via encrypted SSL connections. CrewBrain provides two variants for authentication: HTTP basic authentication and an access token. The latter should be used preferably so that no password has to be stored in the API implementation.

Basic Authentication  

HTTP basic authentication is the simplest login method. For this, you simply provide a valid username and associated password with each call to the REST API.

Accesstoken  

By using an access or API token, the user's password only needs to be requested once for initial authentication; the access token is used for further communication. These tokens have a validity of 14 days after the last use in CrewBrain and can be managed by each user under "My Account" > "Active Sessions".

All access tokens in CrewBrain are bound to a user and entitle to the same functions as the user is entitled to. To get an access token, the following GET request must be executed with Basic Authentication (username & password):

GET https://your-name.crewbrain.com/api/accesstoken

The response to this request is a JSON object that contains a valid access token. This can be used for further requests instead of the basic authentication. For this purpose the token is passed in the X-API-KEY header.

URI structure  

The CrewBrain REST API allows access to resources (data types) via URI paths. To use the REST API, your application must make an HTTP request and evaluate the response. The CrewBrain API uses the JSON format and HTTP status codes as the return format as well as the HTTP methods such as GET, POST, PUT and DELETE. URIs for the CrewBrain REST API have the following structure:

https://your-name.crewbrain.com/api/ressource-name

Technical IDs  

Each object is stored in the database of CrewBrain with a unique ID. This ID is stored in the ID field of the same name in each object and also serves to identify the objects in the API (e.g. as jobID , docID , etc.). Parallel to this the field FremdID exists in all base data objects, which can contain an ID of a foreign system with up to 32 characters. You can store the technical ID of external systems in this field. The corresponding objects can then also be selected directly in the API using the external ID:

https://your-name.crewbrain.com/api/ressource-name/FremdID:abcdefghijklmnopqrstuvwxyz

Date values  

The interface is based on the format ISO 8601 as the basis for the date values. A date is issued by the API in the form 2019-01-01 , a date with a time in the form 20190101T235959Z . When you send data to the API, the interface also accepts the formats 20119-01-01T23:59:59Z and 2019-01-01T23:59:59+00:00 in addition to these formats. The values are automatically converted by the interface into the time zone stored in CrewBrain.

Encoding  

The encoding for all calls is UTF-8, both for the JSON object sent to the REST API and for the responses returned to the client.

Ressources  

api/jobs/  

Provides access to the jobs of the currently logged in user

> Get jobs GET api/jobs/

api/job/  

Provides access to jobs and their information

> Read job GET api/job/{jobId}
> Create job POST api/job/
> Update job PUT api/job/{jobId}
> Delete job DELETE api/job/{jobId}
> Search jobs POST api/job/suche
> Get all documents GET api/job/{jobId}/dokumente/
> Read document GET api/job/{jobId}/dokument/{docId}
> Save document POST api/job/{jobId}/dokument/
> Update document PUT api/job/{jobId}/dokument/{docId}
> Delete document DELETE api/job/{jobId}/dokument/{docId}
> Get all categories GET api/job/{jobId}/kategorien/
> Get category GET api/job/{jobId}/kategorie/{kategorieId}
> Create category POST api/job/{jobId}/kategorie/
> Update category PUT api/job/{jobId}/kategorie/{kategorieId}
> Delete category DELETE api/job/{jobId}/kategorie/{kategorieId}
> Get employees GET api/job/{jobId}/mitarbeiter/{terminMitarbeiterId}
> Add employee POST api/job/{jobId}/mitarbeiter/
> Update employee PUT api/job/{jobId}/mitarbeiter/{terminMitarbeiterId}
> Delete employee DELETE api/job/{jobId}/mitarbeiter/{terminMitarbeiterId}
> Update employees PUT api/job/{jobId}/mitarbeiter/
> Get vehicles GET api/job/{jobId}/fahrzeug/{terminFahrzeugId}
> Add vehicle POST api/job/{jobId}/fahrzeug/
> Update vehicle PUT api/job/{jobId}/fahrzeug/{terminFahrzeugId}
> Delete vehicle DELETE api/job/{jobId}/fahrzeug/{terminFahrzeugId}
> Update vehicles PUT api/job/{jobId}/fahrzeug/
> Get scheduler GET api/job/{jobId}/disponent/{disponentenID}
> Add scheduler POST api/job/{jobId}/disponent/
> Update scheduler PUT api/job/{jobId}/disponent/{disponentenID}
> Delete scheduler DELETE api/job/{jobId}/disponent/{disponentenID}
> Get project manager GET api/job/{jobId}/projektleiter/{projektleiterID}
> Add project manager POST api/job/{jobId}/projektleiter/
> Update project manager PUT api/job/{jobId}/projektleiter/{projektleiterID}
> Delete project manager DELETE api/job/{jobId}/projektleiter/{projektleiterID}
> Get client contact person GET api/job/{jobId}/kundenansprechpartner/{ansprechpartnerID}
> Add client contact person POST api/job/{jobId}/kundenansprechpartner/
> Update client contact person PUT api/job/{jobId}/kundenansprechpartner/{ansprechpartnerID}
> Delete client contact person DELETE api/job/{jobId}/kundenansprechpartner/{ansprechpartnerID}
> Get location contact person GET api/job/{jobId}/locationansprechpartner/{ansprechpartnerID}
> Add location contact person POST api/job/{jobId}/locationansprechpartner/
> Update location contact person PUT api/job/{jobId}/locationansprechpartner/{ansprechpartnerID}
> Delete location contact person DELETE api/job/{jobId}/locationansprechpartner/{ansprechpartnerID}
> Get additional data GET api/job/{jobId}/zusatzdaten/{zusatzdatentypID}
> Update additional data PUT api/job/{jobId}/zusatzdaten/{zusatzdatentypID}
> Delete additional data DELETE api/job/{jobId}/zusatzdaten/{zusatzdatentypID}
> Get all comments GET api/job/{jobId}/kommentare/
> Read comment GET api/job/{jobId}/kommentar/{kommentarId}
> Create comment POST api/job/{jobId}/kommentar/
> Update comment PUT api/job/{jobId}/kommentar/{kommentarId}
> Delete comment DELETE api/job/{jobId}/kommentar/{kommentarId}

api/projekt/  

Provides access to projects and their information

> Get project GET api/projekt/{projektId}
> Create project POST api/projekt/
> Update project PUT api/projekt/{projektId}
> Delete project DELETE api/projekt/{projektId}
> Search projects POST api/projekt/suche
> Get all documents GET api/projekt/{projektId}/dokumente/
> Read document GET api/projekt/{projektId}/dokument/{docId}
> Save document POST api/projekt/{projektId}/dokument/
> Update document PUT api/projekt/{projektId}/dokument/{docId}
> Delete document DELETE api/projekt/{projektId}/dokument/{docId}
> Get scheduler GET api/projekt/{projektId}/disponent/{disponentenID}
> Add scheduler POST api/projekt/{projektId}/disponent/
> Update scheduler PUT api/projekt/{projektId}/disponent/{disponentenID}
> Delete scheduler DELETE api/projekt/{projektId}/disponent/{disponentenID}
> Get project manager GET api/projekt/{projektId}/projektleiter/{projektleiterID}
> Add project manager POST api/projekt/{projektId}/projektleiter/
> Update project manager PUT api/projekt/{projektId}/projektleiter/{projektleiterID}
> Delete project manager DELETE api/projekt/{projektId}/projektleiter/{projektleiterID}
> Get client contact person GET api/projekt/{projektId}/kundenansprechpartner/{ansprechpartnerID}
> Add client contact person POST api/projekt/{projektId}/kundenansprechpartner/
> Update client contact person PUT api/projekt/{projektId}/kundenansprechpartner/{ansprechpartnerID}
> Delete client contact person DELETE api/projekt/{projektId}/kundenansprechpartner/{ansprechpartnerID}
> Get additional data GET api/projekt/{projektId}/zusatzdaten/{zusatzdatentypID}
> Update additional data PUT api/projekt/{projektId}/zusatzdaten/{zusatzdatentypID}
> Delete additional data DELETE api/projekt/{projektId}/zusatzdaten/{zusatzdatentypID}
> Get all comments GET api/projekt/{projektId}/kommentare/
> Read comment GET api/projekt/{projektId}/kommentar/{kommentarId}
> Create comment POST api/projekt/{projektId}/kommentar/
> Update comment PUT api/projekt/{projektId}/kommentar/{kommentarId}
> Delete comment DELETE api/projekt/{projektId}/kommentar/{kommentarId}

api/arbeitszeit/  

Provides access to working hours and their information

> Get working hour GET api/arbeitszeit/{zeitId}
> Create working hour POST api/arbeitszeit/
> Update working hour PUT api/arbeitszeit/{zeitId}
> Delete working hour DELETE api/arbeitszeit/{zeitId}
> Search working hours POST api/arbeitszeit/suche

api/urlaub/  

Provides access to holidays and sick notes and their information

> Get holidays / sick notes GET api/urlaub/{urlaubId}
> Create holiday / sick note POST api/urlaub/
> Update holiday / sick note PUT api/urlaub/{urlaubId}
> Delete holiday / sick note DELETE api/urlaub/{urlaubId}
> Search holidays / sick notes POST api/urlaub/suche

api/task/  

Provides access to tasks and their information

> Get task GET api/task/{taskId}
> Create task POST api/task/
> Update task PUT api/task/{taskId}
> Delete task DELETE api/task/{taskId}
> Search tasks POST api/task/suche
> Get task responsible GET api/task/{taskId}/responsible/{responsibleId}
> Create task responsible POST api/task/{taskId}/responsible/
> Update task responsible PUT api/task/{taskId}/responsible/{responsibleId}
> Delete task responsible DELETE api/task/{taskId}/responsible/{responsibleId}
> Get all documents GET api/task/{taskId}/documents/
> Read document GET api/task/{taskId}/dokument/{docId}
> Save document POST api/task/{taskId}/dokument/
> Update document PUT api/task/{taskId}/dokument/{docId}
> Delete document DELETE api/task/{taskId}/dokument/{docId}
> Get all comments GET api/task/{taskId}/comments/
> Read comment GET api/task/{taskId}/comment/{commentId}
> Create comment POST api/task/{taskId}/comment/
> Update comment PUT api/task/{taskId}/comment/{commentId}
> Delete comment DELETE api/task/{taskId}/comment/{commentId}

api/tasklist/  

Provides access to task lists and their information

> Get list GET api/tasklist/{tasklistId}
> Create list POST api/tasklist/
> Update list PUT api/tasklist/{tasklistId}
> Delete list DELETE api/tasklist/{tasklistId}
> Get all tasks for a list POST api/tasklist/{tasklistId}/tasks/
> Get participant GET api/tasklist/{tasklistId}/participant/{participantId}
> Add participant POST api/tasklist/{tasklistId}/participant/
> Update participant PUT api/tasklist/{tasklistId}/participant/{participantId}
> Delete participant DELETE api/tasklist/{tasklistId}/participant/{participantId}

api/tasklistfolder/  

Provides access to folders for task lists and their information

> Get folder GET api/tasklistfolder/{folderId}
> Create folder POST api/tasklistfolder/
> Update folder PUT api/tasklistfolder/{folderId}
> Delete folder DELETE api/tasklistfolder/{folderId}

api/tasklistfolders/  

Creates a list of all task lists and folders of the user.

> Get all folders / lists GET api/tasklistfolders/

api/stammdaten/mitarbeiter/  

Provides access to employees and their information

> Get employee GET api/stammdaten/mitarbeiter/{mitarbeiterId}
> Create employee POST api/stammdaten/mitarbeiter/
> Update employee PUT api/stammdaten/mitarbeiter/{mitarbeiterId}
> Delete employee DELETE api/stammdaten/mitarbeiter/{mitarbeiterId}
> Search employees POST api/stammdaten/mitarbeiter/suche
> Assign user group POST api/stammdaten/mitarbeiter/{mitarbeiterId}/benutzergruppe
> Delete user group DELETE api/stammdaten/mitarbeiter/{mitarbeiterId}/benutzergruppe/{benutzergruppenId}
> Get category GET api/stammdaten/mitarbeiter/{mitarbeiterId}/kategorie/{kategorieId}
> Assign category POST api/stammdaten/mitarbeiter/{mitarbeiterId}/kategorie
> Update category PUT api/stammdaten/mitarbeiter/{mitarbeiterId}/kategorie/{kategorieId}
> Delete category DELETE api/stammdaten/mitarbeiter/{mitarbeiterId}/kategorie/{kategorieId}

api/stammdaten/freelancer/  

Provides access to freelancers and their information

> Get freelancer GET api/stammdaten/freelancer/{freelancerId}
> Create freelancer POST api/stammdaten/freelancer/
> Update freelancer PUT api/stammdaten/freelancer/{freelancerId}
> Delete freelancer DELETE api/stammdaten/freelancer/{freelancerId}
> Search freelancers POST api/stammdaten/freelancer/suche
> Assign user group POST api/stammdaten/freelancer/{freelancerId}/benutzergruppe
> Delete user group DELETE api/stammdaten/freelancer/{freelancerId}/benutzergruppe/{benutzergruppenId}
> Get category GET api/stammdaten/freelancer/{freelancerId}/kategorie/{kategorieId}
> Assign category POST api/stammdaten/freelancer/{freelancerId}/kategorie
> Update category PUT api/stammdaten/freelancer/{freelancerId}/kategorie/{kategorieId}
> Delete category DELETE api/stammdaten/freelancer/{freelancerId}/kategorie/{kategorieId}

api/stammdaten/dienstleister/  

Provides access to subcontractors and their information

> Get subcontractor GET api/stammdaten/dienstleister/{dienstleisterId}
> Create subcontractor POST api/stammdaten/dienstleister/
> Update subcontractor PUT api/stammdaten/dienstleister/{dienstleisterId}
> Delete subcontractor DELETE api/stammdaten/dienstleister/{dienstleisterId}
> Search subcontractor POST api/stammdaten/dienstleister/suche
> Assign user group POST api/stammdaten/dienstleister/{dienstleisterId}/benutzergruppe
> Delete user group DELETE api/stammdaten/dienstleister/{dienstleisterId}/benutzergruppe/{benutzergruppenId}
> Get category GET api/stammdaten/dienstleister/{dienstleisterId}/kategorie/{kategorieId}
> Assign category POST api/stammdaten/dienstleister/{dienstleisterId}/kategorie
> Update category PUT api/stammdaten/dienstleister/{dienstleisterId}/kategorie/{kategorieId}
> Delete category DELETE api/stammdaten/dienstleister/{dienstleisterId}/kategorie/{kategorieId}
> Get contact person GET api/stammdaten/dienstleister/{diensstleisterId}/ansprechpartner/{ansprechpartnerID}
> Create contact person POST api/stammdaten/dienstleister/{diensstleisterId}/ansprechpartner/{ansprechpartnerID}
> Update contact person PUT api/stammdaten/dienstleister/{diensstleisterId}/ansprechpartner/{ansprechpartnerID}
> Delete contact person DELETE api/stammdaten/dienstleister/{diensstleisterId}/ansprechpartner/{ansprechpartnerID}

api/stammdaten/personalkategorien/  

Provides access to the list of all categories for employees, freelancers and subcontractors

> Get all categories GET api/stammdaten/personalkategorien/

api/stammdaten/personalkategorie/  

Provides access to categories for employees, freelancers, and subcontractors

> Get category GET api/stammdaten/personalkategorie/{kategorieId}
> Create category POST api/stammdaten/personalkategorie/
> Update category PUT api/stammdaten/personalkategorie/{kategorieId}
> Delete category DELETE api/stammdaten/personalkategorie/{kategorieId}

api/stammdaten/benutzergruppen/  

Return a list of all user groups. For each user group, only the attributes ID , Name and Beschreibung are returned.

> Get all user groups GET api/stammdaten/benutzergruppen/

api/stammdaten/fahrzeug/  

Provides access to vehicles and their information

> Get vehicle GET api/stammdaten/fahrzeug/{fahrzeugId}
> Create vehicle POST api/stammdaten/fahrzeug/
> Update vehicle PUT api/stammdaten/fahrzeug/{fahrzeugId}
> Delete vehicle DELETE api/stammdaten/fahrzeug/{fahrzeugId}
> Search vehicles POST api/stammdaten/fahrzeug/suche
> Get category GET api/stammdaten/fahrzeug/{fahrzeugId}/kategorie/{kategorieId}
> Assign category POST api/stammdaten/fahrzeug/{fahrzeugId}/kategorie
> Delete category DELETE api/stammdaten/fahrzeug/{fahrzeugId}/kategorie/{kategorieId}

api/stammdaten/fahrzeugkategorien/  

Provides access to the list of all categories for vehicles

> Get all vehicle categories GET api/stammdaten/fahrzeugkategorien/

api/stammdaten/fahrzeugkategorie/  

Provides access to categories for vehicles

> Get vehicle category GET api/stammdaten/fahrzeugkategorie/{kategorieId}
> Create vehicle category POST api/stammdaten/fahrzeugkategorie/
> Update vehicle category PUT api/stammdaten/fahrzeugkategorie/{kategorieId}
> Delete vehicle category DELETE api/stammdaten/fahrzeugkategorie/{kategorieId}

api/stammdaten/kunde/  

Provides access to clients and their information

> Get client GET api/stammdaten/kunde/{kundenId}
> Create client POST api/stammdaten/kunde/
> Update client PUT api/stammdaten/kunde/{kundenId}
> Delete client DELETE api/stammdaten/kunde/{kundenId}
> Search clients POST api/stammdaten/kunde/suche
> Get contact person GET api/stammdaten/kunde/{kundenId}/ansprechpartner/{ansprechpartnerID}
> Create contact person POST api/stammdaten/kunde/{kundenId}/ansprechpartner/{ansprechpartnerID}
> Update contact person PUT api/stammdaten/kunde/{kundenId}/ansprechpartner/{ansprechpartnerID}
> Delete contact person DELETE api/stammdaten/kunde/{kundenId}/ansprechpartner/{ansprechpartnerID}

api/stammdaten/location/  

Provides access to locations and their information

> Get location GET api/stammdaten/location/{locationId}
> Create location POST api/stammdaten/location/
> Update location PUT api/stammdaten/location/{locationId}
> Delete location DELETE api/stammdaten/location/{locationId}
> Search locations POST api/stammdaten/location/suche
> Get contact person GET api/stammdaten/location/{locationId}/ansprechpartner/{ansprechpartnerID}
> Create contact person POST api/stammdaten/location/{locationId}/ansprechpartner/{ansprechpartnerID}
> Update contact person PUT api/stammdaten/location/{locationId}/ansprechpartner/{ansprechpartnerID}
> Delete contact person DELETE api/stammdaten/location/{locationId}/ansprechpartner/{ansprechpartnerID}

api/stammdaten/jobtypen/  

Provides access to the list of all job types including subdivisions.

> Get all job types GET api/stammdaten/jobtypen/

api/stammdaten/jobtyp/  

Provides access to job types and subdivisions

> Read job type / subdivision GET api/stammdaten/jobtyp/{jobtypId}
> Create job type / subdivision POST api/stammdaten/jobtyp/
> Update job type / subdivision PUT api/stammdaten/jobtyp/{jobtypId}
> Delete a job type / subdivision DELETE api/stammdaten/jobtyp/{jobtypId}

api/stammdaten/projekttypen/  

Provides access to the list of all project types including subdivisions.

> Get all project types GET api/stammdaten/projekttypen/

api/stammdaten/projekttyp/  

Provides access to project types and subdivisions

> Read project type / subdivision GET api/stammdaten/projekttyp/{projekttypId}
> Create job project / subdivision POST api/stammdaten/projekttyp/
> Update job project / subdivision PUT api/stammdaten/projekttyp/{projekttypId}
> Delete a project type / subdivision DELETE api/stammdaten/projekttyp/{projekttypId}

api/stammdaten/zeitkategorien/  

Provides access to the list of all categories for working hours

> Get all working hour categories GET api/stammdaten/zeitkategorien/

api/stammdaten/zeitkategorie/  

Provides access to categories for working hours

> Get working hour category GET api/stammdaten/zeitkategorie/{kategorieId}
> Create working hour category POST api/stammdaten/zeitkategorie/
> Update working hour category PUT api/stammdaten/zeitkategorie/{kategorieId}
> Delete working hour category DELETE api/stammdaten/zeitkategorie/{kategorieId}

api/stammdaten/urlaubskategorien/  

Provides access to the list of all categories for holidays

> Get all holiday categories GET api/stammdaten/urlaubskategorien/

api/stammdaten/urlaubskategorie/  

Provides access to categories for holidays

> Get holiday category GET api/stammdaten/urlaubskategorie/{kategorieId}
> Create holiday category POST api/stammdaten/urlaubskategorie/
> Update holiday category PUT api/stammdaten/urlaubskategorie/{kategorieId}
> Delete holiday category DELETE api/stammdaten/urlaubskategorie/{kategorieId}

api/stammdaten/departments/  

Provides access to the list of all departments.

> Get all departments GET api/stammdaten/departments/

api/stammdaten/department/  

Provides access to departments

> Read department GET api/stammdaten/department/{departmentId}
> Create department POST api/stammdaten/department/
> Update department PUT api/stammdaten/department/{departmentId}
> Delete a department DELETE api/stammdaten/department/{departmentId}

api/stammdaten/branches/  

Provides access to the list of all branches.

> Get all branches GET api/stammdaten/branches/

api/stammdaten/branch/  

Provides access to branches

> Read branch GET api/stammdaten/branch/{branchId}
> Create branch POST api/stammdaten/branch/
> Update branch PUT api/stammdaten/branch/{branchId}
> Delete a branch DELETE api/stammdaten/branch/{branchId}

api/stammdaten/enums/  

Provides access to a list of different enumerations used in the data fields (for example, Zugehoerigkeit ). In this way it is possible to check the meaning behind the individual values.

> Read all enums GET api/stammdaten/enums/

api/stammdaten/countries/  

Procides access to a list of countries used in the data fields (for example Land ).

> Read all countries GET api/stammdaten/countries/

api/account/  

Provides access to the data of the currently logged in user

> Get user GET api/account/
> Update user PUT api/account/