EnviroCar Service

Developer Guide

API Reference

Linked Open Data

Additional encodings for tracks

/users/:username/activities

This is the activities of a user resource.

GET

Get a list of activities of the user username.

Response Schema

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "id": "http://schema.envirocar.org/activities.json#",
    "type": "object",
    "required": [
        "activities"
    ],
    "additionalProperties": false,
    "properties": {
        "activities": {
            "type": "array",
            "minItems": 0,
            "items": {
                "$ref": "http://schema.envirocar.org/activity.json#"
            }
        }
    }
}

Response Example

{
    "activities": [
        {
            "time": "2013-07-12T12:10:33Z",
            "track": {
                "id": "51dff239e4b0feb05dbee0d7",
                "modified": "2013-07-12T12:10:33Z",
                "name": "Track 2013-7-12"
            },
            "type": "CREATED_TRACK",
            "user": {
                "country": "Germany",
                "created": "2013-06-25T09:56:13Z",
                "dayOfBirth": "1989-01-01",
                "firstName": "Jakob",
                "gender": "m",
                "language": "de-DE",
                "lastName": "M",
                "mail": "jakob@jakob.de",
                "modified": "2013-07-10T08:30:04Z",
                "name": "jakob1"
            }
        },
        {
            "time": "2013-07-12T12:03:45Z",
            "track": {
                "id": "51dff0a1e4b0feb05dbee00e",
                "modified": "2013-07-12T12:03:45Z",
                "name": "Track 2013-7-12"
            },
            "type": "CREATED_TRACK",
            "user": {
                "country": "Germany",
                "created": "2013-06-25T09:56:13Z",
                "dayOfBirth": "1989-01-01",
                "firstName": "Jakob",
                "gender": "m",
                "language": "de-DE",
                "lastName": "M",
                "mail": "jakob@jakob.de",
                "modified": "2013-07-10T08:30:04Z",
                "name": "jakob1"
            }
        }
    ]
}

/users/:username/activities/:activity

This is the activity of acitvities of a user username.

GET

Get the activity activity of the activities of a user username.

Response Schema

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "id": "http://schema.envirocar.org/activity.json#",
    "type": "object",
    "required": [
        "time",
        "user",
        "type"
    ],
    "properties": {
        "time": {
            "type": "string",
            "format": "date-time"
        },
        "user": {
            "$ref": "http://schema.envirocar.org/user.json#"
        },
        "type": {
            "type": "string"
        }
    },
    "oneOf": [
        {
            "$ref": "#/definitions/self-activity"
        },
        {
            "$ref": "#/definitions/group-activity"
        },
        {
            "$ref": "#/definitions/track-activity"
        },
        {
            "$ref": "#/definitions/user-activity"
        }
    ],
    "definitions": {
        "group-activity": {
            "properties": {
                "group": {
                    "$ref": "http://schema.envirocar.org/group.json#"
                },
                "type": {
                    "enum": [
                        "CREATED_GROUP",
                        "CHANGED_GROUP",
                        "JOINED_GROUP",
                        "LEFT_GROUP",
                        "DELETED_GROUP"
                    ]
                }
            }
        },
        "track-activity": {
            "properties": {
                "track": {
                    "$ref": "http://schema.envirocar.org/definitions.json#/track-ref"
                },
                "type": {
                    "enum": [
                        "CREATED_TRACK"
                    ]
                }
            }
        },
        "user-activity": {
            "properties": {
                "other": {
                    "$ref": "http://schema.envirocar.org/user.json#"
                },
                "type": {
                    "enum": [
                        "FRIENDED_USER",
                        "UNFRIENDED_USER"
                    ]
                }
            }
        },
        "self-activity": {
            "properties": {
                "type": {
                    "enum": [
                        "CHANGED_PROFILE"
                    ]
                }
            }
        }
    }
}

Response Example

{
    "activities": [
        {
            "time": "2013-07-12T12:10:33Z",
            "type": "CREATED_TRACK",
            "user": {
                "name": "Test",
                "mail": "Test@test.de",
                "created": "2013-06-25T09:56:13Z",
                "modified": "2013-07-10T08:30:04Z",
                "firstName": "Test",
                "lastName": "T",
                "gender": "m",
                "dayOfBirth": "1989-01-01",
                "country": "Germany",
                "language": "de-DE"
            },
            "track": {
                "id": "51dff239e4b0feb05dbee0d7",
                "modified": "2013-07-12T12:10:33Z",
                "name": "Track 2013-7-12"
            }
        },
        {
            "time": "2013-07-12T12:03:45Z",
            "type": "CREATED_TRACK",
            "user": {
                "name": "Test",
                "mail": "Test@test.de",
                "created": "2013-06-25T09:56:13Z",
                "modified": "2013-07-10T08:30:04Z",
                "firstName": "Test",
                "lastName": "T",
                "gender": "m",
                "dayOfBirth": "1989-01-01",
                "country": "Germany",
                "language": "de-DE"
            },
            "track": {
                "id": "51dff0a1e4b0feb05dbee00e",
                "modified": "2013-07-12T12:03:45Z",
                "name": "Track 2013-7-12"
            }
        }
    ]
}

