Skip to content

Commit

Permalink
beta: Beta OpenAPI file replicated from Notehub commit 7d431d2
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Jan 15, 2025
1 parent a9b5fd4 commit 4271b56
Showing 1 changed file with 52 additions and 19 deletions.
71 changes: 52 additions & 19 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,10 @@ paths:
properties:
label:
type: string
description: The label for the Fleet.
description: The label, or name, for the Fleet.
smart_rule:
$ref: "#/components/schemas/FleetRule"


responses:
"201":
Expand Down Expand Up @@ -669,6 +672,8 @@ paths:
items:
type: string
description: List of DeviceUIDs to remove from fleet
smart_rule:
$ref: "#/components/schemas/FleetRule"
responses:
"200":
description: Successful operation
Expand All @@ -691,6 +696,20 @@ paths:
default:
$ref: "#/components/responses/ErrorResponse"

get:
tags: [ "project" ]
operationId: getFleet
description: Get Fleet
security:
- api_key: [ ]
responses:
"200":
description: Successful operation
content:
application/json:
schema:
$ref: "#/components/schemas/Fleet"

/v1/projects/{projectUID}/members:
parameters:
- $ref: "#/components/parameters/projectUIDParam"
Expand Down Expand Up @@ -1208,7 +1227,7 @@ paths:
items:
type: string
- name: since
description: Deprecated.
description: Deprecated.
in: query
required: false
deprecated: true
Expand Down Expand Up @@ -1300,7 +1319,7 @@ paths:
items:
type: string
- name: since
description: Deprecated.
description: Deprecated.
in: query
required: false
deprecated: true
Expand Down Expand Up @@ -2201,7 +2220,7 @@ paths:
/v1/projects/{projectUID}/dfu/{firmwareType}/{action}:
post:
tags: ["project"]
operationId: dfuAction
operationId: dfuAction
description: Update/cancel host or notecard firmware updates
security:
- api_key: []
Expand All @@ -2219,7 +2238,7 @@ paths:
- $ref: "#/components/parameters/productUIDQueryParam"
- $ref: "#/components/parameters/skuParam"
requestBody:
description: Which firmware in the case of an update action
description: Which firmware in the case of an update action
required: false
content:
application/json:
Expand All @@ -2232,6 +2251,7 @@ paths:
$ref: "#/components/responses/ErrorResponse"

components:

securitySchemes:
api_key:
type: apiKey
Expand Down Expand Up @@ -2281,6 +2301,7 @@ components:
schema:
type: string


fleetUIDsParam:
name: fleetUIDs
in: query
Expand All @@ -2306,7 +2327,7 @@ components:
schema:
type: string
example: dev:000000000000000

firmwareTypeParam:
name: firmwareType
in: path
Expand All @@ -2316,9 +2337,9 @@ components:
enum:
- host
- notecard

dfuActionParam:
name: action
name: action
in: path
required: true
schema:
Expand Down Expand Up @@ -2459,8 +2480,8 @@ components:
type: string
default: captured
enum:
- captured
- uploaded
- captured
- uploaded
example: uploaded

cursorParam:
Expand Down Expand Up @@ -2715,6 +2736,8 @@ components:
items:
type: string



responses:
ErrorResponse:
description: The response body in case of an API error.
Expand Down Expand Up @@ -3252,17 +3275,26 @@ components:
- label
- disable_devices_by_default

FleetRule:
type: string
description: JSONata expression that will be evaluated to determine device membership into this fleet, if the expression evaluates to a 1, the device will be included, if it evaluates to -1 it will be removed, and if it evaluates to 0 or errors it will be left unchanged.

Fleet:
type: object
properties:
# NOTE: Leaving out is and is_like, for now.
uid:
type: string
description: Fleet UID
label:
type: string
description: Fleet label
created:
type: string
format: date-time
description: RFC3339 timestamp in UTC
smart_rule:
$ref: "#/components/schemas/FleetRule"

required:
- uid
- label
Expand Down Expand Up @@ -4726,24 +4758,25 @@ components:
type: object
properties:
current_firmware:
$ref: "#/components/schemas/CurrentFirmware"
$ref: '#/components/schemas/CurrentFirmware'
firmware_update:
$ref: "#/components/schemas/UserDfuStateMachine"
$ref: '#/components/schemas/UserDfuStateMachine'
nullable: true

UserDfuStateMachine:
type: object
properties:
status:
$ref: "#/components/schemas/UserDfuStateMachineStatus"
$ref: '#/components/schemas/UserDfuStateMachineStatus'
created:
type: string
format: date-time
nullable: true
from_version:
type: string
metadata:
$ref: "#/components/schemas/UploadMetadata"
$ref: '#/components/schemas/UploadMetadata'


UserDfuStateMachineStatus:
type: object
Expand All @@ -4765,7 +4798,7 @@ components:
version:
type: string
metadata:
$ref: "#/components/schemas/Firmware"
$ref: '#/components/schemas/Firmware'

UploadMetadata:
type: object
Expand Down Expand Up @@ -4795,7 +4828,7 @@ components:
notes:
type: string
firmware:
$ref: "#/components/schemas/Firmware"
$ref: '#/components/schemas/Firmware'

Firmware:
type: object
Expand Down Expand Up @@ -4980,7 +5013,7 @@ components:
type: array
items:
$ref: "#/components/schemas/DeviceDfuStateMachineNode"

DeviceDfuStateMachineNode:
type: object
description: Represents a single request to update the host or Notecard firmware
Expand All @@ -4996,4 +5029,4 @@ components:
description: RFC3339 compatible datetime of when this status update happened
description:
type: string
description: Additional information
description: Additional information

0 comments on commit 4271b56

Please sign in to comment.