| @url = http://localhost:3000 |
| @stream_id = 1 |
| @topic_id = 1 |
| @partition_id = 1 |
| @consumer_group_id = 1 |
| @consumer_id = 1 |
| @client_id = 1 |
| @partition_id_payload_base64 = AQAAAA== |
| @message_1_payload_base64 = aGVsbG8= |
| @message_2_payload_base64 = d29ybGQ= |
| @header_1_payload_base_64 = dmFsdWUgMQ== |
| @root_username = iggy |
| @root_password = iggy |
| @user1_username = user1 |
| @user1_password = secret |
| @access_token = secret |
| @refresh_token = secret |
| @root_id = 1 |
| @user1_id = 2 |
| @pat_name = dev_token |
| @pat_raw_token = secret |
| |
| ### |
| GET {{url}} |
| |
| ### |
| GET {{url}}/ping |
| |
| ### |
| GET {{url}}/metrics |
| |
| ### |
| GET {{url}}/stats |
| Authorization: Bearer {{access_token}} |
| |
| ### |
| GET {{url}}/clients |
| Authorization: Bearer {{access_token}} |
| |
| ### |
| GET {{url}}/clients/{{client_id}} |
| Authorization: Bearer {{access_token}} |
| |
| |
| ### |
| POST {{url}}/users/login |
| Content-Type: application/json |
| |
| { |
| "username": "{{root_username}}", |
| "password": "{{root_password}}" |
| } |
| |
| ### |
| POST {{url}}/users/refresh-token |
| Content-Type: application/json |
| |
| { |
| "refresh_token": "{{refresh_token}}" |
| } |
| |
| ### |
| DELETE {{url}}/users/logout |
| Authorization: Bearer {{access_token}} |
| |
| ### |
| POST {{url}}/users |
| Authorization: Bearer {{access_token}} |
| Content-Type: application/json |
| |
| { |
| "username": "{{user1_username}}", |
| "password": "{{user1_password}}", |
| "status": "active", |
| "permissions": null |
| } |
| |
| ### |
| GET {{url}}/users |
| Authorization: Bearer {{access_token}} |
| |
| ### |
| GET {{url}}/users/{{user1_id}} |
| Authorization: Bearer {{access_token}} |
| |
| ### |
| PUT {{url}}/users/{{user1_id}} |
| Authorization: Bearer {{access_token}} |
| Content-Type: application/json |
| |
| { |
| "username": "{{user1_username}}", |
| "status": "active", |
| "permissions": null |
| } |
| |
| ### |
| PUT {{url}}/users/{{user1_id}}/password |
| Authorization: Bearer {{access_token}} |
| Content-Type: application/json |
| |
| { |
| "current_password": "{{user1_password}}", |
| "new_password": "secret1" |
| } |
| |
| ### |
| PUT {{url}}/users/{{user1_id}}/permissions |
| Authorization: Bearer {{access_token}} |
| Content-Type: application/json |
| |
| { |
| "permissions": { |
| "global": { |
| "manage_servers": false, |
| "read_servers": true, |
| "manage_users": true, |
| "read_users": true, |
| "manage_streams": false, |
| "read_streams": true, |
| "manage_topics": false, |
| "read_topics": true, |
| "poll_messages": true, |
| "send_messages": true |
| }, |
| "streams": { |
| "1": { |
| "manage_stream": false, |
| "read_stream": true, |
| "manage_topics": false, |
| "read_topics": true, |
| "poll_messages": true, |
| "send_messages": true, |
| "topics": { |
| "1": { |
| "manage_topic": false, |
| "read_topic": true, |
| "poll_messages": true, |
| "send_messages": true |
| } |
| } |
| } |
| } |
| } |
| } |
| |
| |
| ### |
| DELETE {{url}}/users/{{user1_id}} |
| Authorization: Bearer {{access_token}} |
| |
| ### |
| GET {{url}}/personal-access-tokens |
| Authorization: Bearer {{access_token}} |
| |
| ### |
| POST {{url}}/personal-access-tokens |
| Authorization: Bearer {{access_token}} |
| Content-Type: application/json |
| |
| { |
| "name": "{{pat_name}}", |
| "expiry": 1000 |
| } |
| |
| ### |
| POST {{url}}/personal-access-tokens/login |
| Content-Type: application/json |
| |
| { |
| "token": "{{pat_raw_token}}" |
| } |
| |
| ### |
| DELETE {{url}}/personal-access-tokens/{{pat_name}} |
| Authorization: Bearer {{access_token}} |
| |
| ### |
| GET {{url}}/streams |
| Authorization: Bearer {{access_token}} |
| |
| ### |
| GET {{url}}/streams/{{stream_id}} |
| Authorization: Bearer {{access_token}} |
| |
| ### |
| POST {{url}}/streams |
| Authorization: Bearer {{access_token}} |
| Content-Type: application/json |
| |
| { |
| "stream_id": {{stream_id}}, |
| "name": "stream1" |
| } |
| |
| ### |
| PUT {{url}}/streams/{{stream_id}} |
| Authorization: Bearer {{access_token}} |
| Content-Type: application/json |
| |
| { |
| "name": "stream1" |
| } |
| |
| ### |
| DELETE {{url}}/streams/{{stream_id}} |
| Authorization: Bearer {{access_token}} |
| |
| ### |
| DELETE {{url}}/streams/{{stream_id}}/purge |
| Authorization: Bearer {{access_token}} |
| |
| ### |
| GET {{url}}/streams/{{stream_id}}/topics |
| Authorization: Bearer {{access_token}} |
| |
| ### |
| GET {{url}}/streams/{{stream_id}}/topics/{{topic_id}} |
| Authorization: Bearer {{access_token}} |
| |
| ### |
| POST {{url}}/streams/{{stream_id}}/topics |
| Authorization: Bearer {{access_token}} |
| Content-Type: application/json |
| |
| { |
| "topic_id": {{topic_id}}, |
| "name": "topic1", |
| "partitions_count": 3, |
| "message_expiry": 0 |
| } |
| |
| ### |
| PUT {{url}}/streams/{{stream_id}}/topics/{{topic_id}} |
| Authorization: Bearer {{access_token}} |
| Content-Type: application/json |
| |
| { |
| "name": "topic1", |
| "message_expiry": 1000 |
| } |
| |
| ### |
| DELETE {{url}}/streams/{{stream_id}}/topics/{{topic_id}} |
| Authorization: Bearer {{access_token}} |
| |
| ### |
| DELETE {{url}}/streams/{{stream_id}}/topics/{{topic_id}}/purge |
| Authorization: Bearer {{access_token}} |
| |
| ### |
| POST {{url}}/streams/{{stream_id}}/topics/{{topic_id}}/partitions |
| Authorization: Bearer {{access_token}} |
| Content-Type: application/json |
| |
| { |
| "partitions_count": 3 |
| } |
| |
| ### |
| DELETE {{url}}/streams/{{stream_id}}/topics/{{topic_id}}/partitions?partitions_count=1 |
| Authorization: Bearer {{access_token}} |
| |
| ### |
| POST {{url}}/streams/{{stream_id}}/topics/{{topic_id}}/messages |
| Authorization: Bearer {{access_token}} |
| Content-Type: application/json |
| |
| { |
| "partitioning": { |
| "kind": "partition_id", |
| "value": "{{partition_id_payload_base64}}" |
| }, |
| "messages": [{ |
| "id": 0, |
| "payload": "{{message_1_payload_base64}}" |
| }, { |
| "id": 0, |
| "payload": "{{message_2_payload_base64}}", |
| "headers": { |
| "key_1": { |
| "kind": "string", |
| "value": "{{header_1_payload_base_64}}" |
| } |
| } |
| }] |
| } |
| |
| ### |
| GET {{url}}/streams/{{stream_id}}/topics/{{topic_id}}/messages?consumer_id={{consumer_id}}&partition_id={{partition_id}}&kind=offset&value=0&count=10&auto_commit=false |
| Authorization: Bearer {{access_token}} |
| |
| ### |
| PUT {{url}}/streams/{{stream_id}}/topics/{{topic_id}}/consumer-offsets |
| Authorization: Bearer {{access_token}} |
| Content-Type: application/json |
| |
| { |
| "consumer_id": {{consumer_id}}, |
| "partition_id": {{partition_id}}, |
| "offset": 1 |
| } |
| |
| ### |
| GET {{url}}/streams/{{stream_id}}/topics/{{topic_id}}/consumer-offsets?consumer_id={{consumer_id}}&partition_id={{partition_id}} |
| Authorization: Bearer {{access_token}} |
| |
| ### |
| GET {{url}}/streams/{{stream_id}}/topics/{{topic_id}}/consumer-groups |
| Authorization: Bearer {{access_token}} |
| |
| ### |
| GET {{url}}/streams/{{stream_id}}/topics/{{topic_id}}/consumer-groups/{{consumer_group_id}} |
| Authorization: Bearer {{access_token}} |
| |
| ### |
| POST {{url}}/streams/{{stream_id}}/topics/{{topic_id}}/consumer-groups |
| Authorization: Bearer {{access_token}} |
| Content-Type: application/json |
| |
| { |
| "consumer_group_id": {{consumer_group_id}}, |
| "name": "consumer_group_1", |
| } |
| |
| ### |
| DELETE {{url}}/streams/{{stream_id}}/topics/{{topic_id}}/consumer-groups/{{consumer_group_id}} |
| Authorization: Bearer {{access_token}} |