Skip to content

Instantly share code, notes, and snippets.

@Alexei-Kornienko
Created March 18, 2020 12:31
Show Gist options
  • Save Alexei-Kornienko/ed1e8948fae00340172e10b0a4a7a87f to your computer and use it in GitHub Desktop.
Save Alexei-Kornienko/ed1e8948fae00340172e10b0a4a7a87f to your computer and use it in GitHub Desktop.
openapi: 3.0.1
tags:
- name: Health check
- name: info
- name: history
- name: bid
info:
title: Prozorro Sale Auction API
description: Swagger API definition
version: v3.0.10-1-gf2e97ad
servers:
- url: /
paths:
/api/ping:
get:
description: This end-point allows to test that service is up.
tags:
- Health check
operationId: ping
responses:
'200':
description: successful operation. Return "pong" json
content:
application/json:
schema:
type: object
properties:
text:
type: string
/api/auctions:
get:
tags:
- info
operationId: auction_list
responses:
'200':
description: List auction objects
'404':
description: Not Found
'/api/auctions/{auction_id}':
get:
tags:
- info
operationId: get_auction_by_id
parameters:
- in: path
name: auction_id
required: true
schema:
type: string
responses:
'200':
description: Auction object
'404':
description: Not Found
'/api/auctions/{auction_id}/feed':
get:
tags:
- info
operationId: auction_feed
parameters:
- in: path
name: auction_id
required: true
schema:
type: string
responses:
'200':
description: Auction object
'404':
description: Not Found
'/api/auctions/{auction_id}/bid':
post:
description: Post bid in auction bidding round
tags:
- bid
operationId: post_bid_auction
parameters:
- in: query
name: acc_token
required: true
schema:
type: string
- in: path
name: auction_id
required: true
schema:
type: string
responses:
'201':
description: Bid placed
'400':
description: Cannot post bid in current state
'403':
description: Permission error
'404':
description: Not Found
'/api/auctions/{auction_id}/history':
get:
description: Get history list
tags:
- history
operationId: history_list
parameters:
- in: path
name: auction_id
required: true
schema:
type: string
responses:
'200':
description: History list
content:
application/json:
schema:
type: array
items:
type: object
properties:
_id:
type: string
_lastModified:
type: string
'404':
description: Not Found
'/api/auctions/{auction_id}/history/{archive_id}':
get:
description: Get history object
tags:
- history
operationId: history_view
parameters:
- in: path
name: auction_id
required: true
schema:
type: string
- in: path
name: archive_id
required: true
schema:
type: string
responses:
'200':
description: History auction object
'404':
description: Not Found
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment