FIBR RBO Api

OpenAPI 1.0.0

Скачать исходную спецификацию

Варианты

  • Паблик

Операции API

GET /archive-tasks — Get archive-task

{
  "tags": [
    "reporter"
  ],
  "summary": "Get archive-task",
  "operationId": "getArchiveTask",
  "parameters": [
    {
      "name": "Id-Token",
      "in": "header",
      "description": "id token",
      "required": true,
      "style": "simple"
    },
    {
      "name": "cnum",
      "in": "query",
      "required": false,
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "id",
      "in": "query",
      "required": false,
      "schema": {
        "type": "string",
        "format": "uuid"
      }
    },
    {
      "name": "status",
      "in": "query",
      "required": false,
      "schema": {
        "type": "string",
        "enum": [
          "NEW",
          "IN_PROGRESS",
          "FAILED",
          "DONE"
        ]
      }
    }
  ],
  "responses": {
    "200": {
      "description": "List of reports",
      "content": {
        "*/*": {
          "schema": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ArchiveTaskResponse"
            }
          }
        }
      }
    },
    "400": {
      "description": "Bad Request",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ErrorResponse"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ErrorResponse"
          }
        }
      }
    },
    "500": {
      "description": "Internal Server Error",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ErrorResponse"
          }
        }
      }
    }
  }
}

POST /archive-tasks — Create archive-task

{
  "tags": [
    "reporter"
  ],
  "summary": "Create archive-task",
  "operationId": "createArchiveTask",
  "parameters": [
    {
      "name": "Id-Token",
      "in": "header",
      "description": "id token",
      "required": true,
      "style": "simple"
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/ArchiveTaskCreateRequest"
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "description": "List of reports",
      "content": {
        "*/*": {
          "schema": {
            "$ref": "#/components/schemas/ArchiveTaskResponse"
          }
        }
      }
    },
    "400": {
      "description": "Bad Request",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ErrorResponse"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ErrorResponse"
          }
        }
      }
    },
    "500": {
      "description": "Internal Server Error",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ErrorResponse"
          }
        }
      }
    }
  }
}

GET /storage/download/{id} — Retrieve report file by uuid

Retrieve report fie by uuid. The response is byte array with file name in response header

{
  "tags": [
    "reporter"
  ],
  "summary": "Retrieve report file by uuid",
  "description": "Retrieve report fie by uuid. The response is byte array with file name in response header",
  "operationId": "downloadFile",
  "parameters": [
    {
      "name": "Id-Token",
      "in": "header",
      "description": "id token",
      "required": true,
      "style": "simple"
    },
    {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "format": "uuid"
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Internal Server Error",
      "content": {
        "*/*": {
          "schema": {
            "type": "string",
            "format": "byte"
          }
        }
      }
    },
    "400": {
      "description": "Bad Request",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ErrorResponse"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ErrorResponse"
          }
        }
      }
    },
    "500": {
      "description": "Internal Server Error",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ErrorResponse"
          }
        }
      }
    }
  }
}

GET /reports — Get all last updated Report's File UUIDs

{
  "tags": [
    "reporter"
  ],
  "summary": "Get all last updated Report's File UUIDs",
  "operationId": "getReports",
  "parameters": [
    {
      "name": "Id-Token",
      "in": "header",
      "description": "id token",
      "required": true,
      "style": "simple"
    }
  ],
  "responses": {
    "200": {
      "description": "List of reports",
      "content": {
        "application/json": {
          "schema": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReportFileInfoResponse"
            }
          }
        }
      }
    },
    "400": {
      "description": "Bad Request",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ErrorResponse"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ErrorResponse"
          }
        }
      }
    },
    "500": {
      "description": "Internal Server Error",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ErrorResponse"
          }
        }
      }
    }
  }
}

GET /reportTypes — Get list of reportTypes with Description

{
  "tags": [
    "reporter"
  ],
  "summary": "Get list of reportTypes with Description",
  "operationId": "getReportTypesWithDesc",
  "parameters": [
    {
      "name": "Id-Token",
      "in": "header",
      "description": "id token",
      "required": true,
      "style": "simple"
    }
  ],
  "responses": {
    "200": {
      "description": "List of ReportTypes with Description",
      "content": {
        "application/json": {
          "schema": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReportTypeWithDescResponse"
            }
          }
        }
      }
    },
    "400": {
      "description": "Bad Request",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ErrorResponse"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ErrorResponse"
          }
        }
      }
    },
    "500": {
      "description": "Internal Server Error",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ErrorResponse"
          }
        }
      }
    }
  }
}

Схемы и примеры

