2018-01-26 22:11:42 +01:00
|
|
|
{
|
2018-03-02 22:04:25 +01:00
|
|
|
"add-subscriptions": {
|
|
|
|
"already_subscribed": {
|
|
|
|
"already_subscribed": {
|
|
|
|
"newbie@zulip.com": [
|
|
|
|
"new stream"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"msg": "",
|
|
|
|
"result": "success",
|
|
|
|
"subscribed": {}
|
|
|
|
},
|
|
|
|
"unauthorized_errors_fatal_false": {
|
|
|
|
"already_subscribed": {},
|
|
|
|
"msg": "",
|
|
|
|
"result": "success",
|
|
|
|
"subscribed": {},
|
|
|
|
"unauthorized": [
|
|
|
|
"private_stream"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"unauthorized_errors_fatal_true": {
|
|
|
|
"msg": "Unable to access stream (private_stream).",
|
|
|
|
"result": "error"
|
|
|
|
},
|
|
|
|
"without_principals": {
|
|
|
|
"already_subscribed": {},
|
|
|
|
"msg": "",
|
|
|
|
"result": "success",
|
|
|
|
"subscribed": {
|
|
|
|
"iago@zulip.com": [
|
|
|
|
"new stream"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
2018-01-27 22:26:16 +01:00
|
|
|
},
|
2018-03-02 22:04:25 +01:00
|
|
|
"create-user": {
|
|
|
|
"email_already_used_error": {
|
|
|
|
"msg": "Email 'newbie@zulip.com' already in use",
|
|
|
|
"result": "error"
|
|
|
|
},
|
|
|
|
"successful_response": {
|
|
|
|
"msg": "",
|
|
|
|
"result": "success"
|
|
|
|
}
|
2018-01-27 22:56:36 +01:00
|
|
|
},
|
2018-03-02 22:04:25 +01:00
|
|
|
"delete-queue": {
|
|
|
|
"bad_event_queue_id_error": {
|
|
|
|
"code": "BAD_EVENT_QUEUE_ID",
|
|
|
|
"msg": "Bad event queue id: 1518820930:1",
|
|
|
|
"queue_id": "1518820930:1",
|
|
|
|
"result": "error"
|
|
|
|
},
|
|
|
|
"successful_response": {
|
|
|
|
"msg": "",
|
|
|
|
"result": "success"
|
|
|
|
}
|
2018-01-27 23:18:19 +01:00
|
|
|
},
|
2018-03-02 22:04:25 +01:00
|
|
|
"get-all-streams": {
|
|
|
|
"msg": "",
|
|
|
|
"result": "success",
|
|
|
|
"streams": [
|
|
|
|
{
|
|
|
|
"description": "A Scandinavian country",
|
|
|
|
"invite_only": false,
|
|
|
|
"name": "Denmark",
|
|
|
|
"stream_id": 1
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"description": "Yet another Italian city",
|
|
|
|
"invite_only": false,
|
|
|
|
"name": "Rome",
|
|
|
|
"stream_id": 2
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"description": "Located in the United Kingdom",
|
|
|
|
"invite_only": false,
|
|
|
|
"name": "Scotland",
|
|
|
|
"stream_id": 3
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"description": "A northeastern Italian city",
|
|
|
|
"invite_only": false,
|
|
|
|
"name": "Venice",
|
|
|
|
"stream_id": 4
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"description": "A city in Italy",
|
|
|
|
"invite_only": false,
|
|
|
|
"name": "Verona",
|
|
|
|
"stream_id": 5
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"description": "New stream for testing",
|
|
|
|
"invite_only": false,
|
|
|
|
"name": "new stream",
|
|
|
|
"stream_id": 6
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"get-all-users": {
|
|
|
|
"members": [
|
|
|
|
{
|
|
|
|
"avatar_url": "https://secure.gravatar.com/avatar/818c212b9f8830dfef491b3f7da99a14?d=identicon&version=1",
|
|
|
|
"bot_type": null,
|
|
|
|
"email": "AARON@zulip.com",
|
|
|
|
"full_name": "aaron",
|
|
|
|
"is_active": true,
|
|
|
|
"is_admin": false,
|
|
|
|
"is_bot": false,
|
|
|
|
"user_id": 1
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"avatar_url": "https://secure.gravatar.com/avatar/77c3871a68c8d70356156029fd0a4999?d=identicon&version=1",
|
|
|
|
"bot_type": null,
|
|
|
|
"email": "cordelia@zulip.com",
|
|
|
|
"full_name": "Cordelia Lear",
|
|
|
|
"is_active": true,
|
|
|
|
"is_admin": false,
|
|
|
|
"is_bot": false,
|
|
|
|
"user_id": 3
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"avatar_url": "https://secure.gravatar.com/avatar/0cbf08f3a355995fa2ec542246e35123?d=identicon&version=1",
|
|
|
|
"bot_type": null,
|
|
|
|
"email": "newbie@zulip.com",
|
|
|
|
"full_name": "New User",
|
|
|
|
"is_active": true,
|
|
|
|
"is_admin": false,
|
|
|
|
"is_bot": false,
|
|
|
|
"user_id": 24
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"msg": "",
|
|
|
|
"result": "success"
|
|
|
|
},
|
|
|
|
"get-events-from-queue": {
|
|
|
|
"events": [
|
|
|
|
{
|
|
|
|
"id": 0,
|
|
|
|
"message": {
|
|
|
|
"avatar_url": "https://url/for/othello-bots/avatar",
|
|
|
|
"client": "website",
|
|
|
|
"content": "Something is rotten in the state of Denmark.",
|
|
|
|
"content_type": "text/x-markdown",
|
|
|
|
"display_recipient": "Denmark",
|
|
|
|
"id": 12345678,
|
|
|
|
"recipient_id": 12314,
|
|
|
|
"sender_email": "othello-bot@example.com",
|
|
|
|
"sender_full_name": "Othello Bot",
|
|
|
|
"sender_id": 13215,
|
|
|
|
"sender_realm_str": "example",
|
|
|
|
"sender_short_name": "othello-bot",
|
|
|
|
"subject": "Castle",
|
|
|
|
"subject_links": [],
|
|
|
|
"timestamp": 1375978403,
|
|
|
|
"type": "stream"
|
|
|
|
},
|
|
|
|
"type": "message"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"id": 1,
|
|
|
|
"message": {
|
|
|
|
"avatar_url": "https://url/for/othello-bots/avatar",
|
|
|
|
"client": "website",
|
|
|
|
"content": "I come not, friends, to steal away your hearts.",
|
|
|
|
"content_type": "text/x-markdown",
|
|
|
|
"display_recipient": [
|
|
|
|
{
|
|
|
|
"email": "hamlet@example.com",
|
|
|
|
"full_name": "Hamlet of Denmark",
|
|
|
|
"id": 31572,
|
|
|
|
"short_name": "hamlet"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"id": 12345679,
|
|
|
|
"recipient_id": 18391,
|
|
|
|
"sender_email": "othello-bot@example.com",
|
|
|
|
"sender_full_name": "Othello Bot",
|
|
|
|
"sender_id": 13215,
|
|
|
|
"sender_realm_str": "example",
|
|
|
|
"sender_short_name": "othello-bot",
|
|
|
|
"subject": "",
|
|
|
|
"subject_links": [],
|
|
|
|
"timestamp": 1375978404,
|
|
|
|
"type": "private"
|
|
|
|
},
|
|
|
|
"type": "message"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"msg": "",
|
|
|
|
"result": "success"
|
|
|
|
},
|
|
|
|
"get-profile": {
|
|
|
|
"client_id": "74c768b081076fdb3c4326256c17467e",
|
|
|
|
"email": "iago@zulip.com",
|
|
|
|
"full_name": "Iago",
|
|
|
|
"is_admin": true,
|
|
|
|
"is_bot": false,
|
|
|
|
"max_message_id": 30,
|
|
|
|
"msg": "",
|
|
|
|
"pointer": -1,
|
|
|
|
"result": "success",
|
|
|
|
"short_name": "iago",
|
|
|
|
"user_id": 5
|
2018-01-28 00:06:45 +01:00
|
|
|
},
|
|
|
|
"get-stream-id": {
|
2018-03-02 22:04:25 +01:00
|
|
|
"msg": "",
|
|
|
|
"result": "success",
|
|
|
|
"stream_id": 15
|
2018-01-28 00:39:16 +01:00
|
|
|
},
|
|
|
|
"get-subscribed-streams": {
|
2018-03-02 22:04:25 +01:00
|
|
|
"msg": "",
|
|
|
|
"result": "success",
|
|
|
|
"subscriptions": [
|
2018-01-28 00:39:16 +01:00
|
|
|
{
|
2018-03-02 22:04:25 +01:00
|
|
|
"audible_notifications": true,
|
|
|
|
"color": "#e79ab5",
|
|
|
|
"description": "A Scandinavian country",
|
|
|
|
"desktop_notifications": true,
|
|
|
|
"email_address": "Denmark+187b4125ed36d6af8b5d03ef4f65c0cf@zulipdev.com:9981",
|
|
|
|
"in_home_view": true,
|
|
|
|
"invite_only": false,
|
|
|
|
"name": "Denmark",
|
|
|
|
"pin_to_top": false,
|
|
|
|
"push_notifications": false,
|
|
|
|
"stream_id": 1,
|
|
|
|
"subscribers": [
|
2018-01-28 00:39:16 +01:00
|
|
|
"ZOE@zulip.com",
|
|
|
|
"hamlet@zulip.com",
|
|
|
|
"iago@zulip.com",
|
|
|
|
"othello@zulip.com",
|
|
|
|
"prospero@zulip.com"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2018-03-02 22:04:25 +01:00
|
|
|
"audible_notifications": true,
|
|
|
|
"color": "#e79ab5",
|
|
|
|
"description": "Located in the United Kingdom",
|
|
|
|
"desktop_notifications": true,
|
|
|
|
"email_address": "Scotland+f5786390183e60a1ccb18374f9d05649@zulipdev.com:9981",
|
|
|
|
"in_home_view": true,
|
|
|
|
"invite_only": false,
|
|
|
|
"name": "Scotland",
|
|
|
|
"pin_to_top": false,
|
|
|
|
"push_notifications": false,
|
|
|
|
"stream_id": 3,
|
|
|
|
"subscribers": [
|
2018-01-28 00:39:16 +01:00
|
|
|
"ZOE@zulip.com",
|
|
|
|
"iago@zulip.com",
|
|
|
|
"othello@zulip.com",
|
|
|
|
"prospero@zulip.com"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2018-03-02 22:04:25 +01:00
|
|
|
"audible_notifications": true,
|
|
|
|
"color": "#e79ab5",
|
|
|
|
"description": "A city in Italy",
|
|
|
|
"desktop_notifications": true,
|
|
|
|
"email_address": "Verona+faaa92dc82cf143174ddc098a1c832ef@zulipdev.com:9981",
|
|
|
|
"in_home_view": true,
|
|
|
|
"invite_only": false,
|
|
|
|
"name": "Verona",
|
|
|
|
"pin_to_top": false,
|
|
|
|
"push_notifications": false,
|
|
|
|
"stream_id": 5,
|
|
|
|
"subscribers": [
|
2018-01-28 00:39:16 +01:00
|
|
|
"AARON@zulip.com",
|
|
|
|
"ZOE@zulip.com",
|
|
|
|
"cordelia@zulip.com",
|
|
|
|
"hamlet@zulip.com",
|
|
|
|
"iago@zulip.com",
|
|
|
|
"othello@zulip.com",
|
|
|
|
"prospero@zulip.com"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2018-03-02 22:04:25 +01:00
|
|
|
"audible_notifications": false,
|
|
|
|
"color": "#76ce90",
|
|
|
|
"description": "New stream for testing",
|
|
|
|
"desktop_notifications": false,
|
|
|
|
"email_address": "new%0032stream+e1917b4fc733268e91fcc57cf79a9249@zulipdev.com:9981",
|
|
|
|
"in_home_view": true,
|
|
|
|
"invite_only": false,
|
|
|
|
"name": "new stream",
|
|
|
|
"pin_to_top": false,
|
|
|
|
"push_notifications": false,
|
|
|
|
"stream_id": 6,
|
|
|
|
"subscribers": [
|
2018-01-28 00:39:16 +01:00
|
|
|
"iago@zulip.com"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
2018-01-31 05:04:43 +01:00
|
|
|
},
|
2018-03-02 22:04:25 +01:00
|
|
|
"invalid-api-key": {
|
|
|
|
"msg": "Invalid API key",
|
|
|
|
"result": "error"
|
2018-01-31 06:06:56 +01:00
|
|
|
},
|
2018-03-02 22:04:25 +01:00
|
|
|
"invalid-pm-recipient-error": {
|
|
|
|
"code": "BAD_REQUEST",
|
|
|
|
"msg": "Invalid email 'eeshan@zulip.com'",
|
|
|
|
"result": "error"
|
2018-02-06 04:17:10 +01:00
|
|
|
},
|
2018-03-02 22:04:25 +01:00
|
|
|
"invalid-stream-error": {
|
|
|
|
"code": "BAD_REQUEST",
|
|
|
|
"msg": "Invalid stream name 'nonexistent'",
|
|
|
|
"result": "error"
|
2018-02-06 04:47:40 +01:00
|
|
|
},
|
2018-03-02 22:04:25 +01:00
|
|
|
"missing-request-argument-error": {
|
|
|
|
"code": "REQUEST_VARIABLE_MISSING",
|
|
|
|
"msg": "Missing 'content' argument",
|
|
|
|
"result": "error",
|
|
|
|
"var_name": "content"
|
2018-02-06 21:04:07 +01:00
|
|
|
},
|
2018-03-02 22:04:25 +01:00
|
|
|
"nonexistent-stream-error": {
|
2018-03-22 21:43:28 +01:00
|
|
|
"code": "STREAM_DOES_NOT_EXIST",
|
2018-03-02 22:04:25 +01:00
|
|
|
"msg": "Stream 'nonexistent_stream' does not exist",
|
2018-03-22 21:43:28 +01:00
|
|
|
"result": "error",
|
|
|
|
"stream": "nonexistent_stream"
|
2018-02-07 04:25:23 +01:00
|
|
|
},
|
2018-03-02 22:04:25 +01:00
|
|
|
"private-message": {
|
|
|
|
"id": 134,
|
|
|
|
"msg": "",
|
|
|
|
"result": "success"
|
2018-02-07 05:00:10 +01:00
|
|
|
},
|
|
|
|
"register-queue": {
|
2018-03-02 22:04:25 +01:00
|
|
|
"last_event_id": -1,
|
|
|
|
"msg": "",
|
|
|
|
"queue_id": "1517975029:0",
|
|
|
|
"result": "success"
|
2018-02-08 03:54:20 +01:00
|
|
|
},
|
2018-03-02 22:04:25 +01:00
|
|
|
"remove-subscriptions": {
|
|
|
|
"msg": "",
|
|
|
|
"not_subscribed": [],
|
|
|
|
"removed": [
|
|
|
|
"new stream"
|
|
|
|
],
|
|
|
|
"result": "success"
|
2018-02-16 20:25:59 +01:00
|
|
|
},
|
2018-03-02 22:04:25 +01:00
|
|
|
"render-message": {
|
|
|
|
"msg": "",
|
|
|
|
"rendered": "<p><strong>foo</strong></p>",
|
|
|
|
"result": "success"
|
2018-02-16 20:35:05 +01:00
|
|
|
},
|
2018-03-02 22:04:25 +01:00
|
|
|
"stream-message": {
|
|
|
|
"id": 134,
|
|
|
|
"msg": "",
|
|
|
|
"result": "success"
|
2018-02-16 21:03:50 +01:00
|
|
|
},
|
2018-03-02 22:04:25 +01:00
|
|
|
"update-message": {
|
|
|
|
"msg": "",
|
|
|
|
"result": "success"
|
2018-02-16 21:26:43 +01:00
|
|
|
},
|
|
|
|
"update-message-edit-permission-error": {
|
2018-03-02 22:04:25 +01:00
|
|
|
"code": "BAD_REQUEST",
|
|
|
|
"msg": "You don't have permission to edit this message",
|
|
|
|
"result": "error"
|
2018-02-25 01:01:45 +01:00
|
|
|
},
|
|
|
|
"upload-file": {
|
2018-03-02 22:04:25 +01:00
|
|
|
"msg": "",
|
|
|
|
"result": "success",
|
|
|
|
"uri": "/user_uploads/1/4e/m2A3MSqFnWRLUf9SaPzQ0Up_/zulip.txt"
|
2018-03-02 21:51:56 +01:00
|
|
|
},
|
2018-03-02 22:04:25 +01:00
|
|
|
"user-not-authorized-error": {
|
|
|
|
"code": "BAD_REQUEST",
|
|
|
|
"msg": "User not authorized for this query",
|
|
|
|
"result": "error"
|
2018-01-26 22:11:42 +01:00
|
|
|
}
|
|
|
|
}
|