Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Confluence API Endpoint for Calendar Entry

I am trying to use the API to create a calendar entry with Postman.  I seem to be close receiving a 200 OK response, but still failing on a couple of things.

Here is some of the items...

Using JSON PUT request


Auth - Basic Auth - Use your user name and password

Header - Key: Content-Type Value: application/x-www-form-urlencoded

Body -

"subCalendarId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",            "eventType":"Events",     
"what": "Test Meeting",     
"person": "(Your user ID)",    
"startDate": "Oct 11, 2020",    
"startTime": "10:00 AM",    
"endDate": "Oct 11, 2020",    
"endTime": "11:00 AM",    
"allDayEvent": "false",    
"where": "Test Room",}


It looks like it is going to the right URL, but my fields might be incorrect.  Anyone have any suggestions?  I have tried digging through the internet and some of the python suggestions didn't seem to work either.

1 answer

Hi Matt

In case you or anyone else still need this. The Rest API only works on Get for me, I too couldn't get it to work with put.

While inspecting how this works on the interface I've noticed that the page actually send the body as encoded URL instead of a json. Hence got it to work by mimicing what the interface is doing instead.

In your header change the content type to below
request.ContentType = "application/x-www-form-urlencoded; charset=UTF-8";

The URL format is something like below substitute your data into it.

"?confirmRemoveInvalidUsers=false&childSubCalendarId=&customEventTypeId={youreventtypeID}&eventType=custom&isSingleJiraDate=false&originalSubCalendarId=&originalStartDate=&originalEventType=&originalCustomEventTypeId=&recurrenceId=&subCalendarId=" + caldendaID + "&uid=&what=" + HttpUtility.UrlEncode(title) + "&startDate=" + HttpUtility.UrlEncode(startDateString) + "&startTime=" + HttpUtility.UrlEncode(startTimeString) + "&endDate=" + HttpUtility.UrlEncode(endDateString) + "&endTime=" + HttpUtility.UrlEncode(endTimeString) + "&allDayEvent=false&rruleStr=&until=&editAllInRecurrenceSeries=true&where=" + HttpUtility.UrlEncode(where) + "&url=&description=" + HttpUtility.UrlEncode(body) + "&userTimeZoneId =Australia%2FPerth";

Hope this helps.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Jira

Online AMA this week: Your project management questions answered by Jira Design Lead James Rotanson

We know that great teams require amazing project management chops. It's no surprise that great teams who use Jira have strong project managers, effective workflows, and secrets that bring planning ...

208 views 1 6
Read article

Atlassian Community Events