Events

Events are the building blocks of the organization calendar. This API enables CRUD operations on Events.

Events collection

GET

Retrieve list of events of a specific organization member.

GET /orgs/{org_pk}/members/{member_pk}/events/

Example request:

curl -iL --request GET "https:/www.readycloud.com/api/v2/orgs/1/members/1/events/?bearer_token=4ef5b29b1f4f35c383bebfccf4bf4d01"

Response 200 (application/json):

{
    "count": 1,
    "next": null,
    "previous": null,
    "results": [
        {
            "alert_at": "2018-03-30T08:18:48Z",
            "alert_dismissed_at": "2018-03-30T08:18:48Z",
            "all_day": false,
            "attachments": [],
            "attendees": [],
            "contact_attendees": [],
            "color": null,
            "created_at": "2018-03-30T08:18:48Z",
            "description": "should go to the grocery store to buy some milk",
            "ends_at": "2018-03-30T08:18:48Z",
            "location": "grocery store",
            "starts_at": "2018-03-30T08:18:48Z",
            "title": "remember the milk",
            "updated_at": "2018-03-30T08:18:48Z",
            "url": "/api/v2/orgs/1/members/1/events/1/",
            "visited_at": "2018-03-30T08:18:48Z"
        }
    ]
}

POST

Create new event for a specific organization member.

POST /orgs/{org_pk}/members/{member_pk}/events/

Example request:

curl -iL --request POST -H "Content-Type: application/json" --upload-file data.json "https:/www.readycloud.com/api/v2/orgs/1/members/1/events/?bearer_token=4ef5b29b1f4f35c383bebfccf4bf4d01"

data.json:

{
    "alert_at": "2018-03-30T08:18:48Z",
    "alert_dismissed_at": null,
    "all_day": false,
    "attachments": [],
    "attendees": [],
    "color": null,
    "created_at": "2018-03-30T08:18:48Z",
    "description": "",
    "ends_at": "2018-03-30T08:18:48Z",
    "location": "",
    "starts_at": "2018-03-30T08:18:48Z",
    "title": "call Jane",
    "updated_at": "2018-03-30T08:18:48Z",
    "visited_at": "2018-03-30T08:18:48Z"
}

Response 201 (application/json):

{
    "alert_at": "2018-03-30T08:18:48Z",
    "alert_dismissed_at": null,
    "all_day": false,
    "attachments": [],
    "attendees": [],
    "contact_attendees": [],
    "color": null,
    "created_at": "2018-03-30T00:00:16.159321Z",
    "description": "",
    "ends_at": "2018-03-30T08:18:48Z",
    "location": "",
    "starts_at": "2018-03-30T08:18:48Z",
    "title": "call Jane",
    "updated_at": "2018-03-30T00:00:16.159321Z",
    "url": "/api/v2/orgs/1/members/1/events/2/",
    "visited_at": "2018-03-30T08:18:48Z"
}

Event

GET

Retrieve details of a specific event.

GET /orgs/{org_pk}/members/{member_pk}/events/{event_pk}/

Example request:

curl -iL --request GET "https:/www.readycloud.com/api/v2/orgs/1/members/1/events/1/?bearer_token=4ef5b29b1f4f35c383bebfccf4bf4d01"

Response 200 (application/json):

{
    "alert_at": "2018-03-30T08:18:48Z",
    "alert_dismissed_at": "2018-03-30T08:18:48Z",
    "all_day": false,
    "attachments": [],
    "attendees": [],
    "contact_attendees": [],
    "color": null,
    "created_at": "2018-03-30T08:18:48Z",
    "description": "should go to the grocery store to buy some milk",
    "ends_at": "2018-03-30T08:18:48Z",
    "location": "grocery store",
    "starts_at": "2018-03-30T08:18:48Z",
    "title": "remember the milk",
    "updated_at": "2018-03-30T08:18:48Z",
    "url": "/api/v2/orgs/1/members/1/events/1/",
    "visited_at": "2018-03-30T08:18:48Z"
}

PATCH

Update a specific event.

PATCH /orgs/{org_pk}/members/{member_pk}/events/{event_pk}/

Example request:

curl -iL --request PATCH -H "Content-Type: application/json" --upload-file data.json "https:/www.readycloud.com/api/v2/orgs/1/members/1/events/1/?bearer_token=4ef5b29b1f4f35c383bebfccf4bf4d01"

data.json:

{
    "description": "should go to the grocery store to buy some milk if the fridge is empty"
}

Response 200 (application/json):

{
    "alert_at": "2018-03-30T08:18:48Z",
    "alert_dismissed_at": "2018-03-30T08:18:48Z",
    "all_day": false,
    "attachments": [],
    "attendees": [],
    "contact_attendees": [],
    "color": null,
    "created_at": "2018-03-30T08:18:48Z",
    "description": "should go to the grocery store to buy some milk if the fridge is empty",
    "ends_at": "2018-03-30T08:18:48Z",
    "location": "grocery store",
    "starts_at": "2018-03-30T08:18:48Z",
    "title": "remember the milk",
    "updated_at": "2018-03-30T00:00:16.159321Z",
    "url": "/api/v2/orgs/1/members/1/events/1/",
    "visited_at": "2018-03-30T08:18:48Z"
}

DELETE

Delete a specific event.

DELETE /orgs/{org_pk}/members/{member_pk}/events/{event_pk}/

Response 204 (application/json)