Create or update an event (upsert by guid or systemId)
1 min
POST
https://dev1.frontu.com//client/api/v2/events
Body Parameters
- bodyobjectrequired
- guidstring<uuid>Formatuuid
- systemIdstring
- titlestringrequiredMax Length50
- descriptionstring
- startDateTimestring<date-time>requiredFormatdate-time
- endDateTimestring<date-time>requiredFormatdate-time
- typestring<custom_event | work_hour>requiredAllowedcustom_eventwork_hour
- busyboolean
- userstringrequiredDescription
- taskstringDescription
- resourcestringDescription
Responses
200
- Event
- guidstring<uuid>Formatuuid
- systemIdstring
- versioninteger
- titlestring
- descriptionstring
- startDateTimestring<date-time>Formatdate-time
- endDateTimestring<date-time>Formatdate-time
- typestring<custom_event | work_hour>Allowedcustom_eventwork_hour
- busyboolean
- deletedboolean
- userobject
- guidstring<uuid>Formatuuid
- systemIdstring
- taskobject
- guidstring<uuid>Formatuuid
- systemIdstring
- resourceobject
- guidstring<uuid>Formatuuid
- systemIdstring
- createdstring<date-time>Formatdate-time
- updatedstring<date-time>Formatdate-time
201
- Event
- guidstring<uuid>Formatuuid
- systemIdstring
- versioninteger
- titlestring
- descriptionstring
- startDateTimestring<date-time>Formatdate-time
- endDateTimestring<date-time>Formatdate-time
- typestring<custom_event | work_hour>Allowedcustom_eventwork_hour
- busyboolean
- deletedboolean
- userobject
- guidstring<uuid>Formatuuid
- systemIdstring
- taskobject
- guidstring<uuid>Formatuuid
- systemIdstring
- resourceobject
- guidstring<uuid>Formatuuid
- systemIdstring
- createdstring<date-time>Formatdate-time
- updatedstring<date-time>Formatdate-time
400
curl
curl --request POST \
--url https://dev1.frontu.com//client/api/v2/events \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"title": "",
"startDateTime": "",
"endDateTime": "",
"type": "",
"user": ""
}'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var raw = JSON.stringify({
"title": "",
"startDateTime": "",
"endDateTime": "",
"type": "",
"user": ""
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://dev1.frontu.com//client/api/v2/events", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://dev1.frontu.com//client/api/v2/events")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
request.body = JSON.dump({
"title": "",
"startDateTime": "",
"endDateTime": "",
"type": "",
"user": ""
})
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://dev1.frontu.com//client/api/v2/events"
payload = json.dumps({
"title": "",
"startDateTime": "",
"endDateTime": "",
"type": "",
"user": ""
})
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
// Updated
{
"guid": "",
"systemId": "",
"version": 0,
"title": "",
"description": "",
"startDateTime": "",
"endDateTime": "",
"type": "",
"busy": false,
"deleted": false,
"user": {
"guid": "",
"systemId": ""
},
"task": {
"guid": "",
"systemId": ""
},
"resource": {
"guid": "",
"systemId": ""
},
"created": "",
"updated": ""
}201
// Created
{
"guid": "",
"systemId": "",
"version": 0,
"title": "",
"description": "",
"startDateTime": "",
"endDateTime": "",
"type": "",
"busy": false,
"deleted": false,
"user": {
"guid": "",
"systemId": ""
},
"task": {
"guid": "",
"systemId": ""
},
"resource": {
"guid": "",
"systemId": ""
},
"created": "",
"updated": ""
}400
// Validation error