-
Notifications
You must be signed in to change notification settings - Fork 2
/
openapi.yml
91 lines (90 loc) · 2.34 KB
/
openapi.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
---
openapi: 3.0.3
info:
title: Pulsar Viewer
version: 2.0.0
paths:
/read:
get:
tags:
- Reader Resource
parameters:
- name: topic
in: query
required: true
description: Topic name which messages are requested e.g. persistent://public/default/my-topic
schema:
minLength: 1
type: string
nullable: false
- name: from
in: query
required: false
description: Filtering messages which should be newer than epoch seconds of this "from" field. This field is not required but highly recommended.
schema:
format: int64
type: integer
- name: to
in: query
required: false
description: Filtering messages which should be older than epoch seconds of this "to" field.
schema:
format: int64
type: integer
- name: jsonPathPredicate
in: query
required: false
description: JsonPath predicate to filter messages e.g. $[?(@.type=='order-created')]
schema:
type: string
- name: key
in: query
required: false
description: Filtering by key of the message.
schema:
type: string
- name: messageId
in: query
schema:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ReaderInfo'
components:
schemas:
ReaderInfo:
type: object
properties:
messages:
type: array
items:
$ref: '#/components/schemas/ReaderMessage'
errorMessage:
type: string
description: Error message for a user
ReaderMessage:
type: object
properties:
messageId:
type: string
description: Message ID
payload:
type: string
description: message data itself
topic:
type: string
description: name of topic in which message is stored
producer:
type: string
description: name of message producer
publishTime:
format: int64
type: integer
description: epoch milliseconds
key:
type: string
description: Message key