openapi: 3.1.0 info: title: OpenAPI definition version: v0 servers: - url: http://localhost:8080 description: Generated server url paths: /rule-books/{ruleBookId}: get: tags: - rule-book summary: Find a rule book by its id operationId: findRuleBookById parameters: - name: ruleBookId in: path description: Id of the rule book required: true schema: type: string format: uuid responses: "200": description: The rule book content: '*/*': schema: $ref: "#/components/schemas/RuleBookResponse" "404": description: No rule book with this id put: tags: - rule-book summary: Update a rule book operationId: updateRuleBook parameters: - name: ruleBookId in: path description: Id of the rule book required: true schema: type: string format: uuid requestBody: description: New state of the rule book content: application/json: schema: $ref: "#/components/schemas/UpdateRuleBookRequest" required: true responses: "200": description: The updated rule book content: '*/*': schema: $ref: "#/components/schemas/RuleBookResponse" "400": description: Invalid request (e.g. blank name) /ledgers/main/{ledgerId}: put: tags: - ledger summary: Update a main ledger operationId: updateMainLedger parameters: - name: ledgerId in: path description: Id of the main ledger required: true schema: type: string format: uuid requestBody: description: New state of the main ledger content: application/json: schema: $ref: "#/components/schemas/UpdateMainLedgerRequest" required: true responses: "200": description: The updated main ledger content: '*/*': schema: $ref: "#/components/schemas/MainLedgerResponse" "400": description: "The ledger is not a main ledger, or the request is invalid" "404": description: No ledger with this id /ledgers/combined/{ledgerId}: put: tags: - ledger summary: Update a combined ledger operationId: updateCombinedLedger parameters: - name: ledgerId in: path description: Id of the combined ledger required: true schema: type: string format: uuid requestBody: description: New state of the combined ledger content: application/json: schema: $ref: "#/components/schemas/UpdateCombinedLedgerRequest" required: true responses: "200": description: The updated combined ledger content: '*/*': schema: $ref: "#/components/schemas/CombinedLedgerResponse" "400": description: "The ledger is not a combined ledger, or the request is invalid" "404": description: No ledger with this id /characters/{characterId}/rule-book: get: tags: - character-rule-book summary: Find the rule book assigned to a character operationId: findCharacterRuleBookByCharacterId parameters: - name: characterId in: path description: Id of the character required: true schema: type: integer format: int64 responses: "200": description: The rule book assignment of the character content: '*/*': schema: $ref: "#/components/schemas/CharacterRuleBookResponse" "400": description: Invalid character id "404": description: No rule book assigned to this character put: tags: - character-rule-book summary: Assign a rule book to a character operationId: setCharacterRuleBookForCharacter parameters: - name: characterId in: path description: Id of the character required: true schema: type: integer format: int64 requestBody: description: Rule book and ledger bindings to assign content: application/json: schema: $ref: "#/components/schemas/SetCharacterRuleBookRequest" required: true responses: "200": description: The rule book assignment of the character content: '*/*': schema: $ref: "#/components/schemas/CharacterRuleBookResponse" "400": description: "The referenced rule book or a bound ledger does not exist,\ \ or a ledger binding is missing" /rule-books: get: tags: - rule-book summary: Find all rule books operationId: findAllRuleBooks responses: "200": description: All rule books content: '*/*': schema: type: array items: $ref: "#/components/schemas/RuleBookResponse" post: tags: - rule-book summary: Create a rule book operationId: createRuleBook requestBody: description: Rule book to create content: application/json: schema: $ref: "#/components/schemas/CreateRuleBookRequest" required: true responses: "201": description: The created rule book content: '*/*': schema: $ref: "#/components/schemas/RuleBookResponse" "400": description: Invalid request (e.g. blank name) /process-activities: post: tags: - processing summary: Process new activities for all characters with a usable token operationId: processNewActivities responses: "200": description: New activities processed /ledgers/main: post: tags: - ledger summary: Create a main ledger operationId: createMainLedger requestBody: description: Main ledger to create content: application/json: schema: $ref: "#/components/schemas/CreateMainLedgerRequest" required: true responses: "201": description: The created main ledger content: '*/*': schema: $ref: "#/components/schemas/MainLedgerResponse" "400": description: Invalid request (e.g. blank name) /ledgers/combined: post: tags: - ledger summary: Create a combined ledger operationId: createCombinedLedger requestBody: description: Combined ledger to create content: application/json: schema: $ref: "#/components/schemas/CreateCombinedLedgerRequest" required: true responses: "201": description: The created combined ledger content: '*/*': schema: $ref: "#/components/schemas/CombinedLedgerResponse" "400": description: "Invalid request (e.g. blank name, a member ledger missing\ \ or already contained)" /activity/fetch: post: tags: - activity summary: Fetch all new activities for all characters from the EVE API operationId: fetchAllNewActivities responses: "200": description: New activities fetched and stored /activity/fetch/{characterId}: post: tags: - activity summary: Fetch new activities for a character from the EVE API operationId: fetchNewActivitiesForCharacter parameters: - name: characterId in: path description: Id of the character required: true schema: type: integer format: int64 responses: "200": description: New activities fetched and stored "400": description: No character with this id /rule-books/script-definitions: get: tags: - rule-book summary: Download the TypeScript definitions for the rule script runtime operationId: getScriptDefinitions responses: "200": description: The rule-runner.d.ts type definitions content: text/plain: schema: type: string /ledgers: get: tags: - ledger summary: Find all ledgers operationId: findAllLedgers responses: "200": description: All ledgers content: '*/*': schema: type: array items: $ref: "#/components/schemas/LedgerResponse" /ledgers/{ledgerId}: get: tags: - ledger summary: Find a ledger by its id operationId: findLedgerById parameters: - name: ledgerId in: path description: Id of the ledger required: true schema: type: string format: uuid responses: "200": description: The ledger content: '*/*': schema: $ref: "#/components/schemas/LedgerResponse" "400": description: The ledger cannot be exposed (system ledger) "404": description: No ledger with this id /ledgers/{ledgerId}/transactions: get: tags: - transaction summary: Find all transactions in a ledger operationId: finAllTransactionsInLedger parameters: - name: ledgerId in: path description: Id of the ledger required: true schema: type: string format: uuid responses: "200": description: All transactions in the ledger content: '*/*': schema: type: array items: $ref: "#/components/schemas/TransactionResponse" "404": description: No ledger with this id /ledgers/{ledgerId}/balance: get: tags: - ledger summary: Find the balance of a ledger operationId: findBalanceByLedgerId parameters: - name: ledgerId in: path description: Id of the ledger required: true schema: type: string format: uuid responses: "200": description: The balance of the ledger content: '*/*': schema: $ref: "#/components/schemas/BalanceResponse" "404": description: No ledger with this id /characters: get: tags: - character summary: Find all characters with a usable token operationId: findAllCharacters responses: "200": description: All characters with a usable token content: '*/*': schema: type: array items: $ref: "#/components/schemas/CharacterResponse" /acquisitions: get: tags: - acquisition summary: Find all acquisitions that still have remaining stock operationId: findAllAcquisitions responses: "200": description: The acquisitions with remaining stock content: '*/*': schema: type: array items: $ref: "#/components/schemas/AcquisitionResponse" components: schemas: UpdateRuleBookRequest: type: object properties: name: type: string usedForAcquisitions: type: boolean ledgerRefs: type: array items: type: string pattern: "[a-z]+(-[a-z]+)*" script: type: string required: - ledgerRefs - name - script - usedForAcquisitions RuleBookResponse: type: object properties: ruleBookId: type: string format: uuid name: type: string usedForAcquisitions: type: boolean ledgerRefs: type: array items: type: string pattern: "[a-z]+(-[a-z]+)*" script: type: string required: - ledgerRefs - name - ruleBookId - script - usedForAcquisitions UpdateMainLedgerRequest: type: object properties: name: type: string required: - name MainLedgerResponse: allOf: - $ref: "#/components/schemas/LedgerResponse" - type: object properties: ledgerId: type: string format: uuid name: type: string balance: type: number required: - balance - ledgerId - name UpdateCombinedLedgerRequest: type: object properties: name: type: string memberLedgerIds: type: array items: type: string format: uuid required: - memberLedgerIds - name CombinedLedgerResponse: allOf: - $ref: "#/components/schemas/LedgerResponse" - type: object properties: ledgerId: type: string format: uuid name: type: string balance: type: number memberLedgerIds: type: array items: type: string format: uuid required: - balance - ledgerId - memberLedgerIds - name SetCharacterRuleBookRequest: type: object properties: ruleBookId: type: string format: uuid bindings: type: object additionalProperties: type: string format: uuid required: - bindings - ruleBookId CharacterRuleBookResponse: type: object properties: characterId: type: integer format: int64 ruleBookId: type: string format: uuid bindings: type: object additionalProperties: type: string format: uuid required: - bindings - characterId - ruleBookId CreateRuleBookRequest: type: object properties: name: type: string usedForAcquisitions: type: boolean ledgerRefs: type: array items: type: string pattern: "[a-z]+(-[a-z]+)*" script: type: string required: - ledgerRefs - name - script - usedForAcquisitions CreateMainLedgerRequest: type: object properties: name: type: string required: - name CreateCombinedLedgerRequest: type: object properties: name: type: string memberLedgerIds: type: array items: type: string format: uuid required: - memberLedgerIds - name LedgerResponse: discriminator: propertyName: type mapping: MAIN: "#/components/schemas/MainLedgerResponse" COMBINED: "#/components/schemas/CombinedLedgerResponse" oneOf: - $ref: "#/components/schemas/MainLedgerResponse" - $ref: "#/components/schemas/CombinedLedgerResponse" properties: type: type: string required: - type IskTransferResponse: allOf: - $ref: "#/components/schemas/TransferResponse" - type: object properties: fromLedgerId: type: string format: uuid toLedgerId: type: string format: uuid amount: type: number required: - amount - fromLedgerId - toLedgerId ItemTransferResponse: allOf: - $ref: "#/components/schemas/TransferResponse" - type: object properties: fromLedgerId: type: string format: uuid toLedgerId: type: string format: uuid marketTypeId: type: integer format: int64 quantity: type: integer format: int64 required: - fromLedgerId - marketTypeId - quantity - toLedgerId TransactionResponse: type: object properties: transactionId: type: string format: uuid characterId: type: integer format: int64 datetime: type: string format: date-time description: type: string transfers: type: array items: $ref: "#/components/schemas/TransferResponse" required: - characterId - datetime - description - transactionId - transfers TransferResponse: discriminator: propertyName: type mapping: ISK: "#/components/schemas/IskTransferResponse" ITEM: "#/components/schemas/ItemTransferResponse" oneOf: - $ref: "#/components/schemas/IskTransferResponse" - $ref: "#/components/schemas/ItemTransferResponse" properties: type: type: string required: - type BalanceResponse: type: object properties: iskBalance: type: number itemBalances: type: array items: $ref: "#/components/schemas/ItemBalanceResponse" required: - iskBalance - itemBalances ItemBalanceResponse: type: object properties: typeId: type: integer format: int64 quantity: type: integer format: int64 required: - quantity - typeId CharacterResponse: type: object properties: characterId: type: integer format: int64 name: type: string required: - characterId - name AcquisitionResponse: type: object properties: acquisitionId: type: string format: uuid characterId: type: integer format: int64 marketTypeId: type: integer format: int64 source: type: string enum: - BOUGHT - MANUAL datetime: type: string format: date-time quantity: type: integer format: int64 remaining: type: integer format: int64 unitCost: type: number required: - acquisitionId - characterId - datetime - marketTypeId - quantity - remaining - source - unitCost