openapi: 3.0.0 info: title: CyberChef API description: A HTTP API that exposes some of CyberChef's functionality. version: 1.1.0 paths: /health: get: summary: Server healthcheck tags: - Health description: > If the server is up, returns a 200 response and some basic info about uptime responses: '200': description: Server is alive and healthy content: application/json: schema: $ref: "#/components/schemas/HealthResponse" example: uptime: 1138.00 message: "OK" timestamp: "Thu Dec 17 2017 19:23:54 GMT+0000" '503': description: Server error content: application/json: schema: $ref: "#/components/schemas/HealthResponse" example: uptime: 1138.00 message: "Internal Server Error: Not enough biscuits" timestamp: "Thu Dec 19 2019 19:23:54 GMT+0000" /bake: post: summary: Bakes a recipe tags: - Single Operations description: > Bake a recipe defined in JSON. For an example JSON recipe, build a recipe on [CyberChef](https://gchq.github.io/CyberChef/) and click save. Select "clean JSON". The Recipe property in the payload is designed so that you only need to provide arguments for operations if they are required, or you want to change them from the default. For more information on accepted recipe formats, see the [bake section of the Node API docs](https://github.com/gchq/CyberChef/wiki/Node-API#bake) requestBody: required: true content: application/json: schema: oneOf: - $ref: "#/components/schemas/SingleOpRecipe" - $ref: "#/components/schemas/MultiOpRecipe" example: input: "some input" recipe: - op: toHex - op: toBase64 - op: toBinary args: delimiter: "Comma" responses: '200': description: Recipe baked successfully content: application/json: schema: $ref: "#/components/schemas/BakeResponse" example: type: "string" value: "01001110,01111010,01001101,01100111,01001110,01101101,01011001,01100111,01001110,01101101,01010001,01100111,01001110,01101010,01010101,01100111,01001101,01101010,01000001,01100111,01001110,01101010,01101011,01100111,01001110,01101101,01010101,01100111,01001110,01111010,01000001,01100111,01001110,01111010,01010101,01100111,01001110,01111010,01010001,00111101" '400': description: Bad request /magic: post: summary: Performs magic on some input tags: - Single Operations description: > Take some input data and optional arguments for the [Magic operation](https://github.com/gchq/CyberChef/wiki/Automatic-detection-of-encoded-data-using-CyberChef-Magic) and return JSON of results of automatic encoding detection of the inputted data. requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/MagicInput" example: input: "WUagwsiae6mP8gNtCCLUFpCpCB26RmBDoDD8PacdAmzAzBVjkK2QstFXaKhpC6iUS7RHqXrJtFisoRSgoJ4whjm1arm864qaNq4RcfUmLHrcsAaZc5TXCYifNdgS83gDeejGX46gaiMyuBV6EskHt1scgJ88x2tNSotQDwbGY1mmCob2ARGFvCKYNqiN9ipMq1ZU1mgkdbNuGcb76aRtYWhCGUc8g93UJudhb8htsheZnwTpgqhx83SVJSZXMXUjJT2zmpC7uXWtumqokbdSi88YtkWDAc1Toouh2oH4D4ddmNKJWUDpMwmngUmK14xwmomccPQE9hM172APnSqwxdKQ172RkcAsysnmj5gGtRmVNNh2s359wr6mS2QRP" args: depth: 1 responses: '200': description: Magic operation ran successfully content: application/json: schema: $ref: "#/components/schemas/MagicResponse" example: type: 6 value: - recipe: - op: "From Base58" args: - "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz" - false data: "x^Ü^Í^ÒÑqÃ0\fCWá\b^ÉcKò8mâì?B\u001eA^ÊUûÕ»^ÜOb@\u0010^ÀxìÖ^Ƶö^Ûµ§µ»õ^Çõ]×ÃzÓwÓ\u0015äÛ1^Ý3-§µKõ^×0t=¼½õdë\u001cÄ^Ö^ØS\u0000uÁ\u001f´Pñõ³*^ÌppuÝÅ\u0003" languageScores: - lang: zh score: 215110.97112616687 probability: 0 fileType: null isUTF8: true entropy: 5.6887987925007035 matchingOps: - op: "From Base58" pattern: {} args: - 123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz - false useful: false /batch/bake: post: summary: Bakes a batch of data with a recipe tags: - Batch Operations description: > Bake a recipe defined in JSON over an array of input data. To obtain a JSON-formatted recipe, build a recipe on [CyberChef](https://gchq.github.io/CyberChef/) and click save. Select "clean JSON" and copy the output. Input data must be in the form of an array. All items will be baked individually and an individual result object provided for each in the response The Recipe property in the payload is designed so that you only need to provide arguments for operations if they are required, or you want to change them from the default. For more information on accepted recipe formats, see the [bake section of the Node API docs](https://github.com/gchq/CyberChef/wiki/Node-API#bake) requestBody: required: true content: application/json: schema: oneOf: - $ref: "#/components/schemas/SingleOpBatchRecipe" - $ref: "#/components/schemas/MultiOpBatchRecipe" example: input: ["some input", "some more input"] recipe: - op: toHex - op: toBase64 - op: toBinary args: delimiter: "Comma" responses: '200': description: Inputs were syntactically valid, individual bakes may or may not have succeeded content: application/json: schema: $ref: "#/components/schemas/BatchBakeResponse" example: - type: "string" value: "01001110" success: true - error: "Spline reticulation exception" success: false '400': description: Bad request, most often a syntactically invalid recipe components: schemas: SingleOpRecipe: type: object properties: input: type: string example: "bake this" recipe: $ref: "#/components/schemas/Operation" example: op: "toHex" MultiOpRecipe: type: object properties: input: type: string example: "input for recipe" recipe: type: array items: $ref: "#/components/schemas/Operation" Operation: type: object properties: op: type: string args: oneOf: - $ref: "#/components/schemas/ArgArray" - $ref: "#/components/schemas/ArgObject" required: - op SingleOpBatchRecipe: type: object properties: input: type: object example: "bake this" recipe: $ref: "#/components/schemas/Operation" example: op: "toHex" MultiOpBatchRecipe: type: object properties: input: type: array items: string example: "input for recipe" recipe: type: array items: $ref: "#/components/schemas/Operation" OperationArray: type: array items: $ref: "#/components/schemas/Operation" InputArray: type: array items: type: string BatchBakeResponse: type: array items: oneOf: - $ref: "#/components/schemas/SuccessfulBakeResult" - $ref: "#/components/schemas/UnsuccessfulBakeResult" SuccessfulBakeResult: type: object properties: success: type: boolean value: type: string type: type: string UnsuccessfulBakeResult: type: object properties: success: type: boolean error: type: string ArgArray: type: array items: type: object example: - 16 - true - false ArgObject: type: object additionalProperties: true example: width: 16 upperCaseHex: true includeFinalLength: false BakeResponse: type: object properties: type: type: string value: oneOf: - type: string - type: number MagicInput: type: object properties: input: {} args: oneOf: - $ref: "#/components/schemas/ArgArray" - $ref: "#/components/schemas/ArgObject" MagicResponse: type: object properties: type: type: integer value: type: array items: $ref: "#/components/schemas/MagicResponseItem" MagicResponseItem: type: object properties: recipe: type: array items: type: object data: type: string languageScores: type: array items: type: object matchingOps: type: array items: type: object useful: type: boolean HealthResponse: type: object properties: uptime: type: number message: type: string timestamp: type: string