Use Events API to Create, Update, & Delete Events
Get Events
GET /v2/events/[event_id]
Optional Parameters
- event_id - If omitted then a list of events will be returned.
- project_id - Project ID
- from - Date range for Start date (yyyymmdd)
- to - Date range for Due date (yyyymmdd)
- start_from - Start date from (yyyymmdd)
- start_to - Start date to (yyyymmdd)
- due_from - Due date from (yyyymmdd)
- due_to - Due date to (yyyymmdd)
- limit - Limit number of records returned. Maximum 1000 records
- offset - Start position for fetching records
Sample Response
{
"paging": {
"offset": 0,
"limit": 1000,
"total_records": 1
},
"data": [
{
"event_id": "1",
"event_name": "Project X",
"start_date": "2015-01-04 00:00:00",
"due_date": "2015-01-31 00:00:00",
"project_id": "0",
"date_created": "2014-09-19 16:51:07",
"date_modified": "0000-00-00 00:00:00",
"user_id": "1234"
}
]
}
"paging": {
"offset": 0,
"limit": 1000,
"total_records": 1
},
"data": [
{
"event_id": "1",
"event_name": "Project X",
"start_date": "2015-01-04 00:00:00",
"due_date": "2015-01-31 00:00:00",
"project_id": "0",
"date_created": "2014-09-19 16:51:07",
"date_modified": "0000-00-00 00:00:00",
"user_id": "1234"
}
]
}
Example Calls
Get all events
curl -X GET "https://api.projectbubble.com/v2/events" \
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8"
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8"
Get events with a due date within a one week range
curl -X GET "https://api.projectbubble.com/v2/events?due_date_from=20150101&due_date_to=20150107" \
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8"
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8"
Response Codes
200 - OK or "No records found"
401 - Permission error. Your user account (API Key) does not have permission to access events.
Create Event
POST /v2/events
Required Parameters
- event_name - Name of event
- start_date - Start date (yyyymmdd)
- due_date - Due date (yyyymmdd)
Optional Parameters
- project_id - Project ID
- user_id - Creator user ID
Sample Response
{
"data": {
"event_id": "2",
"event_name": "My first api event",
"start_date": "2014-01-27 00:00:00",
"due_date": "2014-01-27 00:00:00",
"project_id": "0",
"date_created": "2015-01-27 09:32:00",
"date_modified": "0000-00-00 00:00:00",
"user_id": "1234"
}
}
"data": {
"event_id": "2",
"event_name": "My first api event",
"start_date": "2014-01-27 00:00:00",
"due_date": "2014-01-27 00:00:00",
"project_id": "0",
"date_created": "2015-01-27 09:32:00",
"date_modified": "0000-00-00 00:00:00",
"user_id": "1234"
}
}
Example Calls
curl -X POST "https://api.projectbubble.com/v2/events" \
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8" \
-d '{"event_name": "My first api event", "start_date": "20150127", "due_date": "20150129"}'
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8" \
-d '{"event_name": "My first api event", "start_date": "20150127", "due_date": "20150129"}'
Response Codes
201 - Created OK
401 - Permission error. Your user account (API Key) does not have permission to access events.
404 - Events not found
401 - Permission error. Your user account (API Key) does not have permission to access events.
404 - Events not found
Update Event
PUT /v2/events/[event_id]
Required Parameters
- event_id - Id of event to change
Optional Parameters
- event_name - Name of event
- start_date - Start date (yyyymmdd)
- due_date - Due date (yyyymmdd)
- project_id - Project ID
- user_id - Creator user ID
Sample Response
{
"data": {
"event_id": "2",
"event_name": "My first api event updated",
"start_date": "2014-01-27 00:00:00",
"due_date": "2014-01-27 00:00:00",
"project_id": "0",
"date_created": "2015-01-27 09:32:00",
"date_modified": "2015-01-27 09:41:18",
"user_id": "1234"
}
}
"data": {
"event_id": "2",
"event_name": "My first api event updated",
"start_date": "2014-01-27 00:00:00",
"due_date": "2014-01-27 00:00:00",
"project_id": "0",
"date_created": "2015-01-27 09:32:00",
"date_modified": "2015-01-27 09:41:18",
"user_id": "1234"
}
}
Example Calls
curl -X PUT "https://api.projectbubble.com/v2/events/2" \
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8" \
-d '{"event_name": "My first api event updated"}'
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8" \
-d '{"event_name": "My first api event updated"}'
Response Codes
200 - OK
401 - Permission error. Your user account (API Key) does not have permission to access events.
404 - Events not found
401 - Permission error. Your user account (API Key) does not have permission to access events.
404 - Events not found
Delete Event
DELETE /v2/events/[event_id]
Sample Response
[]
Example Calls
curl -X DELETE "https://api.projectbubble.com/v2/events/2" \
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8"
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8"
Response Codes
200 - OK
401 - Permission error. Your user account (API Key) does not have permission to access events.
404 - Events not foun
401 - Permission error. Your user account (API Key) does not have permission to access events.
404 - Events not foun
© 2005 - 2024 ProProfs