/users/:username/friendActivities

This is the fiend-activities of a user resource.

GET

Get a list of acitvities of the friends of a user username.

Response Schema

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "id": "http://schema.envirocar.org/activities.json#",
    "type": "object",
    "required": [
        "activities"
    ],
    "additionalProperties": false,
    "properties": {
        "activities": {
            "type": "array",
            "minItems": 0,
            "items": {
                "$ref": "http://schema.envirocar.org/activity.json#"
            }
        }
    }
}

Response Example

{
    "activities": [
        {
            "time": "2013-07-12T12:10:33Z",
            "track": {
                "id": "51dff239e4b0feb05dbee0d7",
                "modified": "2013-07-12T12:10:33Z",
                "name": "Track 2013-7-12"
            },
            "type": "CREATED_TRACK",
            "user": {
                "country": "Germany",
                "created": "2013-06-25T09:56:13Z",
                "dayOfBirth": "1989-01-01",
                "firstName": "Jakob",
                "gender": "m",
                "language": "de-DE",
                "lastName": "M",
                "mail": "jakob@jakob.de",
                "modified": "2013-07-10T08:30:04Z",
                "name": "jakob1"
            }
        },
        {
            "time": "2013-07-12T12:03:45Z",
            "track": {
                "id": "51dff0a1e4b0feb05dbee00e",
                "modified": "2013-07-12T12:03:45Z",
                "name": "Track 2013-7-12"
            },
            "type": "CREATED_TRACK",
            "user": {
                "country": "Germany",
                "created": "2013-06-25T09:56:13Z",
                "dayOfBirth": "1989-01-01",
                "firstName": "Jakob",
                "gender": "m",
                "language": "de-DE",
                "lastName": "M",
                "mail": "jakob@jakob.de",
                "modified": "2013-07-10T08:30:04Z",
                "name": "jakob1"
            }
        }
    ]
}

/users/:username/friendActivities/:activity

This is the activity of friend-acitvities of a user username.

GET

Get the activity activity of the activities of a user username.

Response Schema

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "id": "http://schema.envirocar.org/activity.json#",
    "type": "object",
    "required": [
        "time",
        "user",
        "type"
    ],
    "properties": {
        "time": {
            "type": "string",
            "format": "date-time"
        },
        "user": {
            "$ref": "http://schema.envirocar.org/user.json#"
        },
        "type": {
            "type": "string"
        }
    },
    "oneOf": [
        {
            "$ref": "#/definitions/self-activity"
        },
        {
            "$ref": "#/definitions/group-activity"
        },
        {
            "$ref": "#/definitions/track-activity"
        },
        {
            "$ref": "#/definitions/user-activity"
        }
    ],
    "definitions": {
        "group-activity": {
            "properties": {
                "group": {
                    "$ref": "http://schema.envirocar.org/group.json#"
                },
                "type": {
                    "enum": [
                        "CREATED_GROUP",
                        "CHANGED_GROUP",
                        "JOINED_GROUP",
                        "LEFT_GROUP",
                        "DELETED_GROUP"
                    ]
                }
            }
        },
        "track-activity": {
            "properties": {
                "track": {
                    "$ref": "http://schema.envirocar.org/definitions.json#/track-ref"
                },
                "type": {
                    "enum": [
                        "CREATED_TRACK"
                    ]
                }
            }
        },
        "user-activity": {
            "properties": {
                "other": {
                    "$ref": "http://schema.envirocar.org/user.json#"
                },
                "type": {
                    "enum": [
                        "FRIENDED_USER",
                        "UNFRIENDED_USER"
                    ]
                }
            }
        },
        "self-activity": {
            "properties": {
                "type": {
                    "enum": [
                        "CHANGED_PROFILE"
                    ]
                }
            }
        }
    }
}

Response Example

{
    "activities": [
        {
            "time": "2013-07-12T12:10:33Z",
            "type": "CREATED_TRACK",
            "user": {
                "name": "Test",
                "mail": "Test@test.de",
                "created": "2013-06-25T09:56:13Z",
                "modified": "2013-07-10T08:30:04Z",
                "firstName": "Test",
                "lastName": "T",
                "gender": "m",
                "dayOfBirth": "1989-01-01",
                "country": "Germany",
                "language": "de-DE"
            },
            "track": {
                "id": "51dff239e4b0feb05dbee0d7",
                "modified": "2013-07-12T12:10:33Z",
                "name": "Track 2013-7-12"
            }
        },
        {
            "time": "2013-07-12T12:03:45Z",
            "type": "CREATED_TRACK",
            "user": {
                "name": "Test",
                "mail": "Test@test.de",
                "created": "2013-06-25T09:56:13Z",
                "modified": "2013-07-10T08:30:04Z",
                "firstName": "Test",
                "lastName": "T",
                "gender": "m",
                "dayOfBirth": "1989-01-01",
                "country": "Germany",
                "language": "de-DE"
            },
            "track": {
                "id": "51dff0a1e4b0feb05dbee00e",
                "modified": "2013-07-12T12:03:45Z",
                "name": "Track 2013-7-12"
            }
        }
    ]
}

