dlq.yml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348
  1. openapi: '3.0.3'
  2. info:
  3. title: payment-payin-work-redriver API
  4. version: 1.0.0
  5. servers:
  6. - url: /api/payment-payin-work-redriver/v1
  7. paths:
  8. /dlq:
  9. get:
  10. summary: SPA
  11. responses:
  12. '200':
  13. description: SPA main screen
  14. '500':
  15. description: Server error
  16. content:
  17. application/json:
  18. schema:
  19. $ref: '#/components/schemas/SPAError'
  20. /dlq/info:
  21. get:
  22. operationId: dlq_info
  23. summary: List visible queues
  24. security:
  25. - OAuth2:
  26. - lbc.payment.payment.read
  27. parameters: []
  28. responses:
  29. '200':
  30. description: Information about the visible queues
  31. content:
  32. application/json:
  33. schema:
  34. type: array
  35. items:
  36. $ref: '#/components/schemas/QueueInfo'
  37. '500':
  38. description: Server error
  39. content:
  40. application/json:
  41. schema:
  42. $ref: '#/components/schemas/SPAError'
  43. /dlq/ui/{asset}:
  44. get:
  45. summary: UI assets
  46. parameters:
  47. - in: path
  48. description: the relative path of the asset
  49. name: asset
  50. required: true
  51. schema:
  52. type: string
  53. example: favicon.ico
  54. responses:
  55. '200':
  56. description: Asset
  57. '500':
  58. description: Server error
  59. content:
  60. application/json:
  61. schema:
  62. $ref: '#/components/schemas/SPAError'
  63. /dsl/{name}/delete:
  64. post:
  65. operationId: dlq_delete
  66. summary: Delete the items
  67. parameters:
  68. - in: path
  69. description: the name of the queue from which to delete messages
  70. name: name
  71. required: true
  72. schema:
  73. type: string
  74. requestBody:
  75. description: a list of message ReceiptHandle values
  76. content:
  77. application/json:
  78. schema:
  79. type: array
  80. items:
  81. type: string
  82. responses:
  83. '205':
  84. description: Items deleted, reset view
  85. '500':
  86. description: Server error
  87. content:
  88. application/json:
  89. schema:
  90. $ref: '#/components/schemas/SPAError'
  91. /dsl/{name}/redrive:
  92. post:
  93. operationId: dlq_redrive
  94. summary: Redrive the selected items
  95. parameters:
  96. - in: path
  97. description: the name of the DLQ from which to redrive messages
  98. name: name
  99. required: true
  100. schema:
  101. type: string
  102. requestBody:
  103. description: a list of message ID/ReceiptHandle pairs. ID is needed to republish, ReceiptHandle to remove from DLQ. Process starts by ChangingVisility to protect messages, then SendMessage on original source queue, and on success, DeleteMessage for the original messages.
  104. content:
  105. application/json:
  106. schema:
  107. type: array
  108. items:
  109. type: object
  110. properties:
  111. id:
  112. type: string
  113. receipt_handle:
  114. type: string
  115. responses:
  116. '205':
  117. description: Items deleted, reset view
  118. '500':
  119. description: Server error
  120. content:
  121. application/json:
  122. schema:
  123. $ref: '#/components/schemas/SPAError'
  124. /dsl/{name}/purge:
  125. post:
  126. operationId: dlq_purge
  127. summary: purge the whole queue
  128. parameters:
  129. - in: path
  130. description: the name of the queue to purge
  131. name: name
  132. required: true
  133. schema:
  134. type: string
  135. responses:
  136. '205':
  137. description: Success, reset views
  138. '500':
  139. description: Server error
  140. content:
  141. application/json:
  142. schema:
  143. $ref: '#/components/schemas/SPAError'
  144. /dsl/{name}/release:
  145. post:
  146. operationId: dlq_release
  147. summary: Release the items for reception by resetting their VisibilityTimeout to 0
  148. parameters:
  149. - in: path
  150. description: the name of the queue to poll
  151. name: name
  152. required: true
  153. schema:
  154. type: string
  155. requestBody:
  156. description: a list of message ReceiptHandle values
  157. content:
  158. application/json:
  159. schema:
  160. type: array
  161. items:
  162. type: string
  163. responses:
  164. '200':
  165. description: Asset
  166. '500':
  167. description: Server error
  168. content:
  169. application/json:
  170. schema:
  171. $ref: '#/components/schemas/SPAError'
  172. /dlq/{name}/items:
  173. get:
  174. operationId: dlq_items
  175. summary: Get the first items ready to be received in a queue
  176. parameters:
  177. - in: path
  178. description: the name of the queue to poll
  179. name: name
  180. required: true
  181. schema:
  182. type: string
  183. - in: query
  184. description: the maximum number of items to return
  185. name: limit
  186. schema:
  187. type: integer
  188. default: 10
  189. maximum: 10
  190. security:
  191. - OAuth2:
  192. - lbc.payment.payment.read
  193. responses:
  194. '200':
  195. description: A list of messages
  196. content:
  197. application/json:
  198. schema:
  199. type: array
  200. items:
  201. $ref: '#/components/schemas/Message'
  202. '500':
  203. description: Server error
  204. content:
  205. application/json:
  206. schema:
  207. $ref: '#/components/schemas/SPAError'
  208. components:
  209. schemas:
  210. QueueURL:
  211. type: string
  212. description: The absolute URL to the queue
  213. example: https://sqs.amazonws.com/eu-west-3/12345678901234/some-queue
  214. QueueARN:
  215. type: string
  216. description: the Amazon resource name (ARN) of the queue.
  217. example: 'arn:sqs:eu-west-3:12345678901234:some_queue'
  218. Message:
  219. type: object
  220. properties:
  221. attributes:
  222. type: object
  223. properties:
  224. # AWSTraceHeader
  225. approximate_first_receive_timestamp:
  226. type: integer
  227. approximate_receive_count:
  228. type: integer
  229. minimum: 1
  230. # MessageDeduplicationId
  231. # MessageGroupId
  232. sender_id:
  233. type: string
  234. example: 'ABCDE1F2GH3I4JK5LMNOP:i-a123b456'
  235. description: IAM user or role
  236. sent_timestamp:
  237. type: integer
  238. sequence_number:
  239. type: integer
  240. body:
  241. type: string
  242. description: not url-encoded
  243. md5_of_body:
  244. type: string
  245. description: An MD5 digest of the non-URL-encoded message body string.
  246. md5_of_message_attributes:
  247. type: string
  248. description: An MD5 digest of the non-URL-encoded message attribute string. You can use this attribute to verify that Amazon SQS received the message correctly. Amazon SQS URL-decodes the message before creating the MD5 digest. For information about MD5, see RFC1321 (https://www.ietf.org/rfc/rfc1321.txt).
  249. message_id:
  250. type: string
  251. receipt_handle:
  252. type: string
  253. description: An identifier associated with the act of receiving the message. A new receipt handle is returned every time you receive a message. When deleting a message, you provide the last received receipt handle to delete the message.
  254. SPAError:
  255. type: object
  256. properties:
  257. message:
  258. type: string
  259. description: Free string describing the error
  260. example:
  261. message: an error message
  262. QueueInfo:
  263. type: object
  264. properties:
  265. name:
  266. type: string
  267. description: The queue name, for both human and machine use
  268. url:
  269. $ref: '#/components/schemas/QueueURL'
  270. attributes:
  271. type: object
  272. properties:
  273. approximate_number_of_messages:
  274. type: integer
  275. description: he approximate number of messages available for retrieval from the queue.
  276. approximate_number_of_messages_delayed:
  277. type: integer
  278. description: the approximate number of messages in the queue that are delayed and not available for reading immediately. This can happen when the queue is configured as a delay queue or when a message has been sent with a delay parameter.
  279. approximate_number_of_messages_not_visible:
  280. type: integer
  281. description: the approximate number of messages that are in flight. Messages are considered to be in flight if they have been sent to a client but have not yet been deleted or have not yet reached the end of their visibility window.
  282. created_timestamp:
  283. type: integer
  284. description: the time when the queue was created in seconds (epoch time).
  285. delay_seconds:
  286. type: integer
  287. description: the default delay on the queue in seconds.
  288. last_modified_timestamp:
  289. type: integer
  290. description: the time when the queue was last changed in seconds (epoch time).
  291. maximum_message_size:
  292. type: integer
  293. description: the limit of how many bytes a message can contain before Amazon SQS rejects it.
  294. message_retention_period:
  295. type: integer
  296. description: the length of time, in seconds, for which Amazon SQS retains a message. When you change a queue's attributes, the change can take up to 60 seconds for most of the attributes to propagate throughout the Amazon SQS system. Changes made to the MessageRetentionPeriod attribute can take up to 15 minutes and will impact existing messages in the queue potentially causing them to be expired and deleted if the MessageRetentionPeriod is reduced below the age of existing messages.
  297. # policy:
  298. queue_arn:
  299. $ref: '#/components/schemas/QueueARN'
  300. receive_message_wait_time_seconds:
  301. type: integer
  302. description: the length of time, in seconds, for which the ReceiveMessage action waits for a message to arrive.
  303. visibility_timeout:
  304. type: integer
  305. description: seconds a message remains hidden after being received. Max 43200.
  306. redrive_policy:
  307. type: object
  308. description: the parameters for the dead-letter queue functionality of the source queue
  309. properties:
  310. deadLetterTargetArn:
  311. type: string
  312. description: The Amazon Resource Name (ARN) of the dead-letter queue to which Amazon SQS moves messages after the value of maxReceiveCount is exceeded.
  313. maxReceiveCount:
  314. type: integer
  315. description: The number of times a message is delivered to the source queue before being moved to the dead-letter queue. Default 10. When the ReceiveCount for a message exceeds the maxReceiveCount for a queue, Amazon SQS moves the message to the dead-letter-queue.
  316. redrive_allow_policy:
  317. type: object
  318. description: the permissions for the dead-letter queue redrive permission and which source queues can specify dead-letter queues.
  319. properties:
  320. redrive_permission:
  321. description: The permission type that defines which source queues can specify the current queue as the dead-letter queue.
  322. enum:
  323. - allowAll
  324. - denyAll
  325. - byQueue
  326. source_queue_arns:
  327. type: array
  328. items:
  329. $ref: '#/components/schemas/QueueARN'
  330. # KmsMesterKeyID:
  331. # KmsDataKeyReusePeriodSeconds:
  332. # SqsManagerSseEnabled:
  333. # FifoQueue:
  334. # DeduplicationScope
  335. # FifoThroughputLimit
  336. securitySchemes:
  337. OAuth2:
  338. type: oauth2
  339. flows:
  340. authorizationCode:
  341. authorizationUrl: https://api.leboncoin.fr/api/oauth/v1/authorize
  342. tokenUrl: https://api.leboncoin.fr/api/oauth/v1/token
  343. scopes:
  344. user: Get user rights