anonymousland-synapse/docs/client-server/swagger_matrix/events

113 lines
2.9 KiB
Plaintext
Raw Normal View History

2014-08-22 08:40:37 -04:00
{
"apiVersion": "1.0.0",
"swaggerVersion": "1.2",
"basePath": "http://localhost:8080/matrix/client/api/v1",
"resourcePath": "/events",
2014-08-22 08:40:37 -04:00
"produces": [
"application/json"
],
"apis": [
{
"path": "/events",
2014-08-22 08:40:37 -04:00
"operations": [
{
"method": "GET",
"summary": "Listen on the event stream",
"notes": "This can only be done by the logged in user. This will block until an event is received, or until the timeout is reached.",
"type": "PaginationChunk",
"nickname": "get_event_stream"
2014-08-22 08:40:37 -04:00
}
],
"parameters": [
2014-08-22 08:40:37 -04:00
{
"name": "from",
"description": "The token to stream from.",
"required": false,
"type": "string",
"paramType": "query"
},
{
"name": "timeout",
"description": "The maximum time in milliseconds to wait for an event.",
"required": false,
"type": "integer",
"paramType": "query"
2014-08-22 08:40:37 -04:00
}
],
"responseMessages": [
2014-08-22 08:40:37 -04:00
{
"code": 400,
"message": "Bad pagination token."
2014-08-22 08:40:37 -04:00
}
]
},
{
"path": "/events/{eventId}",
2014-08-22 08:40:37 -04:00
"operations": [
{
"method": "GET",
"summary": "Get information about a single event.",
"notes": "Get information about a single event.",
"type": "Event",
"nickname": "get_event",
2014-08-22 08:40:37 -04:00
"parameters": [
{
"name": "eventId",
"description": "The event ID to get.",
2014-08-22 08:40:37 -04:00
"required": true,
"type": "string",
"paramType": "path"
}
],
"responseMessages": [
{
"code": 404,
"message": "Event not found."
2014-08-22 08:40:37 -04:00
}
]
}
]
}
],
"models": {
"PaginationChunk": {
"id": "PaginationChunk",
2014-08-22 08:40:37 -04:00
"properties": {
"start": {
"type": "string",
"description": "A token which correlates to the first value in \"chunk\" for paginating.",
"required": true
2014-08-22 08:40:37 -04:00
},
"end": {
"type": "string",
"description": "A token which correlates to the last value in \"chunk\" for paginating.",
"required": true
2014-08-22 08:40:37 -04:00
},
"chunk": {
"type": "array",
"description": "An array of events.",
"required": true,
"items": {
"$ref": "Event"
}
}
}
},
"Event": {
"id": "Event",
"properties": {
"event_id": {
"type": "string",
"description": "An ID which uniquely identifies this event.",
"required": true
2014-08-22 08:40:37 -04:00
},
"room_id": {
"type": "string",
"description": "The room in which this event occurred.",
"required": true
2014-08-22 08:40:37 -04:00
}
}
}
}
}