openapi: 3.1.0 info: title: Fermyon Cloud accounts device-codes API version: '1.0' description: OpenAPI 3.1 specification for the Fermyon Cloud REST API, derived from the public swagger.json published in the fermyon/cloud-openapi repository on GitHub. servers: - url: https://cloud.fermyon.com description: Fermyon Cloud production API security: - Bearer: [] tags: - name: device-codes paths: /api/device-codes: post: tags: - device-codes parameters: - name: Api-Version in: header description: The requested API version schema: type: string default: '1.0' requestBody: content: application/json-patch+json: schema: $ref: '#/components/schemas/CreateDeviceCodeCommand' application/json: schema: $ref: '#/components/schemas/CreateDeviceCodeCommand' text/json: schema: $ref: '#/components/schemas/CreateDeviceCodeCommand' application/*+json: schema: $ref: '#/components/schemas/CreateDeviceCodeCommand' required: true responses: '200': description: Success content: text/plain: schema: $ref: '#/components/schemas/DeviceCodeItem' application/json: schema: $ref: '#/components/schemas/DeviceCodeItem' text/json: schema: $ref: '#/components/schemas/DeviceCodeItem' /api/device-codes/{userCode}: get: tags: - device-codes parameters: - name: userCode in: path required: true schema: type: string - name: Api-Version in: header description: The requested API version schema: type: string default: '1.0' responses: '200': description: Success content: text/plain: schema: $ref: '#/components/schemas/DeviceCodeDetails' application/json: schema: $ref: '#/components/schemas/DeviceCodeDetails' text/json: schema: $ref: '#/components/schemas/DeviceCodeDetails' /api/device-codes/activate: post: tags: - device-codes parameters: - name: Api-Version in: header description: The requested API version schema: type: string default: '1.0' requestBody: content: application/json-patch+json: schema: $ref: '#/components/schemas/ActivateDeviceCodeCommand' application/json: schema: $ref: '#/components/schemas/ActivateDeviceCodeCommand' text/json: schema: $ref: '#/components/schemas/ActivateDeviceCodeCommand' application/*+json: schema: $ref: '#/components/schemas/ActivateDeviceCodeCommand' required: true responses: '200': description: Success components: schemas: DeviceCodeDetails: type: object properties: clientName: type: string additionalProperties: false DeviceCodeItem: required: - deviceCode - expiresIn - interval - userCode - verificationUrl type: object properties: deviceCode: minLength: 1 type: string userCode: minLength: 1 type: string verificationUrl: minLength: 1 type: string expiresIn: type: integer format: int64 interval: type: integer format: int32 additionalProperties: false ActivateDeviceCodeCommand: required: - userCode type: object properties: userCode: minLength: 1 type: string additionalProperties: false CreateDeviceCodeCommand: required: - clientId type: object properties: clientId: type: string format: uuid additionalProperties: false securitySchemes: Bearer: type: apiKey description: 'JWT Authorization header using the Bearer scheme. Example: "Authorization: Bearer {token}"' name: Authorization in: header