API

API

Subject to change

It's changed! There's a search endpoint. We'll document better asap. For now if you look at the PHP reference implementation

it uses the search filters.

One thing certain to change is the search endpoint. It's an incorrect implementation, but is there now as a stopgap to enable lookups of UUIDs to use the other endpoints.

Example:

First find the UUID for the group.


Request:
  GET api/1.0/search/groups.json?fields[]=title&fields[]=uuid&filter[~and][title]=Joe's Garage


Response:
{

    "3": {
        "title": "Joe's Garage",
        "uuid": "9b48213f-212f-4799-9430-0499683c3fb8"
    }

}



Request:
  GET api/1.0/group_events/9b48213f-212f-4799-9430-0499683c3fb8.json


Response:
[

    {
        "uid": "1",
        "field_category": [
            {
                "tid": "5"
            }
        ],
        "field_date_time": [
            {
                "value": "2014-09-01 20:00:00",
                "value2": "2014-09-01 21:00:00",
                "timezone": "Europe/Amsterdam",
                "offset": "7200",
                "offset2": "7200",
                "rrule": "RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=MO;COUNT=2;WKST=MO",
                "timezone_db": "Europe/Amsterdam",
                "date_type": "datetime"
            }
        ],
        "body": {
            "value": "This is a sample repeating event in the group that will repeat for two weeks.",
            "summary": "",
            "format": null,
            "safe_value": "This is a sample repeating event in the group that will repeat for two weeks.",
            "safe_summary": ""
        },
        "group_group": [ ],
        "field_image": [ ],
        "language": "English",
        "nid": "5",
        "uuid": "73cfeeb2-3687-4808-beaf-fc61c0e8c553",
        "field_offline": [
            {
                "target_id": "1",
                "uuid": "997bd4d7-8460-4799-a6c4-644c4946eba7"
            }
        ],
        "field_link": [ ],
        "field_phone": [ ],
        "created": "2014-08-30T13:51:25+00:00",
        "field_price": [ ],
        "title": "A repeating event in the Joe group",
        "field_topic": [
            {
                "tid": "15"
            }
        ],
        "vid": "5"
    },
    {
        "uid": "1",
        "field_category": [
            {
                "tid": "5"
            }
        ],
        "field_date_time": [
            {
                "value": "2014-09-08 20:00:00",
                "value2": "2014-09-08 21:00:00",
                "timezone": "Europe/Amsterdam",
                "offset": "7200",
                "offset2": "7200",
                "rrule": "RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=MO;COUNT=2;WKST=MO",
                "timezone_db": "Europe/Amsterdam",
                "date_type": "datetime"
            }
        ],
        "body": {
            "value": "This is a sample repeating event in the group that will repeat for two weeks.",
            "summary": "",
            "format": null,
            "safe_value": "This is a sample repeating event in the group that will repeat for two weeks.",
            "safe_summary": ""
        },
        "group_group": [ ],
        "field_image": [ ],
        "language": "English",
        "nid": "4",
        "uuid": "fa9f7618-9310-4cff-89bd-36d65b6824b3",
        "field_offline": [
            {
                "target_id": "1",
                "uuid": "997bd4d7-8460-4799-a6c4-644c4946eba7"
            }
        ],
        "field_link": [ ],
        "field_phone": [ ],
        "created": "2014-08-30T13:51:25+00:00",
        "field_price": [ ],
        "title": "A repeating event in the Joe group",
        "field_topic": [
            {
                "tid": "15"
            }
        ],
        "vid": "4"
    }

]

A bug already visible: the topics need to be by UUID :-(. You could then look them up using GET api/1.0/taxonom_term/:uuid

File

Retrieve

GET api/1.0/file/:uuid

Update

PUT api/1.0/file/:uuid

Create_raw

POST api/1.0/file/create_raw

Group_events

Index

GET api/1.0/group_events/:uuid

Location

Retrieve

GET api/1.0/location/:uuid

Update

PUT api/1.0/location/:uuid

Node

Retrieve

GET api/1.0/node/:uuid

Update

PUT api/1.0/node/:uuid

Files

GET api/1.0/node/:nid/:file_contents/:image_styles/files

Search

Retrieve

GET api/1.0/search/:index
Query String Parameters

(array) filter - optional

String of filters to apply to the search, in the form 'filter[~and][title]=title'. Filters can be nested.

(array) sort - optional

String containing the sort elements for the search in the form 'sort[nid]=DESC'. Multiple sort terms can be used.

(int) limit - optional

Number of results to retrieve.

(int) offset - optional

The position of the first returned search result.

(array) fields - optional

The fields to get, if fields are from a related entity, use field_relationship:field_name for getting a given field or field_relationship_* for getting the whole set of data

Taxonomy_term

Retrieve

GET api/1.0/taxonomy_term/:uuid

Update

PUT api/1.0/taxonomy_term/:uuid

User

Login

POST api/1.0/user/login
Body Data

(string) username - required

A valid username

(string) password - required

A valid password

Logout

POST api/1.0/user/logout

Token

POST api/1.0/user/token

iCalendar feeds

Incoming

Administrators of groups can 'Create new Event ical importer in group', link in the grey section where others can add events. You just need to fill the iCalendar feed into the 'FEED URL' box. If your events do not have geolocation you will also want to select the default 'Offline' location for events.

Outgoing

Each group has an iCal link to it's upcoming events feed on the group page.

Feeds of the other upcoming events pages to be created.