EnviroCar Service

Developer Guide

API Reference

Linked Open Data

Additional encodings for tracks

This is the groups resource.

/groups

GET

Get a list of all groups.

Response Schema

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

Response Example

{
    "groups": [
        {
            "created": "2013-06-25T10:00:30Z",
            "description": "Product Owner Description",
            "modified": "2013-06-28T08:47:16Z",
            "name": "Product Owner",
            "owner": {
                "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"
            }
        },
        {
            "description": "enviroCar Developer Group",
            "name": "enviroCar developer",
            "owner": {
                "name": "dustin"
            }
        },
        {
            "description": "FirstTestGroup_ARE_secondInputField",
            "name": "FirstTestGroup_ARE",
            "owner": {
                "created": "2013-06-28T15:47:04Z",
                "modified": "2013-07-03T16:13:46Z",
                "name": "AlbertRemke"
            }
        },
        {
            "description": "enviroCar Scrum Master Group",
            "name": "scrum master",
            "owner": {
                "name": "dustin"
            }
        },
        {
            "description": "52\u00b0North staff members",
            "name": "52\u00b0North",
            "owner": {
                "name": "daniel"
            }
        },
        {
            "description": "Wer sp\u00e4ter bremst bleibt l\u00e4nger schnell.",
            "name": "Raser-Club M\u00fcnster",
            "owner": {
                "created": "2013-06-25T15:21:17Z",
                "modified": "2013-07-01T17:18:03Z",
                "name": "Turbomartin"
            }
        }
    ]
}

/groups/:group

GET

Get the group with the name group.

Response Schema

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "additionalProperties": false,
    "id": "http://schema.envirocar.org/group.json#",
    "properties": {
        "created": {
            "type": "string",
            "format": "date-time"
        },
        "description": {
            "type": "string"
        },
        "modified": {
            "type": "string",
            "format": "date-time"
        },
        "name": {
            "type": "string"
        },
        "owner": {
            "$ref": "http://schema.envirocar.org/user.json#"
        }
    },
    "required": [
        "name",
        "description"
    ],
    "type": "object"
}

Response Example

{
    "groups": [
        {
            "created": "2013-06-25T10:00:30Z",
            "description": "Product Owner Description",
            "modified": "2013-06-28T08:47:16Z",
            "name": "Product Owner",
            "owner": {
                "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"
            }
        },
        {
            "description": "enviroCar Developer Group",
            "name": "enviroCar developer",
            "owner": {
                "name": "dustin"
            }
        },
        {
            "description": "FirstTestGroup_ARE_secondInputField",
            "name": "FirstTestGroup_ARE",
            "owner": {
                "created": "2013-06-28T15:47:04Z",
                "modified": "2013-07-03T16:13:46Z",
                "name": "AlbertRemke"
            }
        },
        {
            "description": "enviroCar Scrum Master Group",
            "name": "scrum master",
            "owner": {
                "name": "dustin"
            }
        },
        {
            "description": "52\u00b0North staff members",
            "name": "52\u00b0North",
            "owner": {
                "name": "daniel"
            }
        },
        {
            "description": "Wer sp\u00e4ter bremst bleibt l\u00e4nger schnell.",
            "name": "Raser-Club M\u00fcnster",
            "owner": {
                "created": "2013-06-25T15:21:17Z",
                "modified": "2013-07-01T17:18:03Z",
                "name": "Turbomartin"
            }
        }
    ]
}

PUT

Updates the group group.

Request Schema

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "id": "http://schema.envirocar.org/group.modify.json#",
    "type": "object",
    "additionalProperties": false,
    "properties": {
        "description": {
            "type": "string"
        }
    }
}

Request Example

{
  "description": "new groupdescription"
}

DELETE

Deletes the group group. Just the owner of the group is able to delete the group.

/groups/:group/members

GET

Get a list of members of the group group.

Response Schema

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

Response Example

{
    "users": [
        {
            "name": "test1",
            "mail": "test1@example.de",
            "created": "2013-06-25T09:56:13Z",
            "modified": "2013-07-01T14:19:19Z"
        },
        {
            "name": "test2",
            "mail": "test2@example.de",
            "created": "2013-06-25T07:56:10Z",
            "modified": "2013-07-01T18:19:36Z"
        }
    ]
}

POST

Adds a user to the group group.

Request Schema

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "id": "http://schema.envirocar.org/user.ref.json#",
    "type": "object",
    "additionalProperties": false,
    "required": [
        "name"
    ],
    "properties": {
        "name": {
            "$ref": "http://schema.envirocar.org/definitions.json#/username"
        }
    }
}

Request Example

{
  "name": "NewUserName",
}

/groups/:group/members/:member

Get the member member of the group group.

GET

Get the member member of the group group.

Response Schema

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "id": "http://schema.envirocar.org/user.json#",
    "type": "object",
    "required": [
        "name"
    ],
    "allOf": [
        {
            "$ref": "http://schema.envirocar.org/definitions.json#/optional-user-properties"
        },
        {
            "properties": {
                "created": {
                    "type": "string",
                    "format": "date-time"
                },
                "mail": {
                    "$ref": "http://schema.envirocar.org/definitions.json#/mail"
                },
                "modified": {
                    "type": "string",
                    "format": "date-time"
                },
                "name": {
                    "$ref": "http://schema.envirocar.org/definitions.json#/username"
                }
            }
        }
    ]
}

Response Example

{
    "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"
}

DELETE

Removes the user member from the group group.