openapi: 3.0.0 info: version: 0.0.1 title: Nebraska Activity Apps API description: Nebraska is an update manager. contact: name: Flatcar Container Linux email: maintainers@flatcar-linux.org url: http://flatcar.org tags: - name: Apps paths: /api/apps: get: description: get Apps operationId: paginateApps security: - oidcBearerAuth: [] - oidcCookieAuth: [] - githubCookieAuth: [] parameters: - in: query name: page required: false schema: type: integer minimum: 0 - in: query name: perpage required: false schema: type: integer minimum: 10 responses: '200': description: Get App success response content: application/json: schema: $ref: '#/components/schemas/appsPage' '404': description: Apps not found response '400': description: Bad request response tags: - Apps post: description: create app operationId: createApp security: - oidcBearerAuth: [] - oidcCookieAuth: [] - githubCookieAuth: [] parameters: - in: query name: clone_from required: false schema: type: string requestBody: description: payload for create app required: true content: application/json: schema: $ref: '#/components/schemas/appConfig' responses: '200': description: Create App success response content: application/json: schema: $ref: '#/components/schemas/application' '400': description: Bad request response '500': description: Create App error response tags: - Apps /api/apps/{appIDorProductID}: get: description: get app operationId: getApp security: - oidcBearerAuth: [] - oidcCookieAuth: [] - githubCookieAuth: [] parameters: - in: path name: appIDorProductID required: true schema: type: string responses: '200': description: Get app success response content: application/json: schema: $ref: '#/components/schemas/application' '404': description: App not found response '500': description: Get App error response tags: - Apps put: description: update app operationId: updateApp security: - oidcBearerAuth: [] - oidcCookieAuth: [] - githubCookieAuth: [] parameters: - in: path name: appIDorProductID required: true schema: type: string requestBody: description: payload for update app required: true content: application/json: schema: $ref: '#/components/schemas/appConfig' responses: '200': description: Update App success response content: application/json: schema: $ref: '#/components/schemas/application' '400': description: Bad request response '500': description: Update app error response tags: - Apps delete: description: delete app operationId: deleteApp security: - oidcBearerAuth: [] - oidcCookieAuth: [] - githubCookieAuth: [] parameters: - in: path name: appIDorProductID required: true schema: type: string responses: '200': description: Delete App success response '500': description: Delete App error response tags: - Apps /api/apps/{appIDorProductID}/groups: get: description: paginate groups of an app operationId: paginateGroups security: - oidcBearerAuth: [] - oidcCookieAuth: [] - githubCookieAuth: [] parameters: - in: path name: appIDorProductID required: true schema: type: string - in: query name: page required: false schema: type: integer minimum: 0 - in: query name: perpage required: false schema: type: integer minimum: 10 responses: '200': description: get Groups success response content: application/json: schema: $ref: '#/components/schemas/groupPage' '404': description: Groups not found response '500': description: get Groups error response tags: - Apps post: description: create group in app operationId: createGroup security: - oidcBearerAuth: [] - oidcCookieAuth: [] - githubCookieAuth: [] parameters: - in: path name: appIDorProductID required: true schema: type: string requestBody: description: payload for create group required: true content: application/json: schema: $ref: '#/components/schemas/groupConfig' responses: '200': description: Create Group success response content: application/json: schema: $ref: '#/components/schemas/group' '400': description: Bad request response '500': description: Create Group error response tags: - Apps /api/apps/{appIDorProductID}/groups/{groupID}: get: description: get group given its groupID and appID operationId: getGroup security: - oidcBearerAuth: [] - oidcCookieAuth: [] - githubCookieAuth: [] parameters: - in: path name: appIDorProductID required: true schema: type: string - in: path name: groupID required: true schema: type: string responses: '200': description: Get Group success response content: application/json: schema: $ref: '#/components/schemas/group' '404': description: Group not found response '500': description: Get Group error response tags: - Apps put: description: update group given its groupID and appID operationId: updateGroup security: - oidcBearerAuth: [] - oidcCookieAuth: [] - githubCookieAuth: [] parameters: - in: path name: appIDorProductID required: true schema: type: string - in: path name: groupID required: true schema: type: string requestBody: description: payload for update group required: true content: application/json: schema: $ref: '#/components/schemas/groupConfig' responses: '200': description: Update Group success response content: application/json: schema: $ref: '#/components/schemas/group' '404': description: Group not found response '400': description: Update Group Bad request response '500': description: Update Group error response tags: - Apps delete: description: delete group given its groupID and appID operationId: deleteGroup security: - oidcBearerAuth: [] - oidcCookieAuth: [] - githubCookieAuth: [] parameters: - in: path name: appIDorProductID required: true schema: type: string - in: path name: groupID required: true schema: type: string responses: '200': description: Delete Group success response '404': description: Group not found response '500': description: Delete Group error response tags: - Apps /api/apps/{appIDorProductID}/groups/{groupID}/version_timeline: get: description: get version timeline of a group given its groupID and appID operationId: getGroupVersionTimeline security: - oidcBearerAuth: [] - oidcCookieAuth: [] - githubCookieAuth: [] parameters: - in: path name: appIDorProductID required: true schema: type: string - in: path name: groupID required: true schema: type: string - in: query name: duration required: true schema: type: string responses: '200': description: Version Timeline of group success response content: application/json: schema: $ref: '#/components/schemas/groupVersionCountTimeline' '404': description: Group not found response '500': description: Version Timeline of group error response tags: - Apps /api/apps/{appIDorProductID}/groups/{groupID}/status_timeline: get: description: get status timeline of a group given its groupID and appID operationId: getGroupStatusTimeline security: - oidcBearerAuth: [] - oidcCookieAuth: [] - githubCookieAuth: [] parameters: - in: path name: appIDorProductID required: true schema: type: string - in: path name: groupID required: true schema: type: string - in: query name: duration required: true schema: type: string responses: '200': description: Status Timeline of group success response content: application/json: schema: $ref: '#/components/schemas/groupStatusCountTimeline' '404': description: Group not found response '500': description: Status Timeline of group error response tags: - Apps /api/apps/{appIDorProductID}/groups/{groupID}/instances_stats: get: description: get instance stats of a group given its groupID and appID operationId: getGroupInstanceStats security: - oidcBearerAuth: [] - oidcCookieAuth: [] - githubCookieAuth: [] parameters: - in: path name: appIDorProductID required: true schema: type: string - in: path name: groupID required: true schema: type: string - in: query name: duration required: true schema: type: string responses: '200': description: Instance Stats of group success response content: application/json: schema: $ref: '#/components/schemas/groupInstanceStats' '404': description: Group not found response '500': description: Instance Stats of group error response tags: - Apps /api/apps/{appIDorProductID}/groups/{groupID}/version_breakdown: get: description: get version breakdown of a group given its groupID and appID operationId: getGroupVersionBreakdown security: - oidcBearerAuth: [] - oidcCookieAuth: [] - githubCookieAuth: [] parameters: - in: path name: appIDorProductID required: true schema: type: string - in: path name: groupID required: true schema: type: string responses: '200': description: Version Breakdown of group success response content: application/json: schema: $ref: '#/components/schemas/groupVersionBreakdown' '404': description: Group not found response '500': description: Version Breakdown of group error response tags: - Apps /api/apps/{appIDorProductID}/channels: get: description: paginate channels of an app operationId: paginateChannels security: - oidcBearerAuth: [] - oidcCookieAuth: [] - githubCookieAuth: [] parameters: - in: path name: appIDorProductID required: true schema: type: string - in: query name: page required: false schema: type: integer minimum: 0 - in: query name: perpage required: false schema: type: integer minimum: 10 responses: '200': description: Get channels success response content: application/json: schema: $ref: '#/components/schemas/channelPage' '404': description: Channel not found response '500': description: Get channels error response tags: - Apps post: description: create channel operationId: createChannel security: - oidcBearerAuth: [] - oidcCookieAuth: [] - githubCookieAuth: [] parameters: - in: path name: appIDorProductID required: true schema: type: string requestBody: description: payload for create channel required: true content: application/json: schema: $ref: '#/components/schemas/channelConfig' responses: '200': description: Create channel success response content: application/json: schema: $ref: '#/components/schemas/channel' '400': description: Bad request response '500': description: Create channel error response tags: - Apps /api/apps/{appIDorProductID}/channels/{channelID}: get: description: get channel by id operationId: getChannel security: - oidcBearerAuth: [] - oidcCookieAuth: [] - githubCookieAuth: [] parameters: - in: path name: appIDorProductID required: true schema: type: string - in: path name: channelID required: true schema: type: string responses: '200': description: Get channel success response content: application/json: schema: $ref: '#/components/schemas/channel' '404': description: Channel not found response '500': description: Get channel error response tags: - Apps put: description: update channel by id operationId: updateChannel security: - oidcBearerAuth: [] - oidcCookieAuth: [] - githubCookieAuth: [] parameters: - in: path name: appIDorProductID required: true schema: type: string - in: path name: channelID required: true schema: type: string requestBody: description: payload for create channel required: true content: application/json: schema: $ref: '#/components/schemas/channelConfig' responses: '200': description: Update channel success response content: application/json: schema: $ref: '#/components/schemas/channel' '404': description: Channel not found response '400': description: Bad request response '500': description: Update channel error response tags: - Apps delete: description: delete channel by id operationId: deleteChannel security: - oidcBearerAuth: [] - oidcCookieAuth: [] - githubCookieAuth: [] parameters: - in: path name: appIDorProductID required: true schema: type: string - in: path name: channelID required: true schema: type: string responses: '200': description: Delete channel success response '500': description: Delete channel error response tags: - Apps /api/apps/{appIDorProductID}/packages: get: description: paginate packages of an app operationId: paginatePackages security: - oidcBearerAuth: [] - oidcCookieAuth: [] - githubCookieAuth: [] parameters: - in: path name: appIDorProductID required: true schema: type: string - in: query name: page required: false schema: type: integer minimum: 0 - in: query name: perpage required: false schema: type: integer minimum: 10 - in: query name: searchVersion schema: type: string responses: '200': description: get Packages success response content: application/json: schema: $ref: '#/components/schemas/packagePage' '404': description: Packages not found response tags: - Apps post: description: create package operationId: createPackage security: - oidcBearerAuth: [] - oidcCookieAuth: [] - githubCookieAuth: [] parameters: - in: path name: appIDorProductID required: true schema: type: string requestBody: description: payload for create package required: true content: application/json: schema: $ref: '#/components/schemas/packageConfig' responses: '200': description: Create Package success response content: application/json: schema: $ref: '#/components/schemas/package' '400': description: Create Package bad request response '500': description: Create package error response tags: - Apps /api/apps/{appIDorProductID}/packages/{packageID}: get: description: get package given its packageID and appID operationId: getPackage security: - oidcBearerAuth: [] - oidcCookieAuth: [] - githubCookieAuth: [] parameters: - in: path name: appIDorProductID required: true schema: type: string - in: path name: packageID required: true schema: type: string responses: '200': description: Get Package success response content: application/json: schema: $ref: '#/components/schemas/package' '404': description: Package not found response '500': description: Get Package error response tags: - Apps put: description: update package given its packageID and appID operationId: updatePackage security: - oidcBearerAuth: [] - oidcCookieAuth: [] - githubCookieAuth: [] parameters: - in: path name: appIDorProductID required: true schema: type: string - in: path name: packageID required: true schema: type: string requestBody: description: payload for update package required: true content: application/json: schema: $ref: '#/components/schemas/packageConfig' responses: '200': description: Update Package success response content: application/json: schema: $ref: '#/components/schemas/package' '404': description: Package not found response '500': description: Update package error response tags: - Apps delete: description: delete package given its packageID and appID operationId: deletePackage security: - oidcBearerAuth: [] - oidcCookieAuth: [] - githubCookieAuth: [] parameters: - in: path name: appIDorProductID required: true schema: type: string - in: path name: packageID required: true schema: type: string responses: '200': description: Delete Package success response '404': description: Package not found response '500': description: Delete package error response tags: - Apps /api/apps/{appIDorProductID}/packages/{packageID}/floor-channels: get: description: get all channels where a package is marked as a floor operationId: getPackageFloorChannels security: - oidcBearerAuth: [] - oidcCookieAuth: [] - githubCookieAuth: [] parameters: - in: path name: appIDorProductID required: true schema: type: string - in: path name: packageID required: true schema: type: string responses: '200': description: Get Package Floor Channels success response content: application/json: schema: type: object properties: channels: type: array items: type: object properties: channel: $ref: '#/components/schemas/channel' floor_reason: type: string nullable: true count: type: integer '404': description: Package not found '500': description: Internal server error tags: - Apps /api/apps/{appIDorProductID}/groups/{groupID}/instances: get: description: get instances of a group given its groupID and appID operationId: getGroupInstances security: - oidcBearerAuth: [] - oidcCookieAuth: [] - githubCookieAuth: [] parameters: - in: path name: appIDorProductID required: true schema: type: string - in: path name: groupID required: true schema: type: string - in: query name: status required: true schema: type: integer - in: query name: page required: false schema: type: integer minimum: 0 - in: query name: perpage required: false schema: type: integer minimum: 10 - in: query name: sortFilter required: false schema: type: string - in: query name: sortOrder required: false schema: type: string - in: query name: searchFilter required: false schema: type: string - in: query name: searchValue required: false schema: type: string - in: query name: duration required: true schema: type: string - in: query name: version required: false schema: type: string responses: '200': description: Get Instances of a Group success response content: application/json: schema: $ref: '#/components/schemas/instancePage' '500': description: Get Instances of a Group error response tags: - Apps /api/apps/{appIDorProductID}/groups/{groupID}/instancescount: get: description: get instance count of a group given its groupID and appID operationId: getGroupInstancesCount security: - oidcBearerAuth: [] - oidcCookieAuth: [] - githubCookieAuth: [] parameters: - in: path name: appIDorProductID required: true schema: type: string - in: path name: groupID required: true schema: type: string - in: query name: duration required: true schema: type: string responses: '200': description: Get Instance count of a Group success response content: application/json: schema: $ref: '#/components/schemas/instanceCount' '500': description: Get Instance count of a Group error response tags: - Apps /api/apps/{appIDorProductID}/groups/{groupID}/instances/{instanceID}: get: description: get instance of a group given its groupID and appID operationId: getInstance security: - oidcBearerAuth: [] - oidcCookieAuth: [] - githubCookieAuth: [] parameters: - in: path name: appIDorProductID required: true schema: type: string - in: path name: groupID required: true schema: type: string - in: path name: instanceID required: true schema: type: string responses: '200': description: Get instance success response content: application/json: schema: $ref: '#/components/schemas/instance' '404': description: Instance not found response '500': description: Get instance error response tags: - Apps /api/apps/{appIDorProductID}/groups/{groupID}/instances/{instanceID}/status_history: get: description: get instance status_history. operationId: getInstanceStatusHistory security: - oidcBearerAuth: [] - oidcCookieAuth: [] - githubCookieAuth: [] parameters: - in: path name: appIDorProductID required: true schema: type: string - in: path name: groupID required: true schema: type: string - in: path name: instanceID required: true schema: type: string - in: query name: limit required: false schema: type: integer minimum: 0 responses: '200': description: Get instance status history success response content: application/json: schema: $ref: '#/components/schemas/instanceStatusHistories' '404': description: Instance not found response '500': description: Get instance status history error response tags: - Apps components: schemas: flatcarAction: type: object required: - id - event - chromeOSVersion - sha256 - needsAdmin - isDelta - disablePayloadBackoff - metadataSignatureRsa - metadataSize - deadline - createdTs properties: id: type: string event: type: string chromeOSVersion: type: string x-oapi-codegen-extra-tags: json: chromeos_version sha256: type: string needsAdmin: type: boolean x-oapi-codegen-extra-tags: json: needs_admin isDelta: type: boolean x-oapi-codegen-extra-tags: json: is_delta disablePayloadBackoff: type: boolean x-oapi-codegen-extra-tags: json: disable_payload_backoff metadataSignatureRsa: type: string x-oapi-codegen-extra-tags: json: metadata_signature_rsa metadataSize: type: string x-oapi-codegen-extra-tags: json: metadata_size deadline: type: string createdTs: type: string format: date-time x-oapi-codegen-extra-tags: json: created_ts x-oapi-codegen-extra-tags: json: flatcar_action packagePage: type: object required: - totalCount - count - packages properties: totalCount: type: integer count: type: integer packages: type: array items: $ref: '#/components/schemas/package' groupInstanceStats: type: object required: - total - undefined - updateGranted - error - complete - installed - downloaded - downloading - onHold properties: total: type: integer undefined: type: integer updateGranted: type: integer x-oapi-codegen-extra-tags: json: update_granted error: type: integer complete: type: integer installed: type: integer downloaded: type: integer downloading: type: integer onHold: type: integer instance: type: object required: - id - ip - createdTs properties: id: type: string ip: type: string createdTs: type: string format: date-time x-oapi-codegen-extra-tags: json: created_ts application: $ref: '#/components/schemas/instanceApplication' alias: type: string channelPage: type: object required: - totalCount - count - channels properties: totalCount: type: integer count: type: integer channels: type: array items: $ref: '#/components/schemas/channel' channel: type: object required: - id - name - color - createdTs - applicationID - packageID - arch properties: id: type: string name: type: string maxLength: 50 color: type: string createdTs: type: string format: date-time x-oapi-codegen-extra-tags: json: created_ts applicationID: type: string x-oapi-codegen-extra-tags: json: application_id packageID: type: string x-oapi-codegen-extra-tags: json: package_id package: $ref: '#/components/schemas/package' arch: $ref: '#/components/schemas/arch' x-oapi-codegen-extra-tags: db: channel appsPage: type: object required: - totalCount - count - applications properties: totalCount: type: integer count: type: integer applications: type: array items: $ref: '#/components/schemas/application' instancePage: type: object required: - total - instances properties: total: type: integer instances: type: array items: $ref: '#/components/schemas/instance' groupVersionCountTimeline: type: object x-go-type: map[time.Time]map[string]uint64 instanceApplication: type: object required: - instanceID - applicationID - groupID - version - createdTs - status - lastCheckForUpdates - lastUpdateGrantedTs - lastUpdateVersion - updateInProgress properties: instanceID: type: string x-oapi-codegen-extra-tags: json: instance_id applicationID: type: string x-oapi-codegen-extra-tags: json: application_id groupID: type: string x-oapi-codegen-extra-tags: json: group_id version: type: string x-oapi-codegen-extra-tags: json: version createdTs: type: string format: date-time x-oapi-codegen-extra-tags: json: created_ts status: type: integer lastCheckForUpdates: type: string format: date-time x-oapi-codegen-extra-tags: json: last_check_for_updates lastUpdateGrantedTs: type: string format: date-time x-oapi-codegen-extra-tags: json: last_update_granted_ts lastUpdateVersion: type: string x-oapi-codegen-extra-tags: json: last_update_version updateInProgress: type: boolean x-oapi-codegen-extra-tags: json: update_in_progress x-oapi-codegen-extra-tags: json: application instanceCount: type: object required: - count properties: count: type: integer x-go-type: uint64 instanceStatusHistory: type: object required: - status - verison - createdTs - errorCode properties: status: type: integer verison: type: string createdTs: type: string format: date-time x-oapi-codegen-extra-tags: json: created_ts errorCode: type: string x-oapi-codegen-extra-tags: db: error_code json: error_code group: type: object required: - id - name - description - createdTs - rolloutInProgress - applicationID - channelID - policyUpdatesEnabled - policySafeMode - policyOfficeHours - policyTimezone - policyPeriodInterval - policyMaxUpdatesPerPeriod - policyUpdateTimeout - track properties: id: type: string name: type: string description: type: string createdTs: type: string format: date-time x-oapi-codegen-extra-tags: json: created_ts rolloutInProgress: type: boolean x-oapi-codegen-extra-tags: json: rollout_in_progress applicationID: type: string x-oapi-codegen-extra-tags: json: application_id channelID: type: string x-oapi-codegen-extra-tags: json: channel_id policyUpdatesEnabled: type: boolean x-oapi-codegen-extra-tags: json: policy_updates_enabled policySafeMode: type: boolean x-oapi-codegen-extra-tags: json: policy_safe_mode policyOfficeHours: type: boolean x-oapi-codegen-extra-tags: json: policy_office_hours policyTimezone: type: string x-oapi-codegen-extra-tags: json: policy_timezone policyPeriodInterval: type: string x-oapi-codegen-extra-tags: json: policy_period_interval policyMaxUpdatesPerPeriod: type: integer minimum: 0 x-oapi-codegen-extra-tags: json: policy_max_updates_per_period policyUpdateTimeout: type: string x-oapi-codegen-extra-tags: json: policy_update_timeout channel: $ref: '#/components/schemas/channel' track: type: string groupVersionBreakdown: type: array items: $ref: '#/components/schemas/versionBreakdownEntry' application: type: object required: - id - name - description - createdTs - groups - channels - instances - productId properties: id: type: string name: type: string description: type: string createdTs: type: string format: date-time x-oapi-codegen-extra-tags: json: created_ts productId: type: string x-oapi-codegen-extra-tags: json: product_id groups: type: array items: $ref: '#/components/schemas/group' channels: type: array items: $ref: '#/components/schemas/channel' instances: type: object required: - count properties: count: type: integer versionBreakdownEntry: type: object required: - version - instance - percentage properties: version: type: string instances: type: integer percentage: type: number format: double groupConfig: type: object required: - name - policy_max_updates_per_period - policy_period_interval - policy_timezone - policy_update_timeout properties: name: type: string maxLength: 50 description: type: string maxLength: 250 channel_id: type: string policy_updates_enabled: type: boolean policy_safe_mode: type: boolean policy_office_hours: type: boolean policy_timezone: type: string policy_period_interval: type: string policy_max_updates_per_period: type: integer policy_update_timeout: type: string track: type: string maxLength: 256 packageConfig: type: object required: - application_id - arch - channels_blacklist - description - filename - hash - size - type - url - version properties: application_id: type: string arch: type: integer channels_blacklist: type: array items: type: string description: type: string filename: type: string hash: type: string size: type: string url: type: string version: type: string type: type: integer flatcarAction: $ref: '#/components/schemas/flatcarActionPackage' extraFiles: $ref: '#/components/schemas/extraFiles' flatcarActionPackage: type: object properties: id: type: string sha256: type: string x-oapi-codegen-extra-tags: json: flatcar_action appConfig: type: object required: - name properties: name: type: string description: type: string product_id: type: string nullable: true arch: type: integer package: type: object required: - id - type - version - url - filename - description - size - hash - createdTs - channelsBlacklist - applicationID - arch properties: id: type: string type: type: integer version: type: string url: type: string filename: type: string description: type: string size: type: string hash: type: string createdTs: type: string format: date-time x-oapi-codegen-extra-tags: json: created_ts channelsBlacklist: type: array items: type: string x-oapi-codegen-extra-tags: json: channels_blacklist extraFiles: $ref: '#/components/schemas/extraFiles' applicationID: type: string x-oapi-codegen-extra-tags: json: application_id flatcarAction: $ref: '#/components/schemas/flatcarAction' arch: $ref: '#/components/schemas/arch' isFloor: type: boolean description: Indicates if this package is a floor version for the current context x-oapi-codegen-extra-tags: json: is_floor,omitempty floorReason: type: string nullable: true description: Reason why this package is marked as a floor version maxLength: 500 x-oapi-codegen-extra-tags: json: floor_reason channelConfig: type: object required: - application_id - arch - color - name properties: application_id: type: string arch: type: integer x-go-type: uint color: type: string name: type: string package_id: type: string instanceStatusHistories: type: array items: $ref: '#/components/schemas/instanceStatusHistory' groupPage: type: object required: - totalCount - count - groups properties: totalCount: type: integer count: type: integer groups: type: array items: $ref: '#/components/schemas/group' groupStatusCountTimeline: type: object x-go-type: map[time.Time]map[int]map[string]uint64 extraFiles: type: array items: type: object properties: id: type: integer name: type: string hash: type: string hash256: type: string size: type: string x-oapi-codegen-extra-tags: json: extra_files securitySchemes: oidcBearerAuth: type: http scheme: bearer bearerFormat: JWT oidcCookieAuth: type: apiKey in: cookie name: oidc githubCookieAuth: type: apiKey in: cookie name: github