Advertisement
Guest User

Untitled

a guest
Feb 27th, 2020
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 3.39 KB | None | 0 0
  1. openapi: 3.0.0
  2. info:
  3.   title: Tickets API
  4.   version: 1.0.0
  5. paths:
  6.   /acs/GetDownloadTicketByIdAndType:
  7.     get:
  8.       summary: get ticket's metadata
  9.       operationId: GetDownloadTicketByIdAndType
  10.       parameters:
  11.       - in: query
  12.         name: AssetReferenceId
  13.         description: asset identifier
  14.         required: true
  15.         schema:
  16.           type: integer
  17.       - in: query
  18.         name: AssetReferenceType
  19.         description: asset type
  20.         required: true
  21.         schema:
  22.           type: integer
  23.       - in: query
  24.         name: Tags
  25.         description: asset tags
  26.         required: false
  27.         schema:
  28.           type: array
  29.           items:
  30.             type: string
  31.       - in: query
  32.         name: Revision
  33.         description: asset revision
  34.         required: false
  35.         schema:
  36.           type: string
  37.       responses:
  38.         200:
  39.           description: OK
  40.           content:
  41.             application/json:
  42.               schema:
  43.                 $ref: '#/components/schemas/GetDownloadTicketResponse'
  44.  
  45.   /acs/GetDownloadTicketsByTags:
  46.     get:
  47.       summary: get multiple ticket's metadata
  48.       operationId: GetDownloadManyTicketsByIdAndType
  49.       parameters:
  50.       - in: query
  51.         name: AssetReferenceId
  52.         description: asset identifier
  53.         required: true
  54.         schema:
  55.           type: integer
  56.       - in: query
  57.         name: AssetReferenceType
  58.         description: asset type
  59.         required: true
  60.         schema:
  61.           type: integer
  62.       - in: query
  63.         name: Tags
  64.         description: asset tags
  65.         required: false
  66.         schema:
  67.           type: array
  68.           items:
  69.             type: string
  70.       - in: query
  71.         name: Revision
  72.         description: asset revision
  73.         required: false
  74.         schema:
  75.           type: string
  76.       responses:
  77.         200:
  78.           description: OK
  79.           content:
  80.             application/json:
  81.               schema:
  82.                 $ref: '#/components/schemas/GetDownloadTicketsByTagsResponse'
  83.                
  84. components:
  85.   schemas:
  86.     TicketAssetMetaData:
  87.       type: object
  88.       properties:
  89.         Url:
  90.           type: string
  91.           description: url to download the asset file
  92.         RevisionLink:
  93.           type: string
  94.           description: ...
  95.         Method:
  96.           type: string
  97.           description: ... maybe available http method for url
  98.         Token:
  99.           type: string
  100.           description: ...
  101.         MaxTimeout:
  102.           type: integer
  103.           description: ...
  104.         FilePath:
  105.           type: string
  106.           description: path to asset file in S3
  107.         Revision:
  108.           type: string
  109.           description: some revision
  110.         FileAccessPermissions:
  111.           type: integer
  112.           description: some magic numbers for some permissions
  113.         BinaryChecksum:
  114.           type: string
  115.           description: checksum of the file (I think it's responsibility of the S3 storage)
  116.         IsFound:
  117.             type: boolean
  118.             description: exists asset file or not (I think 404 should be used instead of this)
  119.          
  120.     GetDownloadTicketResponse:
  121.       type: object
  122.       allOf:
  123.       - $ref: '#/components/schemas/TicketAssetMetaData'
  124.          
  125.    
  126.     GetDownloadTicketsByTagsResponse:
  127.       type: array
  128.       items:
  129.         $ref: '#/components/schemas/TicketAssetMetaData'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement