swagger: "2.0" info: version: "0.0.1" title: Chroma Rest API # during dev, should point to your local machine host: localhost:54235 # basePath prefixes all resource paths basePath: /chromasdk # schemes: # tip: remove http to make production-grade - http - https # format of bodies a client can send (Content-Type) consumes: - application/json # format of the responses to the client (Accepts) produces: - application/json paths: /: # binds a127 app logic to a route x-swagger-router-controller: chromasdk delete: description: Delete the Chroma SDK session # used as the method name of the controller operationId: deleteChromaSdk responses: # responses may fall through to errors default: description: Response (DELETE) schema: $ref: "#/definitions/DeleteChromaSdkResponse" /heartbeat: # binds a127 app logic to a route x-swagger-router-controller: heartbeat put: description: To turn off effect use CHROMA_NONE. # used as the method name of the controller operationId: heartbeat responses: # responses may fall through to errors default: description: Response (PUT) /effect: # binds a127 app logic to a route x-swagger-router-controller: effect put: description: Setting effect with an identifier or set of identifiers. # used as the method name of the controller operationId: putEffect parameters: - in: body name: data schema: $ref: "#/definitions/EffectIdentifierInput" responses: # responses may fall through to errors default: description: Response (PUT) schema: $ref: "#/definitions/EffectIdentifierResponse" /effect/remove: # binds a127 app logic to a route x-swagger-router-controller: effect_remove put: description: Remove an effect or a set of effects with identifier. Effects must be removed to free resources. # used as the method name of the controller operationId: removeEffect parameters: - in: body name: data schema: $ref: "#/definitions/EffectIdentifierInput" responses: # responses may fall through to errors default: description: Response (PUT) schema: $ref: "#/definitions/EffectIdentifierResponse" /chromalink: # binds a127 app logic to a route x-swagger-router-controller: chromalink put: description: To turn off effect use CHROMA_NONE. # used as the method name of the controller operationId: putChromaLink parameters: - in: body name: data schema: $ref: "#/definitions/EffectInput" responses: # responses may fall through to errors default: description: Response (PUT) schema: $ref: "#/definitions/EffectResponse" post: description: POST will return an effect id. To turn off effect use CHROMA_NONE. operationId: postChromaLink parameters: - in: body name: data schema: $ref: "#/definitions/EffectInput" responses: # responses may fall through to errors default: description: Response (POST) schema: $ref: "#/definitions/EffectResponseId" /chromalink/none: # binds a127 app logic to a route x-swagger-router-controller: chromalink_none put: description: Turn off effect # used as the method name of the controller operationId: putChromaLinkNone responses: # responses may fall through to errors default: description: Response (PUT) schema: $ref: "#/definitions/EffectResponse" post: description: Turn off effect. POST will return an effect id. operationId: postChromaLinkNone responses: # responses may fall through to errors default: description: Response (POST) schema: $ref: "#/definitions/EffectResponseId" /chromalink/static: # binds a127 app logic to a route x-swagger-router-controller: chromalink_static put: description: To set static color. # used as the method name of the controller operationId: putChromaLinkStatic parameters: - in: body name: color description: Color value in BGR format required: true schema: type: integer responses: # responses may fall through to errors default: description: Response (PUT) schema: $ref: "#/definitions/EffectResponse" post: description: To set static color. POST will return an effect id. operationId: postChromaLinkStatic parameters: - in: body name: color description: Color value in BGR format required: true schema: type: integer responses: # responses may fall through to errors default: description: Response (POST) schema: $ref: "#/definitions/EffectResponseId" /chromalink/custom: # binds a127 app logic to a route x-swagger-router-controller: chromalink_custom put: description: 1D array with 5 elements. # used as the method name of the controller operationId: putChromaLinkCustom parameters: - in: body name: data schema: $ref: "#/definitions/EffectArray1dInput" responses: # responses may fall through to errors default: description: Response (PUT) schema: $ref: "#/definitions/EffectResponse" post: description: 1D array with 5 elements. POST will return an effect id. operationId: postChromaLinkCustom parameters: - in: body name: data schema: $ref: "#/definitions/EffectArray1dInput" responses: # responses may fall through to errors default: description: Response (POST) schema: $ref: "#/definitions/EffectResponseId" /headset: # binds a127 app logic to a route x-swagger-router-controller: headset put: description: To turn off effect use CHROMA_NONE. # used as the method name of the controller operationId: putHeadset parameters: - in: body name: data schema: $ref: "#/definitions/EffectInput" responses: # responses may fall through to errors default: description: Response (PUT) schema: $ref: "#/definitions/EffectResponse" post: description: POST will return an effect id. To turn off effect use CHROMA_NONE. operationId: postHeadset parameters: - in: body name: data schema: $ref: "#/definitions/EffectInput" responses: # responses may fall through to errors default: description: Response (POST) schema: $ref: "#/definitions/EffectResponseId" /headset/none: # binds a127 app logic to a route x-swagger-router-controller: headset_none put: description: Turn off effect # used as the method name of the controller operationId: putHeadsetNone responses: # responses may fall through to errors default: description: Response (PUT) schema: $ref: "#/definitions/EffectResponse" post: description: Turn off effect. POST will return an effect id. operationId: postHeadsetNone responses: # responses may fall through to errors default: description: Response (POST) schema: $ref: "#/definitions/EffectResponseId" /headset/static: # binds a127 app logic to a route x-swagger-router-controller: headset_static put: description: To set static color. # used as the method name of the controller operationId: putHeadsetStatic parameters: - in: body name: color description: Color value in BGR format required: true schema: type: integer responses: # responses may fall through to errors default: description: Response (PUT) schema: $ref: "#/definitions/EffectResponse" post: description: To set static color. POST will return an effect id. operationId: postHeadsetStatic parameters: - in: body name: color description: Color value in BGR format required: true schema: type: integer responses: # responses may fall through to errors default: description: Response (POST) schema: $ref: "#/definitions/EffectResponseId" /headset/custom: # binds a127 app logic to a route x-swagger-router-controller: headset_custom put: description: 1D array with 5 elements. # used as the method name of the controller operationId: putHeadsetCustom parameters: - in: body name: data schema: $ref: "#/definitions/EffectArray1dInput" responses: # responses may fall through to errors default: description: Response (PUT) schema: $ref: "#/definitions/EffectResponse" post: description: 1D array with 5 elements. POST will return an effect id. operationId: postHeadsetCustom parameters: - in: body name: data schema: $ref: "#/definitions/EffectArray1dInput" responses: # responses may fall through to errors default: description: Response (POST) schema: $ref: "#/definitions/EffectResponseId" /keyboard: # binds a127 app logic to a route x-swagger-router-controller: keyboard put: description: To turn off effect use CHROMA_NONE. # used as the method name of the controller operationId: putKeyboard parameters: - in: body name: data schema: $ref: "#/definitions/EffectInput" responses: # responses may fall through to errors default: description: Response (PUT) schema: $ref: "#/definitions/EffectResponse" post: description: POST will return an effect id. To turn off effect use CHROMA_NONE. operationId: postKeyboard parameters: - in: body name: data schema: $ref: "#/definitions/EffectInput" responses: # responses may fall through to errors default: description: Response (POST) schema: $ref: "#/definitions/EffectResponseId" /keyboard/none: # binds a127 app logic to a route x-swagger-router-controller: keyboard_none put: description: Turn off effect # used as the method name of the controller operationId: putKeyboardNone responses: # responses may fall through to errors default: description: Response (PUT) schema: $ref: "#/definitions/EffectResponse" post: description: Turn off effect. POST will return an effect id. operationId: postKeyboardNone responses: # responses may fall through to errors default: description: Response (POST) schema: $ref: "#/definitions/EffectResponseId" /keyboard/static: # binds a127 app logic to a route x-swagger-router-controller: keyboard_static put: description: To set static color. # used as the method name of the controller operationId: putKeyboardStatic parameters: - in: body name: color description: Color value in BGR format required: true schema: type: integer responses: # responses may fall through to errors default: description: Response (PUT) schema: $ref: "#/definitions/EffectResponse" post: description: To set static color. POST will return an effect id. operationId: postKeyboardStatic parameters: - in: body name: color description: Color value in BGR format required: true schema: type: integer responses: # responses may fall through to errors default: description: Response (POST) schema: $ref: "#/definitions/EffectResponseId" /keyboard/custom: # binds a127 app logic to a route x-swagger-router-controller: keyboard_custom put: description: 2D array with 6 rows of 22 columns. # used as the method name of the controller operationId: putKeyboardCustom parameters: - in: body name: data schema: $ref: "#/definitions/EffectArray2dInput" responses: # responses may fall through to errors default: description: Response (PUT) schema: $ref: "#/definitions/EffectResponse" post: description: 2D array with 6 rows of 22 columns. POST will return an effect id. operationId: postKeyboardCustom parameters: - in: body name: data schema: $ref: "#/definitions/EffectArray2dInput" responses: # responses may fall through to errors default: description: Response (POST) schema: $ref: "#/definitions/EffectResponseId" /keypad: # binds a127 app logic to a route x-swagger-router-controller: keypad put: description: To turn off effect use CHROMA_NONE. # used as the method name of the controller operationId: putKeypad parameters: - in: body name: data schema: $ref: "#/definitions/EffectInput" responses: # responses may fall through to errors default: description: Response (PUT) schema: $ref: "#/definitions/EffectResponse" post: description: POST will return an effect id. To turn off effect use CHROMA_NONE. operationId: postKeypad parameters: - in: body name: data schema: $ref: "#/definitions/EffectInput" responses: # responses may fall through to errors default: description: Response (POST) schema: $ref: "#/definitions/EffectResponseId" /keypad/none: # binds a127 app logic to a route x-swagger-router-controller: keypad_none put: description: Turn off effect # used as the method name of the controller operationId: putKeypadNone responses: # responses may fall through to errors default: description: Response (PUT) schema: $ref: "#/definitions/EffectResponse" post: description: Turn off effect. POST will return an effect id. operationId: postKeypadNone responses: # responses may fall through to errors default: description: Response (POST) schema: $ref: "#/definitions/EffectResponseId" /keypad/static: # binds a127 app logic to a route x-swagger-router-controller: keypad_static put: description: To set static color. # used as the method name of the controller operationId: putKeypadStatic parameters: - in: body name: color description: Color value in BGR format required: true schema: type: integer responses: # responses may fall through to errors default: description: Response (PUT) schema: $ref: "#/definitions/EffectResponse" post: description: To set static color. POST will return an effect id. operationId: postKeypadStatic parameters: - in: body name: color description: Color value in BGR format required: true schema: type: integer responses: # responses may fall through to errors default: description: Response (POST) schema: $ref: "#/definitions/EffectResponseId" /keypad/custom: # binds a127 app logic to a route x-swagger-router-controller: keypad_custom put: description: 2D array with 4 rows of 5 columns. # used as the method name of the controller operationId: putKeypadCustom parameters: - in: body name: data schema: $ref: "#/definitions/EffectArray2dInput" responses: # responses may fall through to errors default: description: Response (PUT) schema: $ref: "#/definitions/EffectResponse" post: description: 1D array with 4 rows of 5 columns. POST will return an effect id. operationId: postKeypadCustom parameters: - in: body name: data schema: $ref: "#/definitions/EffectArray2dInput" responses: # responses may fall through to errors default: description: Response (POST) schema: $ref: "#/definitions/EffectResponseId" /mouse: # binds a127 app logic to a route x-swagger-router-controller: mouse put: description: To turn off effect use CHROMA_NONE. # used as the method name of the controller operationId: putMouse parameters: - in: body name: data schema: $ref: "#/definitions/EffectInput" responses: # responses may fall through to errors default: description: Response (PUT) schema: $ref: "#/definitions/EffectResponse" post: description: POST will return an effect id. To turn off effect use CHROMA_NONE. operationId: postMouse parameters: - in: body name: data schema: $ref: "#/definitions/EffectInput" responses: # responses may fall through to errors default: description: Response (POST) schema: $ref: "#/definitions/EffectResponseId" /mouse/none: # binds a127 app logic to a route x-swagger-router-controller: mouse_none put: description: Turn off effect # used as the method name of the controller operationId: putMouseNone responses: # responses may fall through to errors default: description: Response (PUT) schema: $ref: "#/definitions/EffectResponse" post: description: Turn off effect. POST will return an effect id. operationId: postMouseNone responses: # responses may fall through to errors default: description: Response (POST) schema: $ref: "#/definitions/EffectResponseId" /mouse/static: # binds a127 app logic to a route x-swagger-router-controller: mouse_static put: description: To set static color. # used as the method name of the controller operationId: putMouseStatic parameters: - in: body name: color description: Color value in BGR format required: true schema: type: integer responses: # responses may fall through to errors default: description: Response (PUT) schema: $ref: "#/definitions/EffectResponse" post: description: To set static color. POST will return an effect id. operationId: postMouseStatic parameters: - in: body name: color description: Color value in BGR format required: true schema: type: integer responses: # responses may fall through to errors default: description: Response (POST) schema: $ref: "#/definitions/EffectResponseId" /mouse/custom2: # binds a127 app logic to a route x-swagger-router-controller: mouse_custom put: description: 2D array with 9 rows of 7 columns. # used as the method name of the controller operationId: putMouseCustom parameters: - in: body name: data schema: $ref: "#/definitions/EffectArray2dInput" responses: # responses may fall through to errors default: description: Response (PUT) schema: $ref: "#/definitions/EffectResponse" post: description: 2D array with 9 rows of 7 columns. POST will return an effect id. operationId: postMouseCustom parameters: - in: body name: data schema: $ref: "#/definitions/EffectArray2dInput" responses: # responses may fall through to errors default: description: Response (POST) schema: $ref: "#/definitions/EffectResponseId" /mousepad: # binds a127 app logic to a route x-swagger-router-controller: mousepad put: description: To turn off effect use CHROMA_NONE. # used as the method name of the controller operationId: putMousepad parameters: - in: body name: data schema: $ref: "#/definitions/EffectInput" responses: # responses may fall through to errors default: description: Response (PUT) schema: $ref: "#/definitions/EffectResponse" post: description: POST will return an effect id. To turn off effect use CHROMA_NONE. operationId: postMousepad parameters: - in: body name: data schema: $ref: "#/definitions/EffectInput" responses: # responses may fall through to errors default: description: Response (POST) schema: $ref: "#/definitions/EffectResponseId" /mousepad/none: # binds a127 app logic to a route x-swagger-router-controller: mousepad_none put: description: Turn off effect # used as the method name of the controller operationId: putMousepadNone responses: # responses may fall through to errors default: description: Response (PUT) schema: $ref: "#/definitions/EffectResponse" post: description: Turn off effect. POST will return an effect id. operationId: postMousepadNone responses: # responses may fall through to errors default: description: Response (POST) schema: $ref: "#/definitions/EffectResponseId" /mousepad/static: # binds a127 app logic to a route x-swagger-router-controller: mousepad_static put: description: To set static color. # used as the method name of the controller operationId: putMousepadStatic parameters: - in: body name: color description: Color value in BGR format required: true schema: type: integer responses: # responses may fall through to errors default: description: Response (PUT) schema: $ref: "#/definitions/EffectResponse" post: description: To set static color. POST will return an effect id. operationId: postMousepadStatic parameters: - in: body name: color description: Color value in BGR format required: true schema: type: integer responses: # responses may fall through to errors default: description: Response (POST) schema: $ref: "#/definitions/EffectResponseId" /mousepad/custom: # binds a127 app logic to a route x-swagger-router-controller: mousepad_custom put: description: 1D array with 15 elements. # used as the method name of the controller operationId: putMousepadCustom parameters: - in: body name: data schema: $ref: "#/definitions/EffectArray1dInput" responses: # responses may fall through to errors default: description: Response (PUT) schema: $ref: "#/definitions/EffectResponse" post: description: 1D array with 15 elements. POST will return an effect id. operationId: postMousepadCustom parameters: - in: body name: data schema: $ref: "#/definitions/EffectArray1dInput" responses: # responses may fall through to errors default: description: Response (POST) schema: $ref: "#/definitions/EffectResponseId" /swagger: x-swagger-pipe: swagger_raw # complex objects have schema definitions definitions: EffectType: type: string enum: - CHROMA_NONE - CHROMA_WAVE - CHROMA_SPECTRUMCYCLING - CHROMA_BREATHING - CHROMA_BLINKING - CHROMA_REACTIVE - CHROMA_STATIC - CHROMA_CUSTOM - CHROMA_CUSTOM2 - CHROMA_RESERVED - CHROMA_INVALID description: Chroma generic effects. Note that not all devices supported the listed effects EffectInput: type: object description: JSON Data required: - effect properties: effect: $ref: "#/definitions/EffectType" param: type: object description: Effect definition properties: color: type: integer description: Color value in BGR format color1: type: integer description: Color 1 value in BGR format color2: type: integer description: Color 2 value in BGR format direction: type: integer description: Effect direction duration: type: integer description: Effect duration type: type: integer description: Effect type EffectArray1dInput: type: array description: 1 dimensional array. Color values are in BGR format. items: type: integer EffectArray2dInput: type: array description: 2 dimensional array. Color values are in BGR format. items: type: array items: type: integer EffectResponseId: required: - result properties: id: type: string result: type: integer EffectResponse: required: - result properties: result: type: integer EffectIdentifierInput: properties: id: type: string ids: type: array items: type: string EffectIdentifierResponse: properties: result: type: integer results: type: array items: type: object properties: result: type: integer DeleteChromaSdkResponse: properties: result: type: integer