{
  "schemas": {
    "ErrorResponse": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "traceId": {
          "type": "string"
        },
        "errors": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      }
    },
    "ArchiveTaskCreateRequest": {
      "required": [
        "cnum"
      ],
      "type": "object",
      "properties": {
        "cnum": {
          "type": "string"
        },
        "agreementNumber": {
          "type": "string"
        },
        "fileIds": {
          "uniqueItems": true,
          "type": "array",
          "items": {
            "type": "string",
            "format": "uuid"
          }
        },
        "forDate": {
          "type": "string",
          "format": "date"
        }
      }
    },
    "ArchiveTaskResponse": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "status": {
          "type": "string",
          "enum": [
            "NEW",
            "IN_PROGRESS",
            "FAILED",
            "DONE"
          ]
        },
        "archiveId": {
          "type": "string",
          "format": "uuid"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "FileUpdatedInfo": {
      "required": [
        "created",
        "fileId",
        "fileName"
      ],
      "type": "object",
      "properties": {
        "fileId": {
          "type": "string",
          "format": "uuid"
        },
        "fileName": {
          "type": "string"
        },
        "reportForDate": {
          "type": "string",
          "format": "date"
        },
        "created": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "ReportFileInfoResponse": {
      "required": [
        "id",
        "type"
      ],
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "type": {
          "type": "string",
          "enum": [
            "QORT_DAILY_BALANCE_REPORT",
            "QORT_EQM23",
            "QORT_FIXED_INCOME",
            "DU_CLIENTS",
            "QORT_REPO",
            "QORT_TRADES",
            "QORT_TRADES_USD_PRICE_PRODUCT",
            "QORT_MONETARY_OPERATIONS_REPORT",
            "QORT_MONETARY_POSITION_REPORT",
            "QORT_MONETARY_POSITION_SUB_REPORT",
            "QORT_SECURITIES_POSITION_REPORT",
            "QORT_SECURITIES_POSITION_SUB_REPORT",
            "QORT_TRADES_MAIN_REPORT",
            "MOEX_EQM99",
            "MOEX_EQM6C",
            "MOEX_EQM06",
            "MOEX_EQM23",
            "MOEX_EQM49",
            "MOEX_EQM84",
            "MOEX_EQM98",
            "MOEX_EQM15",
            "MOEX_CCX43",
            "MOEX_CCX49",
            "MOEX_CCX10",
            "MOEX_CCX84",
            "MOEX_CCX99",
            "MOEX_FORTS",
            "SINGLE_LIMIT_AND_CURRENT_POSITIONS",
            "QORT_TRADES_EXTENDED",
            "QORT_TRADES_RAIFCAP",
            "QORT_TRADES_TFG",
            "ARBITRATION_PNL",
            "QORT_TRADES_EXTENDED_WITH_INT_REF",
            "QUIK_NEGATIVE_BALANCE_REPORT",
            "NON_TRADING_OPERATIONS",
            "TRADES_DATE"
          ]
        },
        "agreementNumber": {
          "type": "string"
        },
        "lastExecution": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/FileUpdatedInfo"
          }
        }
      }
    },
    "ReportTypeWithDescResponse": {
      "required": [
        "desc",
        "type"
      ],
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "QORT_DAILY_BALANCE_REPORT",
            "QORT_EQM23",
            "QORT_FIXED_INCOME",
            "DU_CLIENTS",
            "QORT_REPO",
            "QORT_TRADES",
            "QORT_TRADES_USD_PRICE_PRODUCT",
            "QORT_MONETARY_OPERATIONS_REPORT",
            "QORT_MONETARY_POSITION_REPORT",
            "QORT_MONETARY_POSITION_SUB_REPORT",
            "QORT_SECURITIES_POSITION_REPORT",
            "QORT_SECURITIES_POSITION_SUB_REPORT",
            "QORT_TRADES_MAIN_REPORT",
            "MOEX_EQM99",
            "MOEX_EQM6C",
            "MOEX_EQM06",
            "MOEX_EQM23",
            "MOEX_EQM49",
            "MOEX_EQM84",
            "MOEX_EQM98",
            "MOEX_EQM15",
            "MOEX_CCX43",
            "MOEX_CCX49",
            "MOEX_CCX10",
            "MOEX_CCX84",
            "MOEX_CCX99",
            "MOEX_FORTS",
            "SINGLE_LIMIT_AND_CURRENT_POSITIONS",
            "QORT_TRADES_EXTENDED",
            "QORT_TRADES_RAIFCAP",
            "QORT_TRADES_TFG",
            "ARBITRATION_PNL",
            "QORT_TRADES_EXTENDED_WITH_INT_REF",
            "QUIK_NEGATIVE_BALANCE_REPORT",
            "NON_TRADING_OPERATIONS",
            "TRADES_DATE"
          ]
        },
        "desc": {
          "type": "string"
        }
      }
    }
  },
  "securitySchemes": {
    "bearerAuth": {
      "type": "http",
      "scheme": "bearer",
      "bearerFormat": "JWT"
    }
  }
}