dlq.yml 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477
  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. summary: List visible queues
  23. operationId: dlq_info
  24. parameters: [ ]
  25. responses:
  26. "200":
  27. description: Information about the visible queues
  28. content:
  29. application/json:
  30. schema:
  31. type: array
  32. items:
  33. $ref: '#/components/schemas/QueueInfo'
  34. x-content-type: application/json
  35. "500":
  36. description: Server error
  37. content:
  38. application/json:
  39. schema:
  40. $ref: '#/components/schemas/SPAError'
  41. security:
  42. - OAuth2:
  43. - lbc.payment.payment.read
  44. /dlq/ui/{asset}:
  45. get:
  46. summary: UI assets
  47. parameters:
  48. - name: asset
  49. in: path
  50. description: the relative path of the asset
  51. required: true
  52. style: simple
  53. explode: false
  54. schema:
  55. type: string
  56. example: favicon.ico
  57. responses:
  58. "200":
  59. description: Asset
  60. "500":
  61. description: Server error
  62. content:
  63. application/json:
  64. schema:
  65. $ref: '#/components/schemas/SPAError'
  66. /dlq/{name}/delete:
  67. post:
  68. summary: Delete the items
  69. operationId: dlq_delete
  70. parameters:
  71. - name: name
  72. in: path
  73. description: the name of the queue from which to delete messages
  74. required: true
  75. style: simple
  76. explode: false
  77. schema:
  78. type: string
  79. requestBody:
  80. description: a list of message ReceiptHandle values
  81. content:
  82. application/json:
  83. schema:
  84. type: array
  85. items:
  86. type: string
  87. responses:
  88. "205":
  89. description: "Items deleted, reset view"
  90. "500":
  91. description: Server error
  92. content:
  93. application/json:
  94. schema:
  95. $ref: '#/components/schemas/SPAError'
  96. /dlq/{name}/redrive:
  97. post:
  98. summary: Redrive the selected items
  99. operationId: dlq_redrive
  100. parameters:
  101. - name: name
  102. in: path
  103. description: the name of the DLQ from which to redrive messages
  104. required: true
  105. style: simple
  106. explode: false
  107. schema:
  108. type: string
  109. requestBody:
  110. description: "a list of message ID/ReceiptHandle pairs. ID is needed to republish,\
  111. \ ReceiptHandle to remove from DLQ. Process starts by ChangingVisility to\
  112. \ protect messages, then SendMessage on original source queue, and on success,\
  113. \ DeleteMessage for the original messages."
  114. content:
  115. application/json:
  116. schema:
  117. type: array
  118. items:
  119. $ref: '#/components/schemas/name_redrive_body'
  120. responses:
  121. "205":
  122. description: "Items deleted, reset view"
  123. "500":
  124. description: Server error
  125. content:
  126. application/json:
  127. schema:
  128. $ref: '#/components/schemas/SPAError'
  129. /dlq/{name}/purge:
  130. post:
  131. summary: purge the whole queue
  132. operationId: dlq_purge
  133. parameters:
  134. - name: name
  135. in: path
  136. description: the name of the queue to purge
  137. required: true
  138. style: simple
  139. explode: false
  140. schema:
  141. type: string
  142. responses:
  143. "205":
  144. description: "Success, reset views"
  145. "500":
  146. description: Server error
  147. content:
  148. application/json:
  149. schema:
  150. $ref: '#/components/schemas/SPAError'
  151. /dlq/{name}/release:
  152. post:
  153. summary: Release the items for reception by resetting their VisibilityTimeout
  154. to 0
  155. operationId: dlq_release
  156. parameters:
  157. - name: name
  158. in: path
  159. description: the name of the queue to poll
  160. required: true
  161. style: simple
  162. explode: false
  163. schema:
  164. type: string
  165. requestBody:
  166. description: a list of message ReceiptHandle values
  167. content:
  168. application/json:
  169. schema:
  170. type: array
  171. items:
  172. type: string
  173. responses:
  174. "200":
  175. description: Asset
  176. "500":
  177. description: Server error
  178. content:
  179. application/json:
  180. schema:
  181. $ref: '#/components/schemas/SPAError'
  182. /dlq/{name}/items:
  183. get:
  184. summary: Get the first items ready to be received in a queue
  185. operationId: dlq_items
  186. parameters:
  187. - name: name
  188. in: path
  189. description: the name of the queue to poll
  190. required: true
  191. style: simple
  192. explode: false
  193. schema:
  194. type: string
  195. - name: limit
  196. in: query
  197. description: the maximum number of items to return
  198. required: false
  199. style: form
  200. explode: true
  201. schema:
  202. maximum: 10
  203. type: integer
  204. default: 10
  205. responses:
  206. "200":
  207. description: A list of messages
  208. content:
  209. application/json:
  210. schema:
  211. type: array
  212. items:
  213. $ref: '#/components/schemas/Message'
  214. x-content-type: application/json
  215. "500":
  216. description: Server error
  217. content:
  218. application/json:
  219. schema:
  220. $ref: '#/components/schemas/SPAError'
  221. security:
  222. - OAuth2:
  223. - lbc.payment.payment.read
  224. components:
  225. schemas:
  226. QueueURL:
  227. type: string
  228. description: The absolute URL to the queue
  229. example: https://sqs.amazonws.com/eu-west-3/12345678901234/some-queue
  230. QueueARN:
  231. type: string
  232. description: the Amazon resource name (ARN) of the queue.
  233. example: arn:sqs:eu-west-3:12345678901234:some_queue
  234. Message:
  235. type: object
  236. properties:
  237. attributes:
  238. $ref: '#/components/schemas/Message_attributes'
  239. body:
  240. type: string
  241. description: not url-encoded
  242. md5_of_body:
  243. type: string
  244. description: An MD5 digest of the non-URL-encoded message body string.
  245. md5_of_message_attributes:
  246. type: string
  247. description: "An MD5 digest of the non-URL-encoded message attribute string.\
  248. \ You can use this attribute to verify that Amazon SQS received the message\
  249. \ correctly. Amazon SQS URL-decodes the message before creating the MD5\
  250. \ digest. For information about MD5, see RFC1321 (https://www.ietf.org/rfc/rfc1321.txt)."
  251. message_id:
  252. type: string
  253. receipt_handle:
  254. type: string
  255. description: "An identifier associated with the act of receiving the message.\
  256. \ A new receipt handle is returned every time you receive a message. When\
  257. \ deleting a message, you provide the last received receipt handle to\
  258. \ delete the message."
  259. example:
  260. md5_of_message_attributes: md5_of_message_attributes
  261. receipt_handle: receipt_handle
  262. attributes:
  263. sequence_number: 5
  264. approximate_first_receive_timestamp: 0
  265. approximate_receive_count: 1
  266. sent_timestamp: 1
  267. sender_id: ABCDE1F2GH3I4JK5LMNOP:i-a123b456
  268. message_id: message_id
  269. body: body
  270. md5_of_body: md5_of_body
  271. SPAError:
  272. type: object
  273. properties:
  274. message:
  275. type: string
  276. description: Free string describing the error
  277. example:
  278. message: an error message
  279. QueueInfo:
  280. type: object
  281. properties:
  282. name:
  283. type: string
  284. description: "The queue name, for both human and machine use"
  285. url:
  286. $ref: '#/components/schemas/QueueURL'
  287. attributes:
  288. $ref: '#/components/schemas/QueueInfo_attributes'
  289. example:
  290. name: name
  291. attributes:
  292. visibility_timeout: 2
  293. last_modified_timestamp: 2
  294. approximate_number_of_messages_delayed: 6
  295. created_timestamp: 5
  296. delay_seconds: 5
  297. redrive_policy:
  298. maxReceiveCount: 4
  299. deadLetterTargetArn: arn:sqs:eu-west-3:12345678901234:some_queue
  300. redrive_allow_policy:
  301. source_queue_arns:
  302. - null
  303. - null
  304. redrive_permission: ""
  305. message_retention_period: 9
  306. maximum_message_size: 7
  307. queue_arn: arn:sqs:eu-west-3:12345678901234:some_queue
  308. approximate_number_of_messages_not_visible: 1
  309. approximate_number_of_messages: 0
  310. receive_message_wait_time_seconds: 3
  311. url: https://sqs.amazonws.com/eu-west-3/12345678901234/some-queue
  312. name_redrive_body:
  313. type: object
  314. properties:
  315. id:
  316. type: string
  317. receipt_handle:
  318. type: string
  319. Message_attributes:
  320. type: object
  321. properties:
  322. # AWSTraceHeader
  323. approximate_first_receive_timestamp:
  324. type: integer
  325. approximate_receive_count:
  326. minimum: 1
  327. type: integer
  328. # MessageDeduplicationId
  329. # MessageGroupId
  330. sender_id:
  331. type: string
  332. description: IAM user or role
  333. example: ABCDE1F2GH3I4JK5LMNOP:i-a123b456
  334. sent_timestamp:
  335. type: integer
  336. sequence_number:
  337. type: integer
  338. example:
  339. sequence_number: 5
  340. approximate_first_receive_timestamp: 0
  341. approximate_receive_count: 1
  342. sent_timestamp: 1
  343. sender_id: ABCDE1F2GH3I4JK5LMNOP:i-a123b456
  344. QueueInfo_attributes_redrive_policy:
  345. type: object
  346. properties:
  347. deadLetterTargetArn:
  348. type: string
  349. description: The Amazon Resource Name (ARN) of the dead-letter queue to
  350. which Amazon SQS moves messages after the value of maxReceiveCount is
  351. exceeded.
  352. maxReceiveCount:
  353. type: integer
  354. description: "The number of times a message is delivered to the source queue\
  355. \ before being moved to the dead-letter queue. Default 10. When the ReceiveCount\
  356. \ for a message exceeds the maxReceiveCount for a queue, Amazon SQS moves\
  357. \ the message to the dead-letter-queue."
  358. description: the parameters for the dead-letter queue functionality of the source
  359. queue
  360. example:
  361. maxReceiveCount: 4
  362. deadLetterTargetArn: arn:sqs:eu-west-3:12345678901234:some_queue_dlq
  363. QueueInfo_attributes_redrive_allow_policy:
  364. type: object
  365. properties:
  366. redrive_permission:
  367. type: string
  368. description: The permission type that defines which source queues can specify
  369. the current queue as the dead-letter queue.
  370. enum:
  371. - allowAll
  372. - denyAll
  373. - byQueue
  374. source_queue_arns:
  375. type: array
  376. items:
  377. $ref: '#/components/schemas/QueueARN'
  378. description: the permissions for the dead-letter queue redrive permission and
  379. which source queues can specify dead-letter queues.
  380. example:
  381. source_queue_arns:
  382. - null
  383. - null
  384. redrive_permission: ""
  385. QueueInfo_attributes:
  386. type: object
  387. properties:
  388. approximate_number_of_messages:
  389. type: integer
  390. description: he approximate number of messages available for retrieval from
  391. the queue.
  392. approximate_number_of_messages_delayed:
  393. type: integer
  394. description: the approximate number of messages in the queue that are delayed
  395. and not available for reading immediately. This can happen when the queue
  396. is configured as a delay queue or when a message has been sent with a
  397. delay parameter.
  398. approximate_number_of_messages_not_visible:
  399. type: integer
  400. description: the approximate number of messages that are in flight. Messages
  401. are considered to be in flight if they have been sent to a client but
  402. have not yet been deleted or have not yet reached the end of their visibility
  403. window.
  404. created_timestamp:
  405. type: integer
  406. description: the time when the queue was created in seconds (epoch time).
  407. delay_seconds:
  408. type: integer
  409. description: the default delay on the queue in seconds.
  410. last_modified_timestamp:
  411. type: integer
  412. description: the time when the queue was last changed in seconds (epoch
  413. time).
  414. maximum_message_size:
  415. type: integer
  416. description: the limit of how many bytes a message can contain before Amazon
  417. SQS rejects it.
  418. message_retention_period:
  419. type: integer
  420. description: "the length of time, in seconds, for which Amazon SQS retains\
  421. \ a message. When you change a queue's attributes, the change can take\
  422. \ up to 60 seconds for most of the attributes to propagate throughout\
  423. \ the Amazon SQS system. Changes made to the MessageRetentionPeriod attribute\
  424. \ can take up to 15 minutes and will impact existing messages in the queue\
  425. \ potentially causing them to be expired and deleted if the MessageRetentionPeriod\
  426. \ is reduced below the age of existing messages."
  427. # policy:
  428. queue_arn:
  429. $ref: '#/components/schemas/QueueARN'
  430. receive_message_wait_time_seconds:
  431. type: integer
  432. description: "the length of time, in seconds, for which the ReceiveMessage\
  433. \ action waits for a message to arrive."
  434. visibility_timeout:
  435. type: integer
  436. description: seconds a message remains hidden after being received. Max
  437. 43200.
  438. redrive_policy:
  439. $ref: '#/components/schemas/QueueInfo_attributes_redrive_policy'
  440. redrive_allow_policy:
  441. $ref: '#/components/schemas/QueueInfo_attributes_redrive_allow_policy'
  442. example:
  443. visibility_timeout: 2
  444. last_modified_timestamp: 2
  445. approximate_number_of_messages_delayed: 6
  446. created_timestamp: 5
  447. delay_seconds: 5
  448. redrive_policy:
  449. maxReceiveCount: 4
  450. deadLetterTargetArn: arn:sqs:eu-west-3:12345678901234:some_queue_dlq
  451. redrive_allow_policy:
  452. source_queue_arns:
  453. - null
  454. - null
  455. redrive_permission: ""
  456. message_retention_period: 9
  457. maximum_message_size: 7
  458. queue_arn: arn:sqs:eu-west-3:12345678901234:some_queue
  459. approximate_number_of_messages_not_visible: 1
  460. approximate_number_of_messages: 0
  461. receive_message_wait_time_seconds: 3
  462. # KmsMesterKeyID:
  463. # KmsDataKeyReusePeriodSeconds:
  464. # SqsManagerSseEnabled:
  465. # FifoQueue:
  466. # DeduplicationScope
  467. # FifoThroughputLimit
  468. securitySchemes:
  469. OAuth2:
  470. type: oauth2
  471. flows:
  472. authorizationCode:
  473. authorizationUrl: https://api.leboncoin.fr/api/oauth/v1/authorize
  474. tokenUrl: https://api.leboncoin.fr/api/oauth/v1/token
  475. scopes:
  476. user: Get user rights