/groups/:groupname/activities

This is the group-activities of a group resource.

GET

Get a list of group-acitvities of a group groupname.

Response Schema

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "id": "http://schema.envirocar.org/activities.json#",
    "type": "object",
    "required": [
        "activities"
    ],
    "additionalProperties": false,
    "properties": {
        "activities": {
            "type": "array",
            "minItems": 0,
            "items": {
                "$ref": "http://schema.envirocar.org/activity.json#"
            }
        }
    }
}

Response Example

{
    "activities": [
        {
            "time": "2013-07-12T12:10:33Z",
            "track": {
                "id": "51dff239e4b0feb05dbee0d7",
                "modified": "2013-07-12T12:10:33Z",
                "name": "Track 2013-7-12"
            },
            "type": "CREATED_TRACK",
            "user": {
                "country": "Germany",
                "created": "2013-06-25T09:56:13Z",
                "dayOfBirth": "1989-01-01",
                "firstName": "Jakob",
                "gender": "m",
                "language": "de-DE",
                "lastName": "M",
                "mail": "jakob@jakob.de",
                "modified": "2013-07-10T08:30:04Z",
                "name": "jakob1"
            }
        },
        {
            "time": "2013-07-12T12:03:45Z",
            "track": {
                "id": "51dff0a1e4b0feb05dbee00e",
                "modified": "2013-07-12T12:03:45Z",
                "name": "Track 2013-7-12"
            },
            "type": "CREATED_TRACK",
            "user": {
                "country": "Germany",
                "created": "2013-06-25T09:56:13Z",
                "dayOfBirth": "1989-01-01",
                "firstName": "Jakob",
                "gender": "m",
                "language": "de-DE",
                "lastName": "M",
                "mail": "jakob@jakob.de",
                "modified": "2013-07-10T08:30:04Z",
                "name": "jakob1"
            }
        }
    ]
}

/groups/:groupname/activities/:activity

This is the activity activity of group-acitvities of a group groupname.

GET

Get the activity activity of the activities of a user username.

Response Schema

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "id": "http://schema.envirocar.org/activity.json#",
    "type": "object",
    "required": [
        "time",
        "user",
        "type"
    ],
    "properties": {
        "time": {
            "type": "string",
            "format": "date-time"
        },
        "user": {
            "$ref": "http://schema.envirocar.org/user.json#"
        },
        "type": {
            "type": "string"
        }
    },
    "oneOf": [
        {
            "$ref": "#/definitions/self-activity"
        },
        {
            "$ref": "#/definitions/group-activity"
        },
        {
            "$ref": "#/definitions/track-activity"
        },
        {
            "$ref": "#/definitions/user-activity"
        }
    ],
    "definitions": {
        "group-activity": {
            "properties": {
                "group": {
                    "$ref": "http://schema.envirocar.org/group.json#"
                },
                "type": {
                    "enum": [
                        "CREATED_GROUP",
                        "CHANGED_GROUP",
                        "JOINED_GROUP",
                        "LEFT_GROUP",
                        "DELETED_GROUP"
                    ]
                }
            }
        },
        "track-activity": {
            "properties": {
                "track": {
                    "$ref": "http://schema.envirocar.org/definitions.json#/track-ref"
                },
                "type": {
                    "enum": [
                        "CREATED_TRACK"
                    ]
                }
            }
        },
        "user-activity": {
            "properties": {
                "other": {
                    "$ref": "http://schema.envirocar.org/user.json#"
                },
                "type": {
                    "enum": [
                        "FRIENDED_USER",
                        "UNFRIENDED_USER"
                    ]
                }
            }
        },
        "self-activity": {
            "properties": {
                "type": {
                    "enum": [
                        "CHANGED_PROFILE"
                    ]
                }
            }
        }
    }
}

Response Example

{
    "activities": [
        {
            "time": "2013-07-12T12:10:33Z",
            "type": "CREATED_TRACK",
            "user": {
                "name": "Test",
                "mail": "Test@test.de",
                "created": "2013-06-25T09:56:13Z",
                "modified": "2013-07-10T08:30:04Z",
                "firstName": "Test",
                "lastName": "T",
                "gender": "m",
                "dayOfBirth": "1989-01-01",
                "country": "Germany",
                "language": "de-DE"
            },
            "track": {
                "id": "51dff239e4b0feb05dbee0d7",
                "modified": "2013-07-12T12:10:33Z",
                "name": "Track 2013-7-12"
            }
        },
        {
            "time": "2013-07-12T12:03:45Z",
            "type": "CREATED_TRACK",
            "user": {
                "name": "Test",
                "mail": "Test@test.de",
                "created": "2013-06-25T09:56:13Z",
                "modified": "2013-07-10T08:30:04Z",
                "firstName": "Test",
                "lastName": "T",
                "gender": "m",
                "dayOfBirth": "1989-01-01",
                "country": "Germany",
                "language": "de-DE"
            },
            "track": {
                "id": "51dff0a1e4b0feb05dbee00e",
                "modified": "2013-07-12T12:03:45Z",
                "name": "Track 2013-7-12"
            }
        }
    ]
}