From 835304947e753c876f0d866e3b793778f4fc4d0e Mon Sep 17 00:00:00 2001 From: Ben Hardill Date: Mon, 6 Jul 2026 13:02:48 +0100 Subject: [PATCH 01/16] Add granular RBAC SSO support fixes #7396 Includes both SMAL and LDAP Also includes a fix for the direct SSO login buttons on login page --- forge/db/models/Team.js | 13 ++ forge/db/models/TeamMember.js | 2 +- forge/db/views/User.js | 3 +- forge/ee/lib/sso/index.js | 160 +++++++++++++++--- frontend/src/pages/Login.vue | 2 +- .../pages/application/Settings/UserAccess.vue | 3 +- test/unit/forge/ee/lib/sso/index_spec.js | 54 ++++++ 7 files changed, 206 insertions(+), 31 deletions(-) diff --git a/forge/db/models/Team.js b/forge/db/models/Team.js index 195894829c..b5d40ddac4 100644 --- a/forge/db/models/Team.js +++ b/forge/db/models/Team.js @@ -780,6 +780,19 @@ module.exports = { unsuspend: async function () { this.suspended = false await this.save() + }, + hasApplication: async function (nameOrId) { + const applicationId = M.Application.decodeHashid(nameOrId) + const application = await app.db.models.Application.findOne({ + where: { + [Op.or]: [ + { name: nameOrId }, + { id: applicationId } + ] + } + }) + + return application } } } diff --git a/forge/db/models/TeamMember.js b/forge/db/models/TeamMember.js index d63f18b8fd..c48a88c81d 100644 --- a/forge/db/models/TeamMember.js +++ b/forge/db/models/TeamMember.js @@ -59,7 +59,7 @@ module.exports = { } }) }, - getTeamsForUser: async (userId, includeTeam = false) => { + getTeamsForUser: async (userId, includeTeam) => { if (typeof userId === 'string') { userId = M.User.decodeHashid(userId) } diff --git a/forge/db/views/User.js b/forge/db/views/User.js index e1fcc69281..b03afbdb03 100644 --- a/forge/db/views/User.js +++ b/forge/db/views/User.js @@ -77,7 +77,8 @@ module.exports = function (app) { $id: 'TeamMemberPermissions', type: 'object', properties: { - applications: { type: 'object', additionalProperties: true } + applications: { type: 'object', additionalProperties: true }, + sso: { type: 'boolean' } } }) app.addSchema({ diff --git a/forge/ee/lib/sso/index.js b/forge/ee/lib/sso/index.js index c9ff17928a..771efc7b76 100644 --- a/forge/ee/lib/sso/index.js +++ b/forge/ee/lib/sso/index.js @@ -337,8 +337,9 @@ module.exports.init = async function (app) { } let adminGroup = false const desiredTeamMemberships = {} + const desiredTeamApplicationroles = {} app.log.debug(`SAML Group Assertions for ${user.username} ${JSON.stringify(groupAssertions)}`) - groupAssertions.forEach(ga => { + for (const ga of groupAssertions) { // Trim prefix/postfix from group name let shortGA = ga if (providerOpts.groupPrefixLength || providerOpts.groupSuffixLength) { @@ -351,25 +352,46 @@ module.exports.init = async function (app) { // Generate a slug->role object (desiredTeamMemberships) const match = /^ff-(.+)-([^-]+)$/.exec(shortGA) if (match) { - const teamSlug = match[1] - const teamRoleName = match[2] - const teamRole = Roles[teamRoleName] - // Check this role is a valid team role - if (TeamRoles.includes(teamRole)) { - // Check if this team is allowed to be managed for this SSO provider - // - either `groupAllTeams` is true (allowing all teams to be managed this way) - // - or `groupTeams` (array) contains the teamSlug - if (providerOpts.groupAllTeams || (providerOpts.groupTeams || []).includes(teamSlug)) { - // In case we have multiple assertions for a single team, - // ensure we keep the highest level of access - desiredTeamMemberships[teamSlug] = Math.max(desiredTeamMemberships[teamSlug] || 0, teamRole) + // check for Application Overide groups + const applicationRolesMatch = /(.+)\[(.+)\]/.exec(match[1]) + if (applicationRolesMatch) { + const teamSlug = applicationRolesMatch[1] + const applicationId = applicationRolesMatch[2] + const applicationRoleName = match[2] + const applicationRole = Roles[applicationRoleName] + const team = await app.db.models.Team.bySlug(teamSlug) + const application = await team.hasApplication(applicationId) + if (application) { + if (providerOpts.groupAllTeams || (providerOpts.groupTeams || []).includes(teamSlug)) { + if (desiredTeamApplicationroles[team.hashid]) { + desiredTeamApplicationroles[team.hashid][application.hashid] = Math.max(desiredTeamApplicationroles[teamSlug][application.hashid] || 0, applicationRole) + } else { + desiredTeamApplicationroles[team.hashid] = {} + desiredTeamApplicationroles[team.hashid][application.hashid] = applicationRole + } + } + } + } else { + const teamSlug = match[1] + const teamRoleName = match[2] + const teamRole = Roles[teamRoleName] + // Check this role is a valid team role + if (TeamRoles.includes(teamRole)) { + // Check if this team is allowed to be managed for this SSO provider + // - either `groupAllTeams` is true (allowing all teams to be managed this way) + // - or `groupTeams` (array) contains the teamSlug + if (providerOpts.groupAllTeams || (providerOpts.groupTeams || []).includes(teamSlug)) { + // In case we have multiple assertions for a single team, + // ensure we keep the highest level of access + desiredTeamMemberships[teamSlug] = Math.max(desiredTeamMemberships[teamSlug] || 0, teamRole) + } } } } if (providerOpts.groupAdmin && providerOpts.groupAdminName === ga) { adminGroup = true } - }) + } if (providerOpts.groupAdmin) { if (user.admin && !adminGroup) { @@ -461,6 +483,37 @@ module.exports.init = async function (app) { } await Promise.all(promises) + // Now all group membership updated apply application overrides + // This needs to do 2 passes, get all the memberships that exist and compare to new list + const existingApplicationOveridesList = (await app.db.models.TeamMember.getTeamsForUser(user.id, true))?.filter(app => { return !!app.permissions }) || [] + const existingApplicationOverides = existingApplicationOveridesList.reduce((prev, tm) => { + const n = {} + n[tm.Team.hashid] = { + overides: tm.permissions + } + return { + ...prev, + ...n + } + }, {}) + const applicationPromises = [] + for (const [teamId, overides] of Object.entries(desiredTeamApplicationroles)) { + const membership = await app.db.models.TeamMember.getTeamMembership(user.id, teamId) + if (membership) { + const newPermissions = { applications: overides, sso: true } + applicationPromises.push(app.db.controllers.Team.changeUserTeamPermissions(teamId, user.hashid, newPermissions)) + // need to remove from existingApplicationOvervides + delete existingApplicationOverides.teamId + } else { + app.log.debug(`User ${user.name} not a member of Team ${teamId} so not overriding Application access`) + } + } + for (const teamId of Object.keys(existingApplicationOverides)) { + const tm = await app.db.models.TeamMember.getTeamMembership(user.hashid, teamId) + tm.permissions = {} + applicationPromises.push(tm.save()) + } + await Promise.all(applicationPromises) } else { const missingGroupAssertions = new Error(`SAML response missing ${providerOpts.groupAssertionName} assertion`) missingGroupAssertions.code = 'unknown_sso_user' @@ -479,6 +532,7 @@ module.exports.init = async function (app) { const promises = [] let adminGroup = false const desiredTeamMemberships = {} + const desiredTeamApplicationroles = {} const groupRegEx = /^ff-(.+)-([^-]+)$/ for (const i in searchEntries) { let shortCN = searchEntries[i].cn @@ -490,19 +544,40 @@ module.exports.init = async function (app) { } const match = groupRegEx.exec(shortCN) if (match) { - app.log.debug(`Found group ${searchEntries[i].cn} for user ${user.username}`) - const teamSlug = match[1] - const teamRoleName = match[2] - const teamRole = Roles[teamRoleName] - // Check this role is a valid team role - if (TeamRoles.includes(teamRole)) { - // Check if this team is allowed to be managed for this SSO provider - // - either `groupAllTeams` is true (allowing all teams to be managed this way) - // - or `groupTeams` (array) contains the teamSlug - if (providerOpts.groupAllTeams || (providerOpts.groupTeams || []).includes(teamSlug)) { - // In case we have multiple assertions for a single team, - // ensure we keep the highest level of access - desiredTeamMemberships[teamSlug] = Math.max(desiredTeamMemberships[teamSlug] || 0, teamRole) + // check for Application Overide groups + const applicationRolesMatch = /(.+)\[(.+)\]/.exec(match[1]) + if (applicationRolesMatch) { + const teamSlug = applicationRolesMatch[1] + const applicationId = applicationRolesMatch[2] + const applicationRoleName = match[2] + const applicationRole = Roles[applicationRoleName] + const team = await app.db.models.Team.bySlug(teamSlug) + const application = await team.hasApplication(applicationId) + if (application) { + if (providerOpts.groupAllTeams || (providerOpts.groupTeams || []).includes(teamSlug)) { + if (desiredTeamApplicationroles[team.hashid]) { + desiredTeamApplicationroles[team.hashid][application.hashid] = Math.max(desiredTeamApplicationroles[teamSlug][application.hashid] || 0, applicationRole) + } else { + desiredTeamApplicationroles[team.hashid] = {} + desiredTeamApplicationroles[team.hashid][application.hashid] = applicationRole + } + } + } + } else { + app.log.debug(`Found group ${searchEntries[i].cn} for user ${user.username}`) + const teamSlug = match[1] + const teamRoleName = match[2] + const teamRole = Roles[teamRoleName] + // Check this role is a valid team role + if (TeamRoles.includes(teamRole)) { + // Check if this team is allowed to be managed for this SSO provider + // - either `groupAllTeams` is true (allowing all teams to be managed this way) + // - or `groupTeams` (array) contains the teamSlug + if (providerOpts.groupAllTeams || (providerOpts.groupTeams || []).includes(teamSlug)) { + // In case we have multiple assertions for a single team, + // ensure we keep the highest level of access + desiredTeamMemberships[teamSlug] = Math.max(desiredTeamMemberships[teamSlug] || 0, teamRole) + } } } } @@ -599,6 +674,37 @@ module.exports.init = async function (app) { } await Promise.all(promises) + // Now all group membership updated apply application overrides + // This needs to do 2 passes, get all the memberships that exist and compare to new list + const existingApplicationOveridesList = (await app.db.models.TeamMember.getTeamsForUser(user.id, true))?.filter(app => { return !!app.permissions }) || [] + const existingApplicationOverides = existingApplicationOveridesList.reduce((prev, tm) => { + const n = {} + n[tm.Team.hashid] = { + overides: tm.permissions + } + return { + ...prev, + ...n + } + }, {}) + const applicationPromises = [] + for (const [teamId, overides] of Object.entries(desiredTeamApplicationroles)) { + const membership = await app.db.models.TeamMember.getTeamMembership(user.id, teamId) + if (membership) { + const newPermissions = { applications: overides, sso: true } + applicationPromises.push(app.db.controllers.Team.changeUserTeamPermissions(teamId, user.hashid, newPermissions)) + // need to remove from existingApplicationOvervides + delete existingApplicationOverides.teamId + } else { + app.log.debug(`User ${user.name} not a member of Team ${teamId} so not overriding Application access`) + } + } + for (const teamId of Object.keys(existingApplicationOverides)) { + const tm = await app.db.models.TeamMember.getTeamMembership(user.hashid, teamId) + tm.permissions = {} + applicationPromises.push(tm.save()) + } + await Promise.all(applicationPromises) } return { diff --git a/frontend/src/pages/Login.vue b/frontend/src/pages/Login.vue index 46dd02f9df..b8db6bcb75 100644 --- a/frontend/src/pages/Login.vue +++ b/frontend/src/pages/Login.vue @@ -259,7 +259,7 @@ export default { } }, async directSSO (id) { - const matched = this.redirectUrlAfterLogin.match(/^\/account\/request\/([a-zA-Z0-9\-_]+)(\/editor)?$/) + const matched = this.redirectUrlAfterLogin?.match(/^\/account\/request\/([a-zA-Z0-9\-_]+)(\/editor)?$/) window.location = `/ee/sso/login?p=${id}${this.$route.query.r ? `&r=${this.$route.query.r}` : ''}${matched?.[1] ? `&t=${matched[1]}` : ''}` } } diff --git a/frontend/src/pages/application/Settings/UserAccess.vue b/frontend/src/pages/application/Settings/UserAccess.vue index f17ad550eb..dadf086c71 100644 --- a/frontend/src/pages/application/Settings/UserAccess.vue +++ b/frontend/src/pages/application/Settings/UserAccess.vue @@ -5,7 +5,8 @@ data-el="user-access-table" > diff --git a/test/unit/forge/ee/lib/sso/index_spec.js b/test/unit/forge/ee/lib/sso/index_spec.js index 5d1174ccac..e4ae564208 100644 --- a/test/unit/forge/ee/lib/sso/index_spec.js +++ b/test/unit/forge/ee/lib/sso/index_spec.js @@ -462,6 +462,60 @@ NOY6Z1oJnpttQ9gwyV8euQ3C0Wcjf3+OVQ== ;(await app.db.models.TeamMember.getTeamMembership(app.user.id, teams.ATeam.id)).should.have.property('role', Roles.Member) ;(await app.db.models.TeamMember.getTeamMembership(app.user.id, teams.BTeam.id)).should.have.property('role', Roles.Owner) }) + describe('updateTeamMembership Application Level', async function () { + it('add Application Override', async function () { + await app.sso.updateTeamMembership({ + 'ff-roles': [ + 'ff-ateam-member', + 'ff-ateam[application-1]-owner' + ] + }, app.user, { + groupAssertionName: 'ff-roles', + groupAllTeams: true, + groupPrefixLength: 0, + groupSuffixLength: 0 + }) + const teamMembership = await app.db.models.TeamMember.getTeamMembership(app.user.id, teams.ATeam.id) + teamMembership.should.have.property('permissions') + teamMembership.permissions.should.have.property('applications') + teamMembership.permissions.applications.should.have.property(app.application.hashid, Roles.Owner) + }) + + it('remove Application Override', async function () { + const origTeamMembership = await app.db.models.TeamMember.getTeamMembership(app.user.id, app.team.id) + origTeamMembership.permissions = { applications: {}, sso: true } + origTeamMembership.permissions.applications[app.application.hashid] = Roles.Owner + await origTeamMembership.save() + await app.sso.updateTeamMembership({ + 'ff-roles': [ + 'ff-ateam-member' + ] + }, app.user, { + groupAssertionName: 'ff-roles', + groupAllTeams: true, + groupPrefixLength: 0, + groupSuffixLength: 0 + }) + const teamMembership = await app.db.models.TeamMember.getTeamMembership(app.user.id, teams.ATeam.id) + teamMembership.should.have.property('permissions') + teamMembership.permissions.should.be.empty() + }) + + it('should fail if not a group member', async function () { + await app.sso.updateTeamMembership({ + 'ff-roles': [ + 'ff-ateam[application-1]-owner' + ] + }, app.user, { + groupAssertionName: 'ff-roles', + groupAllTeams: true, + groupPrefixLength: 0, + groupSuffixLength: 0 + }) + const teamMembership = await app.db.models.TeamMember.getTeamMembership(app.user.id, teams.ATeam.id) + should(teamMembership).not.be.ok() + }) + }) }) describe('find expired SSO SAML Certs', async function () { it('send email for active SSO profile with cert with less than 2 weeks life', async function () { From c19127355623269e71ed8a9f24b4b474006ac1c0 Mon Sep 17 00:00:00 2001 From: Ben Hardill Date: Mon, 6 Jul 2026 13:06:39 +0100 Subject: [PATCH 02/16] revert default change --- forge/db/models/TeamMember.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forge/db/models/TeamMember.js b/forge/db/models/TeamMember.js index c48a88c81d..d63f18b8fd 100644 --- a/forge/db/models/TeamMember.js +++ b/forge/db/models/TeamMember.js @@ -59,7 +59,7 @@ module.exports = { } }) }, - getTeamsForUser: async (userId, includeTeam) => { + getTeamsForUser: async (userId, includeTeam = false) => { if (typeof userId === 'string') { userId = M.User.decodeHashid(userId) } From 753390fe544875e52c0656130362bbe5b6ffb1d0 Mon Sep 17 00:00:00 2001 From: Ben Hardill Date: Mon, 6 Jul 2026 13:23:45 +0100 Subject: [PATCH 03/16] add new types file --- openapi.json | 16732 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 16732 insertions(+) create mode 100644 openapi.json diff --git a/openapi.json b/openapi.json new file mode 100644 index 0000000000..2d3396d4ac --- /dev/null +++ b/openapi.json @@ -0,0 +1,16732 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "FlowFuse Platform API", + "description": "API documentation for interacting with the FlowFuse platform", + "version": "2.32.0-git" + }, + "components": { + "schemas": { + "ProvisioningTokenSummary": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "team": { + "type": "string", + "nullable": true + }, + "application": { + "type": "string", + "nullable": true + }, + "instance": { + "type": "string", + "nullable": true + }, + "expiresAt": { + "type": "string", + "nullable": true + }, + "targetSnapshot": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "name", + "team", + "expiresAt" + ], + "title": "ProvisioningTokenSummary" + }, + "ProvisioningToken": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/ProvisioningTokenSummary" + } + ], + "properties": { + "token": { + "type": "string" + } + }, + "required": [ + "token" + ], + "title": "ProvisioningToken" + }, + "PersonalAccessTokenSummary": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "expiresAt": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "name", + "expiresAt" + ], + "title": "PersonalAccessTokenSummary" + }, + "PersonalAccessToken": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/PersonalAccessTokenSummary" + } + ], + "properties": { + "token": { + "type": "string" + } + }, + "required": [ + "token" + ], + "title": "PersonalAccessToken" + }, + "PersonalAccessTokenSummaryList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PersonalAccessTokenSummary" + }, + "title": "PersonalAccessTokenSummaryList" + }, + "InstanceHTTPTokenSummary": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "expiresAt": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "name", + "expiresAt" + ], + "title": "InstanceHTTPTokenSummary" + }, + "InstanceHTTPToken": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/InstanceHTTPTokenSummary" + } + ], + "properties": { + "token": { + "type": "string" + } + }, + "required": [ + "token" + ], + "title": "InstanceHTTPToken" + }, + "InstanceHTTPTokenSummaryList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InstanceHTTPTokenSummary" + }, + "title": "InstanceHTTPTokenSummaryList" + }, + "Application": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "links": { + "$ref": "#/components/schemas/LinksMeta" + }, + "team": { + "$ref": "#/components/schemas/TeamSummary" + } + }, + "required": [ + "id", + "name", + "description", + "createdAt", + "updatedAt", + "links" + ], + "additionalProperties": false, + "title": "Application" + }, + "ApplicationSummary": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string", + "nullable": true + }, + "links": { + "$ref": "#/components/schemas/LinksMeta" + }, + "deviceGroupCount": { + "type": "number" + }, + "snapshotCount": { + "type": "number" + }, + "pipelineCount": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "description", + "links" + ], + "additionalProperties": true, + "title": "ApplicationSummary" + }, + "TeamApplicationList": { + "type": "array", + "items": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/ApplicationSummary" + } + ], + "properties": { + "instances": { + "$ref": "#/components/schemas/InstanceSummaryList" + }, + "devices": { + "$ref": "#/components/schemas/DeviceSummaryList" + }, + "instancesSummary": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "instances": { + "$ref": "#/components/schemas/InstanceSummaryList" + } + } + }, + "devicesSummary": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "devices": { + "$ref": "#/components/schemas/DeviceSummaryList" + } + } + } + }, + "additionalProperties": true + }, + "title": "TeamApplicationList" + }, + "ApplicationAssociationsStatusList": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "instances": { + "$ref": "#/components/schemas/InstanceStatusList" + }, + "devices": { + "$ref": "#/components/schemas/DeviceStatusList" + } + }, + "required": [ + "id", + "instances", + "devices" + ], + "additionalProperties": false + }, + "title": "ApplicationAssociationsStatusList" + }, + "ApplicationBom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/components/schemas/dependant" + } + } + }, + "required": [ + "id", + "name", + "children" + ], + "additionalProperties": false, + "title": "ApplicationBom" + }, + "AuditLogEntry": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "createdAt": { + "type": "string" + }, + "username": { + "type": "string", + "nullable": true + }, + "event": { + "type": "string" + }, + "scope": { + "type": "object", + "additionalProperties": true + }, + "trigger": { + "type": "object", + "additionalProperties": true + }, + "body": { + "type": "object", + "additionalProperties": true + } + }, + "required": [ + "id", + "createdAt", + "username", + "event", + "scope", + "trigger" + ], + "additionalProperties": false, + "title": "AuditLogEntry" + }, + "AuditLogEntryList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AuditLogEntry" + }, + "title": "AuditLogEntryList" + }, + "AuditLogQueryParams": { + "type": "object", + "properties": { + "event": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "username": { + "type": "string" + } + }, + "title": "AuditLogQueryParams" + }, + "TimelineEntry": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "createdAt": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "username": { + "type": "string" + }, + "name": { + "type": "string" + }, + "avatar": { + "type": "string" + }, + "admin": { + "type": "boolean" + }, + "createdAt": { + "type": "string" + }, + "suspended": { + "type": "boolean" + } + }, + "required": [ + "id", + "username", + "name", + "avatar" + ], + "additionalProperties": true + }, + "event": { + "type": "string" + }, + "data": { + "type": "object", + "additionalProperties": true + } + }, + "required": [ + "id", + "createdAt", + "user", + "event", + "data" + ], + "additionalProperties": false, + "title": "TimelineEntry" + }, + "TimelineList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TimelineEntry" + }, + "title": "TimelineList" + }, + "dependency": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "version": { + "type": "object", + "properties": { + "wanted": { + "type": "string" + }, + "current": { + "type": "string", + "nullable": true + } + }, + "required": [ + "current" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "version" + ], + "additionalProperties": false, + "title": "dependency" + }, + "dependant": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "instance", + "device" + ] + }, + "ownerType": { + "type": "string", + "enum": [ + "instance", + "application" + ], + "nullable": true + }, + "ownerId": { + "type": "string", + "nullable": true + }, + "dependencies": { + "type": "array", + "items": { + "$ref": "#/components/schemas/dependency" + } + }, + "state": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "name", + "type", + "dependencies", + "state" + ], + "additionalProperties": false, + "title": "dependant" + }, + "Device": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "ownerType": { + "nullable": true, + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "lastSeenAt": { + "nullable": true, + "type": "string" + }, + "lastSeenMs": { + "nullable": true, + "type": "number" + }, + "activeSnapshot": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/SnapshotSummary" + } + ] + }, + "targetSnapshot": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/SnapshotSummary" + } + ] + }, + "status": { + "type": "string" + }, + "isDeploying": { + "type": "boolean" + }, + "agentVersion": { + "nullable": true, + "type": "string" + }, + "mode": { + "type": "string" + }, + "links": { + "$ref": "#/components/schemas/LinksMeta" + }, + "team": { + "$ref": "#/components/schemas/TeamSummary" + }, + "instance": { + "$ref": "#/components/schemas/InstanceSummary" + }, + "application": { + "$ref": "#/components/schemas/ApplicationSummary" + }, + "editor": { + "type": "object", + "additionalProperties": true + }, + "deviceGroup": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/DeviceGroupSummary" + } + ] + }, + "nrVersion": { + "type": "string" + }, + "localLoginEnabled": { + "type": "boolean" + } + }, + "required": [ + "id", + "lastSeenAt", + "lastSeenMs", + "status", + "mode", + "isDeploying" + ], + "title": "Device" + }, + "DeviceSummary": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "ownerType": { + "nullable": true, + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "lastSeenAt": { + "nullable": true, + "type": "string" + }, + "lastSeenMs": { + "nullable": true, + "type": "number" + }, + "status": { + "type": "string" + }, + "mode": { + "type": "string" + }, + "isDeploying": { + "type": "boolean" + }, + "links": { + "$ref": "#/components/schemas/LinksMeta" + }, + "application": { + "$ref": "#/components/schemas/ApplicationSummary" + }, + "mostRecentAuditLogCreatedAt": { + "type": "string" + }, + "mostRecentAuditLogEvent": { + "type": "string" + } + }, + "required": [ + "id", + "ownerType", + "name", + "type", + "lastSeenAt", + "lastSeenMs", + "status", + "mode", + "isDeploying", + "links" + ], + "additionalProperties": false, + "title": "DeviceSummary" + }, + "DeviceSummaryList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceSummary" + }, + "title": "DeviceSummaryList" + }, + "DeviceStatus": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "lastSeenAt": { + "nullable": true, + "type": "string" + }, + "lastSeenMs": { + "nullable": true, + "type": "number" + }, + "status": { + "type": "string" + }, + "mode": { + "type": "string" + }, + "isDeploying": { + "type": "boolean" + }, + "editor": { + "type": "object", + "additionalProperties": true + } + }, + "required": [ + "id", + "lastSeenAt", + "lastSeenMs", + "status", + "mode", + "isDeploying" + ], + "additionalProperties": false, + "title": "DeviceStatus" + }, + "DeviceStatusList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceStatus" + }, + "title": "DeviceStatusList" + }, + "DeviceGroupSummary": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "deviceCount": { + "type": "number" + }, + "targetSnapshot": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/SnapshotSummary" + } + ] + }, + "application": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/ApplicationSummary" + } + ] + } + }, + "required": [ + "id", + "name", + "description", + "deviceCount" + ], + "title": "DeviceGroupSummary" + }, + "DeviceGroupPipelineSummary": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/DeviceGroupSummary" + } + ], + "properties": { + "targetMatchCount": { + "type": "number" + }, + "activeMatchCount": { + "type": "number" + }, + "developerModeCount": { + "type": "number" + }, + "runningCount": { + "type": "number" + }, + "isDeploying": { + "type": "boolean" + }, + "hasTargetSnapshot": { + "type": "boolean" + }, + "targetSnapshotId": { + "type": "string", + "nullable": true + } + }, + "required": [ + "targetMatchCount", + "activeMatchCount", + "developerModeCount", + "runningCount", + "isDeploying", + "hasTargetSnapshot", + "targetSnapshotId" + ], + "title": "DeviceGroupPipelineSummary" + }, + "DeviceGroup": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/DeviceGroupSummary" + } + ], + "properties": { + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "devices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Device" + } + }, + "settings": { + "type": "object", + "additionalProperties": true + } + }, + "required": [ + "devices", + "settings" + ], + "additionalProperties": true, + "title": "DeviceGroup" + }, + "Invitation": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "role": { + "type": "number", + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "expiresAt": { + "type": "string" + }, + "sentAt": { + "type": "string", + "nullable": true + }, + "team": { + "$ref": "#/components/schemas/TeamSummary" + }, + "invitor": { + "$ref": "#/components/schemas/UserSummary" + }, + "invitee": { + "anyOf": [ + { + "$ref": "#/components/schemas/UserSummary" + }, + { + "type": "object", + "properties": { + "external": { + "type": "boolean" + }, + "email": { + "type": "string" + } + }, + "required": [ + "external", + "email" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "id", + "role", + "createdAt", + "expiresAt", + "sentAt", + "team", + "invitor", + "invitee" + ], + "additionalProperties": false, + "title": "Invitation" + }, + "InvitationList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Invitation" + }, + "title": "InvitationList" + }, + "Notification": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string" + }, + "createdAt": { + "type": "string" + }, + "read": { + "type": "boolean" + }, + "data": { + "type": "object", + "additionalProperties": true + } + }, + "required": [ + "id", + "type", + "createdAt", + "read", + "data" + ], + "additionalProperties": false, + "title": "Notification" + }, + "NotificationList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Notification" + }, + "title": "NotificationList" + }, + "Instance": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "safeName": { + "type": "string" + }, + "url": { + "type": "string" + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "links": { + "$ref": "#/components/schemas/LinksMeta" + }, + "hostname": { + "type": "string" + }, + "application": { + "$ref": "#/components/schemas/ApplicationSummary" + }, + "team": { + "$ref": "#/components/schemas/TeamSummary" + }, + "projectType": { + "$ref": "#/components/schemas/InstanceTypeSummary" + }, + "settings": { + "type": "object", + "additionalProperties": true + }, + "template": { + "type": "object", + "additionalProperties": true + }, + "stack": { + "$ref": "#/components/schemas/StackSummary" + }, + "ha": { + "type": "object", + "additionalProperties": true + }, + "protected": { + "type": "object", + "additionalProperties": true + }, + "customHostname": { + "type": "string" + }, + "launcherSettings": { + "type": "object", + "properties": { + "healthCheckInterval": { + "type": "number" + }, + "disableAutoSafeMode": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "meta": { + "type": "object", + "additionalProperties": true + }, + "flowLastUpdatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "createdAt", + "updatedAt", + "links" + ], + "title": "Instance" + }, + "InstanceSummary": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "url": { + "type": "string" + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "links": { + "$ref": "#/components/schemas/LinksMeta" + }, + "settings": { + "type": "object", + "additionalProperties": true + }, + "ha": { + "type": "object", + "additionalProperties": true + }, + "protected": { + "type": "object", + "additionalProperties": true + }, + "mostRecentAuditLogCreatedAt": { + "type": "string" + }, + "mostRecentAuditLogEvent": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "createdAt", + "updatedAt", + "links" + ], + "title": "InstanceSummary" + }, + "DashboardInstanceSummary": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "url": { + "type": "string" + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "links": { + "$ref": "#/components/schemas/LinksMeta" + }, + "application": { + "$ref": "#/components/schemas/ApplicationSummary" + }, + "flowLastUpdatedAt": { + "type": "string" + }, + "status": { + "type": "string" + }, + "settings": { + "type": "object", + "additionalProperties": true + }, + "meta": { + "type": "object", + "additionalProperties": true + } + }, + "required": [ + "id", + "name", + "createdAt", + "updatedAt", + "links", + "application", + "status", + "settings" + ], + "additionalProperties": false, + "title": "DashboardInstanceSummary" + }, + "InstanceSummaryList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InstanceSummary" + }, + "title": "InstanceSummaryList" + }, + "DashboardInstancesSummaryList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DashboardInstanceSummary" + }, + "title": "DashboardInstancesSummaryList" + }, + "InstanceStatus": { + "type": "object", + "properties": { + "flowLastUpdatedAt": { + "type": "string" + }, + "meta": { + "type": "object", + "additionalProperties": true + }, + "isDeploying": { + "type": "boolean" + } + }, + "title": "InstanceStatus" + }, + "InstanceStatusList": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "state": { + "$ref": "#/components/schemas/InstanceStatus" + } + }, + "additionalProperties": true + }, + "title": "InstanceStatusList" + }, + "SnapshotSummary": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "createdAt": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "description" + ], + "title": "SnapshotSummary" + }, + "Snapshot": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/SnapshotSummary" + } + ], + "properties": { + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "username": { + "type": "string" + }, + "name": { + "type": "string" + }, + "avatar": { + "type": "string" + } + }, + "required": [ + "id", + "username", + "name", + "avatar" + ] + }, + "modules": { + "type": "object", + "additionalProperties": true + }, + "ownerType": { + "type": "string" + }, + "deviceId": { + "type": "string" + }, + "projectId": { + "type": "string" + }, + "device": { + "$ref": "#/components/schemas/DeviceSummary" + }, + "project": { + "$ref": "#/components/schemas/InstanceSummary" + } + }, + "required": [ + "createdAt", + "updatedAt", + "ownerType" + ], + "title": "Snapshot" + }, + "SnapshotAndSettings": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "username": { + "type": "string" + }, + "name": { + "type": "string" + }, + "avatar": { + "type": "string" + } + }, + "required": [ + "id", + "username", + "name", + "avatar" + ] + }, + "exportedBy": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "username": { + "type": "string" + }, + "name": { + "type": "string" + }, + "avatar": { + "type": "string" + } + }, + "required": [ + "id", + "username", + "name", + "avatar" + ] + }, + "ownerType": { + "type": "string" + }, + "settings": { + "type": "object", + "properties": { + "settings": { + "type": "object", + "additionalProperties": true + }, + "env": { + "type": "object", + "additionalProperties": true + }, + "modules": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "required": [ + "id", + "name", + "description", + "createdAt", + "updatedAt", + "ownerType", + "settings" + ], + "title": "SnapshotAndSettings" + }, + "FullSnapshot": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/SnapshotAndSettings" + } + ], + "properties": { + "flows": { + "type": "object", + "properties": { + "flows": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + } + } + } + }, + "required": [ + "flows" + ], + "title": "FullSnapshot" + }, + "ExportedSnapshot": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/SnapshotAndSettings" + } + ], + "properties": { + "flows": { + "type": "object", + "properties": { + "flows": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + }, + "credentials": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "required": [ + "flows" + ], + "title": "ExportedSnapshot" + }, + "Stack": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "label": { + "type": "string" + }, + "active": { + "type": "boolean" + }, + "projectType": { + "type": "string" + }, + "properties": { + "type": "object", + "additionalProperties": true + }, + "replacedBy": { + "type": "string" + }, + "createdAt": { + "type": "string" + }, + "instanceCount": { + "type": "number" + }, + "links": { + "$ref": "#/components/schemas/LinksMeta" + } + }, + "required": [ + "id", + "name", + "active", + "properties", + "createdAt", + "links" + ], + "additionalProperties": false, + "title": "Stack" + }, + "StackSummary": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "label": { + "type": "string" + }, + "properties": { + "type": "object", + "additionalProperties": true + }, + "replacedBy": { + "type": "string" + }, + "links": { + "$ref": "#/components/schemas/LinksMeta" + } + }, + "required": [ + "id", + "name", + "properties", + "links" + ], + "additionalProperties": false, + "title": "StackSummary" + }, + "Template": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/TemplateSummary" + } + ], + "properties": { + "settings": { + "type": "object", + "additionalProperties": true + }, + "policy": { + "type": "object", + "additionalProperties": true + } + }, + "required": [ + "settings", + "policy" + ], + "title": "Template" + }, + "TemplateSummary": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "active": { + "type": "boolean" + }, + "instanceCount": { + "type": "number" + }, + "createdAt": { + "type": "string" + }, + "links": { + "$ref": "#/components/schemas/LinksMeta" + }, + "owner": { + "$ref": "#/components/schemas/UserSummary" + } + }, + "required": [ + "id", + "name", + "description", + "active", + "instanceCount", + "createdAt", + "links" + ], + "title": "TemplateSummary" + }, + "InstanceTypeSummary": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false, + "title": "InstanceTypeSummary" + }, + "InstanceType": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "active": { + "type": "boolean" + }, + "description": { + "type": "string", + "nullable": true + }, + "order": { + "type": "number" + }, + "properties": { + "type": "object", + "additionalProperties": true + }, + "createdAt": { + "type": "string" + }, + "defaultStack": { + "type": "string", + "nullable": true + }, + "instanceCount": { + "type": "number" + }, + "stackCount": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "active", + "description", + "order", + "properties", + "createdAt", + "defaultStack" + ], + "additionalProperties": false, + "title": "InstanceType" + }, + "TeamSummary": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "avatar": { + "type": "string" + }, + "suspended": { + "type": "boolean" + }, + "links": { + "$ref": "#/components/schemas/LinksMeta" + } + }, + "required": [ + "id", + "name", + "slug", + "avatar", + "suspended", + "links" + ], + "title": "TeamSummary" + }, + "Team": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/TeamSummary" + } + ], + "properties": { + "type": { + "$ref": "#/components/schemas/TeamType" + }, + "properties": { + "type": "object", + "additionalProperties": true + }, + "instanceCount": { + "type": "number" + }, + "instanceCountByType": { + "type": "object", + "additionalProperties": true + }, + "memberCount": { + "type": "number" + }, + "deviceCount": { + "type": "number" + }, + "brokerCount": { + "type": "number" + }, + "teamBrokerClientsCount": { + "type": "number" + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "billing": { + "type": "object", + "additionalProperties": true + }, + "billingURL": { + "type": "string" + } + }, + "required": [ + "type", + "properties", + "instanceCount", + "memberCount", + "deviceCount", + "brokerCount", + "teamBrokerClientsCount", + "createdAt", + "updatedAt" + ], + "title": "Team" + }, + "UserTeamList": { + "type": "array", + "items": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/TeamSummary" + } + ], + "properties": { + "type": { + "$ref": "#/components/schemas/TeamTypeSummary" + }, + "role": { + "type": "number" + }, + "instanceCount": { + "type": "number" + }, + "memberCount": { + "type": "number" + }, + "deviceCount": { + "type": "number" + } + }, + "required": [ + "type", + "role", + "instanceCount", + "memberCount", + "deviceCount" + ] + }, + "title": "UserTeamList" + }, + "TeamTypeSummary": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "active": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "active" + ], + "title": "TeamTypeSummary" + }, + "TeamType": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/TeamTypeSummary" + } + ], + "properties": { + "order": { + "type": "number" + }, + "description": { + "type": "string", + "nullable": true + }, + "teamCount": { + "type": "number" + }, + "properties": { + "type": "object", + "properties": { + "users": { + "type": "object", + "additionalProperties": true + }, + "devices": { + "type": "object", + "additionalProperties": true + }, + "features": { + "type": "object", + "additionalProperties": true + }, + "instances": { + "type": "object", + "additionalProperties": true + }, + "billing": { + "type": "object", + "additionalProperties": true + }, + "autoStackUpdate": { + "type": "object", + "additionalProperties": true + } + }, + "additionalProperties": true + } + }, + "required": [ + "order", + "description", + "properties" + ], + "title": "TeamType" + }, + "TeamTypeList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TeamType" + }, + "title": "TeamTypeList" + }, + "User": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/UserSummary" + } + ], + "properties": { + "email": { + "type": "string" + }, + "email_verified": { + "type": "boolean" + }, + "defaultTeam": { + "type": "string" + }, + "sso_enabled": { + "type": "boolean" + }, + "mfa_enabled": { + "type": "boolean" + }, + "free_trial_available": { + "type": "boolean" + }, + "tcs_accepted": { + "type": "string" + }, + "password_expired": { + "type": "boolean" + }, + "pendingEmailChange": { + "type": "boolean" + }, + "SSOGroups": { + "type": "array" + } + }, + "required": [ + "email_verified" + ], + "title": "User" + }, + "UserSummary": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "username": { + "type": "string" + }, + "name": { + "type": "string" + }, + "avatar": { + "type": "string" + }, + "admin": { + "type": "boolean" + }, + "createdAt": { + "type": "string" + }, + "suspended": { + "type": "boolean" + } + }, + "required": [ + "id", + "username", + "name", + "avatar", + "admin", + "createdAt", + "suspended" + ], + "title": "UserSummary" + }, + "TeamMemberPermissions": { + "type": "object", + "properties": { + "applications": { + "type": "object", + "additionalProperties": true + }, + "sso": { + "type": "boolean" + } + }, + "title": "TeamMemberPermissions" + }, + "TeamMemberList": { + "type": "array", + "items": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/UserSummary" + } + ], + "properties": { + "role": { + "type": "number" + }, + "permissions": { + "$ref": "#/components/schemas/TeamMemberPermissions" + }, + "ssoManaged": { + "type": "boolean" + } + }, + "required": [ + "role", + "permissions" + ] + }, + "title": "TeamMemberList" + }, + "UserList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/User" + }, + "title": "UserList" + }, + "MQTTBroker": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "host": { + "type": "string" + }, + "port": { + "type": "number" + }, + "protocol": { + "type": "string" + }, + "protocolVersion": { + "type": "number" + }, + "ssl": { + "type": "boolean" + }, + "verifySSL": { + "type": "boolean" + }, + "clientId": { + "type": "string" + }, + "state": { + "type": "string" + }, + "topicPrefix": { + "type": "array", + "items": { + "type": "string" + } + }, + "status": { + "type": "object", + "additionalProperties": true + }, + "credentials": { + "type": "object", + "additionalProperties": true + }, + "settings": { + "type": "object", + "additionalProperties": true + } + }, + "required": [ + "id", + "name", + "host", + "port", + "protocol", + "protocolVersion", + "ssl", + "verifySSL", + "clientId", + "state", + "topicPrefix" + ], + "additionalProperties": false, + "title": "MQTTBroker" + }, + "MQTTBrokerInput": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "host": { + "type": "string" + }, + "port": { + "type": "number" + }, + "protocol": { + "type": "string" + }, + "protocolVersion": { + "type": "number" + }, + "ssl": { + "type": "boolean" + }, + "verifySSL": { + "type": "boolean" + }, + "clientId": { + "type": "string" + }, + "topicPrefix": { + "type": "array", + "items": { + "type": "string" + } + }, + "credentials": { + "type": "object", + "additionalProperties": true + } + }, + "title": "MQTTBrokerInput" + }, + "APIStatus": { + "type": "object", + "properties": { + "status": { + "type": "string" + } + }, + "required": [ + "status" + ], + "additionalProperties": false, + "title": "APIStatus" + }, + "APIError": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "error": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + } + }, + "additionalProperties": true, + "title": "APIError" + }, + "PaginationParams": { + "type": "object", + "properties": { + "query": { + "type": "string" + }, + "cursor": { + "type": "string" + }, + "limit": { + "type": "number" + }, + "page": { + "type": "number", + "minimum": 1 + }, + "sort": { + "type": "string" + }, + "dir": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "order": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + } + }, + "title": "PaginationParams" + }, + "PaginationMeta": { + "type": "object", + "properties": { + "next_cursor": { + "type": "string" + }, + "previous_cursor": { + "type": "string" + }, + "page": { + "type": "number" + }, + "pageSize": { + "type": "number" + }, + "total": { + "type": "number" + }, + "pageCount": { + "type": "number" + } + }, + "title": "PaginationMeta" + }, + "LinksMeta": { + "type": "object", + "properties": { + "self": { + "type": "string" + } + }, + "additionalProperties": true, + "title": "LinksMeta" + }, + "Pipeline": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "stages": { + "$ref": "#/components/schemas/PipelineStageList" + }, + "application": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "stages" + ], + "additionalProperties": false, + "title": "Pipeline" + }, + "PipelineList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pipeline" + }, + "title": "PipelineList" + }, + "PipelineStage": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "deployToDevices": { + "type": "boolean" + }, + "instances": { + "$ref": "#/components/schemas/InstanceSummaryList" + }, + "devices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceSummary" + } + }, + "deviceGroups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceGroupPipelineSummary" + } + }, + "gitRepo": { + "type": "object", + "properties": { + "gitTokenId": { + "type": "string" + }, + "url": { + "type": "string" + }, + "branch": { + "type": "string" + }, + "pullBranch": { + "type": "string" + }, + "pushPath": { + "type": "string" + }, + "pullPath": { + "type": "string" + }, + "lastPushAt": { + "type": "string", + "nullable": true + }, + "lastPullAt": { + "type": "string", + "nullable": true + }, + "status": { + "type": "string", + "nullable": true + }, + "statusMessage": { + "type": "string", + "nullable": true + }, + "credentialSecret": { + "type": "boolean" + } + }, + "required": [ + "gitTokenId", + "url", + "branch", + "pullBranch", + "pushPath", + "pullPath", + "lastPushAt", + "lastPullAt", + "status", + "statusMessage", + "credentialSecret" + ], + "additionalProperties": false + }, + "action": { + "type": "string", + "enum": [ + "create_snapshot", + "use_active_snapshot", + "use_latest_snapshot", + "prompt", + "none" + ] + }, + "NextStageId": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "action", + "deployToDevices" + ], + "additionalProperties": false, + "title": "PipelineStage" + }, + "PipelineStageList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PipelineStage" + }, + "title": "PipelineStageList" + }, + "FlowBlueprintSummary": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "active": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "category": { + "type": "string" + }, + "icon": { + "type": "string", + "nullable": true + }, + "order": { + "type": "number" + }, + "default": { + "type": "boolean" + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "externalUrl": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "name", + "createdAt", + "updatedAt" + ], + "title": "FlowBlueprintSummary" + }, + "FlowBlueprint": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/FlowBlueprintSummary" + } + ], + "properties": { + "flows": { + "type": "object", + "additionalProperties": true + }, + "modules": { + "type": "object", + "additionalProperties": true + }, + "teamTypeScope": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + } + }, + "required": [ + "flows", + "modules", + "teamTypeScope" + ], + "title": "FlowBlueprint" + }, + "FlowBlueprintInput": { + "type": "object", + "properties": { + "active": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "category": { + "type": "string" + }, + "icon": { + "type": "string", + "nullable": true + }, + "order": { + "type": "number" + }, + "default": { + "type": "boolean" + }, + "externalUrl": { + "type": "string", + "nullable": true + }, + "flows": { + "type": "object", + "additionalProperties": true + }, + "modules": { + "type": "object", + "additionalProperties": true + }, + "teamTypeScope": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + } + }, + "title": "FlowBlueprintInput" + }, + "FlowBlueprintSummaryList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FlowBlueprintSummary" + }, + "title": "FlowBlueprintSummaryList" + }, + "FlowBlueprintExport": { + "type": "object", + "properties": { + "blueprints": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "category": { + "type": "string" + }, + "icon": { + "type": "string", + "nullable": true + }, + "flows": { + "type": "object", + "additionalProperties": true + }, + "modules": { + "type": "object", + "additionalProperties": true + } + }, + "required": [ + "name", + "description", + "category", + "icon", + "flows", + "modules" + ], + "additionalProperties": false + } + }, + "count": { + "type": "integer" + } + }, + "required": [ + "blueprints", + "count" + ], + "additionalProperties": false, + "title": "FlowBlueprintExport" + }, + "MCPRegistrationSummary": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "protocol": { + "type": "string" + }, + "targetType": { + "type": "string", + "enum": [ + "instance", + "device" + ] + }, + "targetId": { + "type": "string" + }, + "nodeId": { + "type": "string" + }, + "endpointRoute": { + "type": "string" + }, + "teamId": { + "type": "string" + }, + "title": { + "type": "string" + }, + "version": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "protocol", + "targetType", + "targetId", + "nodeId", + "endpointRoute", + "teamId", + "title", + "version", + "description" + ], + "additionalProperties": false, + "title": "MCPRegistrationSummary" + }, + "MCPRegistrationSummaryList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MCPRegistrationSummary" + }, + "title": "MCPRegistrationSummaryList" + }, + "DatabaseCredentials": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "credentials": { + "type": "object", + "properties": { + "host": { + "type": "string" + }, + "port": { + "type": "number" + }, + "ssl": { + "type": "boolean" + }, + "database": { + "type": "string" + }, + "user": { + "type": "string" + }, + "password": { + "type": "string" + } + }, + "required": [ + "host", + "port", + "ssl", + "database", + "user", + "password" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "credentials" + ], + "additionalProperties": false, + "title": "DatabaseCredentials" + }, + "DatabaseTable": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "nullable": { + "type": "boolean" + }, + "default": { + "type": "string", + "nullable": true + }, + "generated": { + "type": "boolean" + }, + "maxLength": { + "type": "number", + "nullable": true + } + }, + "required": [ + "name", + "type" + ], + "additionalProperties": true + }, + "title": "DatabaseTable" + } + } + }, + "paths": { + "/api/v1/settings/": { + "get": { + "summary": "Get platform settings", + "tags": [ + "Platform" + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "put": { + "summary": "Update platform settings", + "tags": [ + "Platform" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIStatus" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/admin/stats": { + "get": { + "summary": "Get a platform stats - admin-only", + "tags": [ + "Platform" + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": true + } + }, + "application/openmetrics-text": { + "schema": { + "type": "string" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/admin/license": { + "get": { + "summary": "Get a platform license - admin-only", + "tags": [ + "Platform" + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "put": { + "summary": "Apply a platform license - admin-only", + "tags": [ + "Platform" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "license", + "action" + ], + "properties": { + "license": { + "type": "string" + }, + "action": { + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/admin/invitations": { + "get": { + "summary": "Get a list of all invitations - admin-only", + "tags": [ + "Platform" + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "invitations": { + "$ref": "#/components/schemas/InvitationList" + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/admin/audit-log": { + "get": { + "summary": "Get platform audit event entries - admin-only", + "tags": [ + "Platform" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "query", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "cursor", + "required": false + }, + { + "schema": { + "type": "number" + }, + "in": "query", + "name": "limit", + "required": false + }, + { + "schema": { + "type": "number", + "minimum": 1 + }, + "in": "query", + "name": "page", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sort", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "dir", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "order", + "required": false + }, + { + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "in": "query", + "name": "event", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "username", + "required": false + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + }, + "count": { + "type": "number" + }, + "log": { + "$ref": "#/components/schemas/AuditLogEntryList" + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/admin/audit-log/export": { + "get": { + "summary": "Gets platform audit events as CSV - admin-only", + "tags": [ + "Platform" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "query", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "cursor", + "required": false + }, + { + "schema": { + "type": "number" + }, + "in": "query", + "name": "limit", + "required": false + }, + { + "schema": { + "type": "number", + "minimum": 1 + }, + "in": "query", + "name": "page", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sort", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "dir", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "order", + "required": false + }, + { + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "in": "query", + "name": "event", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "username", + "required": false + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "text/csv": { + "schema": { + "type": "string" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/admin/stats-token": { + "post": { + "summary": "Regenerate platform stats access token - admin-only", + "tags": [ + "Platform" + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "token": { + "type": "string" + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "delete": { + "summary": "Remove platform stats access token - admin-only", + "tags": [ + "Platform" + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIStatus" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/admin/expert-agent-creds": { + "post": { + "summary": "Regenerate expert agent credentials - admin-only", + "tags": [ + "Platform" + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "username": { + "type": "string" + }, + "password": { + "type": "string" + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "delete": { + "summary": "Remove expert agent credentials - admin-only", + "tags": [ + "Platform" + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIStatus" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/admin/announcements": { + "post": { + "summary": "Send platform wide announcements", + "tags": [ + "Platform", + "Notifications", + "Announcements" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "title", + "filter" + ], + "properties": { + "message": { + "type": "string" + }, + "title": { + "type": "string" + }, + "filter": { + "type": "object", + "properties": { + "roles": { + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "mock": { + "type": "boolean" + }, + "to": { + "type": "object" + }, + "url": { + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "recipientCount": { + "type": "number" + }, + "mock": { + "type": "boolean" + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/user/": { + "get": { + "summary": "Get the current user profile", + "tags": [ + "User" + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "put": { + "summary": "Update the current users settings", + "tags": [ + "User" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "username": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tcs_accepted": { + "type": "boolean" + }, + "defaultTeam": { + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "delete": { + "summary": "Delete the current user", + "tags": [ + "User" + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIStatus" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/user/change_password": { + "put": { + "summary": "Change the current users password", + "tags": [ + "User" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "old_password", + "password" + ], + "properties": { + "old_password": { + "type": "string", + "description": "the old password" + }, + "password": { + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIStatus" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/user/teams": { + "get": { + "summary": "Get a list of the current users teams", + "tags": [ + "User" + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + }, + "count": { + "type": "number" + }, + "teams": { + "$ref": "#/components/schemas/UserTeamList" + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/user/tokens": { + "get": { + "summary": "List users Personal Access Tokens", + "tags": [ + "Tokens" + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "tokens": { + "$ref": "#/components/schemas/PersonalAccessTokenSummaryList" + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "post": { + "summary": "Create user Personal Access Token", + "tags": [ + "Tokens" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "scope": { + "type": "string" + }, + "expiresAt": { + "type": "number" + }, + "name": { + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PersonalAccessToken" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/user/tokens/{id}": { + "delete": { + "summary": "Delete user Personal Access Token", + "tags": [ + "Tokens" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "id", + "required": true + } + ], + "responses": { + "204": { + "description": "empty response" + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "put": { + "summary": "Update users Personal Access Token", + "tags": [ + "Tokens" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "scope": { + "type": "string" + }, + "expiresAt": { + "type": "number" + } + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "id", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PersonalAccessTokenSummary" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/user/expert-creds": { + "post": { + "summary": "Initialize expert chat", + "tags": [ + "User" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "minLength": 8 + } + }, + "required": [ + "sessionId" + ] + } + } + } + }, + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "username": { + "type": "string" + }, + "password": { + "type": "string" + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/user/invitations/": { + "get": { + "summary": "Get a list of the current users invitations", + "tags": [ + "User" + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + }, + "count": { + "type": "number" + }, + "invitations": { + "$ref": "#/components/schemas/InvitationList" + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/user/invitations/{invitationId}": { + "patch": { + "summary": "Accept an invitation", + "tags": [ + "User" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "invitationId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIStatus" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "delete": { + "summary": "Reject an invitation", + "tags": [ + "User" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "invitationId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIStatus" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/user/notifications/": { + "get": { + "summary": "Get the notifications for a user", + "tags": [ + "User" + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + }, + "count": { + "type": "number" + }, + "notifications": { + "$ref": "#/components/schemas/NotificationList" + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "put": { + "summary": "Bulk update notifications", + "tags": [ + "User" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "read": { + "type": "boolean" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + }, + "count": { + "type": "number" + }, + "notifications": { + "$ref": "#/components/schemas/NotificationList" + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/user/notifications/{notificationId}": { + "put": { + "summary": "Mark notification as read", + "tags": [ + "User" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "read": { + "type": "boolean" + } + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "notificationId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIStatus" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "delete": { + "summary": "Delete notifications", + "tags": [ + "User" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "notificationId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIStatus" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/users/": { + "get": { + "summary": "Get a list of all users (admin-only)", + "tags": [ + "Users" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "query", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "cursor", + "required": false + }, + { + "schema": { + "type": "number" + }, + "in": "query", + "name": "limit", + "required": false + }, + { + "schema": { + "type": "number", + "minimum": 1 + }, + "in": "query", + "name": "page", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sort", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "dir", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "order", + "required": false + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + }, + "count": { + "type": "number" + }, + "users": { + "$ref": "#/components/schemas/UserList" + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "post": { + "summary": "Create a new user (admin-only)", + "tags": [ + "Users" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "name", + "username", + "password" + ], + "properties": { + "name": { + "type": "string" + }, + "username": { + "type": "string" + }, + "password": { + "type": "string" + }, + "email": { + "type": "string" + }, + "isAdmin": { + "type": "boolean" + }, + "createDefaultTeam": { + "type": "boolean" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/users/{userId}": { + "get": { + "summary": "Get a user profile (admin-only)", + "tags": [ + "Users" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "userId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "put": { + "summary": "Update a users settings (admin-only)", + "tags": [ + "Users" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "username": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tcs_accepted": { + "type": "boolean" + }, + "email_verified": { + "type": "boolean" + }, + "admin": { + "type": "boolean" + }, + "password_expired": { + "type": "boolean" + }, + "suspended": { + "type": "boolean" + }, + "defaultTeam": { + "type": "string" + }, + "mfa_enabled": { + "type": "boolean" + } + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "userId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "delete": { + "summary": "Delete a user (admin-only)", + "tags": [ + "Users" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "userId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIStatus" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/users/{userId}/teams": { + "get": { + "summary": "Get a list of a users teams (admin-only)", + "tags": [ + "Users" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "userId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "teams": { + "$ref": "#/components/schemas/UserTeamList" + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/teams/check-slug": { + "post": { + "summary": "Check a team slug is available", + "tags": [ + "Teams" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "slug" + ], + "properties": { + "slug": { + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Team slug is available", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIStatus" + } + } + } + }, + "409": { + "description": "Team slug is not available", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/teams/{teamId}": { + "get": { + "summary": "Get details of a team", + "tags": [ + "Teams" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/Team" + }, + { + "$ref": "#/components/schemas/TeamSummary" + } + ] + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "delete": { + "summary": "Delete a team", + "tags": [ + "Teams" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIStatus" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "put": { + "summary": "Update a team", + "tags": [ + "Teams" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "type": { + "type": "string" + }, + "suspended": { + "type": "boolean" + }, + "properties": { + "type": "object" + }, + "features": { + "type": "object" + } + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Team" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/teams/slug/{teamSlug}": { + "get": { + "summary": "Get details of a team using its slug", + "tags": [ + "Teams" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamSlug", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/Team" + }, + { + "$ref": "#/components/schemas/TeamSummary" + } + ] + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/teams/": { + "get": { + "summary": "Get a list of all teams - admin-only", + "tags": [ + "Teams" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "query", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "cursor", + "required": false + }, + { + "schema": { + "type": "number" + }, + "in": "query", + "name": "limit", + "required": false + }, + { + "schema": { + "type": "number", + "minimum": 1 + }, + "in": "query", + "name": "page", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sort", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "dir", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "order", + "required": false + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + }, + "count": { + "type": "number" + }, + "teams": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Team" + } + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "post": { + "summary": "Create a new team", + "tags": [ + "Teams" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "trial": { + "type": "boolean" + }, + "billingInterval": { + "type": "string", + "enum": [ + "month", + "year" + ] + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Team" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/teams/{teamId}/applications": { + "get": { + "summary": "Get a list of the teams applications", + "tags": [ + "Teams" + ], + "parameters": [ + { + "schema": { + "type": "number" + }, + "in": "query", + "name": "associationsLimit", + "required": false + }, + { + "schema": { + "type": "boolean" + }, + "in": "query", + "name": "includeInstances", + "required": false + }, + { + "schema": { + "type": "boolean" + }, + "in": "query", + "name": "includeApplicationDevices", + "required": false + }, + { + "schema": { + "type": "boolean" + }, + "in": "query", + "name": "excludeOwnerFiltering", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "applications": { + "$ref": "#/components/schemas/TeamApplicationList" + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/teams/{teamId}/applications/status": { + "get": { + "summary": "Get a list of the teams applications statuses", + "tags": [ + "Teams" + ], + "parameters": [ + { + "schema": { + "type": "number" + }, + "in": "query", + "name": "associationsLimit", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "applications": { + "$ref": "#/components/schemas/ApplicationAssociationsStatusList" + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/teams/{teamId}/comms-credentials": { + "post": { + "summary": "Issue team-channel broker credentials for the current user/session", + "tags": [ + "Teams" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "sessionId": { + "type": "string" + } + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "username": { + "type": "string" + }, + "password": { + "type": "string" + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/teams/{teamId}/user": { + "get": { + "summary": "Get the current users team membership", + "tags": [ + "Teams" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "role": { + "type": "number" + }, + "permissions": { + "$ref": "#/components/schemas/TeamMemberPermissions" + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/teams/{teamId}/audit-log": { + "get": { + "summary": "Get team audit event entries", + "tags": [ + "Teams" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "query", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "cursor", + "required": false + }, + { + "schema": { + "type": "number" + }, + "in": "query", + "name": "limit", + "required": false + }, + { + "schema": { + "type": "number", + "minimum": 1 + }, + "in": "query", + "name": "page", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sort", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "dir", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "order", + "required": false + }, + { + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "in": "query", + "name": "event", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "username", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + }, + "count": { + "type": "number" + }, + "log": { + "$ref": "#/components/schemas/AuditLogEntryList" + }, + "associations": { + "type": "object", + "properties": { + "applications": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ApplicationSummary" + } + }, + "instances": { + "$ref": "#/components/schemas/InstanceSummaryList" + }, + "devices": { + "$ref": "#/components/schemas/DeviceSummaryList" + } + } + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/teams/{teamId}/audit-log/export": { + "get": { + "summary": "Get team audit event entries", + "tags": [ + "Teams" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "query", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "cursor", + "required": false + }, + { + "schema": { + "type": "number" + }, + "in": "query", + "name": "limit", + "required": false + }, + { + "schema": { + "type": "number", + "minimum": 1 + }, + "in": "query", + "name": "page", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sort", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "dir", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "order", + "required": false + }, + { + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "in": "query", + "name": "event", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "username", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "text/csv": { + "schema": { + "type": "string" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/teams/{teamId}/members/": { + "get": { + "summary": "Get a list of the teams members", + "tags": [ + "Team Members" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "members": { + "$ref": "#/components/schemas/TeamMemberList" + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/teams/{teamId}/members/{userId}": { + "delete": { + "summary": "Remove a team member", + "tags": [ + "Team Members" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamId", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "userId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIStatus" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "put": { + "summary": "Change a members role", + "tags": [ + "Team Members" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "role": { + "type": "number" + }, + "permissions": { + "$ref": "#/components/schemas/TeamMemberPermissions" + } + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamId", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "userId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIStatus" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/teams/{teamId}/invitations/": { + "get": { + "summary": "Get a list of the teams invitations", + "tags": [ + "Team Invitations" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "invitations": { + "$ref": "#/components/schemas/InvitationList" + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "post": { + "summary": "Create an invitation", + "tags": [ + "Team Invitations" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "user": { + "type": "string" + }, + "role": { + "type": "number" + } + }, + "required": [ + "user" + ] + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "string" + }, + "code": { + "type": "string" + }, + "error": { + "type": "object", + "additionalProperties": true + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/teams/{teamId}/invitations/{invitationId}": { + "delete": { + "summary": "Delete an invitation", + "tags": [ + "Team Invitations" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamId", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "invitationId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIStatus" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "post": { + "summary": "Resend an invitation", + "tags": [ + "Team Invitations" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamId", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "invitationId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Invitation" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/teams/{teamId}/devices/": { + "get": { + "summary": "Get a list of all devices in a team", + "tags": [ + "Team Devices" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "query", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "cursor", + "required": false + }, + { + "schema": { + "type": "number" + }, + "in": "query", + "name": "limit", + "required": false + }, + { + "schema": { + "type": "number", + "minimum": 1 + }, + "in": "query", + "name": "page", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sort", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "dir", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "order", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamId", + "required": true + }, + { + "schema": { + "type": "boolean" + }, + "in": "path", + "name": "statusOnly", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + }, + "count": { + "type": "number" + }, + "devices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Device" + } + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/teams/{teamId}/devices/provisioning": { + "get": { + "summary": "Get a list of device provisioning tokens in a team", + "tags": [ + "Team Devices" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "query", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "cursor", + "required": false + }, + { + "schema": { + "type": "number" + }, + "in": "query", + "name": "limit", + "required": false + }, + { + "schema": { + "type": "number", + "minimum": 1 + }, + "in": "query", + "name": "page", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sort", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "dir", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "order", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + }, + "count": { + "type": "number" + }, + "tokens": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProvisioningTokenSummary" + } + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "post": { + "summary": "Create a new provisioning token in a team", + "tags": [ + "Team Devices" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + }, + "instance": { + "type": "string" + }, + "application": { + "type": "string" + }, + "expiresAt": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object" + } + ] + } + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProvisioningToken" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/teams/{teamId}/devices/provisioning/{tokenId}": { + "put": { + "summary": "Update a provisioning token in a team", + "tags": [ + "Team Devices" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "instance": { + "type": "string" + }, + "application": { + "type": "string" + }, + "expiresAt": { + "nullable": true, + "type": "string" + } + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamId", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "tokenId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProvisioningTokenSummary" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "delete": { + "summary": "Delete a provisioning token", + "tags": [ + "Team Devices" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamId", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "tokenId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIStatus" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/teams/{teamId}/devices/bulk": { + "delete": { + "summary": "Delete devices", + "tags": [ + "Team Devices" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "devices": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1 + } + }, + "required": [ + "devices" + ] + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIStatus" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "put": { + "summary": "Update devices", + "tags": [ + "Team Devices" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "devices" + ], + "properties": { + "devices": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1 + }, + "instance": { + "type": "string", + "nullable": true + }, + "application": { + "type": "string", + "nullable": true + }, + "deviceGroup": { + "type": "string", + "nullable": true + } + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + }, + "count": { + "type": "number" + }, + "devices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Device" + } + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/team-types/": { + "get": { + "summary": "Get a list of the team types", + "tags": [ + "Team Types" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "query", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "cursor", + "required": false + }, + { + "schema": { + "type": "number" + }, + "in": "query", + "name": "limit", + "required": false + }, + { + "schema": { + "type": "number", + "minimum": 1 + }, + "in": "query", + "name": "page", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sort", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "dir", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "order", + "required": false + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + }, + "count": { + "type": "number" + }, + "types": { + "$ref": "#/components/schemas/TeamTypeList" + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "post": { + "summary": "Create a team type - admin-only", + "tags": [ + "Team Types" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "active": { + "type": "boolean" + }, + "properties": { + "type": "object" + }, + "order": { + "type": "number" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TeamType" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/team-types/{teamTypeId}": { + "get": { + "summary": "Get details of a team type", + "tags": [ + "Teams" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamTypeId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TeamType" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "put": { + "summary": "Update a team type - admin-only", + "tags": [ + "Team Types" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "active": { + "type": "boolean" + }, + "properties": { + "type": "object" + }, + "order": { + "type": "number" + } + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamTypeId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TeamType" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "delete": { + "summary": "Delete a team type - admin-only", + "tags": [ + "Team Types" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamTypeId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIStatus" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/applications/": { + "post": { + "summary": "Create an application", + "tags": [ + "Applications" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "name", + "teamId" + ], + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "teamId": { + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Application" + } + } + } + }, + "500": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/applications/{applicationId}": { + "get": { + "summary": "Get the details of an application", + "tags": [ + "Applications" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "applicationId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Application" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "put": { + "summary": "Update an application", + "tags": [ + "Applications" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + } + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "applicationId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Application" + } + } + } + }, + "500": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "delete": { + "summary": "Delete an application", + "tags": [ + "Applications" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "applicationId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIStatus" + } + } + } + }, + "500": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/applications/{applicationId}/instances": { + "get": { + "summary": "Get a list of an applications instances", + "tags": [ + "Applications" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "applicationId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "instances": { + "$ref": "#/components/schemas/InstanceSummaryList" + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/applications/{applicationId}/devices": { + "get": { + "summary": "Get a list of all devices in an application", + "tags": [ + "Applications" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "query", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "cursor", + "required": false + }, + { + "schema": { + "type": "number" + }, + "in": "query", + "name": "limit", + "required": false + }, + { + "schema": { + "type": "number", + "minimum": 1 + }, + "in": "query", + "name": "page", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sort", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "dir", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "order", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "applicationId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + }, + "count": { + "type": "number" + }, + "devices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Device" + } + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/applications/{applicationId}/instances/status": { + "get": { + "summary": "Get a list of an applications instances status", + "tags": [ + "Applications" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "applicationId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "instances": { + "$ref": "#/components/schemas/InstanceStatusList" + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/applications/{applicationId}/snapshots": { + "get": { + "summary": "Get a list of all snapshots in an Application", + "tags": [ + "Applications" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "applicationId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "snapshots": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Snapshot" + } + }, + "application": { + "$ref": "#/components/schemas/ApplicationSummary" + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/applications/{applicationId}/audit-log": { + "get": { + "summary": "Get application audit event entries", + "tags": [ + "Applications" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "query", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "cursor", + "required": false + }, + { + "schema": { + "type": "number" + }, + "in": "query", + "name": "limit", + "required": false + }, + { + "schema": { + "type": "number", + "minimum": 1 + }, + "in": "query", + "name": "page", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sort", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "dir", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "order", + "required": false + }, + { + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "in": "query", + "name": "event", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "username", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "applicationId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + }, + "count": { + "type": "number" + }, + "log": { + "$ref": "#/components/schemas/AuditLogEntryList" + }, + "associations": { + "type": "object", + "properties": { + "applications": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ApplicationSummary" + } + }, + "instances": { + "$ref": "#/components/schemas/InstanceSummaryList" + }, + "devices": { + "$ref": "#/components/schemas/DeviceSummaryList" + } + } + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/applications/{applicationId}/audit-log/export": { + "get": { + "summary": "Get application audit event entries", + "tags": [ + "Applications" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "query", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "cursor", + "required": false + }, + { + "schema": { + "type": "number" + }, + "in": "query", + "name": "limit", + "required": false + }, + { + "schema": { + "type": "number", + "minimum": 1 + }, + "in": "query", + "name": "page", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sort", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "dir", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "order", + "required": false + }, + { + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "in": "query", + "name": "event", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "username", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "applicationId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "text/csv": { + "schema": { + "type": "string" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/projects/{instanceId}": { + "get": { + "summary": "Get details of an instance", + "tags": [ + "Instances" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "instanceId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/Instance" + }, + { + "$ref": "#/components/schemas/InstanceStatus" + } + ] + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "delete": { + "summary": "Delete an instance", + "tags": [ + "Instances" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "instanceId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIStatus" + } + } + } + }, + "500": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "put": { + "summary": "Update an instance", + "tags": [ + "Instances" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "hostname": { + "type": "string" + }, + "settings": { + "type": "object" + }, + "launcherSettings": { + "type": "object" + }, + "projectType": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "sourceProject": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "options": { + "type": "object" + } + } + } + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "instanceId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/Instance" + }, + { + "$ref": "#/components/schemas/InstanceStatus" + } + ] + } + } + } + }, + "500": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/projects/": { + "post": { + "summary": "Create an instance", + "tags": [ + "Instances" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "name", + "projectType", + "stack", + "template", + "applicationId" + ], + "properties": { + "name": { + "type": "string" + }, + "applicationId": { + "type": "string" + }, + "projectType": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "flowBlueprintId": { + "type": "string" + }, + "flows": { + "type": "array" + }, + "template": { + "type": "string" + }, + "sourceProject": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "options": { + "type": "object" + } + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/Instance" + }, + { + "$ref": "#/components/schemas/InstanceStatus" + } + ] + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/projects/{instanceId}/settings": { + "get": { + "summary": "Get an instance runtime settings (instance tokens only)", + "tags": [ + "Instances" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "instanceId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/projects/{instanceId}/logs": { + "get": { + "summary": "Get instance logs", + "tags": [ + "Instances" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "query", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "cursor", + "required": false + }, + { + "schema": { + "type": "number" + }, + "in": "query", + "name": "limit", + "required": false + }, + { + "schema": { + "type": "number", + "minimum": 1 + }, + "in": "query", + "name": "page", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sort", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "dir", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "order", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "instanceId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "meta": { + "allOf": [ + { + "$ref": "#/components/schemas/PaginationMeta" + }, + { + "type": "object", + "properties": { + "first_entry": { + "type": "string" + }, + "last_entry": { + "type": "string" + } + } + } + ] + }, + "log": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + } + } + } + } + } + }, + "500": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/projects/{instanceId}/audit-log": { + "get": { + "summary": "Get instance audit event entries", + "tags": [ + "Instances" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "query", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "cursor", + "required": false + }, + { + "schema": { + "type": "number" + }, + "in": "query", + "name": "limit", + "required": false + }, + { + "schema": { + "type": "number", + "minimum": 1 + }, + "in": "query", + "name": "page", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sort", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "dir", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "order", + "required": false + }, + { + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "in": "query", + "name": "event", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "username", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "instanceId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + }, + "count": { + "type": "number" + }, + "log": { + "$ref": "#/components/schemas/AuditLogEntryList" + }, + "associations": { + "type": "object", + "properties": { + "applications": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ApplicationSummary" + } + }, + "instances": { + "$ref": "#/components/schemas/InstanceSummaryList" + }, + "devices": { + "$ref": "#/components/schemas/DeviceSummaryList" + } + } + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/projects/{instanceId}/audit-log/export": { + "get": { + "summary": "Get instance audit event entries", + "tags": [ + "Instances" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "query", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "cursor", + "required": false + }, + { + "schema": { + "type": "number" + }, + "in": "query", + "name": "limit", + "required": false + }, + { + "schema": { + "type": "number", + "minimum": 1 + }, + "in": "query", + "name": "page", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sort", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "dir", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "order", + "required": false + }, + { + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "in": "query", + "name": "event", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "username", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "instanceId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "text/csv": { + "schema": { + "type": "string" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/projects/{instanceId}/import": { + "post": { + "summary": "Import flows to the instance", + "tags": [ + "Instances" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "flows": { + "type": "string" + }, + "credentials": { + "type": "string" + }, + "credsSecret": { + "type": "string" + } + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "instanceId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIStatus" + } + } + } + }, + "500": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/projects/check-name": { + "post": { + "summary": "Check if a project name is available", + "tags": [ + "Instances" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "available": { + "type": "boolean" + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/projects/{instanceId}/status": { + "get": { + "summary": "Get the live status of an instance", + "tags": [ + "Instances", + "Live State" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "instanceId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "id": { + "type": "string" + }, + "meta": { + "type": "object", + "additionalProperties": true + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/projects/{instanceId}/generate/snapshot-description": { + "post": { + "summary": "Generate a description of changes between a project's current state and latest snapshot", + "tags": [ + "Instances", + "Snapshots" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "target" + ], + "properties": { + "target": { + "type": "string" + } + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "instanceId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/projects/{instanceId}/devices/": { + "get": { + "summary": "Get a list of devices assigned to an instance", + "tags": [ + "Instances" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "query", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "cursor", + "required": false + }, + { + "schema": { + "type": "number" + }, + "in": "query", + "name": "limit", + "required": false + }, + { + "schema": { + "type": "number", + "minimum": 1 + }, + "in": "query", + "name": "page", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sort", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "dir", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "order", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "instanceId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + }, + "count": { + "type": "number" + }, + "devices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Device" + } + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/projects/{instanceId}/devices/settings": { + "get": { + "summary": "Get instance device settings", + "tags": [ + "Instances" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "instanceId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "targetSnapshot": { + "type": "string", + "nullable": true + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "post": { + "summary": "Update instance device settings", + "tags": [ + "Instances" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "targetSnapshot": { + "type": "string" + } + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "instanceId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIStatus" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/projects/{instanceId}/actions/start": { + "post": { + "summary": "Start an instance", + "tags": [ + "Instance Actions" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "instanceId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIStatus" + } + } + } + }, + "500": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/projects/{instanceId}/actions/stop": { + "post": { + "summary": "Stop an instance", + "tags": [ + "Instance Actions" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "instanceId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIStatus" + } + } + } + }, + "500": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/projects/{instanceId}/actions/restart": { + "post": { + "summary": "Restart an instance", + "tags": [ + "Instance Actions" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "instanceId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIStatus" + } + } + } + }, + "500": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/projects/{instanceId}/actions/suspend": { + "post": { + "summary": "Suspend an instance", + "tags": [ + "Instance Actions" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "instanceId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIStatus" + } + } + } + }, + "500": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/projects/{instanceId}/actions/rollback": { + "post": { + "summary": "Rollback an instance to a snapshot", + "tags": [ + "Instance Actions" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "snapshot": { + "type": "string" + } + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "instanceId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIStatus" + } + } + } + }, + "500": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/projects/{instanceId}/actions/restartStack": { + "post": { + "summary": "Restart an instance stack", + "tags": [ + "Instance Actions" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "instanceId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIStatus" + } + } + } + }, + "500": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/projects/{instanceId}/snapshots/": { + "get": { + "summary": "Get a list of instance snapshots", + "tags": [ + "Snapshots" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "instanceId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + }, + "count": { + "type": "number" + }, + "snapshots": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Snapshot" + } + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "post": { + "summary": "Create a snapshot from an instance", + "tags": [ + "Snapshots" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "flows": { + "oneOf": [ + { + "type": "object", + "properties": { + "flows": { + "type": "array", + "items": { + "type": "object" + } + }, + "credentials": { + "type": "object" + } + } + }, + { + "type": "array", + "items": { + "type": "object" + } + } + ] + }, + "credentials": { + "type": "object" + }, + "credentialSecret": { + "type": "string" + }, + "settings": { + "type": "object", + "properties": { + "modules": { + "type": "object", + "additionalProperties": true + } + } + }, + "setAsTarget": { + "type": "boolean" + } + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "instanceId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Snapshot" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/projects/{instanceId}/snapshots/{snapshotId}": { + "get": { + "summary": "Get details of a snapshot", + "tags": [ + "Snapshots" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "instanceId", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "snapshotId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Snapshot" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "delete": { + "summary": "Delete a snapshot", + "tags": [ + "Snapshots" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "instanceId", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "snapshotId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIStatus" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/projects/{instanceId}/snapshots/{snapshotId}/export": { + "post": { + "summary": "Export an instance snapshot using the provided credentialSecret", + "tags": [ + "Snapshots" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "credentialSecret": { + "type": "string" + } + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "instanceId", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "snapshotId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExportedSnapshot" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/stacks/": { + "get": { + "summary": "Get a list of all stacks", + "tags": [ + "Stacks" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "query", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "cursor", + "required": false + }, + { + "schema": { + "type": "number" + }, + "in": "query", + "name": "limit", + "required": false + }, + { + "schema": { + "type": "number", + "minimum": 1 + }, + "in": "query", + "name": "page", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sort", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "dir", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "order", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "filter", + "required": false + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + }, + "count": { + "type": "number" + }, + "stacks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Stack" + } + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "post": { + "summary": "Create a stack - admin-only", + "tags": [ + "Stacks" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + }, + "label": { + "type": "string" + }, + "active": { + "type": "boolean" + }, + "projectType": { + "type": "string" + }, + "properties": { + "type": "object" + }, + "replaces": { + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Stack" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/stacks/{stackId}": { + "get": { + "summary": "Get details of a stacks", + "tags": [ + "Stacks" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "stackId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Stack" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "delete": { + "summary": "Delete a stack - admin-only", + "tags": [ + "Stacks" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "stackId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIStatus" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "put": { + "summary": "Update details of a stack - admin-only", + "tags": [ + "Stacks" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "label": { + "type": "string" + }, + "active": { + "type": "boolean" + }, + "projectType": { + "type": "string" + }, + "properties": { + "type": "object" + } + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "stackId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Stack" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/templates/": { + "get": { + "summary": "Get a list of all templates", + "tags": [ + "Templates" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "query", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "cursor", + "required": false + }, + { + "schema": { + "type": "number" + }, + "in": "query", + "name": "limit", + "required": false + }, + { + "schema": { + "type": "number", + "minimum": 1 + }, + "in": "query", + "name": "page", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sort", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "dir", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "order", + "required": false + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + }, + "count": { + "type": "number" + }, + "templates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TemplateSummary" + } + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "post": { + "summary": "Create a template - admin-only", + "tags": [ + "Templates" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "name", + "settings", + "policy" + ], + "properties": { + "name": { + "type": "string" + }, + "active": { + "type": "boolean" + }, + "description": { + "type": "string" + }, + "settings": { + "type": "object" + }, + "policy": { + "type": "object" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TemplateSummary" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/templates/{templateId}": { + "get": { + "summary": "Get a template", + "tags": [ + "Templates" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "templateId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Template" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "delete": { + "summary": "Delete a template - admin-only", + "tags": [ + "Templates" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "templateId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIStatus" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "put": { + "summary": "Update a template - admin-only", + "tags": [ + "Templates" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "name", + "settings", + "policy" + ], + "properties": { + "name": { + "type": "string" + }, + "active": { + "type": "boolean" + }, + "description": { + "type": "string" + }, + "settings": { + "type": "object" + }, + "policy": { + "type": "object" + } + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "templateId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TemplateSummary" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/devices/": { + "get": { + "summary": "Get a list of all devices - admin-only", + "tags": [ + "Devices" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "query", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "cursor", + "required": false + }, + { + "schema": { + "type": "number" + }, + "in": "query", + "name": "limit", + "required": false + }, + { + "schema": { + "type": "number", + "minimum": 1 + }, + "in": "query", + "name": "page", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sort", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "dir", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "order", + "required": false + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + }, + "count": { + "type": "number" + }, + "devices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Device" + } + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "post": { + "summary": "Create or provision a device", + "tags": [ + "Devices" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "oneOf": [ + { + "allOf": [ + { + "required": [ + "name" + ] + }, + { + "required": [ + "team" + ] + }, + { + "not": { + "required": [ + "setup" + ] + } + } + ] + }, + { + "allOf": [ + { + "required": [ + "setup" + ] + }, + { + "not": { + "required": [ + "name" + ] + } + }, + { + "not": { + "required": [ + "team" + ] + } + } + ] + } + ], + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "team": { + "type": "string" + }, + "setup": { + "type": "boolean", + "enum": [ + true + ] + }, + "agentHost": { + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/Device" + } + ], + "properties": { + "credentials": { + "type": "object", + "additionalProperties": true + }, + "meta": { + "type": "object", + "properties": { + "ffVersion": { + "type": "string" + } + } + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/devices/{deviceId}": { + "get": { + "summary": "Get details of a device", + "tags": [ + "Devices" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "deviceId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Device" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "delete": { + "summary": "Delete a device", + "tags": [ + "Devices" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "deviceId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIStatus" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "put": { + "summary": "Update a device", + "tags": [ + "Devices" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "instance": { + "type": "string", + "nullable": true + }, + "application": { + "type": "string", + "nullable": true + } + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "deviceId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Device" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/devices/{deviceId}/generate_credentials": { + "post": { + "summary": "Regenerate device credentials", + "tags": [ + "Devices" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "deviceId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/devices/{deviceId}/settings": { + "put": { + "summary": "Update a devices settings", + "tags": [ + "Devices" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "env": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + }, + "autoSnapshot": { + "type": "boolean" + }, + "palette": { + "type": "object", + "additionalProperties": true + }, + "editor": { + "type": "object", + "additionalProperties": true + }, + "security": { + "type": "object", + "additionalProperties": true + } + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "deviceId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIStatus" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "get": { + "summary": "Get a devices settings", + "tags": [ + "Devices" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "deviceId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "env": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + }, + "autoSnapshot": { + "type": "boolean" + }, + "palette": { + "type": "object", + "additionalProperties": true + }, + "editor": { + "type": "object", + "additionalProperties": true + }, + "security": { + "type": "object", + "additionalProperties": true + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/devices/{deviceId}/logs": { + "post": { + "summary": "Start device logging", + "tags": [ + "Devices" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "deviceId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "username": { + "type": "string" + }, + "password": { + "type": "string" + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/devices/{deviceId}/resources": { + "post": { + "summary": "Start device logging", + "tags": [ + "Devices" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "deviceId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "username": { + "type": "string" + }, + "password": { + "type": "string" + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/devices/{deviceId}/mode": { + "put": { + "summary": "Set device mode", + "tags": [ + "Devices" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "mode": { + "type": "string", + "nullable": true + } + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "deviceId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "mode": { + "type": "string" + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/devices/{deviceId}/snapshot": { + "post": { + "summary": "Create a snapshot from a device owned by an instance", + "tags": [ + "Devices" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "setAsTarget": { + "type": "boolean" + } + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "deviceId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Snapshot" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/devices/{deviceId}/audit-log": { + "get": { + "tags": [ + "Devices" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "query", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "cursor", + "required": false + }, + { + "schema": { + "type": "number" + }, + "in": "query", + "name": "limit", + "required": false + }, + { + "schema": { + "type": "number", + "minimum": 1 + }, + "in": "query", + "name": "page", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sort", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "dir", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "order", + "required": false + }, + { + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "in": "query", + "name": "event", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "username", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "deviceId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + }, + "count": { + "type": "number" + }, + "log": { + "$ref": "#/components/schemas/AuditLogEntryList" + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/devices/{deviceId}/audit-log/export": { + "get": { + "tags": [ + "Devices" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "query", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "cursor", + "required": false + }, + { + "schema": { + "type": "number" + }, + "in": "query", + "name": "limit", + "required": false + }, + { + "schema": { + "type": "number", + "minimum": 1 + }, + "in": "query", + "name": "page", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sort", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "dir", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "order", + "required": false + }, + { + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "in": "query", + "name": "event", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "username", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "deviceId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "text/csv": { + "schema": { + "type": "string" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/devices/{deviceId}/generate/snapshot-description": { + "post": { + "summary": "Generate a description of changes between a project's current state and latest snapshot", + "tags": [ + "Instances", + "Snapshots" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "target" + ], + "properties": { + "target": { + "type": "string" + } + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "instanceId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/devices/{deviceId}/snapshots/": { + "get": { + "summary": "Get a list of snapshots for a device", + "tags": [ + "DeviceSnapshots" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "deviceId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + }, + "count": { + "type": "number" + }, + "snapshots": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Snapshot" + } + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "post": { + "summary": "Create a snapshot from a device", + "tags": [ + "Devices" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "setAsTarget": { + "type": "boolean" + } + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "deviceId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Snapshot" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/devices/{deviceId}/snapshots/{snapshotId}": { + "get": { + "summary": "Get details of a device snapshot", + "tags": [ + "DeviceSnapshots" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "deviceId", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "snapshotId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Snapshot" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "delete": { + "summary": "Delete a devices snapshot", + "tags": [ + "DeviceSnapshots" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "deviceId", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "snapshotId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIStatus" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/devices/{deviceId}/actions/restart": { + "post": { + "summary": "Restart Node-RED", + "tags": [ + "Device Actions" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "deviceId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIStatus" + } + } + } + }, + "500": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/project-types/": { + "get": { + "summary": "Get a list of all instance types", + "tags": [ + "Instance Types" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "query", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "cursor", + "required": false + }, + { + "schema": { + "type": "number" + }, + "in": "query", + "name": "limit", + "required": false + }, + { + "schema": { + "type": "number", + "minimum": 1 + }, + "in": "query", + "name": "page", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sort", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "dir", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "order", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "filter", + "required": false + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + }, + "count": { + "type": "number" + }, + "types": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InstanceType" + } + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "post": { + "summary": "Create an instance type - admin-only", + "tags": [ + "Instance Types" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "active": { + "type": "boolean" + }, + "properties": { + "type": "object" + }, + "order": { + "type": "number" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InstanceType" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/project-types/{instanceTypeId}": { + "get": { + "summary": "Get a details of an instance types", + "tags": [ + "Instance Types" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "instanceTypeId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InstanceType" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "put": { + "summary": "Update an instance type - admin-only", + "tags": [ + "Instance Types" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "active": { + "type": "boolean" + }, + "properties": { + "type": "object" + }, + "order": { + "type": "number" + }, + "defaultStack": { + "type": "string" + } + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "instanceTypeId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InstanceType" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "delete": { + "summary": "Delete an instance type - admin-only", + "tags": [ + "Instance Types" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "instanceTypeId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIStatus" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/snapshots/{id}": { + "get": { + "summary": "Get summary of a snapshot", + "tags": [ + "Snapshots" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "id", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Snapshot" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "delete": { + "summary": "Delete a snapshot", + "tags": [ + "Snapshots" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "id", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIStatus" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "put": { + "summary": "Update a snapshot", + "tags": [ + "Snapshots" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + } + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "id", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Snapshot" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/snapshots/{id}/full": { + "get": { + "summary": "Get details of a snapshot", + "tags": [ + "Snapshots" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "id", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FullSnapshot" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/snapshots/{id}/export": { + "post": { + "summary": "Export a snapshot", + "tags": [ + "Snapshots" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "credentialSecret": { + "type": "string" + }, + "components": { + "type": "object", + "properties": { + "flows": { + "type": "boolean", + "default": true + }, + "credentials": { + "type": "boolean", + "default": true + }, + "envVars": { + "anyOf": [ + { + "type": "string", + "enum": [ + "all", + "keys" + ] + }, + { + "type": "boolean", + "enum": [ + false + ] + } + ] + } + } + } + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "id", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExportedSnapshot" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/snapshots/import": { + "post": { + "summary": "Upload a snapshot", + "tags": [ + "Snapshots" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "ownerId": { + "type": "string" + }, + "ownerType": { + "type": "string" + }, + "snapshot": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "flows": { + "type": "object", + "properties": { + "flows": { + "type": "array", + "items": {}, + "minItems": 0 + }, + "credentials": { + "type": "object" + } + }, + "required": [ + "flows" + ] + }, + "settings": { + "type": "object", + "properties": { + "settings": { + "type": "object" + }, + "env": { + "type": "object" + }, + "modules": { + "type": "object" + } + }, + "required": [] + } + }, + "required": [ + "name", + "flows", + "settings" + ] + }, + "credentialSecret": { + "type": "string" + }, + "components": { + "type": "object", + "properties": { + "flows": { + "type": "boolean", + "default": true + }, + "credentials": { + "type": "boolean", + "default": true + }, + "envVars": { + "anyOf": [ + { + "type": "string", + "enum": [ + "all", + "keys" + ] + }, + { + "type": "boolean", + "enum": [ + false + ] + } + ] + } + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Snapshot" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/search/": { + "get": { + "summary": "Search for resources", + "tags": [ + "Search" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "team", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "query", + "required": false + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "results": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/search/instances": { + "get": { + "summary": "Search for hosted and remote instances", + "tags": [ + "Search" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "team", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "query", + "required": false + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "results": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/pipelines": { + "post": { + "summary": "Create a new pipeline within an application", + "tags": [ + "Pipelines" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "applicationId": { + "type": "string" + }, + "name": { + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pipeline" + } + } + } + }, + "500": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/pipelines/{pipelineId}": { + "delete": { + "summary": "Delete a pipeline", + "tags": [ + "Pipelines" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "pipelineId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIStatus" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "put": { + "summary": "Update a pipeline within an application", + "tags": [ + "Pipelines" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "pipelineId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pipeline" + } + } + } + }, + "500": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/pipelines/{pipelineId}/stages": { + "post": { + "summary": "Add a new stage to an existing pipeline", + "tags": [ + "Pipelines" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "instanceId": { + "type": "string" + }, + "deviceId": { + "type": "string" + }, + "deviceGroupId": { + "type": "string" + }, + "deployToDevices": { + "type": "boolean" + }, + "action": { + "type": "string", + "enum": [ + "create_snapshot", + "use_active_snapshot", + "use_latest_snapshot", + "prompt", + "none" + ] + }, + "gitTokenId": { + "type": "string" + }, + "url": { + "type": "string" + }, + "branch": { + "type": "string" + }, + "pullBranch": { + "type": "string" + }, + "pushPath": { + "type": "string" + }, + "pullPath": { + "type": "string" + }, + "credentialSecret": { + "type": "string" + }, + "source": { + "type": "string" + } + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "pipelineId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PipelineStage" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/pipelines/{pipelineId}/stages/{stageId}": { + "put": { + "summary": "Update details of a stage within a pipeline", + "tags": [ + "Pipelines" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "instanceId": { + "type": "string" + }, + "deviceId": { + "type": "string" + }, + "deviceGroupId": { + "type": "string" + }, + "action": { + "type": "string", + "enum": [ + "create_snapshot", + "use_active_snapshot", + "use_latest_snapshot", + "prompt", + "none" + ] + }, + "gitTokenId": { + "type": "string" + }, + "url": { + "type": "string" + }, + "branch": { + "type": "string" + }, + "pullBranch": { + "type": "string" + }, + "pushPath": { + "type": "string" + }, + "pullPath": { + "type": "string" + }, + "credentialSecret": { + "type": "string" + }, + "source": { + "type": "string" + } + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "pipelineId", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "stageId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PipelineStage" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "delete": { + "summary": "Delete a pipeline stage", + "tags": [ + "Pipelines" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "pipelineId", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "stageId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIStatus" + } + } + } + }, + "500": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/pipelines/{pipelineId}/stages/{stageId}/deploy": { + "put": { + "summary": "Triggers a pipeline stage", + "tags": [ + "Pipelines" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": [ + "object", + "null" + ], + "properties": { + "sourceSnapshotId": { + "type": "string", + "description": "The snapshot to deploy if the stage action is set to \"prompt\"" + } + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "pipelineId", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "stageId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIStatus" + } + } + } + }, + "500": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/applications/{applicationId}/pipelines": { + "get": { + "summary": "List all pipelines within an application", + "tags": [ + "Pipelines" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "applicationId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "pipelines": { + "$ref": "#/components/schemas/PipelineList" + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/teams/{teamId}/pipelines/": { + "get": { + "tags": [ + "Pipelines" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "pipelines": { + "$ref": "#/components/schemas/PipelineList" + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/applications/{applicationId}/bom": { + "get": { + "summary": "Get application BOM", + "tags": [ + "Applications" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "applicationId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApplicationBom" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/teams/{teamId}/bom": { + "get": { + "summary": "Get team BOM", + "tags": [ + "Teams" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ApplicationBom" + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/flow-blueprints/": { + "get": { + "summary": "Get a list of the available flow blueprints", + "tags": [ + "Flow Blueprints" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "query", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "cursor", + "required": false + }, + { + "schema": { + "type": "number" + }, + "in": "query", + "name": "limit", + "required": false + }, + { + "schema": { + "type": "number", + "minimum": 1 + }, + "in": "query", + "name": "page", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sort", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "dir", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "order", + "required": false + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + }, + "count": { + "type": "number" + }, + "blueprints": { + "$ref": "#/components/schemas/FlowBlueprintSummaryList" + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "post": { + "summary": "Create a flow blueprint - admin-only", + "tags": [ + "Flow Blueprints" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/FlowBlueprintInput" + } + ], + "required": [ + "name" + ] + } + } + } + }, + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FlowBlueprintSummary" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/flow-blueprints/{flowBlueprintId}": { + "get": { + "summary": "Get full details of a flow blueprint", + "tags": [ + "Flow Blueprints" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "flowBlueprintId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FlowBlueprint" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "delete": { + "summary": "Delete a flow blueprint - admin-only", + "tags": [ + "Flow Blueprints" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "flowBlueprintId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIStatus" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "put": { + "summary": "Update a flow blueprint - admin-only", + "tags": [ + "Flow Blueprints" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FlowBlueprintInput" + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "flowBlueprintId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FlowBlueprintSummary" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/flow-blueprints/export": { + "get": { + "summary": "Export one or more Blueprints", + "tags": [ + "Flow Blueprints" + ], + "parameters": [ + { + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "in": "query", + "name": "id", + "required": false + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/FlowBlueprintExport" + } + ], + "properties": { + "count": { + "type": "integer" + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/flow-blueprints/export-public": { + "get": { + "summary": "Export one or more Blueprints", + "tags": [ + "Flow Blueprints" + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/FlowBlueprintExport" + } + ], + "properties": { + "count": { + "type": "integer" + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/flow-blueprints/import": { + "post": { + "summary": "Import one or more Blueprints", + "tags": [ + "Flow Blueprints" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "blueprints": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + }, + "count": { + "type": "integer" + } + }, + "required": [ + "blueprints" + ] + } + } + } + }, + "responses": { + "201": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "blueprints": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FlowBlueprintSummary" + } + }, + "count": { + "type": "integer" + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/applications/{applicationId}/device-groups/": { + "get": { + "summary": "Get a list of device groups in an application", + "tags": [ + "Application Device Groups" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "query", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "cursor", + "required": false + }, + { + "schema": { + "type": "number" + }, + "in": "query", + "name": "limit", + "required": false + }, + { + "schema": { + "type": "number", + "minimum": 1 + }, + "in": "query", + "name": "page", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sort", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "dir", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "order", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "applicationId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + }, + "count": { + "type": "number" + }, + "groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceGroupSummary" + } + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "post": { + "summary": "Add a new Device Group to an Application", + "tags": [ + "Application Device Groups" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": [ + "name" + ] + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "applicationId", + "required": true + } + ], + "responses": { + "201": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceGroupSummary" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/applications/{applicationId}/device-groups/{groupId}": { + "put": { + "summary": "Update a Device Group", + "tags": [ + "Application Device Groups" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "targetSnapshotId": { + "type": [ + "string", + "null" + ] + } + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "applicationId", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "groupId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "get": { + "summary": "Get a specific Device Group", + "tags": [ + "Application Device Groups" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "applicationId", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "groupId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceGroup" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "patch": { + "summary": "Update Device Group membership", + "tags": [ + "Application Device Groups" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "add": { + "type": "array", + "items": { + "type": "string" + } + }, + "remove": { + "type": "array", + "items": { + "type": "string" + } + }, + "set": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "applicationId", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "groupId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "delete": { + "summary": "Delete a Device Group", + "tags": [ + "Application Device Groups" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "applicationId", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "groupId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/applications/{applicationId}/device-groups/{groupId}/settings": { + "put": { + "summary": "Update a Device Group Settings", + "tags": [ + "Application Device Groups" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "env": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + } + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "applicationId", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "groupId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIStatus" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/teams/{teamId}/device-groups/": { + "get": { + "summary": "Get a list of device groups in an application", + "tags": [ + "Application Device Groups" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "query", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "cursor", + "required": false + }, + { + "schema": { + "type": "number" + }, + "in": "query", + "name": "limit", + "required": false + }, + { + "schema": { + "type": "number", + "minimum": 1 + }, + "in": "query", + "name": "page", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sort", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "dir", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "order", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "applicationId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + }, + "count": { + "type": "number" + }, + "groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceGroupSummary" + } + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/projects/{projectId}/files/_/{path}": { + "get": { + "summary": "List files stored in the instance", + "tags": [ + "Instance Files" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "instanceId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response" + } + } + }, + "put": { + "summary": "Update file properties in the instance", + "tags": [ + "Instance Files" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "path": { + "type": "string" + }, + "share": { + "type": "object", + "additionalProperties": true + } + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "instanceId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response" + } + } + }, + "delete": { + "summary": "Delete a file in the instance", + "tags": [ + "Instance Files" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "instanceId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response" + } + } + }, + "post": { + "summary": "Upload a file to the instance/Create directory", + "tags": [ + "Instance Files" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "instanceId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response" + } + } + } + }, + "/api/v1/teams/{teamId}/broker/clients": { + "get": { + "summary": "List MQTT clients for the team", + "tags": [ + "MQTT Broker" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "query", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "cursor", + "required": false + }, + { + "schema": { + "type": "number" + }, + "in": "query", + "name": "limit", + "required": false + }, + { + "schema": { + "type": "number", + "minimum": 1 + }, + "in": "query", + "name": "page", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sort", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "dir", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "order", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "clients": { + "type": "array" + }, + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + }, + "count": { + "type": "integer" + } + }, + "additionalProperties": true + } + } + } + }, + "500": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/teams/{teamId}/broker/client": { + "post": { + "summary": "Create new MQTT client for the team", + "tags": [ + "MQTT Broker" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "acls": { + "type": "array" + }, + "username": { + "type": "string" + }, + "password": { + "type": "string" + } + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamId", + "required": true + } + ], + "responses": { + "201": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "username": { + "type": "string" + }, + "acls": { + "type": "array" + } + } + } + } + } + }, + "500": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/teams/{teamId}/broker/client/{username}": { + "get": { + "summary": "Get details about a specific MQTT client", + "tags": [ + "MQTT Broker" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamId", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "username", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "username": { + "type": "string" + }, + "acls": { + "type": "array" + }, + "owner": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "instanceType": { + "type": "string", + "enum": [ + "instance", + "device" + ] + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + } + } + ] + } + } + } + } + } + }, + "500": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "put": { + "summary": "Modify a MQTT Client", + "tags": [ + "MQTT Broker" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "type": "object", + "properties": { + "password": { + "type": "string" + }, + "acls": { + "type": "array" + } + } + }, + { + "type": "object", + "properties": { + "password": { + "type": "string" + } + } + }, + { + "type": "object", + "properties": { + "acls": { + "type": "array" + } + } + } + ] + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamId", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "username", + "required": true + } + ], + "responses": { + "201": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "username": { + "type": "string" + }, + "acls": { + "type": "array" + } + } + } + } + } + }, + "500": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "delete": { + "summary": "Delete a MQTT client", + "tags": [ + "MQTT Broker" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamId", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "username", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIStatus" + } + } + } + }, + "500": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/teams/{teamId}/broker/client/{username}/link": { + "post": { + "summary": "Link a MQTT client to a device or project", + "tags": [ + "MQTT Broker" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "oneOf": [ + { + "type": "object", + "required": [ + "password" + ], + "properties": { + "password": { + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "ownerType", + "ownerId" + ], + "properties": { + "ownerType": { + "type": "string", + "enum": [ + "device", + "instance" + ] + }, + "ownerId": { + "type": "string" + }, + "password": { + "type": "string" + } + }, + "additionalProperties": false + } + ], + "properties": { + "ownerType": { + "type": "string", + "enum": [ + "device", + "instance" + ] + }, + "ownerId": { + "type": "string" + }, + "password": { + "type": "string" + } + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamId", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "username", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "username": { + "type": "string" + }, + "acls": { + "type": "array" + }, + "owner": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "instance", + "device" + ] + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + } + } + } + } + } + } + }, + "201": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "username": { + "type": "string" + }, + "acls": { + "type": "array" + }, + "owner": { + "type": "object", + "properties": { + "instanceType": { + "type": "string", + "enum": [ + "instance", + "device" + ] + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + } + } + } + } + } + } + }, + "500": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/teams/{teamId}/brokers": { + "get": { + "summary": "Get credentials for 3rd party MQTT brokers", + "tags": [ + "MQTT Broker" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + }, + "count": { + "type": "number" + }, + "brokers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MQTTBroker" + } + } + }, + "additionalProperties": true + } + } + } + }, + "500": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "post": { + "summary": "Create credentials for a 3rd party MQTT broker", + "tags": [ + "MQTT Broker" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MQTTBrokerInput" + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamId", + "required": true + } + ], + "responses": { + "201": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MQTTBroker" + } + } + } + }, + "500": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/teams/{teamId}/brokers/{brokerId}/credentials": { + "get": { + "summary": "Gets credentials for a 3rd party MQTT broker", + "tags": [ + "MQTT Broker" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamId", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "brokerId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MQTTBroker" + } + } + } + }, + "500": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/teams/{teamId}/brokers/{brokerId}": { + "put": { + "summary": "Delete credentials for a 3rd party MQTT broker", + "tags": [ + "MQTT Broker" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MQTTBrokerInput" + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamId", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "brokerId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MQTTBroker" + } + } + } + }, + "500": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "get": { + "summary": "Get 3rd Party Broker details and status", + "tags": [ + "MQTT Broker" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamId", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "brokerId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/MQTTBroker" + }, + { + "type": "object", + "properties": { + "state": { + "type": "string" + } + }, + "required": [ + "state" + ], + "additionalProperties": false + } + ] + } + } + } + }, + "500": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "delete": { + "summary": "Delete credentials for a 3rd party MQTT broker", + "tags": [ + "MQTT Broker" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamId", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "brokerId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "additionalProperties": true + } + } + } + }, + "500": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/teams/{teamId}/brokers/{brokerId}/topics": { + "get": { + "tags": [ + "MQTT Broker" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamId", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "brokerId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "additionalProperties": true + } + } + } + }, + "500": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "post": { + "summary": "Store Topics from a 3rd party MQTT broker", + "tags": [ + "MQTT Broker" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamId", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "brokerId", + "required": true + } + ], + "responses": { + "201": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "topic": { + "type": "string" + } + }, + "additionalProperties": true + } + } + } + }, + "500": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/teams/{teamId}/brokers/{brokerId}/topics/{topicId}": { + "put": { + "tags": [ + "MQTT Broker" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamId", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "brokerId", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "topicId", + "required": true + } + ], + "responses": { + "201": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "additionalProperties": true + } + } + } + }, + "500": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "delete": { + "tags": [ + "MQTT Broker" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamId", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "brokerId", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "topicId", + "required": true + } + ], + "responses": { + "201": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + } + }, + "500": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/teams/{teamId}/npm/packages": { + "get": { + "summary": "Gets the private packages owned by this team", + "tags": [ + "NPM Packages" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response" + } + } + } + }, + "/api/v1/teams/{teamId}/npm/subflow": { + "put": { + "summary": "Allows Subflow packages to be stored in the Team Registry", + "tags": [ + "NPM Package" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "package": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "required": [ + "name", + "version" + ], + "additionalProperties": true + }, + "subflow": { + "type": "object", + "additionalProperties": true + } + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/teams/{teamId}/npm/userToken": { + "get": { + "summary": "Check if user already has a NPM auth token", + "tags": [ + "NPM packages" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamId", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "userId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "404": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "post": { + "summary": "Generate a new user password for NPM registry", + "tags": [ + "NPM packages" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamId", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "userId", + "required": true + } + ], + "responses": { + "201": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "username": { + "type": "string" + }, + "token": { + "type": "string" + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/projects/{instanceId}/resources/": { + "get": { + "summary": "Returns resource usage history for an Instance", + "tags": [ + "Instances" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "instanceId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + }, + "resources": { + "type": "array", + "items": { + "type": "object", + "properties": { + "src": { + "type": "string" + }, + "ps": { + "type": "number" + }, + "cpu": { + "type": "number" + }, + "hs": { + "type": "number" + }, + "hu": { + "type": "number" + }, + "ts": { + "type": "number" + } + } + } + }, + "count": { + "type": "number" + } + } + } + } + } + }, + "500": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/teams/{teamId}/databases/": { + "get": { + "tags": [ + "FF tables" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DatabaseCredentials" + } + } + } + } + }, + "500": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "post": { + "tags": [ + "FF tables" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the database" + } + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatabaseCredentials" + } + } + } + }, + "500": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/teams/{teamId}/databases/{databaseId}": { + "get": { + "tags": [ + "FF tables" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "databaseId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatabaseCredentials" + } + } + } + }, + "500": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "delete": { + "tags": [ + "FF tables" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "databaseId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "500": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/teams/{teamId}/databases/{databaseId}/tables": { + "get": { + "tags": [ + "FF tables" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "query", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "cursor", + "required": false + }, + { + "schema": { + "type": "number" + }, + "in": "query", + "name": "limit", + "required": false + }, + { + "schema": { + "type": "number", + "minimum": 1 + }, + "in": "query", + "name": "page", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sort", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "dir", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "order", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "databaseId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "tables": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "schema": { + "type": "string" + } + } + } + }, + "meta": { + "type": "object", + "additionalProperties": true + } + } + } + } + } + }, + "500": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "post": { + "tags": [ + "FF tables" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "columns": { + "$ref": "#/components/schemas/DatabaseTable" + } + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "databaseId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatabaseTable" + } + } + } + }, + "500": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/teams/{teamId}/databases/{databaseId}/tables/{tableName}": { + "get": { + "tags": [ + "FF tables" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "databaseId", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "tableName", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatabaseTable" + } + } + } + }, + "500": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "delete": { + "tags": [ + "FF tables" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "databaseId", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "tableName", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatabaseTable" + } + } + } + }, + "500": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/teams/{teamId}/databases/{databaseId}/tables/{tableName}/data": { + "get": { + "tags": [ + "FF tables" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "query", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "cursor", + "required": false + }, + { + "schema": { + "type": "number" + }, + "in": "query", + "name": "limit", + "required": false + }, + { + "schema": { + "type": "number", + "minimum": 1 + }, + "in": "query", + "name": "page", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sort", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "dir", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "order", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "databaseId", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "tableName", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "rows": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + }, + "meta": { + "type": "object", + "additionalProperties": true + } + } + } + } + } + }, + "500": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/teams/{teamId}/mcp/": { + "get": { + "tags": [ + "MCP" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "servers": { + "$ref": "#/components/schemas/MCPRegistrationSummaryList" + } + } + } + } + } + }, + "500": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/teams/{teamId}/mcp/{type}/{typeId}/{nodeId}": { + "post": { + "tags": [ + "MCP" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "endpointRoute": { + "type": "string" + }, + "protocol": { + "type": "string" + }, + "title": { + "type": "string" + }, + "version": { + "type": "string" + }, + "description": { + "type": "string" + } + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamId", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "type", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "typeId", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "nodeId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "500": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "delete": { + "tags": [ + "MCP" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamId", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "type", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "typeId", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "nodeId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "500": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/projects/{projectId}/autoUpdateStack/": { + "get": { + "summary": "Returns when a Instance allowed to be restarted ", + "tags": [ + "Instances" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "projectId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "hour": { + "type": "number" + }, + "day": { + "type": "number" + }, + "restart": { + "type": "boolean" + } + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "put": { + "summary": "Sets when an Instance can be restarted", + "tags": [ + "Instances" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "schedule": { + "type": "array", + "items": { + "type": "object", + "properties": { + "hour": { + "type": "number" + }, + "day": { + "type": "number" + }, + "restart": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "projectId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "hour": { + "type": "number" + }, + "day": { + "type": "number" + }, + "restart": { + "type": "boolean" + } + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "delete": { + "summary": "Clears when an Instance can be restarted", + "tags": [ + "Instances" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "projectId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + } + }, + "tags": [ + { + "name": "User", + "description": "" + }, + { + "name": "Teams", + "description": "" + }, + { + "name": "Team Types", + "description": "" + }, + { + "name": "Team Members", + "description": "" + }, + { + "name": "Team Invitations", + "description": "" + }, + { + "name": "Team Devices", + "description": "" + }, + { + "name": "Applications", + "description": "" + }, + { + "name": "Application Device Groups", + "description": "" + }, + { + "name": "Instances", + "description": "" + }, + { + "name": "Instance Types", + "description": "" + }, + { + "name": "Instance Actions", + "description": "" + }, + { + "name": "Devices", + "description": "" + }, + { + "name": "Snapshots", + "description": "" + }, + { + "name": "Pipelines", + "description": "" + }, + { + "name": "Stacks", + "description": "" + }, + { + "name": "Templates", + "description": "" + }, + { + "name": "Platform", + "description": "" + }, + { + "name": "Users", + "description": "" + } + ], + "externalDocs": { + "url": "https://flowfuse.com/docs", + "description": "Find more info here" + } +} \ No newline at end of file From ed1fb0fef9b503ea293af22f16366ba3cb81398a Mon Sep 17 00:00:00 2001 From: Ben Hardill Date: Mon, 6 Jul 2026 13:35:39 +0100 Subject: [PATCH 04/16] Update types --- frontend/src/types/generated.ts | 3279 +------- openapi.json | 13097 ++++++++++-------------------- 2 files changed, 4073 insertions(+), 12303 deletions(-) diff --git a/frontend/src/types/generated.ts b/frontend/src/types/generated.ts index 322e7eed80..96bb63971e 100644 --- a/frontend/src/types/generated.ts +++ b/frontend/src/types/generated.ts @@ -7088,3130 +7088,6 @@ export interface paths { patch?: never; trace?: never; }; - "/api/v1/pipelines": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Create a new pipeline within an application */ - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - applicationId?: string; - name?: string; - }; - }; - }; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Pipeline"]; - }; - }; - /** @description Default Response */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/v1/pipelines/{pipelineId}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - /** Update a pipeline within an application */ - put: { - parameters: { - query?: never; - header?: never; - path: { - pipelineId: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - name?: string; - }; - }; - }; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Pipeline"]; - }; - }; - /** @description Default Response */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - post?: never; - /** Delete a pipeline */ - delete: { - parameters: { - query?: never; - header?: never; - path: { - pipelineId: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIStatus"]; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/v1/pipelines/{pipelineId}/stages": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Add a new stage to an existing pipeline */ - post: { - parameters: { - query?: never; - header?: never; - path: { - pipelineId: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - name?: string; - instanceId?: string; - deviceId?: string; - deviceGroupId?: string; - deployToDevices?: boolean; - /** @enum {string} */ - action?: "create_snapshot" | "use_active_snapshot" | "use_latest_snapshot" | "prompt" | "none"; - gitTokenId?: string; - url?: string; - branch?: string; - pullBranch?: string; - pushPath?: string; - pullPath?: string; - credentialSecret?: string; - source?: string; - }; - }; - }; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["PipelineStage"]; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/v1/pipelines/{pipelineId}/stages/{stageId}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - /** Update details of a stage within a pipeline */ - put: { - parameters: { - query?: never; - header?: never; - path: { - pipelineId: string; - stageId: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - name?: string; - instanceId?: string; - deviceId?: string; - deviceGroupId?: string; - /** @enum {string} */ - action?: "create_snapshot" | "use_active_snapshot" | "use_latest_snapshot" | "prompt" | "none"; - gitTokenId?: string; - url?: string; - branch?: string; - pullBranch?: string; - pushPath?: string; - pullPath?: string; - credentialSecret?: string; - source?: string; - }; - }; - }; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["PipelineStage"]; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - post?: never; - /** Delete a pipeline stage */ - delete: { - parameters: { - query?: never; - header?: never; - path: { - pipelineId: string; - stageId: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIStatus"]; - }; - }; - /** @description Default Response */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/v1/pipelines/{pipelineId}/stages/{stageId}/deploy": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - /** Triggers a pipeline stage */ - put: { - parameters: { - query?: never; - header?: never; - path: { - pipelineId: string; - stageId: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - /** @description The snapshot to deploy if the stage action is set to "prompt" */ - sourceSnapshotId?: string; - } | null; - }; - }; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIStatus"]; - }; - }; - /** @description Default Response */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/v1/applications/{applicationId}/pipelines": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** List all pipelines within an application */ - get: { - parameters: { - query?: never; - header?: never; - path: { - applicationId: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - count?: number; - pipelines?: components["schemas"]["PipelineList"]; - }; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/v1/teams/{teamId}/pipelines/": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path: { - teamId: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - count?: number; - pipelines?: components["schemas"]["PipelineList"]; - }; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/v1/applications/{applicationId}/bom": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get application BOM */ - get: { - parameters: { - query?: never; - header?: never; - path: { - applicationId: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["ApplicationBom"]; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/v1/teams/{teamId}/bom": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get team BOM */ - get: { - parameters: { - query?: never; - header?: never; - path: { - teamId: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["ApplicationBom"][]; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/v1/flow-blueprints/": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get a list of the available flow blueprints */ - get: { - parameters: { - query?: { - query?: string; - cursor?: string; - limit?: number; - page?: number; - sort?: string; - dir?: "asc" | "desc"; - order?: "asc" | "desc"; - }; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - meta?: components["schemas"]["PaginationMeta"]; - count?: number; - blueprints?: components["schemas"]["FlowBlueprintSummaryList"]; - }; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - put?: never; - /** Create a flow blueprint - admin-only */ - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": WithRequired; - }; - }; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FlowBlueprintSummary"]; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/v1/flow-blueprints/{flowBlueprintId}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get full details of a flow blueprint */ - get: { - parameters: { - query?: never; - header?: never; - path: { - flowBlueprintId: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FlowBlueprint"]; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - /** Update a flow blueprint - admin-only */ - put: { - parameters: { - query?: never; - header?: never; - path: { - flowBlueprintId: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["FlowBlueprintInput"]; - }; - }; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FlowBlueprintSummary"]; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - post?: never; - /** Delete a flow blueprint - admin-only */ - delete: { - parameters: { - query?: never; - header?: never; - path: { - flowBlueprintId: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIStatus"]; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/v1/flow-blueprints/export": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Export one or more Blueprints */ - get: { - parameters: { - query?: { - id?: string[]; - }; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - count?: number; - } & components["schemas"]["FlowBlueprintExport"]; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/v1/flow-blueprints/import": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Import one or more Blueprints */ - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - blueprints: { - [key: string]: unknown; - }[]; - count?: number; - }; - }; - }; - responses: { - /** @description Default Response */ - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - blueprints?: components["schemas"]["FlowBlueprintSummary"][]; - count?: number; - }; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/v1/applications/{applicationId}/device-groups/": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get a list of device groups in an application */ - get: { - parameters: { - query?: { - query?: string; - cursor?: string; - limit?: number; - page?: number; - sort?: string; - dir?: "asc" | "desc"; - order?: "asc" | "desc"; - }; - header?: never; - path: { - applicationId: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - meta?: components["schemas"]["PaginationMeta"]; - count?: number; - groups?: components["schemas"]["DeviceGroupSummary"][]; - }; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - put?: never; - /** Add a new Device Group to an Application */ - post: { - parameters: { - query?: never; - header?: never; - path: { - applicationId: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - name: string; - description?: string; - }; - }; - }; - responses: { - /** @description Default Response */ - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["DeviceGroupSummary"]; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/v1/applications/{applicationId}/device-groups/{groupId}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get a specific Device Group */ - get: { - parameters: { - query?: never; - header?: never; - path: { - applicationId: string; - groupId: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["DeviceGroup"]; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - /** Update a Device Group */ - put: { - parameters: { - query?: never; - header?: never; - path: { - applicationId: string; - groupId: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - name?: string; - description?: string; - targetSnapshotId?: string | null; - }; - }; - }; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": Record; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - post?: never; - /** Delete a Device Group */ - delete: { - parameters: { - query?: never; - header?: never; - path: { - applicationId: string; - groupId: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": Record; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - options?: never; - head?: never; - /** Update Device Group membership */ - patch: { - parameters: { - query?: never; - header?: never; - path: { - applicationId: string; - groupId: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - add?: string[]; - remove?: string[]; - set?: string[]; - }; - }; - }; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": Record; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - trace?: never; - }; - "/api/v1/applications/{applicationId}/device-groups/{groupId}/settings": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - /** Update a Device Group Settings */ - put: { - parameters: { - query?: never; - header?: never; - path: { - applicationId: string; - groupId: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - env?: { - [key: string]: unknown; - }[]; - }; - }; - }; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIStatus"]; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/v1/teams/{teamId}/device-groups/": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get a list of device groups in an application */ - get: { - parameters: { - query?: { - query?: string; - cursor?: string; - limit?: number; - page?: number; - sort?: string; - dir?: "asc" | "desc"; - order?: "asc" | "desc"; - }; - header?: never; - path: { - applicationId: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - meta?: components["schemas"]["PaginationMeta"]; - count?: number; - groups?: components["schemas"]["DeviceGroupSummary"][]; - }; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/v1/projects/{projectId}/files/_/{path}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** List files stored in the instance */ - get: { - parameters: { - query?: never; - header?: never; - path: { - instanceId: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - /** Update file properties in the instance */ - put: { - parameters: { - query?: never; - header?: never; - path: { - instanceId: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - path?: string; - share?: { - [key: string]: unknown; - }; - }; - }; - }; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - /** Upload a file to the instance/Create directory */ - post: { - parameters: { - query?: never; - header?: never; - path: { - instanceId: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - /** Delete a file in the instance */ - delete: { - parameters: { - query?: never; - header?: never; - path: { - instanceId: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/v1/teams/{teamId}/broker/clients": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** List MQTT clients for the team */ - get: { - parameters: { - query?: { - query?: string; - cursor?: string; - limit?: number; - page?: number; - sort?: string; - dir?: "asc" | "desc"; - order?: "asc" | "desc"; - }; - header?: never; - path: { - teamId: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - clients?: unknown[]; - meta?: components["schemas"]["PaginationMeta"]; - count?: number; - } & { - [key: string]: unknown; - }; - }; - }; - /** @description Default Response */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/v1/teams/{teamId}/broker/client": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Create new MQTT client for the team */ - post: { - parameters: { - query?: never; - header?: never; - path: { - teamId: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - acls?: unknown[]; - username?: string; - password?: string; - }; - }; - }; - responses: { - /** @description Default Response */ - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - id?: string; - username?: string; - acls?: unknown[]; - }; - }; - }; - /** @description Default Response */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/v1/teams/{teamId}/broker/client/{username}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get details about a specific MQTT client */ - get: { - parameters: { - query?: never; - header?: never; - path: { - teamId: string; - username: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - id?: string; - username?: string; - acls?: unknown[]; - owner?: null | { - /** @enum {string} */ - instanceType?: "instance" | "device"; - id?: string; - name?: string; - }; - }; - }; - }; - /** @description Default Response */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - /** Modify a MQTT Client */ - put: { - parameters: { - query?: never; - header?: never; - path: { - teamId: string; - username: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - password?: string; - acls?: unknown[]; - } | { - password?: string; - } | { - acls?: unknown[]; - }; - }; - }; - responses: { - /** @description Default Response */ - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - id?: string; - username?: string; - acls?: unknown[]; - }; - }; - }; - /** @description Default Response */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - post?: never; - /** Delete a MQTT client */ - delete: { - parameters: { - query?: never; - header?: never; - path: { - teamId: string; - username: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIStatus"]; - }; - }; - /** @description Default Response */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/v1/teams/{teamId}/broker/client/{username}/link": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Link a MQTT client to a device or project */ - post: { - parameters: { - query?: never; - header?: never; - path: { - teamId: string; - username: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - /** @enum {string} */ - ownerType?: "device" | "instance"; - ownerId?: string; - password?: string; - } & ({ - password: string; - } | { - /** @enum {string} */ - ownerType: "device" | "instance"; - ownerId: string; - password?: string; - }); - }; - }; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - id?: string; - username?: string; - acls?: unknown[]; - owner?: { - /** @enum {string} */ - type?: "instance" | "device"; - id?: string; - name?: string; - }; - }; - }; - }; - /** @description Default Response */ - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - id?: string; - username?: string; - acls?: unknown[]; - owner?: { - /** @enum {string} */ - instanceType?: "instance" | "device"; - id?: string; - name?: string; - }; - }; - }; - }; - /** @description Default Response */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/v1/teams/{teamId}/brokers": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get credentials for 3rd party MQTT brokers */ - get: { - parameters: { - query?: never; - header?: never; - path: { - teamId: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - meta?: components["schemas"]["PaginationMeta"]; - count?: number; - brokers?: components["schemas"]["MQTTBroker"][]; - } & { - [key: string]: unknown; - }; - }; - }; - /** @description Default Response */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - put?: never; - /** Create credentials for a 3rd party MQTT broker */ - post: { - parameters: { - query?: never; - header?: never; - path: { - teamId: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["MQTTBrokerInput"]; - }; - }; - responses: { - /** @description Default Response */ - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["MQTTBroker"]; - }; - }; - /** @description Default Response */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/v1/teams/{teamId}/brokers/{brokerId}/credentials": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Gets credentials for a 3rd party MQTT broker */ - get: { - parameters: { - query?: never; - header?: never; - path: { - teamId: string; - brokerId: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["MQTTBroker"]; - }; - }; - /** @description Default Response */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/v1/teams/{teamId}/brokers/{brokerId}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get 3rd Party Broker details and status */ - get: { - parameters: { - query?: never; - header?: never; - path: { - teamId: string; - brokerId: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["MQTTBroker"] | { - state: string; - }; - }; - }; - /** @description Default Response */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - /** Delete credentials for a 3rd party MQTT broker */ - put: { - parameters: { - query?: never; - header?: never; - path: { - teamId: string; - brokerId: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["MQTTBrokerInput"]; - }; - }; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["MQTTBroker"]; - }; - }; - /** @description Default Response */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - post?: never; - /** Delete credentials for a 3rd party MQTT broker */ - delete: { - parameters: { - query?: never; - header?: never; - path: { - teamId: string; - brokerId: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - [key: string]: unknown; - }; - }; - }; - /** @description Default Response */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/v1/teams/{teamId}/brokers/{brokerId}/topics": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path: { - teamId: string; - brokerId: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - [key: string]: unknown; - }; - }; - }; - /** @description Default Response */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - put?: never; - /** Store Topics from a 3rd party MQTT broker */ - post: { - parameters: { - query?: never; - header?: never; - path: { - teamId: string; - brokerId: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Default Response */ - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - topic?: string; - } & { - [key: string]: unknown; - }; - }; - }; - /** @description Default Response */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/v1/teams/{teamId}/brokers/{brokerId}/topics/{topicId}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put: { - parameters: { - query?: never; - header?: never; - path: { - teamId: string; - brokerId: string; - topicId: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Default Response */ - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - [key: string]: unknown; - }; - }; - }; - /** @description Default Response */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - post?: never; - delete: { - parameters: { - query?: never; - header?: never; - path: { - teamId: string; - brokerId: string; - topicId: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Default Response */ - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": Record; - }; - }; - /** @description Default Response */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/v1/projects/{instanceId}/resources/": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Returns resource usage history for an Instance */ - get: { - parameters: { - query?: never; - header?: never; - path: { - instanceId: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - meta?: components["schemas"]["PaginationMeta"]; - resources?: { - src?: string; - ps?: number; - cpu?: number; - hs?: number; - hu?: number; - ts?: number; - }[]; - count?: number; - }; - }; - }; - /** @description Default Response */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/v1/teams/{teamId}/databases/": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path: { - teamId: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["DatabaseCredentials"][]; - }; - }; - /** @description Default Response */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path: { - teamId: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - /** @description Name of the database */ - name?: string; - }; - }; - }; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["DatabaseCredentials"]; - }; - }; - /** @description Default Response */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/v1/teams/{teamId}/databases/{databaseId}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path: { - databaseId: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["DatabaseCredentials"]; - }; - }; - /** @description Default Response */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - put?: never; - post?: never; - delete: { - parameters: { - query?: never; - header?: never; - path: { - databaseId: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": unknown; - }; - }; - /** @description Default Response */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/v1/teams/{teamId}/databases/{databaseId}/tables": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: { - query?: string; - cursor?: string; - limit?: number; - page?: number; - sort?: string; - dir?: "asc" | "desc"; - order?: "asc" | "desc"; - }; - header?: never; - path: { - databaseId: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - count?: number; - tables?: { - name?: string; - schema?: string; - }[]; - meta?: { - [key: string]: unknown; - }; - }; - }; - }; - /** @description Default Response */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path: { - databaseId: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - name?: string; - columns?: components["schemas"]["DatabaseTable"]; - }; - }; - }; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["DatabaseTable"]; - }; - }; - /** @description Default Response */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/v1/teams/{teamId}/databases/{databaseId}/tables/{tableName}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path: { - databaseId: string; - tableName: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["DatabaseTable"]; - }; - }; - /** @description Default Response */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - put?: never; - post?: never; - delete: { - parameters: { - query?: never; - header?: never; - path: { - databaseId: string; - tableName: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["DatabaseTable"]; - }; - }; - /** @description Default Response */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/v1/teams/{teamId}/databases/{databaseId}/tables/{tableName}/data": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: { - query?: string; - cursor?: string; - limit?: number; - page?: number; - sort?: string; - dir?: "asc" | "desc"; - order?: "asc" | "desc"; - }; - header?: never; - path: { - databaseId: string; - tableName: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - count?: number; - rows?: { - [key: string]: unknown; - }[]; - meta?: { - [key: string]: unknown; - }; - }; - }; - }; - /** @description Default Response */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/v1/teams/{teamId}/mcp/": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path: { - teamId: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - count?: number; - servers?: components["schemas"]["MCPRegistrationSummaryList"]; - }; - }; - }; - /** @description Default Response */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/v1/teams/{teamId}/mcp/{type}/{typeId}/{nodeId}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path: { - teamId: string; - type: string; - typeId: string; - nodeId: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - name?: string; - endpointRoute?: string; - protocol?: string; - title?: string; - version?: string; - description?: string; - }; - }; - }; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": Record; - }; - }; - /** @description Default Response */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - delete: { - parameters: { - query?: never; - header?: never; - path: { - teamId: string; - type: string; - typeId: string; - nodeId: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": Record; - }; - }; - /** @description Default Response */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/v1/projects/{projectId}/autoUpdateStack/": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Returns when a Instance allowed to be restarted */ - get: { - parameters: { - query?: never; - header?: never; - path: { - projectId: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - hour?: number; - day?: number; - restart?: boolean; - }[]; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - /** Sets when an Instance can be restarted */ - put: { - parameters: { - query?: never; - header?: never; - path: { - projectId: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - schedule?: { - hour?: number; - day?: number; - restart?: boolean; - }[]; - }; - }; - }; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - hour?: number; - day?: number; - restart?: boolean; - }[]; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - post?: never; - /** Clears when an Instance can be restarted */ - delete: { - parameters: { - query?: never; - header?: never; - path: { - projectId: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": unknown; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; } export type webhooks = Record; export interface components { @@ -10823,6 +7699,7 @@ export interface components { applications?: { [key: string]: unknown; }; + sso?: boolean; }; /** TeamMemberList */ TeamMemberList: ({ @@ -10912,147 +7789,6 @@ export interface components { } & { [key: string]: unknown; }; - /** Pipeline */ - Pipeline: { - id: string; - name: string; - stages: components["schemas"]["PipelineStageList"]; - application?: { - id: string; - name: string; - }; - }; - /** PipelineList */ - PipelineList: components["schemas"]["Pipeline"][]; - /** PipelineStage */ - PipelineStage: { - id: string; - name: string; - deployToDevices: boolean; - instances?: components["schemas"]["InstanceSummaryList"]; - devices?: components["schemas"]["DeviceSummary"][]; - deviceGroups?: components["schemas"]["DeviceGroupPipelineSummary"][]; - gitRepo?: { - gitTokenId: string; - url: string; - branch: string; - pullBranch: string; - pushPath: string; - pullPath: string; - lastPushAt: string | null; - lastPullAt: string | null; - status: string | null; - statusMessage: string | null; - credentialSecret: boolean; - }; - /** @enum {string} */ - action: "create_snapshot" | "use_active_snapshot" | "use_latest_snapshot" | "prompt" | "none"; - NextStageId?: string; - }; - /** PipelineStageList */ - PipelineStageList: components["schemas"]["PipelineStage"][]; - /** FlowBlueprintSummary */ - FlowBlueprintSummary: { - id: string; - active?: boolean; - name: string; - description?: string; - category?: string; - icon?: string | null; - order?: number; - default?: boolean; - createdAt: string; - updatedAt: string; - externalUrl?: string | null; - }; - /** FlowBlueprint */ - FlowBlueprint: { - flows: { - [key: string]: unknown; - }; - modules: { - [key: string]: unknown; - }; - teamTypeScope: string[] | null; - } & components["schemas"]["FlowBlueprintSummary"]; - /** FlowBlueprintInput */ - FlowBlueprintInput: { - active?: boolean; - name?: string; - description?: string; - category?: string; - icon?: string | null; - order?: number; - default?: boolean; - externalUrl?: string | null; - flows?: { - [key: string]: unknown; - }; - modules?: { - [key: string]: unknown; - }; - teamTypeScope?: string[] | null; - }; - /** FlowBlueprintSummaryList */ - FlowBlueprintSummaryList: components["schemas"]["FlowBlueprintSummary"][]; - /** FlowBlueprintExport */ - FlowBlueprintExport: { - blueprints: { - id?: string; - name: string; - description: string; - category: string; - icon: string | null; - flows: { - [key: string]: unknown; - }; - modules: { - [key: string]: unknown; - }; - }[]; - count: number; - }; - /** MCPRegistrationSummary */ - MCPRegistrationSummary: { - id: string; - name: string; - protocol: string; - /** @enum {string} */ - targetType: "instance" | "device"; - targetId: string; - nodeId: string; - endpointRoute: string; - teamId: string; - title: string; - version: string; - description: string; - }; - /** MCPRegistrationSummaryList */ - MCPRegistrationSummaryList: components["schemas"]["MCPRegistrationSummary"][]; - /** DatabaseCredentials */ - DatabaseCredentials: { - id: string; - name: string; - credentials: { - host: string; - port: number; - ssl: boolean; - database: string; - user: string; - password: string; - }; - }; - /** DatabaseTable */ - DatabaseTable: ({ - name: string; - type: string; - nullable?: boolean; - default?: string | null; - generated?: boolean; - maxLength?: number | null; - } & { - [key: string]: unknown; - })[]; }; responses: never; parameters: never; @@ -11128,19 +7864,6 @@ export type ApiError = components['schemas']['APIError']; export type PaginationParams = components['schemas']['PaginationParams']; export type PaginationMeta = components['schemas']['PaginationMeta']; export type LinksMeta = components['schemas']['LinksMeta']; -export type Pipeline = components['schemas']['Pipeline']; -export type PipelineList = components['schemas']['PipelineList']; -export type PipelineStage = components['schemas']['PipelineStage']; -export type PipelineStageList = components['schemas']['PipelineStageList']; -export type FlowBlueprintSummary = components['schemas']['FlowBlueprintSummary']; -export type FlowBlueprint = components['schemas']['FlowBlueprint']; -export type FlowBlueprintInput = components['schemas']['FlowBlueprintInput']; -export type FlowBlueprintSummaryList = components['schemas']['FlowBlueprintSummaryList']; -export type FlowBlueprintExport = components['schemas']['FlowBlueprintExport']; -export type McpRegistrationSummary = components['schemas']['MCPRegistrationSummary']; -export type McpRegistrationSummaryList = components['schemas']['MCPRegistrationSummaryList']; -export type DatabaseCredentials = components['schemas']['DatabaseCredentials']; -export type DatabaseTable = components['schemas']['DatabaseTable']; export type $defs = Record; type WithRequired = T & { [P in K]-?: T[P]; diff --git a/openapi.json b/openapi.json index 2d3396d4ac..b2a03c9bb1 100644 --- a/openapi.json +++ b/openapi.json @@ -2197,4639 +2197,15 @@ }, "additionalProperties": true, "title": "LinksMeta" - }, - "Pipeline": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "stages": { - "$ref": "#/components/schemas/PipelineStageList" - }, - "application": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "required": [ - "id", - "name" - ], - "additionalProperties": false - } - }, - "required": [ - "id", - "name", - "stages" - ], - "additionalProperties": false, - "title": "Pipeline" - }, - "PipelineList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Pipeline" - }, - "title": "PipelineList" - }, - "PipelineStage": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "deployToDevices": { - "type": "boolean" - }, - "instances": { - "$ref": "#/components/schemas/InstanceSummaryList" - }, - "devices": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceSummary" - } - }, - "deviceGroups": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceGroupPipelineSummary" - } - }, - "gitRepo": { - "type": "object", - "properties": { - "gitTokenId": { - "type": "string" - }, - "url": { - "type": "string" - }, - "branch": { - "type": "string" - }, - "pullBranch": { - "type": "string" - }, - "pushPath": { - "type": "string" - }, - "pullPath": { - "type": "string" - }, - "lastPushAt": { - "type": "string", - "nullable": true - }, - "lastPullAt": { - "type": "string", - "nullable": true - }, - "status": { - "type": "string", - "nullable": true - }, - "statusMessage": { - "type": "string", - "nullable": true - }, - "credentialSecret": { - "type": "boolean" - } - }, - "required": [ - "gitTokenId", - "url", - "branch", - "pullBranch", - "pushPath", - "pullPath", - "lastPushAt", - "lastPullAt", - "status", - "statusMessage", - "credentialSecret" - ], - "additionalProperties": false - }, - "action": { - "type": "string", - "enum": [ - "create_snapshot", - "use_active_snapshot", - "use_latest_snapshot", - "prompt", - "none" - ] - }, - "NextStageId": { - "type": "string" - } - }, - "required": [ - "id", - "name", - "action", - "deployToDevices" - ], - "additionalProperties": false, - "title": "PipelineStage" - }, - "PipelineStageList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PipelineStage" - }, - "title": "PipelineStageList" - }, - "FlowBlueprintSummary": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "active": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "category": { - "type": "string" - }, - "icon": { - "type": "string", - "nullable": true - }, - "order": { - "type": "number" - }, - "default": { - "type": "boolean" - }, - "createdAt": { - "type": "string" - }, - "updatedAt": { - "type": "string" - }, - "externalUrl": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "name", - "createdAt", - "updatedAt" - ], - "title": "FlowBlueprintSummary" - }, - "FlowBlueprint": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/FlowBlueprintSummary" - } - ], - "properties": { - "flows": { - "type": "object", - "additionalProperties": true - }, - "modules": { - "type": "object", - "additionalProperties": true - }, - "teamTypeScope": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - } - }, - "required": [ - "flows", - "modules", - "teamTypeScope" - ], - "title": "FlowBlueprint" - }, - "FlowBlueprintInput": { - "type": "object", - "properties": { - "active": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "category": { - "type": "string" - }, - "icon": { - "type": "string", - "nullable": true - }, - "order": { - "type": "number" - }, - "default": { - "type": "boolean" - }, - "externalUrl": { - "type": "string", - "nullable": true - }, - "flows": { - "type": "object", - "additionalProperties": true - }, - "modules": { - "type": "object", - "additionalProperties": true - }, - "teamTypeScope": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - } - }, - "title": "FlowBlueprintInput" - }, - "FlowBlueprintSummaryList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FlowBlueprintSummary" - }, - "title": "FlowBlueprintSummaryList" - }, - "FlowBlueprintExport": { - "type": "object", - "properties": { - "blueprints": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "category": { - "type": "string" - }, - "icon": { - "type": "string", - "nullable": true - }, - "flows": { - "type": "object", - "additionalProperties": true - }, - "modules": { - "type": "object", - "additionalProperties": true - } - }, - "required": [ - "name", - "description", - "category", - "icon", - "flows", - "modules" - ], - "additionalProperties": false - } - }, - "count": { - "type": "integer" - } - }, - "required": [ - "blueprints", - "count" - ], - "additionalProperties": false, - "title": "FlowBlueprintExport" - }, - "MCPRegistrationSummary": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "protocol": { - "type": "string" - }, - "targetType": { - "type": "string", - "enum": [ - "instance", - "device" - ] - }, - "targetId": { - "type": "string" - }, - "nodeId": { - "type": "string" - }, - "endpointRoute": { - "type": "string" - }, - "teamId": { - "type": "string" - }, - "title": { - "type": "string" - }, - "version": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "required": [ - "id", - "name", - "protocol", - "targetType", - "targetId", - "nodeId", - "endpointRoute", - "teamId", - "title", - "version", - "description" - ], - "additionalProperties": false, - "title": "MCPRegistrationSummary" - }, - "MCPRegistrationSummaryList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MCPRegistrationSummary" - }, - "title": "MCPRegistrationSummaryList" - }, - "DatabaseCredentials": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "credentials": { - "type": "object", - "properties": { - "host": { - "type": "string" - }, - "port": { - "type": "number" - }, - "ssl": { - "type": "boolean" - }, - "database": { - "type": "string" - }, - "user": { - "type": "string" - }, - "password": { - "type": "string" - } - }, - "required": [ - "host", - "port", - "ssl", - "database", - "user", - "password" - ], - "additionalProperties": false - } - }, - "required": [ - "id", - "name", - "credentials" - ], - "additionalProperties": false, - "title": "DatabaseCredentials" - }, - "DatabaseTable": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "nullable": { - "type": "boolean" - }, - "default": { - "type": "string", - "nullable": true - }, - "generated": { - "type": "boolean" - }, - "maxLength": { - "type": "number", - "nullable": true - } - }, - "required": [ - "name", - "type" - ], - "additionalProperties": true - }, - "title": "DatabaseTable" - } - } - }, - "paths": { - "/api/v1/settings/": { - "get": { - "summary": "Get platform settings", - "tags": [ - "Platform" - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "put": { - "summary": "Update platform settings", - "tags": [ - "Platform" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object" - } - } - } - }, - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/admin/stats": { - "get": { - "summary": "Get a platform stats - admin-only", - "tags": [ - "Platform" - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": true - } - }, - "application/openmetrics-text": { - "schema": { - "type": "string" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/admin/license": { - "get": { - "summary": "Get a platform license - admin-only", - "tags": [ - "Platform" - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "put": { - "summary": "Apply a platform license - admin-only", - "tags": [ - "Platform" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "license", - "action" - ], - "properties": { - "license": { - "type": "string" - }, - "action": { - "type": "string" - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/admin/invitations": { - "get": { - "summary": "Get a list of all invitations - admin-only", - "tags": [ - "Platform" - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "count": { - "type": "number" - }, - "invitations": { - "$ref": "#/components/schemas/InvitationList" - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/admin/audit-log": { - "get": { - "summary": "Get platform audit event entries - admin-only", - "tags": [ - "Platform" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "query", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "cursor", - "required": false - }, - { - "schema": { - "type": "number" - }, - "in": "query", - "name": "limit", - "required": false - }, - { - "schema": { - "type": "number", - "minimum": 1 - }, - "in": "query", - "name": "page", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "sort", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "dir", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "order", - "required": false - }, - { - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - }, - "in": "query", - "name": "event", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "username", - "required": false - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - }, - "count": { - "type": "number" - }, - "log": { - "$ref": "#/components/schemas/AuditLogEntryList" - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/admin/audit-log/export": { - "get": { - "summary": "Gets platform audit events as CSV - admin-only", - "tags": [ - "Platform" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "query", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "cursor", - "required": false - }, - { - "schema": { - "type": "number" - }, - "in": "query", - "name": "limit", - "required": false - }, - { - "schema": { - "type": "number", - "minimum": 1 - }, - "in": "query", - "name": "page", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "sort", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "dir", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "order", - "required": false - }, - { - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - }, - "in": "query", - "name": "event", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "username", - "required": false - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "text/csv": { - "schema": { - "type": "string" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/admin/stats-token": { - "post": { - "summary": "Regenerate platform stats access token - admin-only", - "tags": [ - "Platform" - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "token": { - "type": "string" - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "delete": { - "summary": "Remove platform stats access token - admin-only", - "tags": [ - "Platform" - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/admin/expert-agent-creds": { - "post": { - "summary": "Regenerate expert agent credentials - admin-only", - "tags": [ - "Platform" - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "username": { - "type": "string" - }, - "password": { - "type": "string" - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "delete": { - "summary": "Remove expert agent credentials - admin-only", - "tags": [ - "Platform" - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/admin/announcements": { - "post": { - "summary": "Send platform wide announcements", - "tags": [ - "Platform", - "Notifications", - "Announcements" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "message", - "title", - "filter" - ], - "properties": { - "message": { - "type": "string" - }, - "title": { - "type": "string" - }, - "filter": { - "type": "object", - "properties": { - "roles": { - "type": "array", - "items": { - "type": "number" - } - } - } - }, - "mock": { - "type": "boolean" - }, - "to": { - "type": "object" - }, - "url": { - "type": "string" - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "recipientCount": { - "type": "number" - }, - "mock": { - "type": "boolean" - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/user/": { - "get": { - "summary": "Get the current user profile", - "tags": [ - "User" - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "put": { - "summary": "Update the current users settings", - "tags": [ - "User" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "username": { - "type": "string" - }, - "email": { - "type": "string" - }, - "tcs_accepted": { - "type": "boolean" - }, - "defaultTeam": { - "type": "string" - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "delete": { - "summary": "Delete the current user", - "tags": [ - "User" - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/user/change_password": { - "put": { - "summary": "Change the current users password", - "tags": [ - "User" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "old_password", - "password" - ], - "properties": { - "old_password": { - "type": "string", - "description": "the old password" - }, - "password": { - "type": "string" - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/user/teams": { - "get": { - "summary": "Get a list of the current users teams", - "tags": [ - "User" - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - }, - "count": { - "type": "number" - }, - "teams": { - "$ref": "#/components/schemas/UserTeamList" - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/user/tokens": { - "get": { - "summary": "List users Personal Access Tokens", - "tags": [ - "Tokens" - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "count": { - "type": "number" - }, - "tokens": { - "$ref": "#/components/schemas/PersonalAccessTokenSummaryList" - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "post": { - "summary": "Create user Personal Access Token", - "tags": [ - "Tokens" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "scope": { - "type": "string" - }, - "expiresAt": { - "type": "number" - }, - "name": { - "type": "string" - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PersonalAccessToken" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/user/tokens/{id}": { - "delete": { - "summary": "Delete user Personal Access Token", - "tags": [ - "Tokens" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "id", - "required": true - } - ], - "responses": { - "204": { - "description": "empty response" - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "put": { - "summary": "Update users Personal Access Token", - "tags": [ - "Tokens" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "scope": { - "type": "string" - }, - "expiresAt": { - "type": "number" - } - } - } - } - } - }, - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "id", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PersonalAccessTokenSummary" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/user/expert-creds": { - "post": { - "summary": "Initialize expert chat", - "tags": [ - "User" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "sessionId": { - "type": "string", - "minLength": 8 - } - }, - "required": [ - "sessionId" - ] - } - } - } - }, - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "username": { - "type": "string" - }, - "password": { - "type": "string" - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/user/invitations/": { - "get": { - "summary": "Get a list of the current users invitations", - "tags": [ - "User" - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - }, - "count": { - "type": "number" - }, - "invitations": { - "$ref": "#/components/schemas/InvitationList" - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/user/invitations/{invitationId}": { - "patch": { - "summary": "Accept an invitation", - "tags": [ - "User" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "invitationId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "delete": { - "summary": "Reject an invitation", - "tags": [ - "User" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "invitationId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/user/notifications/": { - "get": { - "summary": "Get the notifications for a user", - "tags": [ - "User" - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - }, - "count": { - "type": "number" - }, - "notifications": { - "$ref": "#/components/schemas/NotificationList" - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "put": { - "summary": "Bulk update notifications", - "tags": [ - "User" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "ids": { - "type": "array", - "items": { - "type": "string" - } - }, - "read": { - "type": "boolean" - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - }, - "count": { - "type": "number" - }, - "notifications": { - "$ref": "#/components/schemas/NotificationList" - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/user/notifications/{notificationId}": { - "put": { - "summary": "Mark notification as read", - "tags": [ - "User" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "read": { - "type": "boolean" - } - } - } - } - } - }, - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "notificationId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "delete": { - "summary": "Delete notifications", - "tags": [ - "User" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "notificationId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/users/": { - "get": { - "summary": "Get a list of all users (admin-only)", - "tags": [ - "Users" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "query", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "cursor", - "required": false - }, - { - "schema": { - "type": "number" - }, - "in": "query", - "name": "limit", - "required": false - }, - { - "schema": { - "type": "number", - "minimum": 1 - }, - "in": "query", - "name": "page", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "sort", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "dir", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "order", - "required": false - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - }, - "count": { - "type": "number" - }, - "users": { - "$ref": "#/components/schemas/UserList" - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "post": { - "summary": "Create a new user (admin-only)", - "tags": [ - "Users" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "name", - "username", - "password" - ], - "properties": { - "name": { - "type": "string" - }, - "username": { - "type": "string" - }, - "password": { - "type": "string" - }, - "email": { - "type": "string" - }, - "isAdmin": { - "type": "boolean" - }, - "createDefaultTeam": { - "type": "boolean" - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/users/{userId}": { - "get": { - "summary": "Get a user profile (admin-only)", - "tags": [ - "Users" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "userId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "put": { - "summary": "Update a users settings (admin-only)", - "tags": [ - "Users" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "username": { - "type": "string" - }, - "email": { - "type": "string" - }, - "tcs_accepted": { - "type": "boolean" - }, - "email_verified": { - "type": "boolean" - }, - "admin": { - "type": "boolean" - }, - "password_expired": { - "type": "boolean" - }, - "suspended": { - "type": "boolean" - }, - "defaultTeam": { - "type": "string" - }, - "mfa_enabled": { - "type": "boolean" - } - } - } - } - } - }, - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "userId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "delete": { - "summary": "Delete a user (admin-only)", - "tags": [ - "Users" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "userId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/users/{userId}/teams": { - "get": { - "summary": "Get a list of a users teams (admin-only)", - "tags": [ - "Users" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "userId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "count": { - "type": "number" - }, - "teams": { - "$ref": "#/components/schemas/UserTeamList" - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/teams/check-slug": { - "post": { - "summary": "Check a team slug is available", - "tags": [ - "Teams" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "slug" - ], - "properties": { - "slug": { - "type": "string" - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Team slug is available", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "409": { - "description": "Team slug is not available", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/teams/{teamId}": { - "get": { - "summary": "Get details of a team", - "tags": [ - "Teams" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/Team" - }, - { - "$ref": "#/components/schemas/TeamSummary" - } - ] - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "delete": { - "summary": "Delete a team", - "tags": [ - "Teams" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "put": { - "summary": "Update a team", - "tags": [ - "Teams" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "slug": { - "type": "string" - }, - "type": { - "type": "string" - }, - "suspended": { - "type": "boolean" - }, - "properties": { - "type": "object" - }, - "features": { - "type": "object" - } - } - } - } - } - }, - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Team" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/teams/slug/{teamSlug}": { - "get": { - "summary": "Get details of a team using its slug", - "tags": [ - "Teams" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamSlug", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/Team" - }, - { - "$ref": "#/components/schemas/TeamSummary" - } - ] - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/teams/": { - "get": { - "summary": "Get a list of all teams - admin-only", - "tags": [ - "Teams" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "query", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "cursor", - "required": false - }, - { - "schema": { - "type": "number" - }, - "in": "query", - "name": "limit", - "required": false - }, - { - "schema": { - "type": "number", - "minimum": 1 - }, - "in": "query", - "name": "page", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "sort", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "dir", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "order", - "required": false - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - }, - "count": { - "type": "number" - }, - "teams": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Team" - } - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "post": { - "summary": "Create a new team", - "tags": [ - "Teams" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "name", - "type" - ], - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "slug": { - "type": "string" - }, - "trial": { - "type": "boolean" - }, - "billingInterval": { - "type": "string", - "enum": [ - "month", - "year" - ] - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Team" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/teams/{teamId}/applications": { - "get": { - "summary": "Get a list of the teams applications", - "tags": [ - "Teams" - ], - "parameters": [ - { - "schema": { - "type": "number" - }, - "in": "query", - "name": "associationsLimit", - "required": false - }, - { - "schema": { - "type": "boolean" - }, - "in": "query", - "name": "includeInstances", - "required": false - }, - { - "schema": { - "type": "boolean" - }, - "in": "query", - "name": "includeApplicationDevices", - "required": false - }, - { - "schema": { - "type": "boolean" - }, - "in": "query", - "name": "excludeOwnerFiltering", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "count": { - "type": "number" - }, - "applications": { - "$ref": "#/components/schemas/TeamApplicationList" - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/teams/{teamId}/applications/status": { - "get": { - "summary": "Get a list of the teams applications statuses", - "tags": [ - "Teams" - ], - "parameters": [ - { - "schema": { - "type": "number" - }, - "in": "query", - "name": "associationsLimit", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "count": { - "type": "number" - }, - "applications": { - "$ref": "#/components/schemas/ApplicationAssociationsStatusList" - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/teams/{teamId}/comms-credentials": { - "post": { - "summary": "Issue team-channel broker credentials for the current user/session", - "tags": [ - "Teams" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "sessionId": { - "type": "string" - } - } - } - } - } - }, - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "username": { - "type": "string" - }, - "password": { - "type": "string" - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/teams/{teamId}/user": { - "get": { - "summary": "Get the current users team membership", - "tags": [ - "Teams" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "role": { - "type": "number" - }, - "permissions": { - "$ref": "#/components/schemas/TeamMemberPermissions" - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/teams/{teamId}/audit-log": { - "get": { - "summary": "Get team audit event entries", - "tags": [ - "Teams" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "query", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "cursor", - "required": false - }, - { - "schema": { - "type": "number" - }, - "in": "query", - "name": "limit", - "required": false - }, - { - "schema": { - "type": "number", - "minimum": 1 - }, - "in": "query", - "name": "page", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "sort", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "dir", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "order", - "required": false - }, - { - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - }, - "in": "query", - "name": "event", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "username", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - }, - "count": { - "type": "number" - }, - "log": { - "$ref": "#/components/schemas/AuditLogEntryList" - }, - "associations": { - "type": "object", - "properties": { - "applications": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ApplicationSummary" - } - }, - "instances": { - "$ref": "#/components/schemas/InstanceSummaryList" - }, - "devices": { - "$ref": "#/components/schemas/DeviceSummaryList" - } - } - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/teams/{teamId}/audit-log/export": { - "get": { - "summary": "Get team audit event entries", - "tags": [ - "Teams" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "query", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "cursor", - "required": false - }, - { - "schema": { - "type": "number" - }, - "in": "query", - "name": "limit", - "required": false - }, - { - "schema": { - "type": "number", - "minimum": 1 - }, - "in": "query", - "name": "page", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "sort", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "dir", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "order", - "required": false - }, - { - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - }, - "in": "query", - "name": "event", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "username", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "text/csv": { - "schema": { - "type": "string" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/teams/{teamId}/members/": { - "get": { - "summary": "Get a list of the teams members", - "tags": [ - "Team Members" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "count": { - "type": "number" - }, - "members": { - "$ref": "#/components/schemas/TeamMemberList" - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/teams/{teamId}/members/{userId}": { - "delete": { - "summary": "Remove a team member", - "tags": [ - "Team Members" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamId", - "required": true - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "userId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "put": { - "summary": "Change a members role", - "tags": [ - "Team Members" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "role": { - "type": "number" - }, - "permissions": { - "$ref": "#/components/schemas/TeamMemberPermissions" - } - } - } - } - } - }, - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamId", - "required": true - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "userId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/teams/{teamId}/invitations/": { - "get": { - "summary": "Get a list of the teams invitations", - "tags": [ - "Team Invitations" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "count": { - "type": "number" - }, - "invitations": { - "$ref": "#/components/schemas/InvitationList" - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "post": { - "summary": "Create an invitation", - "tags": [ - "Team Invitations" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "user": { - "type": "string" - }, - "role": { - "type": "number" - } - }, - "required": [ - "user" - ] - } - } - } - }, - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "string" - }, - "code": { - "type": "string" - }, - "error": { - "type": "object", - "additionalProperties": true - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/teams/{teamId}/invitations/{invitationId}": { - "delete": { - "summary": "Delete an invitation", - "tags": [ - "Team Invitations" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamId", - "required": true - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "invitationId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "post": { - "summary": "Resend an invitation", - "tags": [ - "Team Invitations" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamId", - "required": true - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "invitationId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Invitation" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/teams/{teamId}/devices/": { - "get": { - "summary": "Get a list of all devices in a team", - "tags": [ - "Team Devices" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "query", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "cursor", - "required": false - }, - { - "schema": { - "type": "number" - }, - "in": "query", - "name": "limit", - "required": false - }, - { - "schema": { - "type": "number", - "minimum": 1 - }, - "in": "query", - "name": "page", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "sort", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "dir", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "order", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamId", - "required": true - }, - { - "schema": { - "type": "boolean" - }, - "in": "path", - "name": "statusOnly", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - }, - "count": { - "type": "number" - }, - "devices": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Device" - } - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/teams/{teamId}/devices/provisioning": { - "get": { - "summary": "Get a list of device provisioning tokens in a team", - "tags": [ - "Team Devices" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "query", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "cursor", - "required": false - }, - { - "schema": { - "type": "number" - }, - "in": "query", - "name": "limit", - "required": false - }, - { - "schema": { - "type": "number", - "minimum": 1 - }, - "in": "query", - "name": "page", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "sort", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "dir", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "order", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - }, - "count": { - "type": "number" - }, - "tokens": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProvisioningTokenSummary" - } - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "post": { - "summary": "Create a new provisioning token in a team", - "tags": [ - "Team Devices" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string" - }, - "instance": { - "type": "string" - }, - "application": { - "type": "string" - }, - "expiresAt": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - } - } - } - }, - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProvisioningToken" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/teams/{teamId}/devices/provisioning/{tokenId}": { - "put": { - "summary": "Update a provisioning token in a team", - "tags": [ - "Team Devices" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "instance": { - "type": "string" - }, - "application": { - "type": "string" - }, - "expiresAt": { - "nullable": true, - "type": "string" - } - } - } - } - } - }, - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamId", - "required": true - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "tokenId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProvisioningTokenSummary" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "delete": { - "summary": "Delete a provisioning token", - "tags": [ - "Team Devices" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamId", - "required": true - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "tokenId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/teams/{teamId}/devices/bulk": { - "delete": { - "summary": "Delete devices", - "tags": [ - "Team Devices" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "devices": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1 - } - }, - "required": [ - "devices" - ] - } - } - } - }, - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "put": { - "summary": "Update devices", - "tags": [ - "Team Devices" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "devices" - ], - "properties": { - "devices": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1 - }, - "instance": { - "type": "string", - "nullable": true - }, - "application": { - "type": "string", - "nullable": true - }, - "deviceGroup": { - "type": "string", - "nullable": true - } - } - } - } - } - }, - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - }, - "count": { - "type": "number" - }, - "devices": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Device" - } - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/team-types/": { - "get": { - "summary": "Get a list of the team types", - "tags": [ - "Team Types" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "query", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "cursor", - "required": false - }, - { - "schema": { - "type": "number" - }, - "in": "query", - "name": "limit", - "required": false - }, - { - "schema": { - "type": "number", - "minimum": 1 - }, - "in": "query", - "name": "page", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "sort", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "dir", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "order", - "required": false - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - }, - "count": { - "type": "number" - }, - "types": { - "$ref": "#/components/schemas/TeamTypeList" - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "post": { - "summary": "Create a team type - admin-only", - "tags": [ - "Team Types" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "active": { - "type": "boolean" - }, - "properties": { - "type": "object" - }, - "order": { - "type": "number" - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TeamType" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/team-types/{teamTypeId}": { - "get": { - "summary": "Get details of a team type", - "tags": [ - "Teams" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamTypeId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TeamType" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "put": { - "summary": "Update a team type - admin-only", - "tags": [ - "Team Types" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "active": { - "type": "boolean" - }, - "properties": { - "type": "object" - }, - "order": { - "type": "number" - } - } - } - } - } - }, - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamTypeId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TeamType" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "delete": { - "summary": "Delete a team type - admin-only", - "tags": [ - "Team Types" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamTypeId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/applications/": { - "post": { - "summary": "Create an application", - "tags": [ - "Applications" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "name", - "teamId" - ], - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "teamId": { - "type": "string" - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Application" - } - } - } - }, - "500": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } } - }, - "/api/v1/applications/{applicationId}": { + } + }, + "paths": { + "/api/v1/settings/": { "get": { - "summary": "Get the details of an application", + "summary": "Get platform settings", "tags": [ - "Applications" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "applicationId", - "required": true - } + "Platform" ], "responses": { "200": { @@ -6837,7 +2213,8 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Application" + "type": "object", + "additionalProperties": true } } } @@ -6855,86 +2232,20 @@ } }, "put": { - "summary": "Update an application", - "tags": [ - "Applications" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - } - } - } - } - } - }, - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "applicationId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Application" - } - } - } - }, - "500": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "delete": { - "summary": "Delete an application", + "summary": "Update platform settings", "tags": [ - "Applications" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "applicationId", - "required": true - } + "Platform" ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, "responses": { "200": { "description": "Default Response", @@ -6946,16 +2257,6 @@ } } }, - "500": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - }, "4XX": { "description": "Default Response", "content": { @@ -6969,21 +2270,11 @@ } } }, - "/api/v1/applications/{applicationId}/instances": { + "/api/v1/admin/stats": { "get": { - "summary": "Get a list of an applications instances", + "summary": "Get a platform stats - admin-only", "tags": [ - "Applications" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "applicationId", - "required": true - } + "Platform" ], "responses": { "200": { @@ -6992,14 +2283,12 @@ "application/json": { "schema": { "type": "object", - "properties": { - "count": { - "type": "number" - }, - "instances": { - "$ref": "#/components/schemas/InstanceSummaryList" - } - } + "additionalProperties": true + } + }, + "application/openmetrics-text": { + "schema": { + "type": "string" } } } @@ -7017,86 +2306,11 @@ } } }, - "/api/v1/applications/{applicationId}/devices": { + "/api/v1/admin/license": { "get": { - "summary": "Get a list of all devices in an application", + "summary": "Get a platform license - admin-only", "tags": [ - "Applications" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "query", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "cursor", - "required": false - }, - { - "schema": { - "type": "number" - }, - "in": "query", - "name": "limit", - "required": false - }, - { - "schema": { - "type": "number", - "minimum": 1 - }, - "in": "query", - "name": "page", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "sort", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "dir", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "order", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "applicationId", - "required": true - } + "Platform" ], "responses": { "200": { @@ -7105,20 +2319,7 @@ "application/json": { "schema": { "type": "object", - "properties": { - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - }, - "count": { - "type": "number" - }, - "devices": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Device" - } - } - } + "additionalProperties": true } } } @@ -7134,24 +2335,34 @@ } } } - } - }, - "/api/v1/applications/{applicationId}/instances/status": { - "get": { - "summary": "Get a list of an applications instances status", + }, + "put": { + "summary": "Apply a platform license - admin-only", "tags": [ - "Applications" + "Platform" ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "applicationId", - "required": true + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "license", + "action" + ], + "properties": { + "license": { + "type": "string" + }, + "action": { + "type": "string" + } + } + } + } } - ], + }, "responses": { "200": { "description": "Default Response", @@ -7159,14 +2370,7 @@ "application/json": { "schema": { "type": "object", - "properties": { - "count": { - "type": "number" - }, - "instances": { - "$ref": "#/components/schemas/InstanceStatusList" - } - } + "additionalProperties": true } } } @@ -7184,21 +2388,11 @@ } } }, - "/api/v1/applications/{applicationId}/snapshots": { + "/api/v1/admin/invitations": { "get": { - "summary": "Get a list of all snapshots in an Application", + "summary": "Get a list of all invitations - admin-only", "tags": [ - "Applications" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "applicationId", - "required": true - } + "Platform" ], "responses": { "200": { @@ -7211,14 +2405,8 @@ "count": { "type": "number" }, - "snapshots": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Snapshot" - } - }, - "application": { - "$ref": "#/components/schemas/ApplicationSummary" + "invitations": { + "$ref": "#/components/schemas/InvitationList" } } } @@ -7238,11 +2426,11 @@ } } }, - "/api/v1/applications/{applicationId}/audit-log": { + "/api/v1/admin/audit-log": { "get": { - "summary": "Get application audit event entries", + "summary": "Get platform audit event entries - admin-only", "tags": [ - "Applications" + "Platform" ], "parameters": [ { @@ -7335,14 +2523,6 @@ "in": "query", "name": "username", "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "applicationId", - "required": true } ], "responses": { @@ -7357,27 +2537,10 @@ "$ref": "#/components/schemas/PaginationMeta" }, "count": { - "type": "number" - }, - "log": { - "$ref": "#/components/schemas/AuditLogEntryList" - }, - "associations": { - "type": "object", - "properties": { - "applications": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ApplicationSummary" - } - }, - "instances": { - "$ref": "#/components/schemas/InstanceSummaryList" - }, - "devices": { - "$ref": "#/components/schemas/DeviceSummaryList" - } - } + "type": "number" + }, + "log": { + "$ref": "#/components/schemas/AuditLogEntryList" } } } @@ -7397,11 +2560,11 @@ } } }, - "/api/v1/applications/{applicationId}/audit-log/export": { + "/api/v1/admin/audit-log/export": { "get": { - "summary": "Get application audit event entries", + "summary": "Gets platform audit events as CSV - admin-only", "tags": [ - "Applications" + "Platform" ], "parameters": [ { @@ -7494,23 +2657,257 @@ "in": "query", "name": "username", "required": false + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "text/csv": { + "schema": { + "type": "string" + } + } + } }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "applicationId", - "required": true + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/admin/stats-token": { + "post": { + "summary": "Regenerate platform stats access token - admin-only", + "tags": [ + "Platform" + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "token": { + "type": "string" + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "delete": { + "summary": "Remove platform stats access token - admin-only", + "tags": [ + "Platform" + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIStatus" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/admin/expert-agent-creds": { + "post": { + "summary": "Regenerate expert agent credentials - admin-only", + "tags": [ + "Platform" + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "username": { + "type": "string" + }, + "password": { + "type": "string" + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "delete": { + "summary": "Remove expert agent credentials - admin-only", + "tags": [ + "Platform" + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIStatus" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/admin/announcements": { + "post": { + "summary": "Send platform wide announcements", + "tags": [ + "Platform", + "Notifications", + "Announcements" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "title", + "filter" + ], + "properties": { + "message": { + "type": "string" + }, + "title": { + "type": "string" + }, + "filter": { + "type": "object", + "properties": { + "roles": { + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "mock": { + "type": "boolean" + }, + "to": { + "type": "object" + }, + "url": { + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "recipientCount": { + "type": "number" + }, + "mock": { + "type": "boolean" + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } } + } + } + }, + "/api/v1/user/": { + "get": { + "summary": "Get the current user profile", + "tags": [ + "User" ], "responses": { "200": { "description": "Default Response", "content": { - "text/csv": { + "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/User" } } } @@ -7526,38 +2923,46 @@ } } } - } - }, - "/api/v1/projects/{instanceId}": { - "get": { - "summary": "Get details of an instance", + }, + "put": { + "summary": "Update the current users settings", "tags": [ - "Instances" + "User" ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "instanceId", - "required": true + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "username": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tcs_accepted": { + "type": "boolean" + }, + "defaultTeam": { + "type": "string" + } + } + } + } } - ], + }, "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Instance" - }, - { - "$ref": "#/components/schemas/InstanceStatus" - } - ] + "$ref": "#/components/schemas/User" } } } @@ -7575,19 +2980,9 @@ } }, "delete": { - "summary": "Delete an instance", + "summary": "Delete the current user", "tags": [ - "Instances" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "instanceId", - "required": true - } + "User" ], "responses": { "200": { @@ -7600,16 +2995,6 @@ } } }, - "500": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - }, "4XX": { "description": "Default Response", "content": { @@ -7621,11 +3006,13 @@ } } } - }, + } + }, + "/api/v1/user/change_password": { "put": { - "summary": "Update an instance", + "summary": "Change the current users password", "tags": [ - "Instances" + "User" ], "requestBody": { "required": true, @@ -7633,50 +3020,52 @@ "application/json": { "schema": { "type": "object", + "required": [ + "old_password", + "password" + ], "properties": { - "name": { - "type": "string" - }, - "hostname": { - "type": "string" - }, - "settings": { - "type": "object" - }, - "launcherSettings": { - "type": "object" - }, - "projectType": { - "type": "string" + "old_password": { + "type": "string", + "description": "the old password" }, - "stack": { + "password": { "type": "string" - }, - "sourceProject": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "options": { - "type": "object" - } - } } } } } } }, - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "instanceId", - "required": true + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIStatus" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } } + } + } + }, + "/api/v1/user/teams": { + "get": { + "summary": "Get a list of the current users teams", + "tags": [ + "User" ], "responses": { "200": { @@ -7684,19 +3073,23 @@ "content": { "application/json": { "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Instance" + "type": "object", + "properties": { + "meta": { + "$ref": "#/components/schemas/PaginationMeta" }, - { - "$ref": "#/components/schemas/InstanceStatus" + "count": { + "type": "number" + }, + "teams": { + "$ref": "#/components/schemas/UserTeamList" } - ] + } } } } }, - "500": { + "4XX": { "description": "Default Response", "content": { "application/json": { @@ -7705,6 +3098,34 @@ } } } + } + } + } + }, + "/api/v1/user/tokens": { + "get": { + "summary": "List users Personal Access Tokens", + "tags": [ + "Tokens" + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "tokens": { + "$ref": "#/components/schemas/PersonalAccessTokenSummaryList" + } + } + } + } + } }, "4XX": { "description": "Default Response", @@ -7717,59 +3138,27 @@ } } } - } - }, - "/api/v1/projects/": { + }, "post": { - "summary": "Create an instance", + "summary": "Create user Personal Access Token", "tags": [ - "Instances" + "Tokens" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "type": "object", - "required": [ - "name", - "projectType", - "stack", - "template", - "applicationId" - ], - "properties": { - "name": { - "type": "string" - }, - "applicationId": { - "type": "string" - }, - "projectType": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "flowBlueprintId": { - "type": "string" - }, - "flows": { - "type": "array" - }, - "template": { - "type": "string" - }, - "sourceProject": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "options": { - "type": "object" - } - } + "type": "object", + "properties": { + "scope": { + "type": "string" + }, + "expiresAt": { + "type": "number" + }, + "name": { + "type": "string" } } } @@ -7782,14 +3171,7 @@ "content": { "application/json": { "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Instance" - }, - { - "$ref": "#/components/schemas/InstanceStatus" - } - ] + "$ref": "#/components/schemas/PersonalAccessToken" } } } @@ -7807,11 +3189,11 @@ } } }, - "/api/v1/projects/{instanceId}/settings": { - "get": { - "summary": "Get an instance runtime settings (instance tokens only)", + "/api/v1/user/tokens/{id}": { + "delete": { + "summary": "Delete user Personal Access Token", "tags": [ - "Instances" + "Tokens" ], "parameters": [ { @@ -7819,21 +3201,13 @@ "type": "string" }, "in": "path", - "name": "instanceId", + "name": "id", "required": true } ], "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": true - } - } - } + "204": { + "description": "empty response" }, "4XX": { "description": "Default Response", @@ -7846,86 +3220,37 @@ } } } - } - }, - "/api/v1/projects/{instanceId}/logs": { - "get": { - "summary": "Get instance logs", + }, + "put": { + "summary": "Update users Personal Access Token", "tags": [ - "Instances" + "Tokens" ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "scope": { + "type": "string" + }, + "expiresAt": { + "type": "number" + } + } + } + } + } + }, "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "query", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "cursor", - "required": false - }, - { - "schema": { - "type": "number" - }, - "in": "query", - "name": "limit", - "required": false - }, - { - "schema": { - "type": "number", - "minimum": 1 - }, - "in": "query", - "name": "page", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "sort", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "dir", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "order", - "required": false - }, { "schema": { "type": "string" }, "in": "path", - "name": "instanceId", + "name": "id", "required": true } ], @@ -7935,44 +3260,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "meta": { - "allOf": [ - { - "$ref": "#/components/schemas/PaginationMeta" - }, - { - "type": "object", - "properties": { - "first_entry": { - "type": "string" - }, - "last_entry": { - "type": "string" - } - } - } - ] - }, - "log": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": true - } - } - } - } - } - } - }, - "500": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" + "$ref": "#/components/schemas/PersonalAccessTokenSummary" } } } @@ -7986,116 +3274,75 @@ } } } - } - } - } - }, - "/api/v1/projects/{instanceId}/audit-log": { - "get": { - "summary": "Get instance audit event entries", - "tags": [ - "Instances" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "query", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "cursor", - "required": false - }, - { - "schema": { - "type": "number" - }, - "in": "query", - "name": "limit", - "required": false - }, - { - "schema": { - "type": "number", - "minimum": 1 - }, - "in": "query", - "name": "page", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "sort", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "dir", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "order", - "required": false - }, - { - "schema": { - "anyOf": [ - { - "type": "string" + } + } + } + }, + "/api/v1/user/expert-creds": { + "post": { + "summary": "Initialize expert chat", + "tags": [ + "User" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "minLength": 8 + } }, - { - "type": "array", - "items": { - "type": "string" + "required": [ + "sessionId" + ] + } + } + } + }, + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "username": { + "type": "string" + }, + "password": { + "type": "string" + } } } - ] - }, - "in": "query", - "name": "event", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "username", - "required": false + } + } }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "instanceId", - "required": true + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } } + } + } + }, + "/api/v1/user/invitations/": { + "get": { + "summary": "Get a list of the current users invitations", + "tags": [ + "User" ], "responses": { "200": { @@ -8111,25 +3358,8 @@ "count": { "type": "number" }, - "log": { - "$ref": "#/components/schemas/AuditLogEntryList" - }, - "associations": { - "type": "object", - "properties": { - "applications": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ApplicationSummary" - } - }, - "instances": { - "$ref": "#/components/schemas/InstanceSummaryList" - }, - "devices": { - "$ref": "#/components/schemas/DeviceSummaryList" - } - } + "invitations": { + "$ref": "#/components/schemas/InvitationList" } } } @@ -8149,110 +3379,19 @@ } } }, - "/api/v1/projects/{instanceId}/audit-log/export": { - "get": { - "summary": "Get instance audit event entries", + "/api/v1/user/invitations/{invitationId}": { + "patch": { + "summary": "Accept an invitation", "tags": [ - "Instances" + "User" ], "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "query", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "cursor", - "required": false - }, - { - "schema": { - "type": "number" - }, - "in": "query", - "name": "limit", - "required": false - }, - { - "schema": { - "type": "number", - "minimum": 1 - }, - "in": "query", - "name": "page", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "sort", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "dir", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "order", - "required": false - }, - { - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - }, - "in": "query", - "name": "event", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "username", - "required": false - }, { "schema": { "type": "string" }, "in": "path", - "name": "instanceId", + "name": "invitationId", "required": true } ], @@ -8260,9 +3399,9 @@ "200": { "description": "Default Response", "content": { - "text/csv": { + "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/APIStatus" } } } @@ -8278,42 +3417,19 @@ } } } - } - }, - "/api/v1/projects/{instanceId}/import": { - "post": { - "summary": "Import flows to the instance", + }, + "delete": { + "summary": "Reject an invitation", "tags": [ - "Instances" + "User" ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "flows": { - "type": "string" - }, - "credentials": { - "type": "string" - }, - "credsSecret": { - "type": "string" - } - } - } - } - } - }, "parameters": [ { "schema": { "type": "string" }, "in": "path", - "name": "instanceId", + "name": "invitationId", "required": true } ], @@ -8323,17 +3439,48 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIStatus" + "$ref": "#/components/schemas/APIStatus" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } - }, - "500": { + } + } + } + }, + "/api/v1/user/notifications/": { + "get": { + "summary": "Get the notifications for a user", + "tags": [ + "User" + ], + "responses": { + "200": { "description": "Default Response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIError" + "type": "object", + "properties": { + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + }, + "count": { + "type": "number" + }, + "notifications": { + "$ref": "#/components/schemas/NotificationList" + } + } } } } @@ -8349,13 +3496,11 @@ } } } - } - }, - "/api/v1/projects/check-name": { - "post": { - "summary": "Check if a project name is available", + }, + "put": { + "summary": "Bulk update notifications", "tags": [ - "Instances" + "User" ], "requestBody": { "required": true, @@ -8364,8 +3509,14 @@ "schema": { "type": "object", "properties": { - "name": { - "type": "string" + "ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "read": { + "type": "boolean" } } } @@ -8380,8 +3531,14 @@ "schema": { "type": "object", "properties": { - "available": { - "type": "boolean" + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + }, + "count": { + "type": "number" + }, + "notifications": { + "$ref": "#/components/schemas/NotificationList" } } } @@ -8401,20 +3558,34 @@ } } }, - "/api/v1/projects/{instanceId}/status": { - "get": { - "summary": "Get the live status of an instance", + "/api/v1/user/notifications/{notificationId}": { + "put": { + "summary": "Mark notification as read", "tags": [ - "Instances", - "Live State" + "User" ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "read": { + "type": "boolean" + } + } + } + } + } + }, "parameters": [ { "schema": { "type": "string" }, "in": "path", - "name": "instanceId", + "name": "notificationId", "required": true } ], @@ -8424,19 +3595,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "id": { - "type": "string" - }, - "meta": { - "type": "object", - "additionalProperties": true - } - } + "$ref": "#/components/schemas/APIStatus" } } } @@ -8452,40 +3611,19 @@ } } } - } - }, - "/api/v1/projects/{instanceId}/generate/snapshot-description": { - "post": { - "summary": "Generate a description of changes between a project's current state and latest snapshot", + }, + "delete": { + "summary": "Delete notifications", "tags": [ - "Instances", - "Snapshots" + "User" ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "target" - ], - "properties": { - "target": { - "type": "string" - } - } - } - } - } - }, "parameters": [ { "schema": { "type": "string" }, "in": "path", - "name": "instanceId", + "name": "notificationId", "required": true } ], @@ -8495,8 +3633,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "additionalProperties": true + "$ref": "#/components/schemas/APIStatus" } } } @@ -8514,11 +3651,11 @@ } } }, - "/api/v1/projects/{instanceId}/devices/": { + "/api/v1/users/": { "get": { - "summary": "Get a list of devices assigned to an instance", + "summary": "Get a list of all users (admin-only)", "tags": [ - "Instances" + "Users" ], "parameters": [ { @@ -8585,14 +3722,6 @@ "in": "query", "name": "order", "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "instanceId", - "required": true } ], "responses": { @@ -8609,11 +3738,8 @@ "count": { "type": "number" }, - "devices": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Device" - } + "users": { + "$ref": "#/components/schemas/UserList" } } } @@ -8631,13 +3757,76 @@ } } } + }, + "post": { + "summary": "Create a new user (admin-only)", + "tags": [ + "Users" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "name", + "username", + "password" + ], + "properties": { + "name": { + "type": "string" + }, + "username": { + "type": "string" + }, + "password": { + "type": "string" + }, + "email": { + "type": "string" + }, + "isAdmin": { + "type": "boolean" + }, + "createDefaultTeam": { + "type": "boolean" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } } }, - "/api/v1/projects/{instanceId}/devices/settings": { + "/api/v1/users/{userId}": { "get": { - "summary": "Get instance device settings", + "summary": "Get a user profile (admin-only)", "tags": [ - "Instances" + "Users" ], "parameters": [ { @@ -8645,7 +3834,7 @@ "type": "string" }, "in": "path", - "name": "instanceId", + "name": "userId", "required": true } ], @@ -8655,13 +3844,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "targetSnapshot": { - "type": "string", - "nullable": true - } - } + "$ref": "#/components/schemas/User" } } } @@ -8678,10 +3861,10 @@ } } }, - "post": { - "summary": "Update instance device settings", + "put": { + "summary": "Update a users settings (admin-only)", "tags": [ - "Instances" + "Users" ], "requestBody": { "required": true, @@ -8690,8 +3873,35 @@ "schema": { "type": "object", "properties": { - "targetSnapshot": { + "name": { + "type": "string" + }, + "username": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tcs_accepted": { + "type": "boolean" + }, + "email_verified": { + "type": "boolean" + }, + "admin": { + "type": "boolean" + }, + "password_expired": { + "type": "boolean" + }, + "suspended": { + "type": "boolean" + }, + "defaultTeam": { "type": "string" + }, + "mfa_enabled": { + "type": "boolean" } } } @@ -8704,7 +3914,7 @@ "type": "string" }, "in": "path", - "name": "instanceId", + "name": "userId", "required": true } ], @@ -8714,7 +3924,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIStatus" + "$ref": "#/components/schemas/User" } } } @@ -8730,13 +3940,11 @@ } } } - } - }, - "/api/v1/projects/{instanceId}/actions/start": { - "post": { - "summary": "Start an instance", + }, + "delete": { + "summary": "Delete a user (admin-only)", "tags": [ - "Instance Actions" + "Users" ], "parameters": [ { @@ -8744,7 +3952,7 @@ "type": "string" }, "in": "path", - "name": "instanceId", + "name": "userId", "required": true } ], @@ -8759,16 +3967,6 @@ } } }, - "500": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - }, "4XX": { "description": "Default Response", "content": { @@ -8782,11 +3980,11 @@ } } }, - "/api/v1/projects/{instanceId}/actions/stop": { - "post": { - "summary": "Stop an instance", + "/api/v1/users/{userId}/teams": { + "get": { + "summary": "Get a list of a users teams (admin-only)", "tags": [ - "Instance Actions" + "Users" ], "parameters": [ { @@ -8794,7 +3992,7 @@ "type": "string" }, "in": "path", - "name": "instanceId", + "name": "userId", "required": true } ], @@ -8804,12 +4002,20 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIStatus" + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "teams": { + "$ref": "#/components/schemas/UserTeamList" + } + } } } } }, - "500": { + "4XX": { "description": "Default Response", "content": { "application/json": { @@ -8818,9 +4024,47 @@ } } } + } + } + } + }, + "/api/v1/teams/check-slug": { + "post": { + "summary": "Check a team slug is available", + "tags": [ + "Teams" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "slug" + ], + "properties": { + "slug": { + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Team slug is available", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIStatus" + } + } + } }, - "4XX": { - "description": "Default Response", + "409": { + "description": "Team slug is not available", "content": { "application/json": { "schema": { @@ -8832,11 +4076,11 @@ } } }, - "/api/v1/projects/{instanceId}/actions/restart": { - "post": { - "summary": "Restart an instance", + "/api/v1/teams/{teamId}": { + "get": { + "summary": "Get details of a team", "tags": [ - "Instance Actions" + "Teams" ], "parameters": [ { @@ -8844,7 +4088,7 @@ "type": "string" }, "in": "path", - "name": "instanceId", + "name": "teamId", "required": true } ], @@ -8854,17 +4098,14 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "500": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" + "anyOf": [ + { + "$ref": "#/components/schemas/Team" + }, + { + "$ref": "#/components/schemas/TeamSummary" + } + ] } } } @@ -8880,13 +4121,11 @@ } } } - } - }, - "/api/v1/projects/{instanceId}/actions/suspend": { - "post": { - "summary": "Suspend an instance", + }, + "delete": { + "summary": "Delete a team", "tags": [ - "Instance Actions" + "Teams" ], "parameters": [ { @@ -8894,7 +4133,7 @@ "type": "string" }, "in": "path", - "name": "instanceId", + "name": "teamId", "required": true } ], @@ -8909,16 +4148,6 @@ } } }, - "500": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - }, "4XX": { "description": "Default Response", "content": { @@ -8930,13 +4159,11 @@ } } } - } - }, - "/api/v1/projects/{instanceId}/actions/rollback": { - "post": { - "summary": "Rollback an instance to a snapshot", + }, + "put": { + "summary": "Update a team", "tags": [ - "Instance Actions" + "Teams" ], "requestBody": { "required": true, @@ -8945,8 +4172,23 @@ "schema": { "type": "object", "properties": { - "snapshot": { + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "type": { "type": "string" + }, + "suspended": { + "type": "boolean" + }, + "properties": { + "type": "object" + }, + "features": { + "type": "object" } } } @@ -8959,7 +4201,7 @@ "type": "string" }, "in": "path", - "name": "instanceId", + "name": "teamId", "required": true } ], @@ -8969,17 +4211,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "500": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" + "$ref": "#/components/schemas/Team" } } } @@ -8997,11 +4229,11 @@ } } }, - "/api/v1/projects/{instanceId}/actions/restartStack": { - "post": { - "summary": "Restart an instance stack", + "/api/v1/teams/slug/{teamSlug}": { + "get": { + "summary": "Get details of a team using its slug", "tags": [ - "Instance Actions" + "Teams" ], "parameters": [ { @@ -9009,7 +4241,7 @@ "type": "string" }, "in": "path", - "name": "instanceId", + "name": "teamSlug", "required": true } ], @@ -9019,12 +4251,19 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIStatus" + "anyOf": [ + { + "$ref": "#/components/schemas/Team" + }, + { + "$ref": "#/components/schemas/TeamSummary" + } + ] } } } }, - "500": { + "4XX": { "description": "Default Response", "content": { "application/json": { @@ -9033,34 +4272,81 @@ } } } + } + } + } + }, + "/api/v1/teams/": { + "get": { + "summary": "Get a list of all teams - admin-only", + "tags": [ + "Teams" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "query", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "cursor", + "required": false + }, + { + "schema": { + "type": "number" + }, + "in": "query", + "name": "limit", + "required": false + }, + { + "schema": { + "type": "number", + "minimum": 1 + }, + "in": "query", + "name": "page", + "required": false }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/projects/{instanceId}/snapshots/": { - "get": { - "summary": "Get a list of instance snapshots", - "tags": [ - "Snapshots" - ], - "parameters": [ { "schema": { "type": "string" }, - "in": "path", - "name": "instanceId", - "required": true + "in": "query", + "name": "sort", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "dir", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "order", + "required": false } ], "responses": { @@ -9077,10 +4363,10 @@ "count": { "type": "number" }, - "snapshots": { + "teams": { "type": "array", "items": { - "$ref": "#/components/schemas/Snapshot" + "$ref": "#/components/schemas/Team" } } } @@ -9101,9 +4387,9 @@ } }, "post": { - "summary": "Create a snapshot from an instance", + "summary": "Create a new team", "tags": [ - "Snapshots" + "Teams" ], "requestBody": { "required": true, @@ -9111,77 +4397,42 @@ "application/json": { "schema": { "type": "object", + "required": [ + "name", + "type" + ], "properties": { "name": { "type": "string" }, - "description": { + "type": { "type": "string" }, - "flows": { - "oneOf": [ - { - "type": "object", - "properties": { - "flows": { - "type": "array", - "items": { - "type": "object" - } - }, - "credentials": { - "type": "object" - } - } - }, - { - "type": "array", - "items": { - "type": "object" - } - } - ] - }, - "credentials": { - "type": "object" - }, - "credentialSecret": { + "slug": { "type": "string" }, - "settings": { - "type": "object", - "properties": { - "modules": { - "type": "object", - "additionalProperties": true - } - } - }, - "setAsTarget": { + "trial": { "type": "boolean" + }, + "billingInterval": { + "type": "string", + "enum": [ + "month", + "year" + ] } } } } } }, - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "instanceId", - "required": true - } - ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Snapshot" + "$ref": "#/components/schemas/Team" } } } @@ -9199,27 +4450,51 @@ } } }, - "/api/v1/projects/{instanceId}/snapshots/{snapshotId}": { + "/api/v1/teams/{teamId}/applications": { "get": { - "summary": "Get details of a snapshot", + "summary": "Get a list of the teams applications", "tags": [ - "Snapshots" + "Teams" ], "parameters": [ { "schema": { - "type": "string" + "type": "number" }, - "in": "path", - "name": "instanceId", - "required": true + "in": "query", + "name": "associationsLimit", + "required": false + }, + { + "schema": { + "type": "boolean" + }, + "in": "query", + "name": "includeInstances", + "required": false + }, + { + "schema": { + "type": "boolean" + }, + "in": "query", + "name": "includeApplicationDevices", + "required": false + }, + { + "schema": { + "type": "boolean" + }, + "in": "query", + "name": "excludeOwnerFiltering", + "required": false }, { "schema": { "type": "string" }, "in": "path", - "name": "snapshotId", + "name": "teamId", "required": true } ], @@ -9229,7 +4504,15 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Snapshot" + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "applications": { + "$ref": "#/components/schemas/TeamApplicationList" + } + } } } } @@ -9245,27 +4528,29 @@ } } } - }, - "delete": { - "summary": "Delete a snapshot", + } + }, + "/api/v1/teams/{teamId}/applications/status": { + "get": { + "summary": "Get a list of the teams applications statuses", "tags": [ - "Snapshots" + "Teams" ], "parameters": [ { "schema": { - "type": "string" + "type": "number" }, - "in": "path", - "name": "instanceId", - "required": true + "in": "query", + "name": "associationsLimit", + "required": false }, { "schema": { "type": "string" }, "in": "path", - "name": "snapshotId", + "name": "teamId", "required": true } ], @@ -9275,7 +4560,15 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIStatus" + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "applications": { + "$ref": "#/components/schemas/ApplicationAssociationsStatusList" + } + } } } } @@ -9293,11 +4586,11 @@ } } }, - "/api/v1/projects/{instanceId}/snapshots/{snapshotId}/export": { + "/api/v1/teams/{teamId}/comms-credentials": { "post": { - "summary": "Export an instance snapshot using the provided credentialSecret", + "summary": "Issue team-channel broker credentials for the current user/session", "tags": [ - "Snapshots" + "Teams" ], "requestBody": { "required": true, @@ -9306,29 +4599,72 @@ "schema": { "type": "object", "properties": { - "credentialSecret": { + "sessionId": { "type": "string" } } } } } - }, + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "username": { + "type": "string" + }, + "password": { + "type": "string" + } + } + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/teams/{teamId}/user": { + "get": { + "summary": "Get the current users team membership", + "tags": [ + "Teams" + ], "parameters": [ { "schema": { "type": "string" }, "in": "path", - "name": "instanceId", - "required": true - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "snapshotId", + "name": "teamId", "required": true } ], @@ -9338,7 +4674,15 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ExportedSnapshot" + "type": "object", + "properties": { + "role": { + "type": "number" + }, + "permissions": { + "$ref": "#/components/schemas/TeamMemberPermissions" + } + } } } } @@ -9356,11 +4700,11 @@ } } }, - "/api/v1/stacks/": { + "/api/v1/teams/{teamId}/audit-log": { "get": { - "summary": "Get a list of all stacks", + "summary": "Get team audit event entries", "tags": [ - "Stacks" + "Teams" ], "parameters": [ { @@ -9428,13 +4772,39 @@ "name": "order", "required": false }, + { + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "in": "query", + "name": "event", + "required": false + }, { "schema": { "type": "string" }, "in": "query", - "name": "filter", + "name": "username", "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamId", + "required": true } ], "responses": { @@ -9451,10 +4821,24 @@ "count": { "type": "number" }, - "stacks": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Stack" + "log": { + "$ref": "#/components/schemas/AuditLogEntryList" + }, + "associations": { + "type": "object", + "properties": { + "applications": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ApplicationSummary" + } + }, + "instances": { + "$ref": "#/components/schemas/InstanceSummaryList" + }, + "devices": { + "$ref": "#/components/schemas/DeviceSummaryList" + } } } } @@ -9473,52 +4857,122 @@ } } } - }, - "post": { - "summary": "Create a stack - admin-only", + } + }, + "/api/v1/teams/{teamId}/audit-log/export": { + "get": { + "summary": "Get team audit event entries", "tags": [ - "Stacks" + "Teams" ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string" - }, - "label": { - "type": "string" - }, - "active": { - "type": "boolean" - }, - "projectType": { - "type": "string" - }, - "properties": { - "type": "object" - }, - "replaces": { + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "query", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "cursor", + "required": false + }, + { + "schema": { + "type": "number" + }, + "in": "query", + "name": "limit", + "required": false + }, + { + "schema": { + "type": "number", + "minimum": 1 + }, + "in": "query", + "name": "page", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sort", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "dir", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "order", + "required": false + }, + { + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { "type": "string" } } - } - } + ] + }, + "in": "query", + "name": "event", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "username", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamId", + "required": true } - }, + ], "responses": { "200": { "description": "Default Response", "content": { - "application/json": { + "text/csv": { "schema": { - "$ref": "#/components/schemas/Stack" + "type": "string" } } } @@ -9536,11 +4990,11 @@ } } }, - "/api/v1/stacks/{stackId}": { + "/api/v1/teams/{teamId}/members/": { "get": { - "summary": "Get details of a stacks", + "summary": "Get a list of the teams members", "tags": [ - "Stacks" + "Team Members" ], "parameters": [ { @@ -9548,7 +5002,7 @@ "type": "string" }, "in": "path", - "name": "stackId", + "name": "teamId", "required": true } ], @@ -9558,7 +5012,15 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Stack" + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "members": { + "$ref": "#/components/schemas/TeamMemberList" + } + } } } } @@ -9574,11 +5036,13 @@ } } } - }, + } + }, + "/api/v1/teams/{teamId}/members/{userId}": { "delete": { - "summary": "Delete a stack - admin-only", + "summary": "Remove a team member", "tags": [ - "Stacks" + "Team Members" ], "parameters": [ { @@ -9586,7 +5050,15 @@ "type": "string" }, "in": "path", - "name": "stackId", + "name": "teamId", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "userId", "required": true } ], @@ -9614,9 +5086,9 @@ } }, "put": { - "summary": "Update details of a stack - admin-only", + "summary": "Change a members role", "tags": [ - "Stacks" + "Team Members" ], "requestBody": { "required": true, @@ -9625,20 +5097,11 @@ "schema": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "label": { - "type": "string" - }, - "active": { - "type": "boolean" - }, - "projectType": { - "type": "string" + "role": { + "type": "number" }, - "properties": { - "type": "object" + "permissions": { + "$ref": "#/components/schemas/TeamMemberPermissions" } } } @@ -9651,7 +5114,15 @@ "type": "string" }, "in": "path", - "name": "stackId", + "name": "teamId", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "userId", "required": true } ], @@ -9661,7 +5132,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Stack" + "$ref": "#/components/schemas/APIStatus" } } } @@ -9679,77 +5150,20 @@ } } }, - "/api/v1/templates/": { + "/api/v1/teams/{teamId}/invitations/": { "get": { - "summary": "Get a list of all templates", + "summary": "Get a list of the teams invitations", "tags": [ - "Templates" + "Team Invitations" ], "parameters": [ { "schema": { "type": "string" }, - "in": "query", - "name": "query", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "cursor", - "required": false - }, - { - "schema": { - "type": "number" - }, - "in": "query", - "name": "limit", - "required": false - }, - { - "schema": { - "type": "number", - "minimum": 1 - }, - "in": "query", - "name": "page", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "sort", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "dir", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "order", - "required": false + "in": "path", + "name": "teamId", + "required": true } ], "responses": { @@ -9760,17 +5174,11 @@ "schema": { "type": "object", "properties": { - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - }, "count": { "type": "number" }, - "templates": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TemplateSummary" - } + "invitations": { + "$ref": "#/components/schemas/InvitationList" } } } @@ -9790,9 +5198,9 @@ } }, "post": { - "summary": "Create a template - admin-only", + "summary": "Create an invitation", "tags": [ - "Templates" + "Team Invitations" ], "requestBody": { "required": true, @@ -9800,69 +5208,28 @@ "application/json": { "schema": { "type": "object", - "required": [ - "name", - "settings", - "policy" - ], "properties": { - "name": { - "type": "string" - }, - "active": { - "type": "boolean" - }, - "description": { + "user": { "type": "string" }, - "settings": { - "type": "object" - }, - "policy": { - "type": "object" + "role": { + "type": "number" } - } + }, + "required": [ + "user" + ] } } } }, - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TemplateSummary" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/templates/{templateId}": { - "get": { - "summary": "Get a template", - "tags": [ - "Templates" - ], "parameters": [ { "schema": { "type": "string" }, "in": "path", - "name": "templateId", + "name": "teamId", "required": true } ], @@ -9872,7 +5239,19 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Template" + "type": "object", + "properties": { + "status": { + "type": "string" + }, + "code": { + "type": "string" + }, + "error": { + "type": "object", + "additionalProperties": true + } + } } } } @@ -9888,11 +5267,13 @@ } } } - }, + } + }, + "/api/v1/teams/{teamId}/invitations/{invitationId}": { "delete": { - "summary": "Delete a template - admin-only", + "summary": "Delete an invitation", "tags": [ - "Templates" + "Team Invitations" ], "parameters": [ { @@ -9900,7 +5281,15 @@ "type": "string" }, "in": "path", - "name": "templateId", + "name": "teamId", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "invitationId", "required": true } ], @@ -9915,62 +5304,38 @@ } } }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "put": { - "summary": "Update a template - admin-only", - "tags": [ - "Templates" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "name", - "settings", - "policy" - ], - "properties": { - "name": { - "type": "string" - }, - "active": { - "type": "boolean" - }, - "description": { - "type": "string" - }, - "settings": { - "type": "object" - }, - "policy": { - "type": "object" - } + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } } - }, + } + }, + "post": { + "summary": "Resend an invitation", + "tags": [ + "Team Invitations" + ], "parameters": [ { "schema": { "type": "string" }, "in": "path", - "name": "templateId", + "name": "teamId", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "invitationId", "required": true } ], @@ -9980,7 +5345,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TemplateSummary" + "$ref": "#/components/schemas/Invitation" } } } @@ -9998,11 +5363,11 @@ } } }, - "/api/v1/devices/": { + "/api/v1/teams/{teamId}/devices/": { "get": { - "summary": "Get a list of all devices - admin-only", + "summary": "Get a list of all devices in a team", "tags": [ - "Devices" + "Team Devices" ], "parameters": [ { @@ -10069,6 +5434,22 @@ "in": "query", "name": "order", "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "teamId", + "required": true + }, + { + "schema": { + "type": "boolean" + }, + "in": "path", + "name": "statusOnly", + "required": true } ], "responses": { @@ -10107,182 +5488,86 @@ } } } - }, - "post": { - "summary": "Create or provision a device", - "tags": [ - "Devices" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "oneOf": [ - { - "allOf": [ - { - "required": [ - "name" - ] - }, - { - "required": [ - "team" - ] - }, - { - "not": { - "required": [ - "setup" - ] - } - } - ] - }, - { - "allOf": [ - { - "required": [ - "setup" - ] - }, - { - "not": { - "required": [ - "name" - ] - } - }, - { - "not": { - "required": [ - "team" - ] - } - } - ] - } - ], - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "team": { - "type": "string" - }, - "setup": { - "type": "boolean", - "enum": [ - true - ] - }, - "agentHost": { - "type": "string" - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/Device" - } - ], - "properties": { - "credentials": { - "type": "object", - "additionalProperties": true - }, - "meta": { - "type": "object", - "properties": { - "ffVersion": { - "type": "string" - } - } - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } } }, - "/api/v1/devices/{deviceId}": { + "/api/v1/teams/{teamId}/devices/provisioning": { "get": { - "summary": "Get details of a device", + "summary": "Get a list of device provisioning tokens in a team", "tags": [ - "Devices" + "Team Devices" ], "parameters": [ { "schema": { "type": "string" }, - "in": "path", - "name": "deviceId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Device" - } - } - } + "in": "query", + "name": "query", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "cursor", + "required": false + }, + { + "schema": { + "type": "number" + }, + "in": "query", + "name": "limit", + "required": false + }, + { + "schema": { + "type": "number", + "minimum": 1 + }, + "in": "query", + "name": "page", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sort", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "dir", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "order", + "required": false }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "delete": { - "summary": "Delete a device", - "tags": [ - "Devices" - ], - "parameters": [ { "schema": { "type": "string" }, "in": "path", - "name": "deviceId", + "name": "teamId", "required": true } ], @@ -10292,7 +5577,21 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIStatus" + "type": "object", + "properties": { + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + }, + "count": { + "type": "number" + }, + "tokens": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProvisioningTokenSummary" + } + } + } } } } @@ -10309,10 +5608,10 @@ } } }, - "put": { - "summary": "Update a device", + "post": { + "summary": "Create a new provisioning token in a team", "tags": [ - "Devices" + "Team Devices" ], "requestBody": { "required": true, @@ -10320,20 +5619,28 @@ "application/json": { "schema": { "type": "object", + "required": [ + "name" + ], "properties": { "name": { "type": "string" }, - "type": { - "type": "string" - }, "instance": { - "type": "string", - "nullable": true + "type": "string" }, "application": { - "type": "string", - "nullable": true + "type": "string" + }, + "expiresAt": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object" + } + ] } } } @@ -10346,47 +5653,7 @@ "type": "string" }, "in": "path", - "name": "deviceId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Device" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/devices/{deviceId}/generate_credentials": { - "post": { - "summary": "Regenerate device credentials", - "tags": [ - "Devices" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "deviceId", + "name": "teamId", "required": true } ], @@ -10396,8 +5663,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "additionalProperties": true + "$ref": "#/components/schemas/ProvisioningToken" } } } @@ -10415,11 +5681,11 @@ } } }, - "/api/v1/devices/{deviceId}/settings": { + "/api/v1/teams/{teamId}/devices/provisioning/{tokenId}": { "put": { - "summary": "Update a devices settings", + "summary": "Update a provisioning token in a team", "tags": [ - "Devices" + "Team Devices" ], "requestBody": { "required": true, @@ -10428,27 +5694,15 @@ "schema": { "type": "object", "properties": { - "env": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": true - } - }, - "autoSnapshot": { - "type": "boolean" - }, - "palette": { - "type": "object", - "additionalProperties": true + "instance": { + "type": "string" }, - "editor": { - "type": "object", - "additionalProperties": true + "application": { + "type": "string" }, - "security": { - "type": "object", - "additionalProperties": true + "expiresAt": { + "nullable": true, + "type": "string" } } } @@ -10461,109 +5715,15 @@ "type": "string" }, "in": "path", - "name": "deviceId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "get": { - "summary": "Get a devices settings", - "tags": [ - "Devices" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "deviceId", + "name": "teamId", "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "env": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": true - } - }, - "autoSnapshot": { - "type": "boolean" - }, - "palette": { - "type": "object", - "additionalProperties": true - }, - "editor": { - "type": "object", - "additionalProperties": true - }, - "security": { - "type": "object", - "additionalProperties": true - } - } - } - } - } }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/devices/{deviceId}/logs": { - "post": { - "summary": "Start device logging", - "tags": [ - "Devices" - ], - "parameters": [ { "schema": { "type": "string" }, "in": "path", - "name": "deviceId", + "name": "tokenId", "required": true } ], @@ -10573,18 +5733,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "username": { - "type": "string" - }, - "password": { - "type": "string" - } - } + "$ref": "#/components/schemas/ProvisioningTokenSummary" } } } @@ -10597,16 +5746,14 @@ "$ref": "#/components/schemas/APIError" } } - } - } - } - } - }, - "/api/v1/devices/{deviceId}/resources": { - "post": { - "summary": "Start device logging", + } + } + } + }, + "delete": { + "summary": "Delete a provisioning token", "tags": [ - "Devices" + "Team Devices" ], "parameters": [ { @@ -10614,7 +5761,15 @@ "type": "string" }, "in": "path", - "name": "deviceId", + "name": "teamId", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "tokenId", "required": true } ], @@ -10624,18 +5779,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "username": { - "type": "string" - }, - "password": { - "type": "string" - } - } + "$ref": "#/components/schemas/APIStatus" } } } @@ -10653,11 +5797,11 @@ } } }, - "/api/v1/devices/{deviceId}/mode": { - "put": { - "summary": "Set device mode", + "/api/v1/teams/{teamId}/devices/bulk": { + "delete": { + "summary": "Delete devices", "tags": [ - "Devices" + "Team Devices" ], "requestBody": { "required": true, @@ -10666,11 +5810,17 @@ "schema": { "type": "object", "properties": { - "mode": { - "type": "string", - "nullable": true + "devices": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1 } - } + }, + "required": [ + "devices" + ] } } } @@ -10681,7 +5831,7 @@ "type": "string" }, "in": "path", - "name": "deviceId", + "name": "teamId", "required": true } ], @@ -10691,12 +5841,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "mode": { - "type": "string" - } - } + "$ref": "#/components/schemas/APIStatus" } } } @@ -10712,13 +5857,11 @@ } } } - } - }, - "/api/v1/devices/{deviceId}/snapshot": { - "post": { - "summary": "Create a snapshot from a device owned by an instance", + }, + "put": { + "summary": "Update devices", "tags": [ - "Devices" + "Team Devices" ], "requestBody": { "required": true, @@ -10726,15 +5869,28 @@ "application/json": { "schema": { "type": "object", + "required": [ + "devices" + ], "properties": { - "name": { - "type": "string" + "devices": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1 }, - "description": { - "type": "string" + "instance": { + "type": "string", + "nullable": true }, - "setAsTarget": { - "type": "boolean" + "application": { + "type": "string", + "nullable": true + }, + "deviceGroup": { + "type": "string", + "nullable": true } } } @@ -10747,7 +5903,7 @@ "type": "string" }, "in": "path", - "name": "deviceId", + "name": "teamId", "required": true } ], @@ -10757,7 +5913,21 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Snapshot" + "type": "object", + "properties": { + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + }, + "count": { + "type": "number" + }, + "devices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Device" + } + } + } } } } @@ -10775,10 +5945,11 @@ } } }, - "/api/v1/devices/{deviceId}/audit-log": { + "/api/v1/team-types/": { "get": { + "summary": "Get a list of the team types", "tags": [ - "Devices" + "Team Types" ], "parameters": [ { @@ -10845,40 +6016,6 @@ "in": "query", "name": "order", "required": false - }, - { - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - }, - "in": "query", - "name": "event", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "username", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "deviceId", - "required": true } ], "responses": { @@ -10895,130 +6032,98 @@ "count": { "type": "number" }, - "log": { - "$ref": "#/components/schemas/AuditLogEntryList" - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/devices/{deviceId}/audit-log/export": { - "get": { - "tags": [ - "Devices" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "query", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "cursor", - "required": false - }, - { - "schema": { - "type": "number" - }, - "in": "query", - "name": "limit", - "required": false - }, - { - "schema": { - "type": "number", - "minimum": 1 - }, - "in": "query", - "name": "page", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "sort", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "dir", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "order", - "required": false - }, - { - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" + "types": { + "$ref": "#/components/schemas/TeamTypeList" + } } } - ] - }, - "in": "query", - "name": "event", - "required": false + } + } }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "username", - "required": false + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "post": { + "summary": "Create a team type - admin-only", + "tags": [ + "Team Types" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "active": { + "type": "boolean" + }, + "properties": { + "type": "object" + }, + "order": { + "type": "number" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TeamType" + } + } + } }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/team-types/{teamTypeId}": { + "get": { + "summary": "Get details of a team type", + "tags": [ + "Teams" + ], + "parameters": [ { "schema": { "type": "string" }, "in": "path", - "name": "deviceId", + "name": "teamTypeId", "required": true } ], @@ -11026,9 +6131,9 @@ "200": { "description": "Default Response", "content": { - "text/csv": { + "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/TeamType" } } } @@ -11044,14 +6149,11 @@ } } } - } - }, - "/api/v1/devices/{deviceId}/generate/snapshot-description": { - "post": { - "summary": "Generate a description of changes between a project's current state and latest snapshot", + }, + "put": { + "summary": "Update a team type - admin-only", "tags": [ - "Instances", - "Snapshots" + "Team Types" ], "requestBody": { "required": true, @@ -11059,12 +6161,21 @@ "application/json": { "schema": { "type": "object", - "required": [ - "target" - ], "properties": { - "target": { + "name": { "type": "string" + }, + "description": { + "type": "string" + }, + "active": { + "type": "boolean" + }, + "properties": { + "type": "object" + }, + "order": { + "type": "number" } } } @@ -11077,7 +6188,7 @@ "type": "string" }, "in": "path", - "name": "instanceId", + "name": "teamTypeId", "required": true } ], @@ -11087,8 +6198,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "additionalProperties": true + "$ref": "#/components/schemas/TeamType" } } } @@ -11104,13 +6214,11 @@ } } } - } - }, - "/api/v1/devices/{deviceId}/snapshots/": { - "get": { - "summary": "Get a list of snapshots for a device", + }, + "delete": { + "summary": "Delete a team type - admin-only", "tags": [ - "DeviceSnapshots" + "Team Types" ], "parameters": [ { @@ -11118,7 +6226,7 @@ "type": "string" }, "in": "path", - "name": "deviceId", + "name": "teamTypeId", "required": true } ], @@ -11128,21 +6236,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - }, - "count": { - "type": "number" - }, - "snapshots": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Snapshot" - } - } - } + "$ref": "#/components/schemas/APIStatus" } } } @@ -11158,11 +6252,13 @@ } } } - }, + } + }, + "/api/v1/applications/": { "post": { - "summary": "Create a snapshot from a device", + "summary": "Create an application", "tags": [ - "Devices" + "Applications" ], "requestBody": { "required": true, @@ -11170,6 +6266,10 @@ "application/json": { "schema": { "type": "object", + "required": [ + "name", + "teamId" + ], "properties": { "name": { "type": "string" @@ -11177,31 +6277,31 @@ "description": { "type": "string" }, - "setAsTarget": { - "type": "boolean" + "teamId": { + "type": "string" } } } } } }, - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "deviceId", - "required": true - } - ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Snapshot" + "$ref": "#/components/schemas/Application" + } + } + } + }, + "500": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -11219,11 +6319,11 @@ } } }, - "/api/v1/devices/{deviceId}/snapshots/{snapshotId}": { + "/api/v1/applications/{applicationId}": { "get": { - "summary": "Get details of a device snapshot", + "summary": "Get the details of an application", "tags": [ - "DeviceSnapshots" + "Applications" ], "parameters": [ { @@ -11231,15 +6331,63 @@ "type": "string" }, "in": "path", - "name": "deviceId", + "name": "applicationId", "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Application" + } + } + } }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + }, + "put": { + "summary": "Update an application", + "tags": [ + "Applications" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + } + } + } + } + } + }, + "parameters": [ { "schema": { "type": "string" }, "in": "path", - "name": "snapshotId", + "name": "applicationId", "required": true } ], @@ -11249,7 +6397,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Snapshot" + "$ref": "#/components/schemas/Application" + } + } + } + }, + "500": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -11267,9 +6425,9 @@ } }, "delete": { - "summary": "Delete a devices snapshot", + "summary": "Delete an application", "tags": [ - "DeviceSnapshots" + "Applications" ], "parameters": [ { @@ -11277,15 +6435,7 @@ "type": "string" }, "in": "path", - "name": "deviceId", - "required": true - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "snapshotId", + "name": "applicationId", "required": true } ], @@ -11300,6 +6450,16 @@ } } }, + "500": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, "4XX": { "description": "Default Response", "content": { @@ -11313,11 +6473,11 @@ } } }, - "/api/v1/devices/{deviceId}/actions/restart": { - "post": { - "summary": "Restart Node-RED", + "/api/v1/applications/{applicationId}/instances": { + "get": { + "summary": "Get a list of an applications instances", "tags": [ - "Device Actions" + "Applications" ], "parameters": [ { @@ -11325,7 +6485,7 @@ "type": "string" }, "in": "path", - "name": "deviceId", + "name": "applicationId", "required": true } ], @@ -11335,17 +6495,15 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "500": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "instances": { + "$ref": "#/components/schemas/InstanceSummaryList" + } + } } } } @@ -11363,11 +6521,11 @@ } } }, - "/api/v1/project-types/": { + "/api/v1/applications/{applicationId}/devices": { "get": { - "summary": "Get a list of all instance types", + "summary": "Get a list of all devices in an application", "tags": [ - "Instance Types" + "Applications" ], "parameters": [ { @@ -11439,9 +6597,9 @@ "schema": { "type": "string" }, - "in": "query", - "name": "filter", - "required": false + "in": "path", + "name": "applicationId", + "required": true } ], "responses": { @@ -11458,10 +6616,10 @@ "count": { "type": "number" }, - "types": { + "devices": { "type": "array", "items": { - "$ref": "#/components/schemas/InstanceType" + "$ref": "#/components/schemas/Device" } } } @@ -11480,49 +6638,39 @@ } } } - }, - "post": { - "summary": "Create an instance type - admin-only", + } + }, + "/api/v1/applications/{applicationId}/instances/status": { + "get": { + "summary": "Get a list of an applications instances status", "tags": [ - "Instance Types" + "Applications" ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "active": { - "type": "boolean" - }, - "properties": { - "type": "object" - }, - "order": { - "type": "number" - } - } - } - } + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "applicationId", + "required": true } - }, + ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InstanceType" + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "instances": { + "$ref": "#/components/schemas/InstanceStatusList" + } + } } } } @@ -11540,11 +6688,11 @@ } } }, - "/api/v1/project-types/{instanceTypeId}": { + "/api/v1/applications/{applicationId}/snapshots": { "get": { - "summary": "Get a details of an instance types", + "summary": "Get a list of all snapshots in an Application", "tags": [ - "Instance Types" + "Applications" ], "parameters": [ { @@ -11552,7 +6700,7 @@ "type": "string" }, "in": "path", - "name": "instanceTypeId", + "name": "applicationId", "required": true } ], @@ -11562,7 +6710,21 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InstanceType" + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "snapshots": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Snapshot" + } + }, + "application": { + "$ref": "#/components/schemas/ApplicationSummary" + } + } } } } @@ -11578,87 +6740,112 @@ } } } - }, - "put": { - "summary": "Update an instance type - admin-only", + } + }, + "/api/v1/applications/{applicationId}/audit-log": { + "get": { + "summary": "Get application audit event entries", "tags": [ - "Instance Types" + "Applications" ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "active": { - "type": "boolean" - }, - "properties": { - "type": "object" - }, - "order": { - "type": "number" - }, - "defaultStack": { + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "query", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "cursor", + "required": false + }, + { + "schema": { + "type": "number" + }, + "in": "query", + "name": "limit", + "required": false + }, + { + "schema": { + "type": "number", + "minimum": 1 + }, + "in": "query", + "name": "page", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sort", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "dir", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "order", + "required": false + }, + { + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { "type": "string" } } - } - } - } - }, - "parameters": [ + ] + }, + "in": "query", + "name": "event", + "required": false + }, { "schema": { "type": "string" }, - "in": "path", - "name": "instanceTypeId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InstanceType" - } - } - } + "in": "query", + "name": "username", + "required": false }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "delete": { - "summary": "Delete an instance type - admin-only", - "tags": [ - "Instance Types" - ], - "parameters": [ { "schema": { "type": "string" }, "in": "path", - "name": "instanceTypeId", + "name": "applicationId", "required": true } ], @@ -11668,7 +6855,35 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIStatus" + "type": "object", + "properties": { + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + }, + "count": { + "type": "number" + }, + "log": { + "$ref": "#/components/schemas/AuditLogEntryList" + }, + "associations": { + "type": "object", + "properties": { + "applications": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ApplicationSummary" + } + }, + "instances": { + "$ref": "#/components/schemas/InstanceSummaryList" + }, + "devices": { + "$ref": "#/components/schemas/DeviceSummaryList" + } + } + } + } } } } @@ -11686,113 +6901,110 @@ } } }, - "/api/v1/snapshots/{id}": { + "/api/v1/applications/{applicationId}/audit-log/export": { "get": { - "summary": "Get summary of a snapshot", + "summary": "Get application audit event entries", "tags": [ - "Snapshots" + "Applications" ], "parameters": [ { "schema": { "type": "string" }, - "in": "path", - "name": "id", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Snapshot" - } - } - } + "in": "query", + "name": "query", + "required": false }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "delete": { - "summary": "Delete a snapshot", - "tags": [ - "Snapshots" - ], - "parameters": [ { "schema": { "type": "string" }, - "in": "path", - "name": "id", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } + "in": "query", + "name": "cursor", + "required": false }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "put": { - "summary": "Update a snapshot", - "tags": [ - "Snapshots" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "description": { + { + "schema": { + "type": "number" + }, + "in": "query", + "name": "limit", + "required": false + }, + { + "schema": { + "type": "number", + "minimum": 1 + }, + "in": "query", + "name": "page", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sort", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "dir", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "order", + "required": false + }, + { + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { "type": "string" } } - } - } - } - }, - "parameters": [ + ] + }, + "in": "query", + "name": "event", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "username", + "required": false + }, { "schema": { "type": "string" }, "in": "path", - "name": "id", + "name": "applicationId", "required": true } ], @@ -11800,9 +7012,9 @@ "200": { "description": "Default Response", "content": { - "application/json": { + "text/csv": { "schema": { - "$ref": "#/components/schemas/Snapshot" + "type": "string" } } } @@ -11820,11 +7032,11 @@ } } }, - "/api/v1/snapshots/{id}/full": { + "/api/v1/projects/{instanceId}": { "get": { - "summary": "Get details of a snapshot", + "summary": "Get details of an instance", "tags": [ - "Snapshots" + "Instances" ], "parameters": [ { @@ -11832,7 +7044,7 @@ "type": "string" }, "in": "path", - "name": "id", + "name": "instanceId", "required": true } ], @@ -11842,7 +7054,14 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FullSnapshot" + "allOf": [ + { + "$ref": "#/components/schemas/Instance" + }, + { + "$ref": "#/components/schemas/InstanceStatus" + } + ] } } } @@ -11858,66 +7077,19 @@ } } } - } - }, - "/api/v1/snapshots/{id}/export": { - "post": { - "summary": "Export a snapshot", + }, + "delete": { + "summary": "Delete an instance", "tags": [ - "Snapshots" + "Instances" ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "credentialSecret": { - "type": "string" - }, - "components": { - "type": "object", - "properties": { - "flows": { - "type": "boolean", - "default": true - }, - "credentials": { - "type": "boolean", - "default": true - }, - "envVars": { - "anyOf": [ - { - "type": "string", - "enum": [ - "all", - "keys" - ] - }, - { - "type": "boolean", - "enum": [ - false - ] - } - ] - } - } - } - } - } - } - } - }, "parameters": [ { "schema": { "type": "string" }, "in": "path", - "name": "id", + "name": "instanceId", "required": true } ], @@ -11927,195 +7099,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ExportedSnapshot" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/snapshots/import": { - "post": { - "summary": "Upload a snapshot", - "tags": [ - "Snapshots" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "ownerId": { - "type": "string" - }, - "ownerType": { - "type": "string" - }, - "snapshot": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "flows": { - "type": "object", - "properties": { - "flows": { - "type": "array", - "items": {}, - "minItems": 0 - }, - "credentials": { - "type": "object" - } - }, - "required": [ - "flows" - ] - }, - "settings": { - "type": "object", - "properties": { - "settings": { - "type": "object" - }, - "env": { - "type": "object" - }, - "modules": { - "type": "object" - } - }, - "required": [] - } - }, - "required": [ - "name", - "flows", - "settings" - ] - }, - "credentialSecret": { - "type": "string" - }, - "components": { - "type": "object", - "properties": { - "flows": { - "type": "boolean", - "default": true - }, - "credentials": { - "type": "boolean", - "default": true - }, - "envVars": { - "anyOf": [ - { - "type": "string", - "enum": [ - "all", - "keys" - ] - }, - { - "type": "boolean", - "enum": [ - false - ] - } - ] - } - } - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Snapshot" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" + "$ref": "#/components/schemas/APIStatus" } } - } - } - } - } - }, - "/api/v1/search/": { - "get": { - "summary": "Search for resources", - "tags": [ - "Search" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "team", - "required": true - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "query", - "required": false - } - ], - "responses": { - "200": { + } + }, + "500": { "description": "Default Response", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "count": { - "type": "number" - }, - "results": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": true - } - } - } + "$ref": "#/components/schemas/APIError" } } } @@ -12131,30 +7125,61 @@ } } } - } - }, - "/api/v1/search/instances": { - "get": { - "summary": "Search for hosted and remote instances", + }, + "put": { + "summary": "Update an instance", "tags": [ - "Search" + "Instances" ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "hostname": { + "type": "string" + }, + "settings": { + "type": "object" + }, + "launcherSettings": { + "type": "object" + }, + "projectType": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "sourceProject": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "options": { + "type": "object" + } + } + } + } + } + } + } + }, "parameters": [ { "schema": { "type": "string" }, - "in": "query", - "name": "team", + "in": "path", + "name": "instanceId", "required": true - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "query", - "required": false } ], "responses": { @@ -12163,19 +7188,24 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "count": { - "type": "number" + "allOf": [ + { + "$ref": "#/components/schemas/Instance" }, - "results": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": true - } + { + "$ref": "#/components/schemas/InstanceStatus" } - } + ] + } + } + } + }, + "500": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -12193,11 +7223,11 @@ } } }, - "/api/v1/pipelines": { + "/api/v1/projects/": { "post": { - "summary": "Create a new pipeline within an application", + "summary": "Create an instance", "tags": [ - "Pipelines" + "Instances" ], "requestBody": { "required": true, @@ -12205,12 +7235,45 @@ "application/json": { "schema": { "type": "object", + "required": [ + "name", + "projectType", + "stack", + "template", + "applicationId" + ], "properties": { + "name": { + "type": "string" + }, "applicationId": { "type": "string" }, - "name": { + "projectType": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "flowBlueprintId": { "type": "string" + }, + "flows": { + "type": "array" + }, + "template": { + "type": "string" + }, + "sourceProject": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "options": { + "type": "object" + } + } } } } @@ -12223,17 +7286,14 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Pipeline" - } - } - } - }, - "500": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" + "allOf": [ + { + "$ref": "#/components/schemas/Instance" + }, + { + "$ref": "#/components/schemas/InstanceStatus" + } + ] } } } @@ -12251,11 +7311,11 @@ } } }, - "/api/v1/pipelines/{pipelineId}": { - "delete": { - "summary": "Delete a pipeline", + "/api/v1/projects/{instanceId}/settings": { + "get": { + "summary": "Get an instance runtime settings (instance tokens only)", "tags": [ - "Pipelines" + "Instances" ], "parameters": [ { @@ -12263,7 +7323,7 @@ "type": "string" }, "in": "path", - "name": "pipelineId", + "name": "instanceId", "required": true } ], @@ -12273,50 +7333,103 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIStatus" + "type": "object", + "additionalProperties": true + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } + } + } + } + }, + "/api/v1/projects/{instanceId}/logs": { + "get": { + "summary": "Get instance logs", + "tags": [ + "Instances" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "query", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "cursor", + "required": false + }, + { + "schema": { + "type": "number" + }, + "in": "query", + "name": "limit", + "required": false + }, + { + "schema": { + "type": "number", + "minimum": 1 + }, + "in": "query", + "name": "page", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sort", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "dir", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "order", + "required": false }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "put": { - "summary": "Update a pipeline within an application", - "tags": [ - "Pipelines" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - } - } - } - } - } - }, - "parameters": [ { "schema": { "type": "string" }, "in": "path", - "name": "pipelineId", + "name": "instanceId", "required": true } ], @@ -12326,7 +7439,34 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Pipeline" + "type": "object", + "properties": { + "meta": { + "allOf": [ + { + "$ref": "#/components/schemas/PaginationMeta" + }, + { + "type": "object", + "properties": { + "first_entry": { + "type": "string" + }, + "last_entry": { + "type": "string" + } + } + } + ] + }, + "log": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + } + } } } } @@ -12354,186 +7494,110 @@ } } }, - "/api/v1/pipelines/{pipelineId}/stages": { - "post": { - "summary": "Add a new stage to an existing pipeline", + "/api/v1/projects/{instanceId}/audit-log": { + "get": { + "summary": "Get instance audit event entries", "tags": [ - "Pipelines" + "Instances" ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "instanceId": { - "type": "string" - }, - "deviceId": { - "type": "string" - }, - "deviceGroupId": { - "type": "string" - }, - "deployToDevices": { - "type": "boolean" - }, - "action": { - "type": "string", - "enum": [ - "create_snapshot", - "use_active_snapshot", - "use_latest_snapshot", - "prompt", - "none" - ] - }, - "gitTokenId": { - "type": "string" - }, - "url": { - "type": "string" - }, - "branch": { - "type": "string" - }, - "pullBranch": { - "type": "string" - }, - "pushPath": { - "type": "string" - }, - "pullPath": { - "type": "string" - }, - "credentialSecret": { - "type": "string" - }, - "source": { - "type": "string" - } - } - } - } - } - }, "parameters": [ { "schema": { "type": "string" }, - "in": "path", - "name": "pipelineId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PipelineStage" - } - } - } + "in": "query", + "name": "query", + "required": false }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/pipelines/{pipelineId}/stages/{stageId}": { - "put": { - "summary": "Update details of a stage within a pipeline", - "tags": [ - "Pipelines" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "instanceId": { - "type": "string" - }, - "deviceId": { - "type": "string" - }, - "deviceGroupId": { - "type": "string" - }, - "action": { - "type": "string", - "enum": [ - "create_snapshot", - "use_active_snapshot", - "use_latest_snapshot", - "prompt", - "none" - ] - }, - "gitTokenId": { - "type": "string" - }, - "url": { - "type": "string" - }, - "branch": { - "type": "string" - }, - "pullBranch": { - "type": "string" - }, - "pushPath": { - "type": "string" - }, - "pullPath": { - "type": "string" - }, - "credentialSecret": { - "type": "string" - }, - "source": { + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "cursor", + "required": false + }, + { + "schema": { + "type": "number" + }, + "in": "query", + "name": "limit", + "required": false + }, + { + "schema": { + "type": "number", + "minimum": 1 + }, + "in": "query", + "name": "page", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sort", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "dir", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "order", + "required": false + }, + { + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { "type": "string" } } - } - } - } - }, - "parameters": [ + ] + }, + "in": "query", + "name": "event", + "required": false + }, { "schema": { "type": "string" }, - "in": "path", - "name": "pipelineId", - "required": true + "in": "query", + "name": "username", + "required": false }, { "schema": { "type": "string" }, "in": "path", - "name": "stageId", + "name": "instanceId", "required": true } ], @@ -12543,7 +7607,35 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PipelineStage" + "type": "object", + "properties": { + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + }, + "count": { + "type": "number" + }, + "log": { + "$ref": "#/components/schemas/AuditLogEntryList" + }, + "associations": { + "type": "object", + "properties": { + "applications": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ApplicationSummary" + } + }, + "instances": { + "$ref": "#/components/schemas/InstanceSummaryList" + }, + "devices": { + "$ref": "#/components/schemas/DeviceSummaryList" + } + } + } + } } } } @@ -12559,27 +7651,112 @@ } } } - }, - "delete": { - "summary": "Delete a pipeline stage", + } + }, + "/api/v1/projects/{instanceId}/audit-log/export": { + "get": { + "summary": "Get instance audit event entries", "tags": [ - "Pipelines" + "Instances" ], "parameters": [ { "schema": { "type": "string" }, - "in": "path", - "name": "pipelineId", - "required": true + "in": "query", + "name": "query", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "cursor", + "required": false + }, + { + "schema": { + "type": "number" + }, + "in": "query", + "name": "limit", + "required": false + }, + { + "schema": { + "type": "number", + "minimum": 1 + }, + "in": "query", + "name": "page", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sort", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "dir", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "order", + "required": false + }, + { + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "in": "query", + "name": "event", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "username", + "required": false }, { "schema": { "type": "string" }, "in": "path", - "name": "stageId", + "name": "instanceId", "required": true } ], @@ -12587,19 +7764,9 @@ "200": { "description": "Default Response", "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "500": { - "description": "Default Response", - "content": { - "application/json": { + "text/csv": { "schema": { - "$ref": "#/components/schemas/APIError" + "type": "string" } } } @@ -12617,25 +7784,27 @@ } } }, - "/api/v1/pipelines/{pipelineId}/stages/{stageId}/deploy": { - "put": { - "summary": "Triggers a pipeline stage", + "/api/v1/projects/{instanceId}/import": { + "post": { + "summary": "Import flows to the instance", "tags": [ - "Pipelines" + "Instances" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "type": [ - "object", - "null" - ], + "type": "object", "properties": { - "sourceSnapshotId": { - "type": "string", - "description": "The snapshot to deploy if the stage action is set to \"prompt\"" + "flows": { + "type": "string" + }, + "credentials": { + "type": "string" + }, + "credsSecret": { + "type": "string" } } } @@ -12648,15 +7817,7 @@ "type": "string" }, "in": "path", - "name": "pipelineId", - "required": true - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "stageId", + "name": "instanceId", "required": true } ], @@ -12694,69 +7855,27 @@ } } }, - "/api/v1/applications/{applicationId}/pipelines": { - "get": { - "summary": "List all pipelines within an application", + "/api/v1/projects/check-name": { + "post": { + "summary": "Check if a project name is available", "tags": [ - "Pipelines" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "applicationId", - "required": true - } + "Instances" ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "count": { - "type": "number" - }, - "pipelines": { - "$ref": "#/components/schemas/PipelineList" - } + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" } } } } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/teams/{teamId}/pipelines/": { - "get": { - "tags": [ - "Pipelines" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamId", - "required": true } - ], + }, "responses": { "200": { "description": "Default Response", @@ -12765,11 +7884,8 @@ "schema": { "type": "object", "properties": { - "count": { - "type": "number" - }, - "pipelines": { - "$ref": "#/components/schemas/PipelineList" + "available": { + "type": "boolean" } } } @@ -12789,11 +7905,12 @@ } } }, - "/api/v1/applications/{applicationId}/bom": { + "/api/v1/projects/{instanceId}/status": { "get": { - "summary": "Get application BOM", + "summary": "Get the live status of an instance", "tags": [ - "Applications" + "Instances", + "Live State" ], "parameters": [ { @@ -12801,7 +7918,7 @@ "type": "string" }, "in": "path", - "name": "applicationId", + "name": "instanceId", "required": true } ], @@ -12811,7 +7928,19 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ApplicationBom" + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "id": { + "type": "string" + }, + "meta": { + "type": "object", + "additionalProperties": true + } + } } } } @@ -12829,19 +7958,38 @@ } } }, - "/api/v1/teams/{teamId}/bom": { - "get": { - "summary": "Get team BOM", + "/api/v1/projects/{instanceId}/generate/snapshot-description": { + "post": { + "summary": "Generate a description of changes between a project's current state and latest snapshot", "tags": [ - "Teams" + "Instances", + "Snapshots" ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "target" + ], + "properties": { + "target": { + "type": "string" + } + } + } + } + } + }, "parameters": [ { "schema": { "type": "string" }, "in": "path", - "name": "teamId", + "name": "instanceId", "required": true } ], @@ -12851,10 +7999,8 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ApplicationBom" - } + "type": "object", + "additionalProperties": true } } } @@ -12872,11 +8018,11 @@ } } }, - "/api/v1/flow-blueprints/": { + "/api/v1/projects/{instanceId}/devices/": { "get": { - "summary": "Get a list of the available flow blueprints", + "summary": "Get a list of devices assigned to an instance", "tags": [ - "Flow Blueprints" + "Instances" ], "parameters": [ { @@ -12943,6 +8089,14 @@ "in": "query", "name": "order", "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "instanceId", + "required": true } ], "responses": { @@ -12959,8 +8113,11 @@ "count": { "type": "number" }, - "blueprints": { - "$ref": "#/components/schemas/FlowBlueprintSummaryList" + "devices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Device" + } } } } @@ -12978,59 +8135,13 @@ } } } - }, - "post": { - "summary": "Create a flow blueprint - admin-only", - "tags": [ - "Flow Blueprints" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/FlowBlueprintInput" - } - ], - "required": [ - "name" - ] - } - } - } - }, - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FlowBlueprintSummary" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } } }, - "/api/v1/flow-blueprints/{flowBlueprintId}": { + "/api/v1/projects/{instanceId}/devices/settings": { "get": { - "summary": "Get full details of a flow blueprint", + "summary": "Get instance device settings", "tags": [ - "Flow Blueprints" + "Instances" ], "parameters": [ { @@ -13038,7 +8149,7 @@ "type": "string" }, "in": "path", - "name": "flowBlueprintId", + "name": "instanceId", "required": true } ], @@ -13048,7 +8159,13 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FlowBlueprint" + "type": "object", + "properties": { + "targetSnapshot": { + "type": "string", + "nullable": true + } + } } } } @@ -13065,18 +8182,33 @@ } } }, - "delete": { - "summary": "Delete a flow blueprint - admin-only", + "post": { + "summary": "Update instance device settings", "tags": [ - "Flow Blueprints" + "Instances" ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "targetSnapshot": { + "type": "string" + } + } + } + } + } + }, "parameters": [ { "schema": { "type": "string" }, "in": "path", - "name": "flowBlueprintId", + "name": "instanceId", "required": true } ], @@ -13102,29 +8234,21 @@ } } } - }, - "put": { - "summary": "Update a flow blueprint - admin-only", + } + }, + "/api/v1/projects/{instanceId}/actions/start": { + "post": { + "summary": "Start an instance", "tags": [ - "Flow Blueprints" + "Instance Actions" ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FlowBlueprintInput" - } - } - } - }, "parameters": [ { "schema": { "type": "string" }, "in": "path", - "name": "flowBlueprintId", + "name": "instanceId", "required": true } ], @@ -13134,7 +8258,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FlowBlueprintSummary" + "$ref": "#/components/schemas/APIStatus" + } + } + } + }, + "500": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -13152,23 +8286,20 @@ } } }, - "/api/v1/flow-blueprints/export": { - "get": { - "summary": "Export one or more Blueprints", + "/api/v1/projects/{instanceId}/actions/stop": { + "post": { + "summary": "Stop an instance", "tags": [ - "Flow Blueprints" + "Instance Actions" ], "parameters": [ { "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, - "in": "query", - "name": "id", - "required": false + "in": "path", + "name": "instanceId", + "required": true } ], "responses": { @@ -13177,22 +8308,12 @@ "content": { "application/json": { "schema": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/FlowBlueprintExport" - } - ], - "properties": { - "count": { - "type": "integer" - } - } + "$ref": "#/components/schemas/APIStatus" } } } }, - "4XX": { + "500": { "description": "Default Response", "content": { "application/json": { @@ -13201,36 +8322,6 @@ } } } - } - } - } - }, - "/api/v1/flow-blueprints/export-public": { - "get": { - "summary": "Export one or more Blueprints", - "tags": [ - "Flow Blueprints" - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/FlowBlueprintExport" - } - ], - "properties": { - "count": { - "type": "integer" - } - } - } - } - } }, "4XX": { "description": "Default Response", @@ -13245,55 +8336,39 @@ } } }, - "/api/v1/flow-blueprints/import": { + "/api/v1/projects/{instanceId}/actions/restart": { "post": { - "summary": "Import one or more Blueprints", + "summary": "Restart an instance", "tags": [ - "Flow Blueprints" + "Instance Actions" ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "blueprints": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": true - } - }, - "count": { - "type": "integer" - } - }, - "required": [ - "blueprints" - ] - } - } + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "instanceId", + "required": true } - }, + ], "responses": { - "201": { + "200": { "description": "Default Response", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "blueprints": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FlowBlueprintSummary" - } - }, - "count": { - "type": "integer" - } - } + "$ref": "#/components/schemas/APIStatus" + } + } + } + }, + "500": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -13311,84 +8386,19 @@ } } }, - "/api/v1/applications/{applicationId}/device-groups/": { - "get": { - "summary": "Get a list of device groups in an application", + "/api/v1/projects/{instanceId}/actions/suspend": { + "post": { + "summary": "Suspend an instance", "tags": [ - "Application Device Groups" + "Instance Actions" ], "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "query", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "cursor", - "required": false - }, - { - "schema": { - "type": "number" - }, - "in": "query", - "name": "limit", - "required": false - }, - { - "schema": { - "type": "number", - "minimum": 1 - }, - "in": "query", - "name": "page", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "sort", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "dir", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "order", - "required": false - }, { "schema": { "type": "string" }, "in": "path", - "name": "applicationId", + "name": "instanceId", "required": true } ], @@ -13398,21 +8408,17 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - }, - "count": { - "type": "number" - }, - "groups": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceGroupSummary" - } - } - } + "$ref": "#/components/schemas/APIStatus" + } + } + } + }, + "500": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -13428,11 +8434,13 @@ } } } - }, + } + }, + "/api/v1/projects/{instanceId}/actions/rollback": { "post": { - "summary": "Add a new Device Group to an Application", + "summary": "Rollback an instance to a snapshot", "tags": [ - "Application Device Groups" + "Instance Actions" ], "requestBody": { "required": true, @@ -13441,16 +8449,10 @@ "schema": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "description": { + "snapshot": { "type": "string" } - }, - "required": [ - "name" - ] + } } } } @@ -13461,17 +8463,27 @@ "type": "string" }, "in": "path", - "name": "applicationId", + "name": "instanceId", "required": true } ], "responses": { - "201": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIStatus" + } + } + } + }, + "500": { "description": "Default Response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceGroupSummary" + "$ref": "#/components/schemas/APIError" } } } @@ -13489,51 +8501,69 @@ } } }, - "/api/v1/applications/{applicationId}/device-groups/{groupId}": { - "put": { - "summary": "Update a Device Group", + "/api/v1/projects/{instanceId}/actions/restartStack": { + "post": { + "summary": "Restart an instance stack", "tags": [ - "Application Device Groups" + "Instance Actions" ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "targetSnapshotId": { - "type": [ - "string", - "null" - ] - } - } - } - } - } - }, "parameters": [ { "schema": { "type": "string" }, "in": "path", - "name": "applicationId", + "name": "instanceId", "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIStatus" + } + } + } + }, + "500": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/projects/{instanceId}/snapshots/": { + "get": { + "summary": "Get a list of instance snapshots", + "tags": [ + "Snapshots" + ], + "parameters": [ { "schema": { "type": "string" }, "in": "path", - "name": "groupId", + "name": "instanceId", "required": true } ], @@ -13544,7 +8574,20 @@ "application/json": { "schema": { "type": "object", - "additionalProperties": false + "properties": { + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + }, + "count": { + "type": "number" + }, + "snapshots": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Snapshot" + } + } + } } } } @@ -13559,28 +8602,80 @@ } } } - } - }, - "get": { - "summary": "Get a specific Device Group", - "tags": [ - "Application Device Groups" - ], + } + }, + "post": { + "summary": "Create a snapshot from an instance", + "tags": [ + "Snapshots" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "flows": { + "oneOf": [ + { + "type": "object", + "properties": { + "flows": { + "type": "array", + "items": { + "type": "object" + } + }, + "credentials": { + "type": "object" + } + } + }, + { + "type": "array", + "items": { + "type": "object" + } + } + ] + }, + "credentials": { + "type": "object" + }, + "credentialSecret": { + "type": "string" + }, + "settings": { + "type": "object", + "properties": { + "modules": { + "type": "object", + "additionalProperties": true + } + } + }, + "setAsTarget": { + "type": "boolean" + } + } + } + } + } + }, "parameters": [ { "schema": { "type": "string" }, "in": "path", - "name": "applicationId", - "required": true - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "groupId", + "name": "instanceId", "required": true } ], @@ -13590,7 +8685,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceGroup" + "$ref": "#/components/schemas/Snapshot" } } } @@ -13606,49 +8701,21 @@ } } } - }, - "patch": { - "summary": "Update Device Group membership", + } + }, + "/api/v1/projects/{instanceId}/snapshots/{snapshotId}": { + "get": { + "summary": "Get details of a snapshot", "tags": [ - "Application Device Groups" + "Snapshots" ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "add": { - "type": "array", - "items": { - "type": "string" - } - }, - "remove": { - "type": "array", - "items": { - "type": "string" - } - }, - "set": { - "type": "array", - "items": { - "type": "string" - } - } - } - } - } - } - }, "parameters": [ { "schema": { "type": "string" }, "in": "path", - "name": "applicationId", + "name": "instanceId", "required": true }, { @@ -13656,7 +8723,7 @@ "type": "string" }, "in": "path", - "name": "groupId", + "name": "snapshotId", "required": true } ], @@ -13666,8 +8733,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "additionalProperties": false + "$ref": "#/components/schemas/Snapshot" } } } @@ -13685,9 +8751,9 @@ } }, "delete": { - "summary": "Delete a Device Group", + "summary": "Delete a snapshot", "tags": [ - "Application Device Groups" + "Snapshots" ], "parameters": [ { @@ -13695,7 +8761,7 @@ "type": "string" }, "in": "path", - "name": "applicationId", + "name": "instanceId", "required": true }, { @@ -13703,7 +8769,7 @@ "type": "string" }, "in": "path", - "name": "groupId", + "name": "snapshotId", "required": true } ], @@ -13713,8 +8779,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "additionalProperties": false + "$ref": "#/components/schemas/APIStatus" } } } @@ -13732,11 +8797,11 @@ } } }, - "/api/v1/applications/{applicationId}/device-groups/{groupId}/settings": { - "put": { - "summary": "Update a Device Group Settings", + "/api/v1/projects/{instanceId}/snapshots/{snapshotId}/export": { + "post": { + "summary": "Export an instance snapshot using the provided credentialSecret", "tags": [ - "Application Device Groups" + "Snapshots" ], "requestBody": { "required": true, @@ -13745,12 +8810,8 @@ "schema": { "type": "object", "properties": { - "env": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": true - } + "credentialSecret": { + "type": "string" } } } @@ -13763,7 +8824,7 @@ "type": "string" }, "in": "path", - "name": "applicationId", + "name": "instanceId", "required": true }, { @@ -13771,7 +8832,7 @@ "type": "string" }, "in": "path", - "name": "groupId", + "name": "snapshotId", "required": true } ], @@ -13781,7 +8842,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIStatus" + "$ref": "#/components/schemas/ExportedSnapshot" } } } @@ -13799,11 +8860,11 @@ } } }, - "/api/v1/teams/{teamId}/device-groups/": { + "/api/v1/stacks/": { "get": { - "summary": "Get a list of device groups in an application", + "summary": "Get a list of all stacks", "tags": [ - "Application Device Groups" + "Stacks" ], "parameters": [ { @@ -13875,9 +8936,9 @@ "schema": { "type": "string" }, - "in": "path", - "name": "applicationId", - "required": true + "in": "query", + "name": "filter", + "required": false } ], "responses": { @@ -13894,10 +8955,10 @@ "count": { "type": "number" }, - "groups": { + "stacks": { "type": "array", "items": { - "$ref": "#/components/schemas/DeviceGroupSummary" + "$ref": "#/components/schemas/Stack" } } } @@ -13916,34 +8977,11 @@ } } } - } - }, - "/api/v1/projects/{projectId}/files/_/{path}": { - "get": { - "summary": "List files stored in the instance", - "tags": [ - "Instance Files" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "instanceId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response" - } - } }, - "put": { - "summary": "Update file properties in the instance", + "post": { + "summary": "Create a stack - admin-only", "tags": [ - "Instance Files" + "Stacks" ], "requestBody": { "required": true, @@ -13951,39 +8989,100 @@ "application/json": { "schema": { "type": "object", + "required": [ + "name" + ], "properties": { - "path": { + "name": { "type": "string" }, - "share": { - "type": "object", - "additionalProperties": true + "label": { + "type": "string" + }, + "active": { + "type": "boolean" + }, + "projectType": { + "type": "string" + }, + "properties": { + "type": "object" + }, + "replaces": { + "type": "string" } } } } } }, + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Stack" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/stacks/{stackId}": { + "get": { + "summary": "Get details of a stacks", + "tags": [ + "Stacks" + ], "parameters": [ { "schema": { "type": "string" }, "in": "path", - "name": "instanceId", + "name": "stackId", "required": true } ], "responses": { "200": { - "description": "Default Response" + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Stack" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } } } }, "delete": { - "summary": "Delete a file in the instance", + "summary": "Delete a stack - admin-only", "tags": [ - "Instance Files" + "Stacks" ], "parameters": [ { @@ -13991,43 +9090,104 @@ "type": "string" }, "in": "path", - "name": "instanceId", + "name": "stackId", "required": true } ], "responses": { "200": { - "description": "Default Response" + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIStatus" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } } } }, - "post": { - "summary": "Upload a file to the instance/Create directory", + "put": { + "summary": "Update details of a stack - admin-only", "tags": [ - "Instance Files" + "Stacks" ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "label": { + "type": "string" + }, + "active": { + "type": "boolean" + }, + "projectType": { + "type": "string" + }, + "properties": { + "type": "object" + } + } + } + } + } + }, "parameters": [ { "schema": { "type": "string" }, "in": "path", - "name": "instanceId", + "name": "stackId", "required": true } ], "responses": { "200": { - "description": "Default Response" + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Stack" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } } } } }, - "/api/v1/teams/{teamId}/broker/clients": { + "/api/v1/templates/": { "get": { - "summary": "List MQTT clients for the team", + "summary": "Get a list of all templates", "tags": [ - "MQTT Broker" + "Templates" ], "parameters": [ { @@ -14094,14 +9254,6 @@ "in": "query", "name": "order", "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamId", - "required": true } ], "responses": { @@ -14112,27 +9264,19 @@ "schema": { "type": "object", "properties": { - "clients": { - "type": "array" - }, "meta": { "$ref": "#/components/schemas/PaginationMeta" }, "count": { - "type": "integer" + "type": "number" + }, + "templates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TemplateSummary" + } } - }, - "additionalProperties": true - } - } - } - }, - "500": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" + } } } } @@ -14148,13 +9292,11 @@ } } } - } - }, - "/api/v1/teams/{teamId}/broker/client": { + }, "post": { - "summary": "Create new MQTT client for the team", + "summary": "Create a template - admin-only", "tags": [ - "MQTT Broker" + "Templates" ], "requestBody": { "required": true, @@ -14162,59 +9304,39 @@ "application/json": { "schema": { "type": "object", + "required": [ + "name", + "settings", + "policy" + ], "properties": { - "acls": { - "type": "array" - }, - "username": { + "name": { "type": "string" }, - "password": { + "active": { + "type": "boolean" + }, + "description": { "type": "string" + }, + "settings": { + "type": "object" + }, + "policy": { + "type": "object" } } } } } }, - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamId", - "required": true - } - ], "responses": { - "201": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "username": { - "type": "string" - }, - "acls": { - "type": "array" - } - } - } - } - } - }, - "500": { + "200": { "description": "Default Response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIError" + "$ref": "#/components/schemas/TemplateSummary" } } } @@ -14232,11 +9354,11 @@ } } }, - "/api/v1/teams/{teamId}/broker/client/{username}": { + "/api/v1/templates/{templateId}": { "get": { - "summary": "Get details about a specific MQTT client", + "summary": "Get a template", "tags": [ - "MQTT Broker" + "Templates" ], "parameters": [ { @@ -14244,15 +9366,7 @@ "type": "string" }, "in": "path", - "name": "teamId", - "required": true - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "username", + "name": "templateId", "required": true } ], @@ -14262,48 +9376,12 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "username": { - "type": "string" - }, - "acls": { - "type": "array" - }, - "owner": { - "anyOf": [ - { - "type": "null" - }, - { - "type": "object", - "properties": { - "instanceType": { - "type": "string", - "enum": [ - "instance", - "device" - ] - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - } - } - } - ] - } - } + "$ref": "#/components/schemas/Template" } } } }, - "500": { + "4XX": { "description": "Default Response", "content": { "application/json": { @@ -14312,6 +9390,34 @@ } } } + } + } + }, + "delete": { + "summary": "Delete a template - admin-only", + "tags": [ + "Templates" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "templateId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIStatus" + } + } + } }, "4XX": { "description": "Default Response", @@ -14326,44 +9432,38 @@ } }, "put": { - "summary": "Modify a MQTT Client", + "summary": "Update a template - admin-only", "tags": [ - "MQTT Broker" + "Templates" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "anyOf": [ - { - "type": "object", - "properties": { - "password": { - "type": "string" - }, - "acls": { - "type": "array" - } - } + "type": "object", + "required": [ + "name", + "settings", + "policy" + ], + "properties": { + "name": { + "type": "string" }, - { - "type": "object", - "properties": { - "password": { - "type": "string" - } - } + "active": { + "type": "boolean" }, - { - "type": "object", - "properties": { - "acls": { - "type": "array" - } - } + "description": { + "type": "string" + }, + "settings": { + "type": "object" + }, + "policy": { + "type": "object" } - ] + } } } } @@ -14374,46 +9474,17 @@ "type": "string" }, "in": "path", - "name": "teamId", - "required": true - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "username", + "name": "templateId", "required": true } ], "responses": { - "201": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "username": { - "type": "string" - }, - "acls": { - "type": "array" - } - } - } - } - } - }, - "500": { + "200": { "description": "Default Response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIError" + "$ref": "#/components/schemas/TemplateSummary" } } } @@ -14428,29 +9499,80 @@ } } } - } - }, - "delete": { - "summary": "Delete a MQTT client", + } + } + }, + "/api/v1/devices/": { + "get": { + "summary": "Get a list of all devices - admin-only", "tags": [ - "MQTT Broker" + "Devices" ], "parameters": [ { "schema": { "type": "string" }, - "in": "path", - "name": "teamId", - "required": true + "in": "query", + "name": "query", + "required": false }, { "schema": { "type": "string" }, - "in": "path", - "name": "username", - "required": true + "in": "query", + "name": "cursor", + "required": false + }, + { + "schema": { + "type": "number" + }, + "in": "query", + "name": "limit", + "required": false + }, + { + "schema": { + "type": "number", + "minimum": 1 + }, + "in": "query", + "name": "page", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sort", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "dir", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "order", + "required": false } ], "responses": { @@ -14459,17 +9581,21 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "500": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" + "type": "object", + "properties": { + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + }, + "count": { + "type": "number" + }, + "devices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Device" + } + } + } } } } @@ -14485,13 +9611,11 @@ } } } - } - }, - "/api/v1/teams/{teamId}/broker/client/{username}/link": { + }, "post": { - "summary": "Link a MQTT client to a device or project", + "summary": "Create or provision a device", "tags": [ - "MQTT Broker" + "Devices" ], "requestBody": { "required": true, @@ -14501,53 +9625,67 @@ "type": "object", "oneOf": [ { - "type": "object", - "required": [ - "password" - ], - "properties": { - "password": { - "type": "string" + "allOf": [ + { + "required": [ + "name" + ] + }, + { + "required": [ + "team" + ] + }, + { + "not": { + "required": [ + "setup" + ] + } } - }, - "additionalProperties": false + ] }, { - "type": "object", - "required": [ - "ownerType", - "ownerId" - ], - "properties": { - "ownerType": { - "type": "string", - "enum": [ - "device", - "instance" + "allOf": [ + { + "required": [ + "setup" ] }, - "ownerId": { - "type": "string" + { + "not": { + "required": [ + "name" + ] + } }, - "password": { - "type": "string" + { + "not": { + "required": [ + "team" + ] + } } - }, - "additionalProperties": false + ] } ], "properties": { - "ownerType": { - "type": "string", - "enum": [ - "device", - "instance" - ] + "name": { + "type": "string" }, - "ownerId": { + "type": { "type": "string" }, - "password": { + "team": { + "type": "string" + }, + "setup": { + "type": "boolean", + "enum": [ + true + ] + }, + "agentHost": { "type": "string" } } @@ -14555,24 +9693,6 @@ } } }, - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamId", - "required": true - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "username", - "required": true - } - ], "responses": { "200": { "description": "Default Response", @@ -14580,30 +9700,20 @@ "application/json": { "schema": { "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/Device" + } + ], "properties": { - "id": { - "type": "string" - }, - "username": { - "type": "string" - }, - "acls": { - "type": "array" + "credentials": { + "type": "object", + "additionalProperties": true }, - "owner": { + "meta": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "instance", - "device" - ] - }, - "id": { - "type": "string" - }, - "name": { + "ffVersion": { "type": "string" } } @@ -14613,51 +9723,42 @@ } } }, - "201": { + "4XX": { "description": "Default Response", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "username": { - "type": "string" - }, - "acls": { - "type": "array" - }, - "owner": { - "type": "object", - "properties": { - "instanceType": { - "type": "string", - "enum": [ - "instance", - "device" - ] - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - } - } - } - } + "$ref": "#/components/schemas/APIError" } } } - }, - "500": { + } + } + } + }, + "/api/v1/devices/{deviceId}": { + "get": { + "summary": "Get details of a device", + "tags": [ + "Devices" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "deviceId", + "required": true + } + ], + "responses": { + "200": { "description": "Default Response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIError" + "$ref": "#/components/schemas/Device" } } } @@ -14673,13 +9774,11 @@ } } } - } - }, - "/api/v1/teams/{teamId}/brokers": { - "get": { - "summary": "Get credentials for 3rd party MQTT brokers", + }, + "delete": { + "summary": "Delete a device", "tags": [ - "MQTT Broker" + "Devices" ], "parameters": [ { @@ -14687,7 +9786,7 @@ "type": "string" }, "in": "path", - "name": "teamId", + "name": "deviceId", "required": true } ], @@ -14697,32 +9796,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - }, - "count": { - "type": "number" - }, - "brokers": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MQTTBroker" - } - } - }, - "additionalProperties": true - } - } - } - }, - "500": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" + "$ref": "#/components/schemas/APIStatus" } } } @@ -14739,17 +9813,33 @@ } } }, - "post": { - "summary": "Create credentials for a 3rd party MQTT broker", + "put": { + "summary": "Update a device", "tags": [ - "MQTT Broker" + "Devices" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MQTTBrokerInput" + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "instance": { + "type": "string", + "nullable": true + }, + "application": { + "type": "string", + "nullable": true + } + } } } } @@ -14760,27 +9850,17 @@ "type": "string" }, "in": "path", - "name": "teamId", + "name": "deviceId", "required": true } ], "responses": { - "201": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MQTTBroker" - } - } - } - }, - "500": { + "200": { "description": "Default Response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIError" + "$ref": "#/components/schemas/Device" } } } @@ -14798,11 +9878,11 @@ } } }, - "/api/v1/teams/{teamId}/brokers/{brokerId}/credentials": { - "get": { - "summary": "Gets credentials for a 3rd party MQTT broker", + "/api/v1/devices/{deviceId}/generate_credentials": { + "post": { + "summary": "Regenerate device credentials", "tags": [ - "MQTT Broker" + "Devices" ], "parameters": [ { @@ -14810,15 +9890,7 @@ "type": "string" }, "in": "path", - "name": "teamId", - "required": true - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "brokerId", + "name": "deviceId", "required": true } ], @@ -14828,17 +9900,8 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MQTTBroker" - } - } - } - }, - "500": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" + "type": "object", + "additionalProperties": true } } } @@ -14856,18 +9919,42 @@ } } }, - "/api/v1/teams/{teamId}/brokers/{brokerId}": { + "/api/v1/devices/{deviceId}/settings": { "put": { - "summary": "Delete credentials for a 3rd party MQTT broker", + "summary": "Update a devices settings", "tags": [ - "MQTT Broker" + "Devices" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MQTTBrokerInput" + "type": "object", + "properties": { + "env": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + }, + "autoSnapshot": { + "type": "boolean" + }, + "palette": { + "type": "object", + "additionalProperties": true + }, + "editor": { + "type": "object", + "additionalProperties": true + }, + "security": { + "type": "object", + "additionalProperties": true + } + } } } } @@ -14878,15 +9965,7 @@ "type": "string" }, "in": "path", - "name": "teamId", - "required": true - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "brokerId", + "name": "deviceId", "required": true } ], @@ -14896,17 +9975,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MQTTBroker" - } - } - } - }, - "500": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" + "$ref": "#/components/schemas/APIStatus" } } } @@ -14924,9 +9993,9 @@ } }, "get": { - "summary": "Get 3rd Party Broker details and status", + "summary": "Get a devices settings", "tags": [ - "MQTT Broker" + "Devices" ], "parameters": [ { @@ -14934,15 +10003,7 @@ "type": "string" }, "in": "path", - "name": "teamId", - "required": true - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "brokerId", + "name": "deviceId", "required": true } ], @@ -14952,91 +10013,31 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/MQTTBroker" + "type": "object", + "properties": { + "env": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } }, - { + "autoSnapshot": { + "type": "boolean" + }, + "palette": { "type": "object", - "properties": { - "state": { - "type": "string" - } - }, - "required": [ - "state" - ], - "additionalProperties": false + "additionalProperties": true + }, + "editor": { + "type": "object", + "additionalProperties": true + }, + "security": { + "type": "object", + "additionalProperties": true } - ] - } - } - } - }, - "500": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "delete": { - "summary": "Delete credentials for a 3rd party MQTT broker", - "tags": [ - "MQTT Broker" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamId", - "required": true - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "brokerId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {}, - "additionalProperties": true - } - } - } - }, - "500": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" + } } } } @@ -15054,26 +10055,19 @@ } } }, - "/api/v1/teams/{teamId}/brokers/{brokerId}/topics": { - "get": { + "/api/v1/devices/{deviceId}/logs": { + "post": { + "summary": "Start device logging", "tags": [ - "MQTT Broker" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamId", - "required": true - }, + "Devices" + ], + "parameters": [ { "schema": { "type": "string" }, "in": "path", - "name": "brokerId", + "name": "deviceId", "required": true } ], @@ -15084,18 +10078,17 @@ "application/json": { "schema": { "type": "object", - "properties": {}, - "additionalProperties": true - } - } - } - }, - "500": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" + "properties": { + "url": { + "type": "string" + }, + "username": { + "type": "string" + }, + "password": { + "type": "string" + } + } } } } @@ -15111,11 +10104,13 @@ } } } - }, + } + }, + "/api/v1/devices/{deviceId}/resources": { "post": { - "summary": "Store Topics from a 3rd party MQTT broker", + "summary": "Start device logging", "tags": [ - "MQTT Broker" + "Devices" ], "parameters": [ { @@ -15123,41 +10118,28 @@ "type": "string" }, "in": "path", - "name": "teamId", - "required": true - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "brokerId", + "name": "deviceId", "required": true } ], "responses": { - "201": { + "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { - "topic": { + "url": { + "type": "string" + }, + "username": { + "type": "string" + }, + "password": { "type": "string" } - }, - "additionalProperties": true - } - } - } - }, - "500": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" + } } } } @@ -15175,56 +10157,50 @@ } } }, - "/api/v1/teams/{teamId}/brokers/{brokerId}/topics/{topicId}": { + "/api/v1/devices/{deviceId}/mode": { "put": { + "summary": "Set device mode", "tags": [ - "MQTT Broker" + "Devices" ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "mode": { + "type": "string", + "nullable": true + } + } + } + } + } + }, "parameters": [ { "schema": { "type": "string" }, "in": "path", - "name": "teamId", - "required": true - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "brokerId", - "required": true - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "topicId", + "name": "deviceId", "required": true } ], "responses": { - "201": { + "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", - "properties": {}, - "additionalProperties": true - } - } - } - }, - "500": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" + "properties": { + "mode": { + "type": "string" + } + } } } } @@ -15240,55 +10216,52 @@ } } } - }, - "delete": { + } + }, + "/api/v1/devices/{deviceId}/snapshot": { + "post": { + "summary": "Create a snapshot from a device owned by an instance", "tags": [ - "MQTT Broker" + "Devices" ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "setAsTarget": { + "type": "boolean" + } + } + } + } + } + }, "parameters": [ { "schema": { "type": "string" }, "in": "path", - "name": "teamId", - "required": true - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "brokerId", - "required": true - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "topicId", + "name": "deviceId", "required": true } ], "responses": { - "201": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - }, - "500": { + "200": { "description": "Default Response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIError" + "$ref": "#/components/schemas/Snapshot" } } } @@ -15306,74 +10279,109 @@ } } }, - "/api/v1/teams/{teamId}/npm/packages": { + "/api/v1/devices/{deviceId}/audit-log": { "get": { - "summary": "Gets the private packages owned by this team", "tags": [ - "NPM Packages" + "Devices" ], "parameters": [ { "schema": { "type": "string" }, - "in": "path", - "name": "teamId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response" - } - } - } - }, - "/api/v1/teams/{teamId}/npm/subflow": { - "put": { - "summary": "Allows Subflow packages to be stored in the Team Registry", - "tags": [ - "NPM Package" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "package": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "name", - "version" - ], - "additionalProperties": true - }, - "subflow": { - "type": "object", - "additionalProperties": true - } - } - } - } - } - }, - "parameters": [ + "in": "query", + "name": "query", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "cursor", + "required": false + }, + { + "schema": { + "type": "number" + }, + "in": "query", + "name": "limit", + "required": false + }, + { + "schema": { + "type": "number", + "minimum": 1 + }, + "in": "query", + "name": "page", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sort", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "dir", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "order", + "required": false + }, + { + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "in": "query", + "name": "event", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "username", + "required": false + }, { "schema": { "type": "string" }, "in": "path", - "name": "teamId", + "name": "deviceId", "required": true } ], @@ -15383,7 +10391,18 @@ "content": { "application/json": { "schema": { - "type": "object" + "type": "object", + "properties": { + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + }, + "count": { + "type": "number" + }, + "log": { + "$ref": "#/components/schemas/AuditLogEntryList" + } + } } } } @@ -15401,101 +10420,119 @@ } } }, - "/api/v1/teams/{teamId}/npm/userToken": { + "/api/v1/devices/{deviceId}/audit-log/export": { "get": { - "summary": "Check if user already has a NPM auth token", "tags": [ - "NPM packages" + "Devices" ], "parameters": [ { "schema": { "type": "string" }, - "in": "path", - "name": "teamId", - "required": true + "in": "query", + "name": "query", + "required": false }, { "schema": { "type": "string" }, - "in": "path", - "name": "userId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object" - } - } - } + "in": "query", + "name": "cursor", + "required": false }, - "404": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object" - } - } - } + { + "schema": { + "type": "number" + }, + "in": "query", + "name": "limit", + "required": false }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" + { + "schema": { + "type": "number", + "minimum": 1 + }, + "in": "query", + "name": "page", + "required": false + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sort", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "dir", + "required": false + }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "in": "query", + "name": "order", + "required": false + }, + { + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } } - } - } - } - } - }, - "post": { - "summary": "Generate a new user password for NPM registry", - "tags": [ - "NPM packages" - ], - "parameters": [ + ] + }, + "in": "query", + "name": "event", + "required": false + }, { "schema": { "type": "string" }, - "in": "path", - "name": "teamId", - "required": true + "in": "query", + "name": "username", + "required": false }, { "schema": { "type": "string" }, "in": "path", - "name": "userId", + "name": "deviceId", "required": true } ], "responses": { - "201": { + "200": { "description": "Default Response", "content": { - "application/json": { + "text/csv": { "schema": { - "type": "object", - "properties": { - "username": { - "type": "string" - }, - "token": { - "type": "string" - } - } + "type": "string" } } } @@ -15513,73 +10550,49 @@ } } }, - "/api/v1/projects/{instanceId}/resources/": { - "get": { - "summary": "Returns resource usage history for an Instance", + "/api/v1/devices/{deviceId}/generate/snapshot-description": { + "post": { + "summary": "Generate a description of changes between a project's current state and latest snapshot", "tags": [ - "Instances" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "instanceId", - "required": true - } + "Instances", + "Snapshots" ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - }, - "resources": { - "type": "array", - "items": { - "type": "object", - "properties": { - "src": { - "type": "string" - }, - "ps": { - "type": "number" - }, - "cpu": { - "type": "number" - }, - "hs": { - "type": "number" - }, - "hu": { - "type": "number" - }, - "ts": { - "type": "number" - } - } - } - }, - "count": { - "type": "number" - } + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "target" + ], + "properties": { + "target": { + "type": "string" } } } } - }, - "500": { + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "instanceId", + "required": true + } + ], + "responses": { + "200": { "description": "Default Response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIError" + "type": "object", + "additionalProperties": true } } } @@ -15597,10 +10610,11 @@ } } }, - "/api/v1/teams/{teamId}/databases/": { + "/api/v1/devices/{deviceId}/snapshots/": { "get": { + "summary": "Get a list of snapshots for a device", "tags": [ - "FF tables" + "DeviceSnapshots" ], "parameters": [ { @@ -15608,7 +10622,7 @@ "type": "string" }, "in": "path", - "name": "teamId", + "name": "deviceId", "required": true } ], @@ -15618,24 +10632,25 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DatabaseCredentials" + "type": "object", + "properties": { + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + }, + "count": { + "type": "number" + }, + "snapshots": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Snapshot" + } + } } } } } }, - "500": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - }, "4XX": { "description": "Default Response", "content": { @@ -15649,8 +10664,9 @@ } }, "post": { + "summary": "Create a snapshot from a device", "tags": [ - "FF tables" + "Devices" ], "requestBody": { "required": true, @@ -15660,8 +10676,13 @@ "type": "object", "properties": { "name": { - "type": "string", - "description": "Name of the database" + "type": "string" + }, + "description": { + "type": "string" + }, + "setAsTarget": { + "type": "boolean" } } } @@ -15674,7 +10695,7 @@ "type": "string" }, "in": "path", - "name": "teamId", + "name": "deviceId", "required": true } ], @@ -15684,17 +10705,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DatabaseCredentials" - } - } - } - }, - "500": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" + "$ref": "#/components/schemas/Snapshot" } } } @@ -15712,10 +10723,11 @@ } } }, - "/api/v1/teams/{teamId}/databases/{databaseId}": { + "/api/v1/devices/{deviceId}/snapshots/{snapshotId}": { "get": { + "summary": "Get details of a device snapshot", "tags": [ - "FF tables" + "DeviceSnapshots" ], "parameters": [ { @@ -15723,7 +10735,15 @@ "type": "string" }, "in": "path", - "name": "databaseId", + "name": "deviceId", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "snapshotId", "required": true } ], @@ -15733,12 +10753,12 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DatabaseCredentials" + "$ref": "#/components/schemas/Snapshot" } } } }, - "500": { + "4XX": { "description": "Default Response", "content": { "application/json": { @@ -15747,6 +10767,42 @@ } } } + } + } + }, + "delete": { + "summary": "Delete a devices snapshot", + "tags": [ + "DeviceSnapshots" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "deviceId", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "snapshotId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIStatus" + } + } + } }, "4XX": { "description": "Default Response", @@ -15759,10 +10815,13 @@ } } } - }, - "delete": { + } + }, + "/api/v1/devices/{deviceId}/actions/restart": { + "post": { + "summary": "Restart Node-RED", "tags": [ - "FF tables" + "Device Actions" ], "parameters": [ { @@ -15770,7 +10829,7 @@ "type": "string" }, "in": "path", - "name": "databaseId", + "name": "deviceId", "required": true } ], @@ -15779,7 +10838,9 @@ "description": "Default Response", "content": { "application/json": { - "schema": {} + "schema": { + "$ref": "#/components/schemas/APIStatus" + } } } }, @@ -15806,10 +10867,11 @@ } } }, - "/api/v1/teams/{teamId}/databases/{databaseId}/tables": { + "/api/v1/project-types/": { "get": { + "summary": "Get a list of all instance types", "tags": [ - "FF tables" + "Instance Types" ], "parameters": [ { @@ -15881,9 +10943,9 @@ "schema": { "type": "string" }, - "in": "path", - "name": "databaseId", - "required": true + "in": "query", + "name": "filter", + "required": false } ], "responses": { @@ -15894,42 +10956,23 @@ "schema": { "type": "object", "properties": { + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + }, "count": { "type": "number" }, - "tables": { + "types": { "type": "array", "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "schema": { - "type": "string" - } - } + "$ref": "#/components/schemas/InstanceType" } - }, - "meta": { - "type": "object", - "additionalProperties": true } } } } } }, - "500": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - }, "4XX": { "description": "Default Response", "content": { @@ -15943,8 +10986,9 @@ } }, "post": { + "summary": "Create an instance type - admin-only", "tags": [ - "FF tables" + "Instance Types" ], "requestBody": { "required": true, @@ -15952,40 +10996,42 @@ "application/json": { "schema": { "type": "object", + "required": [ + "name" + ], "properties": { "name": { "type": "string" }, - "columns": { - "$ref": "#/components/schemas/DatabaseTable" + "description": { + "type": "string" + }, + "active": { + "type": "boolean" + }, + "properties": { + "type": "object" + }, + "order": { + "type": "number" } } } } } }, - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "databaseId", - "required": true - } - ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DatabaseTable" + "$ref": "#/components/schemas/InstanceType" } } } }, - "500": { + "4XX": { "description": "Default Response", "content": { "application/json": { @@ -15994,6 +11040,36 @@ } } } + } + } + } + }, + "/api/v1/project-types/{instanceTypeId}": { + "get": { + "summary": "Get a details of an instance types", + "tags": [ + "Instance Types" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "instanceTypeId", + "required": true + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InstanceType" + } + } + } }, "4XX": { "description": "Default Response", @@ -16006,28 +11082,49 @@ } } } - } - }, - "/api/v1/teams/{teamId}/databases/{databaseId}/tables/{tableName}": { - "get": { + }, + "put": { + "summary": "Update an instance type - admin-only", "tags": [ - "FF tables" + "Instance Types" ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "active": { + "type": "boolean" + }, + "properties": { + "type": "object" + }, + "order": { + "type": "number" + }, + "defaultStack": { + "type": "string" + } + } + } + } + } + }, "parameters": [ { "schema": { "type": "string" }, "in": "path", - "name": "databaseId", - "required": true - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "tableName", + "name": "instanceTypeId", "required": true } ], @@ -16037,17 +11134,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DatabaseTable" - } - } - } - }, - "500": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" + "$ref": "#/components/schemas/InstanceType" } } } @@ -16065,8 +11152,9 @@ } }, "delete": { + "summary": "Delete an instance type - admin-only", "tags": [ - "FF tables" + "Instance Types" ], "parameters": [ { @@ -16074,15 +11162,7 @@ "type": "string" }, "in": "path", - "name": "databaseId", - "required": true - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "tableName", + "name": "instanceTypeId", "required": true } ], @@ -16092,17 +11172,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DatabaseTable" - } - } - } - }, - "500": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" + "$ref": "#/components/schemas/APIStatus" } } } @@ -16120,91 +11190,19 @@ } } }, - "/api/v1/teams/{teamId}/databases/{databaseId}/tables/{tableName}/data": { + "/api/v1/snapshots/{id}": { "get": { + "summary": "Get summary of a snapshot", "tags": [ - "FF tables" + "Snapshots" ], "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "query", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "cursor", - "required": false - }, - { - "schema": { - "type": "number" - }, - "in": "query", - "name": "limit", - "required": false - }, - { - "schema": { - "type": "number", - "minimum": 1 - }, - "in": "query", - "name": "page", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "sort", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "dir", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "order", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "databaseId", - "required": true - }, { "schema": { "type": "string" }, "in": "path", - "name": "tableName", + "name": "id", "required": true } ], @@ -16214,33 +11212,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "count": { - "type": "number" - }, - "rows": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": true - } - }, - "meta": { - "type": "object", - "additionalProperties": true - } - } - } - } - } - }, - "500": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" + "$ref": "#/components/schemas/Snapshot" } } } @@ -16256,12 +11228,11 @@ } } } - } - }, - "/api/v1/teams/{teamId}/mcp/": { - "get": { + }, + "delete": { + "summary": "Delete a snapshot", "tags": [ - "MCP" + "Snapshots" ], "parameters": [ { @@ -16269,7 +11240,7 @@ "type": "string" }, "in": "path", - "name": "teamId", + "name": "id", "required": true } ], @@ -16279,25 +11250,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "count": { - "type": "number" - }, - "servers": { - "$ref": "#/components/schemas/MCPRegistrationSummaryList" - } - } - } - } - } - }, - "500": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" + "$ref": "#/components/schemas/APIStatus" } } } @@ -16313,12 +11266,11 @@ } } } - } - }, - "/api/v1/teams/{teamId}/mcp/{type}/{typeId}/{nodeId}": { - "post": { + }, + "put": { + "summary": "Update a snapshot", "tags": [ - "MCP" + "Snapshots" ], "requestBody": { "required": true, @@ -16330,18 +11282,6 @@ "name": { "type": "string" }, - "endpointRoute": { - "type": "string" - }, - "protocol": { - "type": "string" - }, - "title": { - "type": "string" - }, - "version": { - "type": "string" - }, "description": { "type": "string" } @@ -16356,31 +11296,7 @@ "type": "string" }, "in": "path", - "name": "teamId", - "required": true - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "type", - "required": true - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "typeId", - "required": true - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "nodeId", + "name": "id", "required": true } ], @@ -16390,12 +11306,12 @@ "content": { "application/json": { "schema": { - "type": "object" + "$ref": "#/components/schemas/Snapshot" } } } }, - "500": { + "4XX": { "description": "Default Response", "content": { "application/json": { @@ -16406,10 +11322,13 @@ } } } - }, - "delete": { + } + }, + "/api/v1/snapshots/{id}/full": { + "get": { + "summary": "Get details of a snapshot", "tags": [ - "MCP" + "Snapshots" ], "parameters": [ { @@ -16417,51 +11336,17 @@ "type": "string" }, "in": "path", - "name": "teamId", - "required": true - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "type", - "required": true - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "typeId", - "required": true - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "nodeId", + "name": "id", "required": true } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object" - } - } - } - }, - "500": { + ], + "responses": { + "200": { "description": "Default Response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIError" + "$ref": "#/components/schemas/FullSnapshot" } } } @@ -16479,19 +11364,64 @@ } } }, - "/api/v1/projects/{projectId}/autoUpdateStack/": { - "get": { - "summary": "Returns when a Instance allowed to be restarted ", + "/api/v1/snapshots/{id}/export": { + "post": { + "summary": "Export a snapshot", "tags": [ - "Instances" + "Snapshots" ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "credentialSecret": { + "type": "string" + }, + "components": { + "type": "object", + "properties": { + "flows": { + "type": "boolean", + "default": true + }, + "credentials": { + "type": "boolean", + "default": true + }, + "envVars": { + "anyOf": [ + { + "type": "string", + "enum": [ + "all", + "keys" + ] + }, + { + "type": "boolean", + "enum": [ + false + ] + } + ] + } + } + } + } + } + } + } + }, "parameters": [ { "schema": { "type": "string" }, "in": "path", - "name": "projectId", + "name": "id", "required": true } ], @@ -16501,21 +11431,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "hour": { - "type": "number" - }, - "day": { - "type": "number" - }, - "restart": { - "type": "boolean" - } - } - } + "$ref": "#/components/schemas/ExportedSnapshot" } } } @@ -16531,11 +11447,13 @@ } } } - }, - "put": { - "summary": "Sets when an Instance can be restarted", + } + }, + "/api/v1/snapshots/import": { + "post": { + "summary": "Upload a snapshot", "tags": [ - "Instances" + "Snapshots" ], "requestBody": { "required": true, @@ -16544,20 +11462,89 @@ "schema": { "type": "object", "properties": { - "schedule": { - "type": "array", - "items": { - "type": "object", - "properties": { - "hour": { - "type": "number" + "ownerId": { + "type": "string" + }, + "ownerType": { + "type": "string" + }, + "snapshot": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "flows": { + "type": "object", + "properties": { + "flows": { + "type": "array", + "items": {}, + "minItems": 0 + }, + "credentials": { + "type": "object" + } }, - "day": { - "type": "number" + "required": [ + "flows" + ] + }, + "settings": { + "type": "object", + "properties": { + "settings": { + "type": "object" + }, + "env": { + "type": "object" + }, + "modules": { + "type": "object" + } }, - "restart": { - "type": "boolean" - } + "required": [] + } + }, + "required": [ + "name", + "flows", + "settings" + ] + }, + "credentialSecret": { + "type": "string" + }, + "components": { + "type": "object", + "properties": { + "flows": { + "type": "boolean", + "default": true + }, + "credentials": { + "type": "boolean", + "default": true + }, + "envVars": { + "anyOf": [ + { + "type": "string", + "enum": [ + "all", + "keys" + ] + }, + { + "type": "boolean", + "enum": [ + false + ] + } + ] } } } @@ -16566,14 +11553,52 @@ } } }, + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Snapshot" + } + } + } + }, + "4XX": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + } + } + }, + "/api/v1/search/": { + "get": { + "summary": "Search for resources", + "tags": [ + "Search" + ], "parameters": [ { "schema": { "type": "string" }, - "in": "path", - "name": "projectId", + "in": "query", + "name": "team", "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "query", + "required": false } ], "responses": { @@ -16582,18 +11607,16 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "hour": { - "type": "number" - }, - "day": { - "type": "number" - }, - "restart": { - "type": "boolean" + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "results": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true } } } @@ -16612,20 +11635,30 @@ } } } - }, - "delete": { - "summary": "Clears when an Instance can be restarted", + } + }, + "/api/v1/search/instances": { + "get": { + "summary": "Search for hosted and remote instances", "tags": [ - "Instances" + "Search" ], "parameters": [ { "schema": { "type": "string" }, - "in": "path", - "name": "projectId", + "in": "query", + "name": "team", "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "query", + "required": false } ], "responses": { @@ -16633,7 +11666,21 @@ "description": "Default Response", "content": { "application/json": { - "schema": {} + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "results": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + } + } + } } } }, From 5a0aa7ee0a3898d52300e80134a9d22bb0411f42 Mon Sep 17 00:00:00 2001 From: Ben Hardill Date: Mon, 6 Jul 2026 13:39:02 +0100 Subject: [PATCH 05/16] remove openapi.json --- openapi.json | 11779 ------------------------------------------------- 1 file changed, 11779 deletions(-) delete mode 100644 openapi.json diff --git a/openapi.json b/openapi.json deleted file mode 100644 index b2a03c9bb1..0000000000 --- a/openapi.json +++ /dev/null @@ -1,11779 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "FlowFuse Platform API", - "description": "API documentation for interacting with the FlowFuse platform", - "version": "2.32.0-git" - }, - "components": { - "schemas": { - "ProvisioningTokenSummary": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "team": { - "type": "string", - "nullable": true - }, - "application": { - "type": "string", - "nullable": true - }, - "instance": { - "type": "string", - "nullable": true - }, - "expiresAt": { - "type": "string", - "nullable": true - }, - "targetSnapshot": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "name", - "team", - "expiresAt" - ], - "title": "ProvisioningTokenSummary" - }, - "ProvisioningToken": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/ProvisioningTokenSummary" - } - ], - "properties": { - "token": { - "type": "string" - } - }, - "required": [ - "token" - ], - "title": "ProvisioningToken" - }, - "PersonalAccessTokenSummary": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "expiresAt": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "name", - "expiresAt" - ], - "title": "PersonalAccessTokenSummary" - }, - "PersonalAccessToken": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/PersonalAccessTokenSummary" - } - ], - "properties": { - "token": { - "type": "string" - } - }, - "required": [ - "token" - ], - "title": "PersonalAccessToken" - }, - "PersonalAccessTokenSummaryList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PersonalAccessTokenSummary" - }, - "title": "PersonalAccessTokenSummaryList" - }, - "InstanceHTTPTokenSummary": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "expiresAt": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "name", - "expiresAt" - ], - "title": "InstanceHTTPTokenSummary" - }, - "InstanceHTTPToken": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/InstanceHTTPTokenSummary" - } - ], - "properties": { - "token": { - "type": "string" - } - }, - "required": [ - "token" - ], - "title": "InstanceHTTPToken" - }, - "InstanceHTTPTokenSummaryList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/InstanceHTTPTokenSummary" - }, - "title": "InstanceHTTPTokenSummaryList" - }, - "Application": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string", - "nullable": true - }, - "createdAt": { - "type": "string" - }, - "updatedAt": { - "type": "string" - }, - "links": { - "$ref": "#/components/schemas/LinksMeta" - }, - "team": { - "$ref": "#/components/schemas/TeamSummary" - } - }, - "required": [ - "id", - "name", - "description", - "createdAt", - "updatedAt", - "links" - ], - "additionalProperties": false, - "title": "Application" - }, - "ApplicationSummary": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string", - "nullable": true - }, - "links": { - "$ref": "#/components/schemas/LinksMeta" - }, - "deviceGroupCount": { - "type": "number" - }, - "snapshotCount": { - "type": "number" - }, - "pipelineCount": { - "type": "number" - } - }, - "required": [ - "id", - "name", - "description", - "links" - ], - "additionalProperties": true, - "title": "ApplicationSummary" - }, - "TeamApplicationList": { - "type": "array", - "items": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/ApplicationSummary" - } - ], - "properties": { - "instances": { - "$ref": "#/components/schemas/InstanceSummaryList" - }, - "devices": { - "$ref": "#/components/schemas/DeviceSummaryList" - }, - "instancesSummary": { - "type": "object", - "properties": { - "count": { - "type": "number" - }, - "instances": { - "$ref": "#/components/schemas/InstanceSummaryList" - } - } - }, - "devicesSummary": { - "type": "object", - "properties": { - "count": { - "type": "number" - }, - "devices": { - "$ref": "#/components/schemas/DeviceSummaryList" - } - } - } - }, - "additionalProperties": true - }, - "title": "TeamApplicationList" - }, - "ApplicationAssociationsStatusList": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "instances": { - "$ref": "#/components/schemas/InstanceStatusList" - }, - "devices": { - "$ref": "#/components/schemas/DeviceStatusList" - } - }, - "required": [ - "id", - "instances", - "devices" - ], - "additionalProperties": false - }, - "title": "ApplicationAssociationsStatusList" - }, - "ApplicationBom": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "children": { - "type": "array", - "items": { - "$ref": "#/components/schemas/dependant" - } - } - }, - "required": [ - "id", - "name", - "children" - ], - "additionalProperties": false, - "title": "ApplicationBom" - }, - "AuditLogEntry": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "createdAt": { - "type": "string" - }, - "username": { - "type": "string", - "nullable": true - }, - "event": { - "type": "string" - }, - "scope": { - "type": "object", - "additionalProperties": true - }, - "trigger": { - "type": "object", - "additionalProperties": true - }, - "body": { - "type": "object", - "additionalProperties": true - } - }, - "required": [ - "id", - "createdAt", - "username", - "event", - "scope", - "trigger" - ], - "additionalProperties": false, - "title": "AuditLogEntry" - }, - "AuditLogEntryList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AuditLogEntry" - }, - "title": "AuditLogEntryList" - }, - "AuditLogQueryParams": { - "type": "object", - "properties": { - "event": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - }, - "username": { - "type": "string" - } - }, - "title": "AuditLogQueryParams" - }, - "TimelineEntry": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "createdAt": { - "type": "string" - }, - "user": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "username": { - "type": "string" - }, - "name": { - "type": "string" - }, - "avatar": { - "type": "string" - }, - "admin": { - "type": "boolean" - }, - "createdAt": { - "type": "string" - }, - "suspended": { - "type": "boolean" - } - }, - "required": [ - "id", - "username", - "name", - "avatar" - ], - "additionalProperties": true - }, - "event": { - "type": "string" - }, - "data": { - "type": "object", - "additionalProperties": true - } - }, - "required": [ - "id", - "createdAt", - "user", - "event", - "data" - ], - "additionalProperties": false, - "title": "TimelineEntry" - }, - "TimelineList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TimelineEntry" - }, - "title": "TimelineList" - }, - "dependency": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "version": { - "type": "object", - "properties": { - "wanted": { - "type": "string" - }, - "current": { - "type": "string", - "nullable": true - } - }, - "required": [ - "current" - ], - "additionalProperties": false - } - }, - "required": [ - "name", - "version" - ], - "additionalProperties": false, - "title": "dependency" - }, - "dependant": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "instance", - "device" - ] - }, - "ownerType": { - "type": "string", - "enum": [ - "instance", - "application" - ], - "nullable": true - }, - "ownerId": { - "type": "string", - "nullable": true - }, - "dependencies": { - "type": "array", - "items": { - "$ref": "#/components/schemas/dependency" - } - }, - "state": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "name", - "type", - "dependencies", - "state" - ], - "additionalProperties": false, - "title": "dependant" - }, - "Device": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "ownerType": { - "nullable": true, - "type": "string" - }, - "name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "createdAt": { - "type": "string" - }, - "updatedAt": { - "type": "string" - }, - "lastSeenAt": { - "nullable": true, - "type": "string" - }, - "lastSeenMs": { - "nullable": true, - "type": "number" - }, - "activeSnapshot": { - "nullable": true, - "allOf": [ - { - "$ref": "#/components/schemas/SnapshotSummary" - } - ] - }, - "targetSnapshot": { - "nullable": true, - "allOf": [ - { - "$ref": "#/components/schemas/SnapshotSummary" - } - ] - }, - "status": { - "type": "string" - }, - "isDeploying": { - "type": "boolean" - }, - "agentVersion": { - "nullable": true, - "type": "string" - }, - "mode": { - "type": "string" - }, - "links": { - "$ref": "#/components/schemas/LinksMeta" - }, - "team": { - "$ref": "#/components/schemas/TeamSummary" - }, - "instance": { - "$ref": "#/components/schemas/InstanceSummary" - }, - "application": { - "$ref": "#/components/schemas/ApplicationSummary" - }, - "editor": { - "type": "object", - "additionalProperties": true - }, - "deviceGroup": { - "nullable": true, - "allOf": [ - { - "$ref": "#/components/schemas/DeviceGroupSummary" - } - ] - }, - "nrVersion": { - "type": "string" - }, - "localLoginEnabled": { - "type": "boolean" - } - }, - "required": [ - "id", - "lastSeenAt", - "lastSeenMs", - "status", - "mode", - "isDeploying" - ], - "title": "Device" - }, - "DeviceSummary": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "ownerType": { - "nullable": true, - "type": "string" - }, - "name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "lastSeenAt": { - "nullable": true, - "type": "string" - }, - "lastSeenMs": { - "nullable": true, - "type": "number" - }, - "status": { - "type": "string" - }, - "mode": { - "type": "string" - }, - "isDeploying": { - "type": "boolean" - }, - "links": { - "$ref": "#/components/schemas/LinksMeta" - }, - "application": { - "$ref": "#/components/schemas/ApplicationSummary" - }, - "mostRecentAuditLogCreatedAt": { - "type": "string" - }, - "mostRecentAuditLogEvent": { - "type": "string" - } - }, - "required": [ - "id", - "ownerType", - "name", - "type", - "lastSeenAt", - "lastSeenMs", - "status", - "mode", - "isDeploying", - "links" - ], - "additionalProperties": false, - "title": "DeviceSummary" - }, - "DeviceSummaryList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceSummary" - }, - "title": "DeviceSummaryList" - }, - "DeviceStatus": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "lastSeenAt": { - "nullable": true, - "type": "string" - }, - "lastSeenMs": { - "nullable": true, - "type": "number" - }, - "status": { - "type": "string" - }, - "mode": { - "type": "string" - }, - "isDeploying": { - "type": "boolean" - }, - "editor": { - "type": "object", - "additionalProperties": true - } - }, - "required": [ - "id", - "lastSeenAt", - "lastSeenMs", - "status", - "mode", - "isDeploying" - ], - "additionalProperties": false, - "title": "DeviceStatus" - }, - "DeviceStatusList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceStatus" - }, - "title": "DeviceStatusList" - }, - "DeviceGroupSummary": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "deviceCount": { - "type": "number" - }, - "targetSnapshot": { - "nullable": true, - "allOf": [ - { - "$ref": "#/components/schemas/SnapshotSummary" - } - ] - }, - "application": { - "nullable": true, - "allOf": [ - { - "$ref": "#/components/schemas/ApplicationSummary" - } - ] - } - }, - "required": [ - "id", - "name", - "description", - "deviceCount" - ], - "title": "DeviceGroupSummary" - }, - "DeviceGroupPipelineSummary": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/DeviceGroupSummary" - } - ], - "properties": { - "targetMatchCount": { - "type": "number" - }, - "activeMatchCount": { - "type": "number" - }, - "developerModeCount": { - "type": "number" - }, - "runningCount": { - "type": "number" - }, - "isDeploying": { - "type": "boolean" - }, - "hasTargetSnapshot": { - "type": "boolean" - }, - "targetSnapshotId": { - "type": "string", - "nullable": true - } - }, - "required": [ - "targetMatchCount", - "activeMatchCount", - "developerModeCount", - "runningCount", - "isDeploying", - "hasTargetSnapshot", - "targetSnapshotId" - ], - "title": "DeviceGroupPipelineSummary" - }, - "DeviceGroup": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/DeviceGroupSummary" - } - ], - "properties": { - "createdAt": { - "type": "string" - }, - "updatedAt": { - "type": "string" - }, - "devices": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Device" - } - }, - "settings": { - "type": "object", - "additionalProperties": true - } - }, - "required": [ - "devices", - "settings" - ], - "additionalProperties": true, - "title": "DeviceGroup" - }, - "Invitation": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "role": { - "type": "number", - "nullable": true - }, - "createdAt": { - "type": "string" - }, - "expiresAt": { - "type": "string" - }, - "sentAt": { - "type": "string", - "nullable": true - }, - "team": { - "$ref": "#/components/schemas/TeamSummary" - }, - "invitor": { - "$ref": "#/components/schemas/UserSummary" - }, - "invitee": { - "anyOf": [ - { - "$ref": "#/components/schemas/UserSummary" - }, - { - "type": "object", - "properties": { - "external": { - "type": "boolean" - }, - "email": { - "type": "string" - } - }, - "required": [ - "external", - "email" - ], - "additionalProperties": false - } - ] - } - }, - "required": [ - "id", - "role", - "createdAt", - "expiresAt", - "sentAt", - "team", - "invitor", - "invitee" - ], - "additionalProperties": false, - "title": "Invitation" - }, - "InvitationList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Invitation" - }, - "title": "InvitationList" - }, - "Notification": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string" - }, - "createdAt": { - "type": "string" - }, - "read": { - "type": "boolean" - }, - "data": { - "type": "object", - "additionalProperties": true - } - }, - "required": [ - "id", - "type", - "createdAt", - "read", - "data" - ], - "additionalProperties": false, - "title": "Notification" - }, - "NotificationList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Notification" - }, - "title": "NotificationList" - }, - "Instance": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "safeName": { - "type": "string" - }, - "url": { - "type": "string" - }, - "createdAt": { - "type": "string" - }, - "updatedAt": { - "type": "string" - }, - "links": { - "$ref": "#/components/schemas/LinksMeta" - }, - "hostname": { - "type": "string" - }, - "application": { - "$ref": "#/components/schemas/ApplicationSummary" - }, - "team": { - "$ref": "#/components/schemas/TeamSummary" - }, - "projectType": { - "$ref": "#/components/schemas/InstanceTypeSummary" - }, - "settings": { - "type": "object", - "additionalProperties": true - }, - "template": { - "type": "object", - "additionalProperties": true - }, - "stack": { - "$ref": "#/components/schemas/StackSummary" - }, - "ha": { - "type": "object", - "additionalProperties": true - }, - "protected": { - "type": "object", - "additionalProperties": true - }, - "customHostname": { - "type": "string" - }, - "launcherSettings": { - "type": "object", - "properties": { - "healthCheckInterval": { - "type": "number" - }, - "disableAutoSafeMode": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "meta": { - "type": "object", - "additionalProperties": true - }, - "flowLastUpdatedAt": { - "type": "string" - } - }, - "required": [ - "id", - "name", - "createdAt", - "updatedAt", - "links" - ], - "title": "Instance" - }, - "InstanceSummary": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "url": { - "type": "string" - }, - "createdAt": { - "type": "string" - }, - "updatedAt": { - "type": "string" - }, - "links": { - "$ref": "#/components/schemas/LinksMeta" - }, - "settings": { - "type": "object", - "additionalProperties": true - }, - "ha": { - "type": "object", - "additionalProperties": true - }, - "protected": { - "type": "object", - "additionalProperties": true - }, - "mostRecentAuditLogCreatedAt": { - "type": "string" - }, - "mostRecentAuditLogEvent": { - "type": "string" - } - }, - "required": [ - "id", - "name", - "createdAt", - "updatedAt", - "links" - ], - "title": "InstanceSummary" - }, - "DashboardInstanceSummary": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "url": { - "type": "string" - }, - "createdAt": { - "type": "string" - }, - "updatedAt": { - "type": "string" - }, - "links": { - "$ref": "#/components/schemas/LinksMeta" - }, - "application": { - "$ref": "#/components/schemas/ApplicationSummary" - }, - "flowLastUpdatedAt": { - "type": "string" - }, - "status": { - "type": "string" - }, - "settings": { - "type": "object", - "additionalProperties": true - }, - "meta": { - "type": "object", - "additionalProperties": true - } - }, - "required": [ - "id", - "name", - "createdAt", - "updatedAt", - "links", - "application", - "status", - "settings" - ], - "additionalProperties": false, - "title": "DashboardInstanceSummary" - }, - "InstanceSummaryList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/InstanceSummary" - }, - "title": "InstanceSummaryList" - }, - "DashboardInstancesSummaryList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DashboardInstanceSummary" - }, - "title": "DashboardInstancesSummaryList" - }, - "InstanceStatus": { - "type": "object", - "properties": { - "flowLastUpdatedAt": { - "type": "string" - }, - "meta": { - "type": "object", - "additionalProperties": true - }, - "isDeploying": { - "type": "boolean" - } - }, - "title": "InstanceStatus" - }, - "InstanceStatusList": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "state": { - "$ref": "#/components/schemas/InstanceStatus" - } - }, - "additionalProperties": true - }, - "title": "InstanceStatusList" - }, - "SnapshotSummary": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "createdAt": { - "type": "string" - } - }, - "required": [ - "id", - "name", - "description" - ], - "title": "SnapshotSummary" - }, - "Snapshot": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/SnapshotSummary" - } - ], - "properties": { - "createdAt": { - "type": "string" - }, - "updatedAt": { - "type": "string" - }, - "user": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "username": { - "type": "string" - }, - "name": { - "type": "string" - }, - "avatar": { - "type": "string" - } - }, - "required": [ - "id", - "username", - "name", - "avatar" - ] - }, - "modules": { - "type": "object", - "additionalProperties": true - }, - "ownerType": { - "type": "string" - }, - "deviceId": { - "type": "string" - }, - "projectId": { - "type": "string" - }, - "device": { - "$ref": "#/components/schemas/DeviceSummary" - }, - "project": { - "$ref": "#/components/schemas/InstanceSummary" - } - }, - "required": [ - "createdAt", - "updatedAt", - "ownerType" - ], - "title": "Snapshot" - }, - "SnapshotAndSettings": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "createdAt": { - "type": "string" - }, - "updatedAt": { - "type": "string" - }, - "user": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "username": { - "type": "string" - }, - "name": { - "type": "string" - }, - "avatar": { - "type": "string" - } - }, - "required": [ - "id", - "username", - "name", - "avatar" - ] - }, - "exportedBy": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "username": { - "type": "string" - }, - "name": { - "type": "string" - }, - "avatar": { - "type": "string" - } - }, - "required": [ - "id", - "username", - "name", - "avatar" - ] - }, - "ownerType": { - "type": "string" - }, - "settings": { - "type": "object", - "properties": { - "settings": { - "type": "object", - "additionalProperties": true - }, - "env": { - "type": "object", - "additionalProperties": true - }, - "modules": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "required": [ - "id", - "name", - "description", - "createdAt", - "updatedAt", - "ownerType", - "settings" - ], - "title": "SnapshotAndSettings" - }, - "FullSnapshot": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/SnapshotAndSettings" - } - ], - "properties": { - "flows": { - "type": "object", - "properties": { - "flows": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": true - } - } - } - } - }, - "required": [ - "flows" - ], - "title": "FullSnapshot" - }, - "ExportedSnapshot": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/SnapshotAndSettings" - } - ], - "properties": { - "flows": { - "type": "object", - "properties": { - "flows": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": true - } - }, - "credentials": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "required": [ - "flows" - ], - "title": "ExportedSnapshot" - }, - "Stack": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "label": { - "type": "string" - }, - "active": { - "type": "boolean" - }, - "projectType": { - "type": "string" - }, - "properties": { - "type": "object", - "additionalProperties": true - }, - "replacedBy": { - "type": "string" - }, - "createdAt": { - "type": "string" - }, - "instanceCount": { - "type": "number" - }, - "links": { - "$ref": "#/components/schemas/LinksMeta" - } - }, - "required": [ - "id", - "name", - "active", - "properties", - "createdAt", - "links" - ], - "additionalProperties": false, - "title": "Stack" - }, - "StackSummary": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "label": { - "type": "string" - }, - "properties": { - "type": "object", - "additionalProperties": true - }, - "replacedBy": { - "type": "string" - }, - "links": { - "$ref": "#/components/schemas/LinksMeta" - } - }, - "required": [ - "id", - "name", - "properties", - "links" - ], - "additionalProperties": false, - "title": "StackSummary" - }, - "Template": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/TemplateSummary" - } - ], - "properties": { - "settings": { - "type": "object", - "additionalProperties": true - }, - "policy": { - "type": "object", - "additionalProperties": true - } - }, - "required": [ - "settings", - "policy" - ], - "title": "Template" - }, - "TemplateSummary": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "active": { - "type": "boolean" - }, - "instanceCount": { - "type": "number" - }, - "createdAt": { - "type": "string" - }, - "links": { - "$ref": "#/components/schemas/LinksMeta" - }, - "owner": { - "$ref": "#/components/schemas/UserSummary" - } - }, - "required": [ - "id", - "name", - "description", - "active", - "instanceCount", - "createdAt", - "links" - ], - "title": "TemplateSummary" - }, - "InstanceTypeSummary": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "required": [ - "id", - "name" - ], - "additionalProperties": false, - "title": "InstanceTypeSummary" - }, - "InstanceType": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "active": { - "type": "boolean" - }, - "description": { - "type": "string", - "nullable": true - }, - "order": { - "type": "number" - }, - "properties": { - "type": "object", - "additionalProperties": true - }, - "createdAt": { - "type": "string" - }, - "defaultStack": { - "type": "string", - "nullable": true - }, - "instanceCount": { - "type": "number" - }, - "stackCount": { - "type": "number" - } - }, - "required": [ - "id", - "name", - "active", - "description", - "order", - "properties", - "createdAt", - "defaultStack" - ], - "additionalProperties": false, - "title": "InstanceType" - }, - "TeamSummary": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "slug": { - "type": "string" - }, - "avatar": { - "type": "string" - }, - "suspended": { - "type": "boolean" - }, - "links": { - "$ref": "#/components/schemas/LinksMeta" - } - }, - "required": [ - "id", - "name", - "slug", - "avatar", - "suspended", - "links" - ], - "title": "TeamSummary" - }, - "Team": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/TeamSummary" - } - ], - "properties": { - "type": { - "$ref": "#/components/schemas/TeamType" - }, - "properties": { - "type": "object", - "additionalProperties": true - }, - "instanceCount": { - "type": "number" - }, - "instanceCountByType": { - "type": "object", - "additionalProperties": true - }, - "memberCount": { - "type": "number" - }, - "deviceCount": { - "type": "number" - }, - "brokerCount": { - "type": "number" - }, - "teamBrokerClientsCount": { - "type": "number" - }, - "createdAt": { - "type": "string" - }, - "updatedAt": { - "type": "string" - }, - "billing": { - "type": "object", - "additionalProperties": true - }, - "billingURL": { - "type": "string" - } - }, - "required": [ - "type", - "properties", - "instanceCount", - "memberCount", - "deviceCount", - "brokerCount", - "teamBrokerClientsCount", - "createdAt", - "updatedAt" - ], - "title": "Team" - }, - "UserTeamList": { - "type": "array", - "items": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/TeamSummary" - } - ], - "properties": { - "type": { - "$ref": "#/components/schemas/TeamTypeSummary" - }, - "role": { - "type": "number" - }, - "instanceCount": { - "type": "number" - }, - "memberCount": { - "type": "number" - }, - "deviceCount": { - "type": "number" - } - }, - "required": [ - "type", - "role", - "instanceCount", - "memberCount", - "deviceCount" - ] - }, - "title": "UserTeamList" - }, - "TeamTypeSummary": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "active": { - "type": "boolean" - } - }, - "required": [ - "id", - "name", - "active" - ], - "title": "TeamTypeSummary" - }, - "TeamType": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/TeamTypeSummary" - } - ], - "properties": { - "order": { - "type": "number" - }, - "description": { - "type": "string", - "nullable": true - }, - "teamCount": { - "type": "number" - }, - "properties": { - "type": "object", - "properties": { - "users": { - "type": "object", - "additionalProperties": true - }, - "devices": { - "type": "object", - "additionalProperties": true - }, - "features": { - "type": "object", - "additionalProperties": true - }, - "instances": { - "type": "object", - "additionalProperties": true - }, - "billing": { - "type": "object", - "additionalProperties": true - }, - "autoStackUpdate": { - "type": "object", - "additionalProperties": true - } - }, - "additionalProperties": true - } - }, - "required": [ - "order", - "description", - "properties" - ], - "title": "TeamType" - }, - "TeamTypeList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TeamType" - }, - "title": "TeamTypeList" - }, - "User": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/UserSummary" - } - ], - "properties": { - "email": { - "type": "string" - }, - "email_verified": { - "type": "boolean" - }, - "defaultTeam": { - "type": "string" - }, - "sso_enabled": { - "type": "boolean" - }, - "mfa_enabled": { - "type": "boolean" - }, - "free_trial_available": { - "type": "boolean" - }, - "tcs_accepted": { - "type": "string" - }, - "password_expired": { - "type": "boolean" - }, - "pendingEmailChange": { - "type": "boolean" - }, - "SSOGroups": { - "type": "array" - } - }, - "required": [ - "email_verified" - ], - "title": "User" - }, - "UserSummary": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "username": { - "type": "string" - }, - "name": { - "type": "string" - }, - "avatar": { - "type": "string" - }, - "admin": { - "type": "boolean" - }, - "createdAt": { - "type": "string" - }, - "suspended": { - "type": "boolean" - } - }, - "required": [ - "id", - "username", - "name", - "avatar", - "admin", - "createdAt", - "suspended" - ], - "title": "UserSummary" - }, - "TeamMemberPermissions": { - "type": "object", - "properties": { - "applications": { - "type": "object", - "additionalProperties": true - }, - "sso": { - "type": "boolean" - } - }, - "title": "TeamMemberPermissions" - }, - "TeamMemberList": { - "type": "array", - "items": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/UserSummary" - } - ], - "properties": { - "role": { - "type": "number" - }, - "permissions": { - "$ref": "#/components/schemas/TeamMemberPermissions" - }, - "ssoManaged": { - "type": "boolean" - } - }, - "required": [ - "role", - "permissions" - ] - }, - "title": "TeamMemberList" - }, - "UserList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/User" - }, - "title": "UserList" - }, - "MQTTBroker": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "host": { - "type": "string" - }, - "port": { - "type": "number" - }, - "protocol": { - "type": "string" - }, - "protocolVersion": { - "type": "number" - }, - "ssl": { - "type": "boolean" - }, - "verifySSL": { - "type": "boolean" - }, - "clientId": { - "type": "string" - }, - "state": { - "type": "string" - }, - "topicPrefix": { - "type": "array", - "items": { - "type": "string" - } - }, - "status": { - "type": "object", - "additionalProperties": true - }, - "credentials": { - "type": "object", - "additionalProperties": true - }, - "settings": { - "type": "object", - "additionalProperties": true - } - }, - "required": [ - "id", - "name", - "host", - "port", - "protocol", - "protocolVersion", - "ssl", - "verifySSL", - "clientId", - "state", - "topicPrefix" - ], - "additionalProperties": false, - "title": "MQTTBroker" - }, - "MQTTBrokerInput": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "host": { - "type": "string" - }, - "port": { - "type": "number" - }, - "protocol": { - "type": "string" - }, - "protocolVersion": { - "type": "number" - }, - "ssl": { - "type": "boolean" - }, - "verifySSL": { - "type": "boolean" - }, - "clientId": { - "type": "string" - }, - "topicPrefix": { - "type": "array", - "items": { - "type": "string" - } - }, - "credentials": { - "type": "object", - "additionalProperties": true - } - }, - "title": "MQTTBrokerInput" - }, - "APIStatus": { - "type": "object", - "properties": { - "status": { - "type": "string" - } - }, - "required": [ - "status" - ], - "additionalProperties": false, - "title": "APIStatus" - }, - "APIError": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "error": { - "type": "string" - }, - "message": { - "type": "string" - }, - "errors": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": true - } - } - }, - "additionalProperties": true, - "title": "APIError" - }, - "PaginationParams": { - "type": "object", - "properties": { - "query": { - "type": "string" - }, - "cursor": { - "type": "string" - }, - "limit": { - "type": "number" - }, - "page": { - "type": "number", - "minimum": 1 - }, - "sort": { - "type": "string" - }, - "dir": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "order": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - } - }, - "title": "PaginationParams" - }, - "PaginationMeta": { - "type": "object", - "properties": { - "next_cursor": { - "type": "string" - }, - "previous_cursor": { - "type": "string" - }, - "page": { - "type": "number" - }, - "pageSize": { - "type": "number" - }, - "total": { - "type": "number" - }, - "pageCount": { - "type": "number" - } - }, - "title": "PaginationMeta" - }, - "LinksMeta": { - "type": "object", - "properties": { - "self": { - "type": "string" - } - }, - "additionalProperties": true, - "title": "LinksMeta" - } - } - }, - "paths": { - "/api/v1/settings/": { - "get": { - "summary": "Get platform settings", - "tags": [ - "Platform" - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "put": { - "summary": "Update platform settings", - "tags": [ - "Platform" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object" - } - } - } - }, - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/admin/stats": { - "get": { - "summary": "Get a platform stats - admin-only", - "tags": [ - "Platform" - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": true - } - }, - "application/openmetrics-text": { - "schema": { - "type": "string" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/admin/license": { - "get": { - "summary": "Get a platform license - admin-only", - "tags": [ - "Platform" - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "put": { - "summary": "Apply a platform license - admin-only", - "tags": [ - "Platform" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "license", - "action" - ], - "properties": { - "license": { - "type": "string" - }, - "action": { - "type": "string" - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/admin/invitations": { - "get": { - "summary": "Get a list of all invitations - admin-only", - "tags": [ - "Platform" - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "count": { - "type": "number" - }, - "invitations": { - "$ref": "#/components/schemas/InvitationList" - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/admin/audit-log": { - "get": { - "summary": "Get platform audit event entries - admin-only", - "tags": [ - "Platform" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "query", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "cursor", - "required": false - }, - { - "schema": { - "type": "number" - }, - "in": "query", - "name": "limit", - "required": false - }, - { - "schema": { - "type": "number", - "minimum": 1 - }, - "in": "query", - "name": "page", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "sort", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "dir", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "order", - "required": false - }, - { - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - }, - "in": "query", - "name": "event", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "username", - "required": false - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - }, - "count": { - "type": "number" - }, - "log": { - "$ref": "#/components/schemas/AuditLogEntryList" - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/admin/audit-log/export": { - "get": { - "summary": "Gets platform audit events as CSV - admin-only", - "tags": [ - "Platform" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "query", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "cursor", - "required": false - }, - { - "schema": { - "type": "number" - }, - "in": "query", - "name": "limit", - "required": false - }, - { - "schema": { - "type": "number", - "minimum": 1 - }, - "in": "query", - "name": "page", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "sort", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "dir", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "order", - "required": false - }, - { - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - }, - "in": "query", - "name": "event", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "username", - "required": false - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "text/csv": { - "schema": { - "type": "string" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/admin/stats-token": { - "post": { - "summary": "Regenerate platform stats access token - admin-only", - "tags": [ - "Platform" - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "token": { - "type": "string" - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "delete": { - "summary": "Remove platform stats access token - admin-only", - "tags": [ - "Platform" - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/admin/expert-agent-creds": { - "post": { - "summary": "Regenerate expert agent credentials - admin-only", - "tags": [ - "Platform" - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "username": { - "type": "string" - }, - "password": { - "type": "string" - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "delete": { - "summary": "Remove expert agent credentials - admin-only", - "tags": [ - "Platform" - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/admin/announcements": { - "post": { - "summary": "Send platform wide announcements", - "tags": [ - "Platform", - "Notifications", - "Announcements" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "message", - "title", - "filter" - ], - "properties": { - "message": { - "type": "string" - }, - "title": { - "type": "string" - }, - "filter": { - "type": "object", - "properties": { - "roles": { - "type": "array", - "items": { - "type": "number" - } - } - } - }, - "mock": { - "type": "boolean" - }, - "to": { - "type": "object" - }, - "url": { - "type": "string" - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "recipientCount": { - "type": "number" - }, - "mock": { - "type": "boolean" - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/user/": { - "get": { - "summary": "Get the current user profile", - "tags": [ - "User" - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "put": { - "summary": "Update the current users settings", - "tags": [ - "User" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "username": { - "type": "string" - }, - "email": { - "type": "string" - }, - "tcs_accepted": { - "type": "boolean" - }, - "defaultTeam": { - "type": "string" - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "delete": { - "summary": "Delete the current user", - "tags": [ - "User" - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/user/change_password": { - "put": { - "summary": "Change the current users password", - "tags": [ - "User" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "old_password", - "password" - ], - "properties": { - "old_password": { - "type": "string", - "description": "the old password" - }, - "password": { - "type": "string" - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/user/teams": { - "get": { - "summary": "Get a list of the current users teams", - "tags": [ - "User" - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - }, - "count": { - "type": "number" - }, - "teams": { - "$ref": "#/components/schemas/UserTeamList" - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/user/tokens": { - "get": { - "summary": "List users Personal Access Tokens", - "tags": [ - "Tokens" - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "count": { - "type": "number" - }, - "tokens": { - "$ref": "#/components/schemas/PersonalAccessTokenSummaryList" - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "post": { - "summary": "Create user Personal Access Token", - "tags": [ - "Tokens" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "scope": { - "type": "string" - }, - "expiresAt": { - "type": "number" - }, - "name": { - "type": "string" - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PersonalAccessToken" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/user/tokens/{id}": { - "delete": { - "summary": "Delete user Personal Access Token", - "tags": [ - "Tokens" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "id", - "required": true - } - ], - "responses": { - "204": { - "description": "empty response" - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "put": { - "summary": "Update users Personal Access Token", - "tags": [ - "Tokens" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "scope": { - "type": "string" - }, - "expiresAt": { - "type": "number" - } - } - } - } - } - }, - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "id", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PersonalAccessTokenSummary" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/user/expert-creds": { - "post": { - "summary": "Initialize expert chat", - "tags": [ - "User" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "sessionId": { - "type": "string", - "minLength": 8 - } - }, - "required": [ - "sessionId" - ] - } - } - } - }, - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "username": { - "type": "string" - }, - "password": { - "type": "string" - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/user/invitations/": { - "get": { - "summary": "Get a list of the current users invitations", - "tags": [ - "User" - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - }, - "count": { - "type": "number" - }, - "invitations": { - "$ref": "#/components/schemas/InvitationList" - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/user/invitations/{invitationId}": { - "patch": { - "summary": "Accept an invitation", - "tags": [ - "User" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "invitationId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "delete": { - "summary": "Reject an invitation", - "tags": [ - "User" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "invitationId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/user/notifications/": { - "get": { - "summary": "Get the notifications for a user", - "tags": [ - "User" - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - }, - "count": { - "type": "number" - }, - "notifications": { - "$ref": "#/components/schemas/NotificationList" - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "put": { - "summary": "Bulk update notifications", - "tags": [ - "User" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "ids": { - "type": "array", - "items": { - "type": "string" - } - }, - "read": { - "type": "boolean" - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - }, - "count": { - "type": "number" - }, - "notifications": { - "$ref": "#/components/schemas/NotificationList" - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/user/notifications/{notificationId}": { - "put": { - "summary": "Mark notification as read", - "tags": [ - "User" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "read": { - "type": "boolean" - } - } - } - } - } - }, - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "notificationId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "delete": { - "summary": "Delete notifications", - "tags": [ - "User" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "notificationId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/users/": { - "get": { - "summary": "Get a list of all users (admin-only)", - "tags": [ - "Users" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "query", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "cursor", - "required": false - }, - { - "schema": { - "type": "number" - }, - "in": "query", - "name": "limit", - "required": false - }, - { - "schema": { - "type": "number", - "minimum": 1 - }, - "in": "query", - "name": "page", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "sort", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "dir", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "order", - "required": false - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - }, - "count": { - "type": "number" - }, - "users": { - "$ref": "#/components/schemas/UserList" - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "post": { - "summary": "Create a new user (admin-only)", - "tags": [ - "Users" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "name", - "username", - "password" - ], - "properties": { - "name": { - "type": "string" - }, - "username": { - "type": "string" - }, - "password": { - "type": "string" - }, - "email": { - "type": "string" - }, - "isAdmin": { - "type": "boolean" - }, - "createDefaultTeam": { - "type": "boolean" - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/users/{userId}": { - "get": { - "summary": "Get a user profile (admin-only)", - "tags": [ - "Users" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "userId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "put": { - "summary": "Update a users settings (admin-only)", - "tags": [ - "Users" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "username": { - "type": "string" - }, - "email": { - "type": "string" - }, - "tcs_accepted": { - "type": "boolean" - }, - "email_verified": { - "type": "boolean" - }, - "admin": { - "type": "boolean" - }, - "password_expired": { - "type": "boolean" - }, - "suspended": { - "type": "boolean" - }, - "defaultTeam": { - "type": "string" - }, - "mfa_enabled": { - "type": "boolean" - } - } - } - } - } - }, - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "userId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "delete": { - "summary": "Delete a user (admin-only)", - "tags": [ - "Users" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "userId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/users/{userId}/teams": { - "get": { - "summary": "Get a list of a users teams (admin-only)", - "tags": [ - "Users" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "userId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "count": { - "type": "number" - }, - "teams": { - "$ref": "#/components/schemas/UserTeamList" - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/teams/check-slug": { - "post": { - "summary": "Check a team slug is available", - "tags": [ - "Teams" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "slug" - ], - "properties": { - "slug": { - "type": "string" - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Team slug is available", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "409": { - "description": "Team slug is not available", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/teams/{teamId}": { - "get": { - "summary": "Get details of a team", - "tags": [ - "Teams" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/Team" - }, - { - "$ref": "#/components/schemas/TeamSummary" - } - ] - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "delete": { - "summary": "Delete a team", - "tags": [ - "Teams" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "put": { - "summary": "Update a team", - "tags": [ - "Teams" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "slug": { - "type": "string" - }, - "type": { - "type": "string" - }, - "suspended": { - "type": "boolean" - }, - "properties": { - "type": "object" - }, - "features": { - "type": "object" - } - } - } - } - } - }, - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Team" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/teams/slug/{teamSlug}": { - "get": { - "summary": "Get details of a team using its slug", - "tags": [ - "Teams" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamSlug", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/Team" - }, - { - "$ref": "#/components/schemas/TeamSummary" - } - ] - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/teams/": { - "get": { - "summary": "Get a list of all teams - admin-only", - "tags": [ - "Teams" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "query", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "cursor", - "required": false - }, - { - "schema": { - "type": "number" - }, - "in": "query", - "name": "limit", - "required": false - }, - { - "schema": { - "type": "number", - "minimum": 1 - }, - "in": "query", - "name": "page", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "sort", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "dir", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "order", - "required": false - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - }, - "count": { - "type": "number" - }, - "teams": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Team" - } - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "post": { - "summary": "Create a new team", - "tags": [ - "Teams" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "name", - "type" - ], - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "slug": { - "type": "string" - }, - "trial": { - "type": "boolean" - }, - "billingInterval": { - "type": "string", - "enum": [ - "month", - "year" - ] - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Team" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/teams/{teamId}/applications": { - "get": { - "summary": "Get a list of the teams applications", - "tags": [ - "Teams" - ], - "parameters": [ - { - "schema": { - "type": "number" - }, - "in": "query", - "name": "associationsLimit", - "required": false - }, - { - "schema": { - "type": "boolean" - }, - "in": "query", - "name": "includeInstances", - "required": false - }, - { - "schema": { - "type": "boolean" - }, - "in": "query", - "name": "includeApplicationDevices", - "required": false - }, - { - "schema": { - "type": "boolean" - }, - "in": "query", - "name": "excludeOwnerFiltering", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "count": { - "type": "number" - }, - "applications": { - "$ref": "#/components/schemas/TeamApplicationList" - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/teams/{teamId}/applications/status": { - "get": { - "summary": "Get a list of the teams applications statuses", - "tags": [ - "Teams" - ], - "parameters": [ - { - "schema": { - "type": "number" - }, - "in": "query", - "name": "associationsLimit", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "count": { - "type": "number" - }, - "applications": { - "$ref": "#/components/schemas/ApplicationAssociationsStatusList" - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/teams/{teamId}/comms-credentials": { - "post": { - "summary": "Issue team-channel broker credentials for the current user/session", - "tags": [ - "Teams" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "sessionId": { - "type": "string" - } - } - } - } - } - }, - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "username": { - "type": "string" - }, - "password": { - "type": "string" - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/teams/{teamId}/user": { - "get": { - "summary": "Get the current users team membership", - "tags": [ - "Teams" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "role": { - "type": "number" - }, - "permissions": { - "$ref": "#/components/schemas/TeamMemberPermissions" - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/teams/{teamId}/audit-log": { - "get": { - "summary": "Get team audit event entries", - "tags": [ - "Teams" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "query", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "cursor", - "required": false - }, - { - "schema": { - "type": "number" - }, - "in": "query", - "name": "limit", - "required": false - }, - { - "schema": { - "type": "number", - "minimum": 1 - }, - "in": "query", - "name": "page", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "sort", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "dir", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "order", - "required": false - }, - { - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - }, - "in": "query", - "name": "event", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "username", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - }, - "count": { - "type": "number" - }, - "log": { - "$ref": "#/components/schemas/AuditLogEntryList" - }, - "associations": { - "type": "object", - "properties": { - "applications": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ApplicationSummary" - } - }, - "instances": { - "$ref": "#/components/schemas/InstanceSummaryList" - }, - "devices": { - "$ref": "#/components/schemas/DeviceSummaryList" - } - } - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/teams/{teamId}/audit-log/export": { - "get": { - "summary": "Get team audit event entries", - "tags": [ - "Teams" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "query", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "cursor", - "required": false - }, - { - "schema": { - "type": "number" - }, - "in": "query", - "name": "limit", - "required": false - }, - { - "schema": { - "type": "number", - "minimum": 1 - }, - "in": "query", - "name": "page", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "sort", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "dir", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "order", - "required": false - }, - { - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - }, - "in": "query", - "name": "event", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "username", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "text/csv": { - "schema": { - "type": "string" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/teams/{teamId}/members/": { - "get": { - "summary": "Get a list of the teams members", - "tags": [ - "Team Members" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "count": { - "type": "number" - }, - "members": { - "$ref": "#/components/schemas/TeamMemberList" - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/teams/{teamId}/members/{userId}": { - "delete": { - "summary": "Remove a team member", - "tags": [ - "Team Members" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamId", - "required": true - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "userId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "put": { - "summary": "Change a members role", - "tags": [ - "Team Members" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "role": { - "type": "number" - }, - "permissions": { - "$ref": "#/components/schemas/TeamMemberPermissions" - } - } - } - } - } - }, - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamId", - "required": true - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "userId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/teams/{teamId}/invitations/": { - "get": { - "summary": "Get a list of the teams invitations", - "tags": [ - "Team Invitations" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "count": { - "type": "number" - }, - "invitations": { - "$ref": "#/components/schemas/InvitationList" - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "post": { - "summary": "Create an invitation", - "tags": [ - "Team Invitations" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "user": { - "type": "string" - }, - "role": { - "type": "number" - } - }, - "required": [ - "user" - ] - } - } - } - }, - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "string" - }, - "code": { - "type": "string" - }, - "error": { - "type": "object", - "additionalProperties": true - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/teams/{teamId}/invitations/{invitationId}": { - "delete": { - "summary": "Delete an invitation", - "tags": [ - "Team Invitations" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamId", - "required": true - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "invitationId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "post": { - "summary": "Resend an invitation", - "tags": [ - "Team Invitations" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamId", - "required": true - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "invitationId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Invitation" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/teams/{teamId}/devices/": { - "get": { - "summary": "Get a list of all devices in a team", - "tags": [ - "Team Devices" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "query", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "cursor", - "required": false - }, - { - "schema": { - "type": "number" - }, - "in": "query", - "name": "limit", - "required": false - }, - { - "schema": { - "type": "number", - "minimum": 1 - }, - "in": "query", - "name": "page", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "sort", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "dir", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "order", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamId", - "required": true - }, - { - "schema": { - "type": "boolean" - }, - "in": "path", - "name": "statusOnly", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - }, - "count": { - "type": "number" - }, - "devices": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Device" - } - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/teams/{teamId}/devices/provisioning": { - "get": { - "summary": "Get a list of device provisioning tokens in a team", - "tags": [ - "Team Devices" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "query", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "cursor", - "required": false - }, - { - "schema": { - "type": "number" - }, - "in": "query", - "name": "limit", - "required": false - }, - { - "schema": { - "type": "number", - "minimum": 1 - }, - "in": "query", - "name": "page", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "sort", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "dir", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "order", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - }, - "count": { - "type": "number" - }, - "tokens": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProvisioningTokenSummary" - } - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "post": { - "summary": "Create a new provisioning token in a team", - "tags": [ - "Team Devices" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string" - }, - "instance": { - "type": "string" - }, - "application": { - "type": "string" - }, - "expiresAt": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - } - } - } - }, - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProvisioningToken" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/teams/{teamId}/devices/provisioning/{tokenId}": { - "put": { - "summary": "Update a provisioning token in a team", - "tags": [ - "Team Devices" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "instance": { - "type": "string" - }, - "application": { - "type": "string" - }, - "expiresAt": { - "nullable": true, - "type": "string" - } - } - } - } - } - }, - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamId", - "required": true - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "tokenId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProvisioningTokenSummary" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "delete": { - "summary": "Delete a provisioning token", - "tags": [ - "Team Devices" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamId", - "required": true - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "tokenId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/teams/{teamId}/devices/bulk": { - "delete": { - "summary": "Delete devices", - "tags": [ - "Team Devices" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "devices": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1 - } - }, - "required": [ - "devices" - ] - } - } - } - }, - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "put": { - "summary": "Update devices", - "tags": [ - "Team Devices" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "devices" - ], - "properties": { - "devices": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1 - }, - "instance": { - "type": "string", - "nullable": true - }, - "application": { - "type": "string", - "nullable": true - }, - "deviceGroup": { - "type": "string", - "nullable": true - } - } - } - } - } - }, - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - }, - "count": { - "type": "number" - }, - "devices": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Device" - } - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/team-types/": { - "get": { - "summary": "Get a list of the team types", - "tags": [ - "Team Types" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "query", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "cursor", - "required": false - }, - { - "schema": { - "type": "number" - }, - "in": "query", - "name": "limit", - "required": false - }, - { - "schema": { - "type": "number", - "minimum": 1 - }, - "in": "query", - "name": "page", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "sort", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "dir", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "order", - "required": false - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - }, - "count": { - "type": "number" - }, - "types": { - "$ref": "#/components/schemas/TeamTypeList" - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "post": { - "summary": "Create a team type - admin-only", - "tags": [ - "Team Types" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "active": { - "type": "boolean" - }, - "properties": { - "type": "object" - }, - "order": { - "type": "number" - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TeamType" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/team-types/{teamTypeId}": { - "get": { - "summary": "Get details of a team type", - "tags": [ - "Teams" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamTypeId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TeamType" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "put": { - "summary": "Update a team type - admin-only", - "tags": [ - "Team Types" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "active": { - "type": "boolean" - }, - "properties": { - "type": "object" - }, - "order": { - "type": "number" - } - } - } - } - } - }, - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamTypeId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TeamType" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "delete": { - "summary": "Delete a team type - admin-only", - "tags": [ - "Team Types" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "teamTypeId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/applications/": { - "post": { - "summary": "Create an application", - "tags": [ - "Applications" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "name", - "teamId" - ], - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "teamId": { - "type": "string" - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Application" - } - } - } - }, - "500": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/applications/{applicationId}": { - "get": { - "summary": "Get the details of an application", - "tags": [ - "Applications" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "applicationId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Application" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "put": { - "summary": "Update an application", - "tags": [ - "Applications" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - } - } - } - } - } - }, - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "applicationId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Application" - } - } - } - }, - "500": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "delete": { - "summary": "Delete an application", - "tags": [ - "Applications" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "applicationId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "500": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/applications/{applicationId}/instances": { - "get": { - "summary": "Get a list of an applications instances", - "tags": [ - "Applications" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "applicationId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "count": { - "type": "number" - }, - "instances": { - "$ref": "#/components/schemas/InstanceSummaryList" - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/applications/{applicationId}/devices": { - "get": { - "summary": "Get a list of all devices in an application", - "tags": [ - "Applications" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "query", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "cursor", - "required": false - }, - { - "schema": { - "type": "number" - }, - "in": "query", - "name": "limit", - "required": false - }, - { - "schema": { - "type": "number", - "minimum": 1 - }, - "in": "query", - "name": "page", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "sort", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "dir", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "order", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "applicationId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - }, - "count": { - "type": "number" - }, - "devices": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Device" - } - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/applications/{applicationId}/instances/status": { - "get": { - "summary": "Get a list of an applications instances status", - "tags": [ - "Applications" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "applicationId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "count": { - "type": "number" - }, - "instances": { - "$ref": "#/components/schemas/InstanceStatusList" - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/applications/{applicationId}/snapshots": { - "get": { - "summary": "Get a list of all snapshots in an Application", - "tags": [ - "Applications" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "applicationId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "count": { - "type": "number" - }, - "snapshots": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Snapshot" - } - }, - "application": { - "$ref": "#/components/schemas/ApplicationSummary" - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/applications/{applicationId}/audit-log": { - "get": { - "summary": "Get application audit event entries", - "tags": [ - "Applications" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "query", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "cursor", - "required": false - }, - { - "schema": { - "type": "number" - }, - "in": "query", - "name": "limit", - "required": false - }, - { - "schema": { - "type": "number", - "minimum": 1 - }, - "in": "query", - "name": "page", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "sort", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "dir", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "order", - "required": false - }, - { - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - }, - "in": "query", - "name": "event", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "username", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "applicationId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - }, - "count": { - "type": "number" - }, - "log": { - "$ref": "#/components/schemas/AuditLogEntryList" - }, - "associations": { - "type": "object", - "properties": { - "applications": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ApplicationSummary" - } - }, - "instances": { - "$ref": "#/components/schemas/InstanceSummaryList" - }, - "devices": { - "$ref": "#/components/schemas/DeviceSummaryList" - } - } - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/applications/{applicationId}/audit-log/export": { - "get": { - "summary": "Get application audit event entries", - "tags": [ - "Applications" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "query", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "cursor", - "required": false - }, - { - "schema": { - "type": "number" - }, - "in": "query", - "name": "limit", - "required": false - }, - { - "schema": { - "type": "number", - "minimum": 1 - }, - "in": "query", - "name": "page", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "sort", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "dir", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "order", - "required": false - }, - { - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - }, - "in": "query", - "name": "event", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "username", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "applicationId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "text/csv": { - "schema": { - "type": "string" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/projects/{instanceId}": { - "get": { - "summary": "Get details of an instance", - "tags": [ - "Instances" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "instanceId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Instance" - }, - { - "$ref": "#/components/schemas/InstanceStatus" - } - ] - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "delete": { - "summary": "Delete an instance", - "tags": [ - "Instances" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "instanceId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "500": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "put": { - "summary": "Update an instance", - "tags": [ - "Instances" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "hostname": { - "type": "string" - }, - "settings": { - "type": "object" - }, - "launcherSettings": { - "type": "object" - }, - "projectType": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "sourceProject": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "options": { - "type": "object" - } - } - } - } - } - } - } - }, - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "instanceId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Instance" - }, - { - "$ref": "#/components/schemas/InstanceStatus" - } - ] - } - } - } - }, - "500": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/projects/": { - "post": { - "summary": "Create an instance", - "tags": [ - "Instances" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "name", - "projectType", - "stack", - "template", - "applicationId" - ], - "properties": { - "name": { - "type": "string" - }, - "applicationId": { - "type": "string" - }, - "projectType": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "flowBlueprintId": { - "type": "string" - }, - "flows": { - "type": "array" - }, - "template": { - "type": "string" - }, - "sourceProject": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "options": { - "type": "object" - } - } - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Instance" - }, - { - "$ref": "#/components/schemas/InstanceStatus" - } - ] - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/projects/{instanceId}/settings": { - "get": { - "summary": "Get an instance runtime settings (instance tokens only)", - "tags": [ - "Instances" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "instanceId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/projects/{instanceId}/logs": { - "get": { - "summary": "Get instance logs", - "tags": [ - "Instances" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "query", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "cursor", - "required": false - }, - { - "schema": { - "type": "number" - }, - "in": "query", - "name": "limit", - "required": false - }, - { - "schema": { - "type": "number", - "minimum": 1 - }, - "in": "query", - "name": "page", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "sort", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "dir", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "order", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "instanceId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "meta": { - "allOf": [ - { - "$ref": "#/components/schemas/PaginationMeta" - }, - { - "type": "object", - "properties": { - "first_entry": { - "type": "string" - }, - "last_entry": { - "type": "string" - } - } - } - ] - }, - "log": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": true - } - } - } - } - } - } - }, - "500": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/projects/{instanceId}/audit-log": { - "get": { - "summary": "Get instance audit event entries", - "tags": [ - "Instances" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "query", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "cursor", - "required": false - }, - { - "schema": { - "type": "number" - }, - "in": "query", - "name": "limit", - "required": false - }, - { - "schema": { - "type": "number", - "minimum": 1 - }, - "in": "query", - "name": "page", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "sort", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "dir", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "order", - "required": false - }, - { - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - }, - "in": "query", - "name": "event", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "username", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "instanceId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - }, - "count": { - "type": "number" - }, - "log": { - "$ref": "#/components/schemas/AuditLogEntryList" - }, - "associations": { - "type": "object", - "properties": { - "applications": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ApplicationSummary" - } - }, - "instances": { - "$ref": "#/components/schemas/InstanceSummaryList" - }, - "devices": { - "$ref": "#/components/schemas/DeviceSummaryList" - } - } - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/projects/{instanceId}/audit-log/export": { - "get": { - "summary": "Get instance audit event entries", - "tags": [ - "Instances" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "query", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "cursor", - "required": false - }, - { - "schema": { - "type": "number" - }, - "in": "query", - "name": "limit", - "required": false - }, - { - "schema": { - "type": "number", - "minimum": 1 - }, - "in": "query", - "name": "page", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "sort", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "dir", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "order", - "required": false - }, - { - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - }, - "in": "query", - "name": "event", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "username", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "instanceId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "text/csv": { - "schema": { - "type": "string" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/projects/{instanceId}/import": { - "post": { - "summary": "Import flows to the instance", - "tags": [ - "Instances" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "flows": { - "type": "string" - }, - "credentials": { - "type": "string" - }, - "credsSecret": { - "type": "string" - } - } - } - } - } - }, - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "instanceId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "500": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/projects/check-name": { - "post": { - "summary": "Check if a project name is available", - "tags": [ - "Instances" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "available": { - "type": "boolean" - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/projects/{instanceId}/status": { - "get": { - "summary": "Get the live status of an instance", - "tags": [ - "Instances", - "Live State" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "instanceId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "id": { - "type": "string" - }, - "meta": { - "type": "object", - "additionalProperties": true - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/projects/{instanceId}/generate/snapshot-description": { - "post": { - "summary": "Generate a description of changes between a project's current state and latest snapshot", - "tags": [ - "Instances", - "Snapshots" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "target" - ], - "properties": { - "target": { - "type": "string" - } - } - } - } - } - }, - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "instanceId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/projects/{instanceId}/devices/": { - "get": { - "summary": "Get a list of devices assigned to an instance", - "tags": [ - "Instances" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "query", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "cursor", - "required": false - }, - { - "schema": { - "type": "number" - }, - "in": "query", - "name": "limit", - "required": false - }, - { - "schema": { - "type": "number", - "minimum": 1 - }, - "in": "query", - "name": "page", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "sort", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "dir", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "order", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "instanceId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - }, - "count": { - "type": "number" - }, - "devices": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Device" - } - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/projects/{instanceId}/devices/settings": { - "get": { - "summary": "Get instance device settings", - "tags": [ - "Instances" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "instanceId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "targetSnapshot": { - "type": "string", - "nullable": true - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "post": { - "summary": "Update instance device settings", - "tags": [ - "Instances" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "targetSnapshot": { - "type": "string" - } - } - } - } - } - }, - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "instanceId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/projects/{instanceId}/actions/start": { - "post": { - "summary": "Start an instance", - "tags": [ - "Instance Actions" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "instanceId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "500": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/projects/{instanceId}/actions/stop": { - "post": { - "summary": "Stop an instance", - "tags": [ - "Instance Actions" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "instanceId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "500": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/projects/{instanceId}/actions/restart": { - "post": { - "summary": "Restart an instance", - "tags": [ - "Instance Actions" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "instanceId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "500": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/projects/{instanceId}/actions/suspend": { - "post": { - "summary": "Suspend an instance", - "tags": [ - "Instance Actions" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "instanceId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "500": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/projects/{instanceId}/actions/rollback": { - "post": { - "summary": "Rollback an instance to a snapshot", - "tags": [ - "Instance Actions" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "snapshot": { - "type": "string" - } - } - } - } - } - }, - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "instanceId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "500": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/projects/{instanceId}/actions/restartStack": { - "post": { - "summary": "Restart an instance stack", - "tags": [ - "Instance Actions" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "instanceId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "500": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/projects/{instanceId}/snapshots/": { - "get": { - "summary": "Get a list of instance snapshots", - "tags": [ - "Snapshots" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "instanceId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - }, - "count": { - "type": "number" - }, - "snapshots": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Snapshot" - } - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "post": { - "summary": "Create a snapshot from an instance", - "tags": [ - "Snapshots" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "flows": { - "oneOf": [ - { - "type": "object", - "properties": { - "flows": { - "type": "array", - "items": { - "type": "object" - } - }, - "credentials": { - "type": "object" - } - } - }, - { - "type": "array", - "items": { - "type": "object" - } - } - ] - }, - "credentials": { - "type": "object" - }, - "credentialSecret": { - "type": "string" - }, - "settings": { - "type": "object", - "properties": { - "modules": { - "type": "object", - "additionalProperties": true - } - } - }, - "setAsTarget": { - "type": "boolean" - } - } - } - } - } - }, - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "instanceId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Snapshot" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/projects/{instanceId}/snapshots/{snapshotId}": { - "get": { - "summary": "Get details of a snapshot", - "tags": [ - "Snapshots" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "instanceId", - "required": true - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "snapshotId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Snapshot" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "delete": { - "summary": "Delete a snapshot", - "tags": [ - "Snapshots" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "instanceId", - "required": true - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "snapshotId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/projects/{instanceId}/snapshots/{snapshotId}/export": { - "post": { - "summary": "Export an instance snapshot using the provided credentialSecret", - "tags": [ - "Snapshots" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "credentialSecret": { - "type": "string" - } - } - } - } - } - }, - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "instanceId", - "required": true - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "snapshotId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExportedSnapshot" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/stacks/": { - "get": { - "summary": "Get a list of all stacks", - "tags": [ - "Stacks" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "query", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "cursor", - "required": false - }, - { - "schema": { - "type": "number" - }, - "in": "query", - "name": "limit", - "required": false - }, - { - "schema": { - "type": "number", - "minimum": 1 - }, - "in": "query", - "name": "page", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "sort", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "dir", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "order", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "filter", - "required": false - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - }, - "count": { - "type": "number" - }, - "stacks": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Stack" - } - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "post": { - "summary": "Create a stack - admin-only", - "tags": [ - "Stacks" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string" - }, - "label": { - "type": "string" - }, - "active": { - "type": "boolean" - }, - "projectType": { - "type": "string" - }, - "properties": { - "type": "object" - }, - "replaces": { - "type": "string" - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Stack" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/stacks/{stackId}": { - "get": { - "summary": "Get details of a stacks", - "tags": [ - "Stacks" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "stackId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Stack" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "delete": { - "summary": "Delete a stack - admin-only", - "tags": [ - "Stacks" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "stackId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "put": { - "summary": "Update details of a stack - admin-only", - "tags": [ - "Stacks" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "label": { - "type": "string" - }, - "active": { - "type": "boolean" - }, - "projectType": { - "type": "string" - }, - "properties": { - "type": "object" - } - } - } - } - } - }, - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "stackId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Stack" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/templates/": { - "get": { - "summary": "Get a list of all templates", - "tags": [ - "Templates" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "query", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "cursor", - "required": false - }, - { - "schema": { - "type": "number" - }, - "in": "query", - "name": "limit", - "required": false - }, - { - "schema": { - "type": "number", - "minimum": 1 - }, - "in": "query", - "name": "page", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "sort", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "dir", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "order", - "required": false - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - }, - "count": { - "type": "number" - }, - "templates": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TemplateSummary" - } - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "post": { - "summary": "Create a template - admin-only", - "tags": [ - "Templates" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "name", - "settings", - "policy" - ], - "properties": { - "name": { - "type": "string" - }, - "active": { - "type": "boolean" - }, - "description": { - "type": "string" - }, - "settings": { - "type": "object" - }, - "policy": { - "type": "object" - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TemplateSummary" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/templates/{templateId}": { - "get": { - "summary": "Get a template", - "tags": [ - "Templates" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "templateId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Template" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "delete": { - "summary": "Delete a template - admin-only", - "tags": [ - "Templates" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "templateId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "put": { - "summary": "Update a template - admin-only", - "tags": [ - "Templates" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "name", - "settings", - "policy" - ], - "properties": { - "name": { - "type": "string" - }, - "active": { - "type": "boolean" - }, - "description": { - "type": "string" - }, - "settings": { - "type": "object" - }, - "policy": { - "type": "object" - } - } - } - } - } - }, - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "templateId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TemplateSummary" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/devices/": { - "get": { - "summary": "Get a list of all devices - admin-only", - "tags": [ - "Devices" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "query", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "cursor", - "required": false - }, - { - "schema": { - "type": "number" - }, - "in": "query", - "name": "limit", - "required": false - }, - { - "schema": { - "type": "number", - "minimum": 1 - }, - "in": "query", - "name": "page", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "sort", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "dir", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "order", - "required": false - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - }, - "count": { - "type": "number" - }, - "devices": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Device" - } - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "post": { - "summary": "Create or provision a device", - "tags": [ - "Devices" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "oneOf": [ - { - "allOf": [ - { - "required": [ - "name" - ] - }, - { - "required": [ - "team" - ] - }, - { - "not": { - "required": [ - "setup" - ] - } - } - ] - }, - { - "allOf": [ - { - "required": [ - "setup" - ] - }, - { - "not": { - "required": [ - "name" - ] - } - }, - { - "not": { - "required": [ - "team" - ] - } - } - ] - } - ], - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "team": { - "type": "string" - }, - "setup": { - "type": "boolean", - "enum": [ - true - ] - }, - "agentHost": { - "type": "string" - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/Device" - } - ], - "properties": { - "credentials": { - "type": "object", - "additionalProperties": true - }, - "meta": { - "type": "object", - "properties": { - "ffVersion": { - "type": "string" - } - } - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/devices/{deviceId}": { - "get": { - "summary": "Get details of a device", - "tags": [ - "Devices" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "deviceId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Device" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "delete": { - "summary": "Delete a device", - "tags": [ - "Devices" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "deviceId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "put": { - "summary": "Update a device", - "tags": [ - "Devices" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "instance": { - "type": "string", - "nullable": true - }, - "application": { - "type": "string", - "nullable": true - } - } - } - } - } - }, - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "deviceId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Device" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/devices/{deviceId}/generate_credentials": { - "post": { - "summary": "Regenerate device credentials", - "tags": [ - "Devices" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "deviceId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/devices/{deviceId}/settings": { - "put": { - "summary": "Update a devices settings", - "tags": [ - "Devices" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "env": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": true - } - }, - "autoSnapshot": { - "type": "boolean" - }, - "palette": { - "type": "object", - "additionalProperties": true - }, - "editor": { - "type": "object", - "additionalProperties": true - }, - "security": { - "type": "object", - "additionalProperties": true - } - } - } - } - } - }, - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "deviceId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "get": { - "summary": "Get a devices settings", - "tags": [ - "Devices" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "deviceId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "env": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": true - } - }, - "autoSnapshot": { - "type": "boolean" - }, - "palette": { - "type": "object", - "additionalProperties": true - }, - "editor": { - "type": "object", - "additionalProperties": true - }, - "security": { - "type": "object", - "additionalProperties": true - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/devices/{deviceId}/logs": { - "post": { - "summary": "Start device logging", - "tags": [ - "Devices" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "deviceId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "username": { - "type": "string" - }, - "password": { - "type": "string" - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/devices/{deviceId}/resources": { - "post": { - "summary": "Start device logging", - "tags": [ - "Devices" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "deviceId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "username": { - "type": "string" - }, - "password": { - "type": "string" - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/devices/{deviceId}/mode": { - "put": { - "summary": "Set device mode", - "tags": [ - "Devices" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "mode": { - "type": "string", - "nullable": true - } - } - } - } - } - }, - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "deviceId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "mode": { - "type": "string" - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/devices/{deviceId}/snapshot": { - "post": { - "summary": "Create a snapshot from a device owned by an instance", - "tags": [ - "Devices" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "setAsTarget": { - "type": "boolean" - } - } - } - } - } - }, - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "deviceId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Snapshot" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/devices/{deviceId}/audit-log": { - "get": { - "tags": [ - "Devices" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "query", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "cursor", - "required": false - }, - { - "schema": { - "type": "number" - }, - "in": "query", - "name": "limit", - "required": false - }, - { - "schema": { - "type": "number", - "minimum": 1 - }, - "in": "query", - "name": "page", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "sort", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "dir", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "order", - "required": false - }, - { - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - }, - "in": "query", - "name": "event", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "username", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "deviceId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - }, - "count": { - "type": "number" - }, - "log": { - "$ref": "#/components/schemas/AuditLogEntryList" - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/devices/{deviceId}/audit-log/export": { - "get": { - "tags": [ - "Devices" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "query", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "cursor", - "required": false - }, - { - "schema": { - "type": "number" - }, - "in": "query", - "name": "limit", - "required": false - }, - { - "schema": { - "type": "number", - "minimum": 1 - }, - "in": "query", - "name": "page", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "sort", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "dir", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "order", - "required": false - }, - { - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - }, - "in": "query", - "name": "event", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "username", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "deviceId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "text/csv": { - "schema": { - "type": "string" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/devices/{deviceId}/generate/snapshot-description": { - "post": { - "summary": "Generate a description of changes between a project's current state and latest snapshot", - "tags": [ - "Instances", - "Snapshots" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "target" - ], - "properties": { - "target": { - "type": "string" - } - } - } - } - } - }, - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "instanceId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/devices/{deviceId}/snapshots/": { - "get": { - "summary": "Get a list of snapshots for a device", - "tags": [ - "DeviceSnapshots" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "deviceId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - }, - "count": { - "type": "number" - }, - "snapshots": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Snapshot" - } - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "post": { - "summary": "Create a snapshot from a device", - "tags": [ - "Devices" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "setAsTarget": { - "type": "boolean" - } - } - } - } - } - }, - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "deviceId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Snapshot" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/devices/{deviceId}/snapshots/{snapshotId}": { - "get": { - "summary": "Get details of a device snapshot", - "tags": [ - "DeviceSnapshots" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "deviceId", - "required": true - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "snapshotId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Snapshot" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "delete": { - "summary": "Delete a devices snapshot", - "tags": [ - "DeviceSnapshots" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "deviceId", - "required": true - }, - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "snapshotId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/devices/{deviceId}/actions/restart": { - "post": { - "summary": "Restart Node-RED", - "tags": [ - "Device Actions" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "deviceId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "500": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/project-types/": { - "get": { - "summary": "Get a list of all instance types", - "tags": [ - "Instance Types" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "query", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "cursor", - "required": false - }, - { - "schema": { - "type": "number" - }, - "in": "query", - "name": "limit", - "required": false - }, - { - "schema": { - "type": "number", - "minimum": 1 - }, - "in": "query", - "name": "page", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "sort", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "dir", - "required": false - }, - { - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "in": "query", - "name": "order", - "required": false - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "filter", - "required": false - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - }, - "count": { - "type": "number" - }, - "types": { - "type": "array", - "items": { - "$ref": "#/components/schemas/InstanceType" - } - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "post": { - "summary": "Create an instance type - admin-only", - "tags": [ - "Instance Types" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "active": { - "type": "boolean" - }, - "properties": { - "type": "object" - }, - "order": { - "type": "number" - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InstanceType" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/project-types/{instanceTypeId}": { - "get": { - "summary": "Get a details of an instance types", - "tags": [ - "Instance Types" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "instanceTypeId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InstanceType" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "put": { - "summary": "Update an instance type - admin-only", - "tags": [ - "Instance Types" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "active": { - "type": "boolean" - }, - "properties": { - "type": "object" - }, - "order": { - "type": "number" - }, - "defaultStack": { - "type": "string" - } - } - } - } - } - }, - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "instanceTypeId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InstanceType" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "delete": { - "summary": "Delete an instance type - admin-only", - "tags": [ - "Instance Types" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "instanceTypeId", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/snapshots/{id}": { - "get": { - "summary": "Get summary of a snapshot", - "tags": [ - "Snapshots" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "id", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Snapshot" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "delete": { - "summary": "Delete a snapshot", - "tags": [ - "Snapshots" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "id", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIStatus" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - }, - "put": { - "summary": "Update a snapshot", - "tags": [ - "Snapshots" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - } - } - } - } - } - }, - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "id", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Snapshot" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/snapshots/{id}/full": { - "get": { - "summary": "Get details of a snapshot", - "tags": [ - "Snapshots" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "id", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FullSnapshot" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/snapshots/{id}/export": { - "post": { - "summary": "Export a snapshot", - "tags": [ - "Snapshots" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "credentialSecret": { - "type": "string" - }, - "components": { - "type": "object", - "properties": { - "flows": { - "type": "boolean", - "default": true - }, - "credentials": { - "type": "boolean", - "default": true - }, - "envVars": { - "anyOf": [ - { - "type": "string", - "enum": [ - "all", - "keys" - ] - }, - { - "type": "boolean", - "enum": [ - false - ] - } - ] - } - } - } - } - } - } - } - }, - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "path", - "name": "id", - "required": true - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExportedSnapshot" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/snapshots/import": { - "post": { - "summary": "Upload a snapshot", - "tags": [ - "Snapshots" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "ownerId": { - "type": "string" - }, - "ownerType": { - "type": "string" - }, - "snapshot": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "flows": { - "type": "object", - "properties": { - "flows": { - "type": "array", - "items": {}, - "minItems": 0 - }, - "credentials": { - "type": "object" - } - }, - "required": [ - "flows" - ] - }, - "settings": { - "type": "object", - "properties": { - "settings": { - "type": "object" - }, - "env": { - "type": "object" - }, - "modules": { - "type": "object" - } - }, - "required": [] - } - }, - "required": [ - "name", - "flows", - "settings" - ] - }, - "credentialSecret": { - "type": "string" - }, - "components": { - "type": "object", - "properties": { - "flows": { - "type": "boolean", - "default": true - }, - "credentials": { - "type": "boolean", - "default": true - }, - "envVars": { - "anyOf": [ - { - "type": "string", - "enum": [ - "all", - "keys" - ] - }, - { - "type": "boolean", - "enum": [ - false - ] - } - ] - } - } - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Snapshot" - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/search/": { - "get": { - "summary": "Search for resources", - "tags": [ - "Search" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "team", - "required": true - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "query", - "required": false - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "count": { - "type": "number" - }, - "results": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": true - } - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - }, - "/api/v1/search/instances": { - "get": { - "summary": "Search for hosted and remote instances", - "tags": [ - "Search" - ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "team", - "required": true - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "query", - "required": false - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "count": { - "type": "number" - }, - "results": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": true - } - } - } - } - } - } - }, - "4XX": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - } - } - } - }, - "tags": [ - { - "name": "User", - "description": "" - }, - { - "name": "Teams", - "description": "" - }, - { - "name": "Team Types", - "description": "" - }, - { - "name": "Team Members", - "description": "" - }, - { - "name": "Team Invitations", - "description": "" - }, - { - "name": "Team Devices", - "description": "" - }, - { - "name": "Applications", - "description": "" - }, - { - "name": "Application Device Groups", - "description": "" - }, - { - "name": "Instances", - "description": "" - }, - { - "name": "Instance Types", - "description": "" - }, - { - "name": "Instance Actions", - "description": "" - }, - { - "name": "Devices", - "description": "" - }, - { - "name": "Snapshots", - "description": "" - }, - { - "name": "Pipelines", - "description": "" - }, - { - "name": "Stacks", - "description": "" - }, - { - "name": "Templates", - "description": "" - }, - { - "name": "Platform", - "description": "" - }, - { - "name": "Users", - "description": "" - } - ], - "externalDocs": { - "url": "https://flowfuse.com/docs", - "description": "Find more info here" - } -} \ No newline at end of file From 04930e7b708b69d50cb0b85b406e33de75076a18 Mon Sep 17 00:00:00 2001 From: Ben Hardill Date: Mon, 6 Jul 2026 13:44:31 +0100 Subject: [PATCH 06/16] Fix generate:types --- frontend/src/types/generated.ts | 3514 +++++++++++++++++++++++++++++++ scripts/dump-openapi.js | 3 + 2 files changed, 3517 insertions(+) diff --git a/frontend/src/types/generated.ts b/frontend/src/types/generated.ts index 96bb63971e..21f6bfa6b9 100644 --- a/frontend/src/types/generated.ts +++ b/frontend/src/types/generated.ts @@ -7088,6 +7088,3366 @@ export interface paths { patch?: never; trace?: never; }; + "/api/v1/pipelines": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Create a new pipeline within an application */ + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": { + applicationId?: string; + name?: string; + }; + }; + }; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Pipeline"]; + }; + }; + /** @description Default Response */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/pipelines/{pipelineId}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** Update a pipeline within an application */ + put: { + parameters: { + query?: never; + header?: never; + path: { + pipelineId: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": { + name?: string; + }; + }; + }; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Pipeline"]; + }; + }; + /** @description Default Response */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + post?: never; + /** Delete a pipeline */ + delete: { + parameters: { + query?: never; + header?: never; + path: { + pipelineId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIStatus"]; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/pipelines/{pipelineId}/stages": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Add a new stage to an existing pipeline */ + post: { + parameters: { + query?: never; + header?: never; + path: { + pipelineId: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": { + name?: string; + instanceId?: string; + deviceId?: string; + deviceGroupId?: string; + deployToDevices?: boolean; + /** @enum {string} */ + action?: "create_snapshot" | "use_active_snapshot" | "use_latest_snapshot" | "prompt" | "none"; + gitTokenId?: string; + url?: string; + branch?: string; + pullBranch?: string; + pushPath?: string; + pullPath?: string; + credentialSecret?: string; + source?: string; + }; + }; + }; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["PipelineStage"]; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/pipelines/{pipelineId}/stages/{stageId}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** Update details of a stage within a pipeline */ + put: { + parameters: { + query?: never; + header?: never; + path: { + pipelineId: string; + stageId: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": { + name?: string; + instanceId?: string; + deviceId?: string; + deviceGroupId?: string; + /** @enum {string} */ + action?: "create_snapshot" | "use_active_snapshot" | "use_latest_snapshot" | "prompt" | "none"; + gitTokenId?: string; + url?: string; + branch?: string; + pullBranch?: string; + pushPath?: string; + pullPath?: string; + credentialSecret?: string; + source?: string; + }; + }; + }; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["PipelineStage"]; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + post?: never; + /** Delete a pipeline stage */ + delete: { + parameters: { + query?: never; + header?: never; + path: { + pipelineId: string; + stageId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIStatus"]; + }; + }; + /** @description Default Response */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/pipelines/{pipelineId}/stages/{stageId}/deploy": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** Triggers a pipeline stage */ + put: { + parameters: { + query?: never; + header?: never; + path: { + pipelineId: string; + stageId: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": { + /** @description The snapshot to deploy if the stage action is set to "prompt" */ + sourceSnapshotId?: string; + } | null; + }; + }; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIStatus"]; + }; + }; + /** @description Default Response */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/applications/{applicationId}/pipelines": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** List all pipelines within an application */ + get: { + parameters: { + query?: never; + header?: never; + path: { + applicationId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + count?: number; + pipelines?: components["schemas"]["PipelineList"]; + }; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/teams/{teamId}/pipelines/": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path: { + teamId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + count?: number; + pipelines?: components["schemas"]["PipelineList"]; + }; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/applications/{applicationId}/bom": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get application BOM */ + get: { + parameters: { + query?: never; + header?: never; + path: { + applicationId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApplicationBom"]; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/teams/{teamId}/bom": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get team BOM */ + get: { + parameters: { + query?: never; + header?: never; + path: { + teamId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApplicationBom"][]; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/flow-blueprints/": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get a list of the available flow blueprints */ + get: { + parameters: { + query?: { + query?: string; + cursor?: string; + limit?: number; + page?: number; + sort?: string; + dir?: "asc" | "desc"; + order?: "asc" | "desc"; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + meta?: components["schemas"]["PaginationMeta"]; + count?: number; + blueprints?: components["schemas"]["FlowBlueprintSummaryList"]; + }; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + put?: never; + /** Create a flow blueprint - admin-only */ + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": WithRequired; + }; + }; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FlowBlueprintSummary"]; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/flow-blueprints/{flowBlueprintId}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get full details of a flow blueprint */ + get: { + parameters: { + query?: never; + header?: never; + path: { + flowBlueprintId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FlowBlueprint"]; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + /** Update a flow blueprint - admin-only */ + put: { + parameters: { + query?: never; + header?: never; + path: { + flowBlueprintId: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["FlowBlueprintInput"]; + }; + }; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FlowBlueprintSummary"]; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + post?: never; + /** Delete a flow blueprint - admin-only */ + delete: { + parameters: { + query?: never; + header?: never; + path: { + flowBlueprintId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIStatus"]; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/flow-blueprints/export": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Export one or more Blueprints */ + get: { + parameters: { + query?: { + id?: string[]; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + count?: number; + } & components["schemas"]["FlowBlueprintExport"]; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/flow-blueprints/export-public": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Export one or more Blueprints */ + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + count?: number; + } & components["schemas"]["FlowBlueprintExport"]; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/flow-blueprints/import": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Import one or more Blueprints */ + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": { + blueprints: { + [key: string]: unknown; + }[]; + count?: number; + }; + }; + }; + responses: { + /** @description Default Response */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + blueprints?: components["schemas"]["FlowBlueprintSummary"][]; + count?: number; + }; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/applications/{applicationId}/device-groups/": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get a list of device groups in an application */ + get: { + parameters: { + query?: { + query?: string; + cursor?: string; + limit?: number; + page?: number; + sort?: string; + dir?: "asc" | "desc"; + order?: "asc" | "desc"; + }; + header?: never; + path: { + applicationId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + meta?: components["schemas"]["PaginationMeta"]; + count?: number; + groups?: components["schemas"]["DeviceGroupSummary"][]; + }; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + put?: never; + /** Add a new Device Group to an Application */ + post: { + parameters: { + query?: never; + header?: never; + path: { + applicationId: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": { + name: string; + description?: string; + }; + }; + }; + responses: { + /** @description Default Response */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["DeviceGroupSummary"]; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/applications/{applicationId}/device-groups/{groupId}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get a specific Device Group */ + get: { + parameters: { + query?: never; + header?: never; + path: { + applicationId: string; + groupId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["DeviceGroup"]; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + /** Update a Device Group */ + put: { + parameters: { + query?: never; + header?: never; + path: { + applicationId: string; + groupId: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": { + name?: string; + description?: string; + targetSnapshotId?: string | null; + }; + }; + }; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": Record; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + post?: never; + /** Delete a Device Group */ + delete: { + parameters: { + query?: never; + header?: never; + path: { + applicationId: string; + groupId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": Record; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + options?: never; + head?: never; + /** Update Device Group membership */ + patch: { + parameters: { + query?: never; + header?: never; + path: { + applicationId: string; + groupId: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": { + add?: string[]; + remove?: string[]; + set?: string[]; + }; + }; + }; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": Record; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + trace?: never; + }; + "/api/v1/applications/{applicationId}/device-groups/{groupId}/settings": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** Update a Device Group Settings */ + put: { + parameters: { + query?: never; + header?: never; + path: { + applicationId: string; + groupId: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": { + env?: { + [key: string]: unknown; + }[]; + }; + }; + }; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIStatus"]; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/teams/{teamId}/device-groups/": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get a list of device groups in an application */ + get: { + parameters: { + query?: { + query?: string; + cursor?: string; + limit?: number; + page?: number; + sort?: string; + dir?: "asc" | "desc"; + order?: "asc" | "desc"; + }; + header?: never; + path: { + applicationId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + meta?: components["schemas"]["PaginationMeta"]; + count?: number; + groups?: components["schemas"]["DeviceGroupSummary"][]; + }; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/projects/{projectId}/files/_/{path}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** List files stored in the instance */ + get: { + parameters: { + query?: never; + header?: never; + path: { + instanceId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + /** Update file properties in the instance */ + put: { + parameters: { + query?: never; + header?: never; + path: { + instanceId: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": { + path?: string; + share?: { + [key: string]: unknown; + }; + }; + }; + }; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + /** Upload a file to the instance/Create directory */ + post: { + parameters: { + query?: never; + header?: never; + path: { + instanceId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + /** Delete a file in the instance */ + delete: { + parameters: { + query?: never; + header?: never; + path: { + instanceId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/teams/{teamId}/broker/clients": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** List MQTT clients for the team */ + get: { + parameters: { + query?: { + query?: string; + cursor?: string; + limit?: number; + page?: number; + sort?: string; + dir?: "asc" | "desc"; + order?: "asc" | "desc"; + }; + header?: never; + path: { + teamId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + clients?: unknown[]; + meta?: components["schemas"]["PaginationMeta"]; + count?: number; + } & { + [key: string]: unknown; + }; + }; + }; + /** @description Default Response */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/teams/{teamId}/broker/client": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Create new MQTT client for the team */ + post: { + parameters: { + query?: never; + header?: never; + path: { + teamId: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": { + acls?: unknown[]; + username?: string; + password?: string; + }; + }; + }; + responses: { + /** @description Default Response */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + id?: string; + username?: string; + acls?: unknown[]; + }; + }; + }; + /** @description Default Response */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/teams/{teamId}/broker/client/{username}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get details about a specific MQTT client */ + get: { + parameters: { + query?: never; + header?: never; + path: { + teamId: string; + username: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + id?: string; + username?: string; + acls?: unknown[]; + owner?: null | { + /** @enum {string} */ + instanceType?: "instance" | "device"; + id?: string; + name?: string; + }; + }; + }; + }; + /** @description Default Response */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + /** Modify a MQTT Client */ + put: { + parameters: { + query?: never; + header?: never; + path: { + teamId: string; + username: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": { + password?: string; + acls?: unknown[]; + } | { + password?: string; + } | { + acls?: unknown[]; + }; + }; + }; + responses: { + /** @description Default Response */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + id?: string; + username?: string; + acls?: unknown[]; + }; + }; + }; + /** @description Default Response */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + post?: never; + /** Delete a MQTT client */ + delete: { + parameters: { + query?: never; + header?: never; + path: { + teamId: string; + username: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIStatus"]; + }; + }; + /** @description Default Response */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/teams/{teamId}/broker/client/{username}/link": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Link a MQTT client to a device or project */ + post: { + parameters: { + query?: never; + header?: never; + path: { + teamId: string; + username: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": { + /** @enum {string} */ + ownerType?: "device" | "instance"; + ownerId?: string; + password?: string; + } & ({ + password: string; + } | { + /** @enum {string} */ + ownerType: "device" | "instance"; + ownerId: string; + password?: string; + }); + }; + }; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + id?: string; + username?: string; + acls?: unknown[]; + owner?: { + /** @enum {string} */ + type?: "instance" | "device"; + id?: string; + name?: string; + }; + }; + }; + }; + /** @description Default Response */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + id?: string; + username?: string; + acls?: unknown[]; + owner?: { + /** @enum {string} */ + instanceType?: "instance" | "device"; + id?: string; + name?: string; + }; + }; + }; + }; + /** @description Default Response */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/teams/{teamId}/brokers": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get credentials for 3rd party MQTT brokers */ + get: { + parameters: { + query?: never; + header?: never; + path: { + teamId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + meta?: components["schemas"]["PaginationMeta"]; + count?: number; + brokers?: components["schemas"]["MQTTBroker"][]; + } & { + [key: string]: unknown; + }; + }; + }; + /** @description Default Response */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + put?: never; + /** Create credentials for a 3rd party MQTT broker */ + post: { + parameters: { + query?: never; + header?: never; + path: { + teamId: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["MQTTBrokerInput"]; + }; + }; + responses: { + /** @description Default Response */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["MQTTBroker"]; + }; + }; + /** @description Default Response */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/teams/{teamId}/brokers/{brokerId}/credentials": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Gets credentials for a 3rd party MQTT broker */ + get: { + parameters: { + query?: never; + header?: never; + path: { + teamId: string; + brokerId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["MQTTBroker"]; + }; + }; + /** @description Default Response */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/teams/{teamId}/brokers/{brokerId}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get 3rd Party Broker details and status */ + get: { + parameters: { + query?: never; + header?: never; + path: { + teamId: string; + brokerId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["MQTTBroker"] | { + state: string; + }; + }; + }; + /** @description Default Response */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + /** Delete credentials for a 3rd party MQTT broker */ + put: { + parameters: { + query?: never; + header?: never; + path: { + teamId: string; + brokerId: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["MQTTBrokerInput"]; + }; + }; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["MQTTBroker"]; + }; + }; + /** @description Default Response */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + post?: never; + /** Delete credentials for a 3rd party MQTT broker */ + delete: { + parameters: { + query?: never; + header?: never; + path: { + teamId: string; + brokerId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + [key: string]: unknown; + }; + }; + }; + /** @description Default Response */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/teams/{teamId}/brokers/{brokerId}/topics": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path: { + teamId: string; + brokerId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + [key: string]: unknown; + }; + }; + }; + /** @description Default Response */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + put?: never; + /** Store Topics from a 3rd party MQTT broker */ + post: { + parameters: { + query?: never; + header?: never; + path: { + teamId: string; + brokerId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Default Response */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + topic?: string; + } & { + [key: string]: unknown; + }; + }; + }; + /** @description Default Response */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/teams/{teamId}/brokers/{brokerId}/topics/{topicId}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put: { + parameters: { + query?: never; + header?: never; + path: { + teamId: string; + brokerId: string; + topicId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Default Response */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + [key: string]: unknown; + }; + }; + }; + /** @description Default Response */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + post?: never; + delete: { + parameters: { + query?: never; + header?: never; + path: { + teamId: string; + brokerId: string; + topicId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Default Response */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": Record; + }; + }; + /** @description Default Response */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/teams/{teamId}/npm/packages": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Gets the private packages owned by this team */ + get: { + parameters: { + query?: never; + header?: never; + path: { + teamId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/teams/{teamId}/npm/subflow": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** Allows Subflow packages to be stored in the Team Registry */ + put: { + parameters: { + query?: never; + header?: never; + path: { + teamId: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": { + package?: { + name: string; + version: string; + } & { + [key: string]: unknown; + }; + subflow?: { + [key: string]: unknown; + }; + }; + }; + }; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": Record; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/teams/{teamId}/npm/userToken": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Check if user already has a NPM auth token */ + get: { + parameters: { + query?: never; + header?: never; + path: { + teamId: string; + userId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": Record; + }; + }; + /** @description Default Response */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": Record; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + put?: never; + /** Generate a new user password for NPM registry */ + post: { + parameters: { + query?: never; + header?: never; + path: { + teamId: string; + userId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Default Response */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + username?: string; + token?: string; + }; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/projects/{instanceId}/resources/": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Returns resource usage history for an Instance */ + get: { + parameters: { + query?: never; + header?: never; + path: { + instanceId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + meta?: components["schemas"]["PaginationMeta"]; + resources?: { + src?: string; + ps?: number; + cpu?: number; + hs?: number; + hu?: number; + ts?: number; + }[]; + count?: number; + }; + }; + }; + /** @description Default Response */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/teams/{teamId}/databases/": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path: { + teamId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["DatabaseCredentials"][]; + }; + }; + /** @description Default Response */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path: { + teamId: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Name of the database */ + name?: string; + }; + }; + }; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["DatabaseCredentials"]; + }; + }; + /** @description Default Response */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/teams/{teamId}/databases/{databaseId}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path: { + databaseId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["DatabaseCredentials"]; + }; + }; + /** @description Default Response */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + put?: never; + post?: never; + delete: { + parameters: { + query?: never; + header?: never; + path: { + databaseId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": unknown; + }; + }; + /** @description Default Response */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/teams/{teamId}/databases/{databaseId}/tables": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: { + query?: string; + cursor?: string; + limit?: number; + page?: number; + sort?: string; + dir?: "asc" | "desc"; + order?: "asc" | "desc"; + }; + header?: never; + path: { + databaseId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + count?: number; + tables?: { + name?: string; + schema?: string; + }[]; + meta?: { + [key: string]: unknown; + }; + }; + }; + }; + /** @description Default Response */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path: { + databaseId: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": { + name?: string; + columns?: components["schemas"]["DatabaseTable"]; + }; + }; + }; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["DatabaseTable"]; + }; + }; + /** @description Default Response */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/teams/{teamId}/databases/{databaseId}/tables/{tableName}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path: { + databaseId: string; + tableName: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["DatabaseTable"]; + }; + }; + /** @description Default Response */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + put?: never; + post?: never; + delete: { + parameters: { + query?: never; + header?: never; + path: { + databaseId: string; + tableName: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["DatabaseTable"]; + }; + }; + /** @description Default Response */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/teams/{teamId}/databases/{databaseId}/tables/{tableName}/data": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: { + query?: string; + cursor?: string; + limit?: number; + page?: number; + sort?: string; + dir?: "asc" | "desc"; + order?: "asc" | "desc"; + }; + header?: never; + path: { + databaseId: string; + tableName: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + count?: number; + rows?: { + [key: string]: unknown; + }[]; + meta?: { + [key: string]: unknown; + }; + }; + }; + }; + /** @description Default Response */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/teams/{teamId}/mcp/": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path: { + teamId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + count?: number; + servers?: components["schemas"]["MCPRegistrationSummaryList"]; + }; + }; + }; + /** @description Default Response */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/teams/{teamId}/mcp/{type}/{typeId}/{nodeId}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path: { + teamId: string; + type: string; + typeId: string; + nodeId: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": { + name?: string; + endpointRoute?: string; + protocol?: string; + title?: string; + version?: string; + description?: string; + }; + }; + }; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": Record; + }; + }; + /** @description Default Response */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + delete: { + parameters: { + query?: never; + header?: never; + path: { + teamId: string; + type: string; + typeId: string; + nodeId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": Record; + }; + }; + /** @description Default Response */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/projects/{projectId}/autoUpdateStack/": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Returns when a Instance allowed to be restarted */ + get: { + parameters: { + query?: never; + header?: never; + path: { + projectId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + hour?: number; + day?: number; + restart?: boolean; + }[]; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + /** Sets when an Instance can be restarted */ + put: { + parameters: { + query?: never; + header?: never; + path: { + projectId: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": { + schedule?: { + hour?: number; + day?: number; + restart?: boolean; + }[]; + }; + }; + }; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + hour?: number; + day?: number; + restart?: boolean; + }[]; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + post?: never; + /** Clears when an Instance can be restarted */ + delete: { + parameters: { + query?: never; + header?: never; + path: { + projectId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": unknown; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; } export type webhooks = Record; export interface components { @@ -7789,6 +11149,147 @@ export interface components { } & { [key: string]: unknown; }; + /** Pipeline */ + Pipeline: { + id: string; + name: string; + stages: components["schemas"]["PipelineStageList"]; + application?: { + id: string; + name: string; + }; + }; + /** PipelineList */ + PipelineList: components["schemas"]["Pipeline"][]; + /** PipelineStage */ + PipelineStage: { + id: string; + name: string; + deployToDevices: boolean; + instances?: components["schemas"]["InstanceSummaryList"]; + devices?: components["schemas"]["DeviceSummary"][]; + deviceGroups?: components["schemas"]["DeviceGroupPipelineSummary"][]; + gitRepo?: { + gitTokenId: string; + url: string; + branch: string; + pullBranch: string; + pushPath: string; + pullPath: string; + lastPushAt: string | null; + lastPullAt: string | null; + status: string | null; + statusMessage: string | null; + credentialSecret: boolean; + }; + /** @enum {string} */ + action: "create_snapshot" | "use_active_snapshot" | "use_latest_snapshot" | "prompt" | "none"; + NextStageId?: string; + }; + /** PipelineStageList */ + PipelineStageList: components["schemas"]["PipelineStage"][]; + /** FlowBlueprintSummary */ + FlowBlueprintSummary: { + id: string; + active?: boolean; + name: string; + description?: string; + category?: string; + icon?: string | null; + order?: number; + default?: boolean; + createdAt: string; + updatedAt: string; + externalUrl?: string | null; + }; + /** FlowBlueprint */ + FlowBlueprint: { + flows: { + [key: string]: unknown; + }; + modules: { + [key: string]: unknown; + }; + teamTypeScope: string[] | null; + } & components["schemas"]["FlowBlueprintSummary"]; + /** FlowBlueprintInput */ + FlowBlueprintInput: { + active?: boolean; + name?: string; + description?: string; + category?: string; + icon?: string | null; + order?: number; + default?: boolean; + externalUrl?: string | null; + flows?: { + [key: string]: unknown; + }; + modules?: { + [key: string]: unknown; + }; + teamTypeScope?: string[] | null; + }; + /** FlowBlueprintSummaryList */ + FlowBlueprintSummaryList: components["schemas"]["FlowBlueprintSummary"][]; + /** FlowBlueprintExport */ + FlowBlueprintExport: { + blueprints: { + id?: string; + name: string; + description: string; + category: string; + icon: string | null; + flows: { + [key: string]: unknown; + }; + modules: { + [key: string]: unknown; + }; + }[]; + count: number; + }; + /** MCPRegistrationSummary */ + MCPRegistrationSummary: { + id: string; + name: string; + protocol: string; + /** @enum {string} */ + targetType: "instance" | "device"; + targetId: string; + nodeId: string; + endpointRoute: string; + teamId: string; + title: string; + version: string; + description: string; + }; + /** MCPRegistrationSummaryList */ + MCPRegistrationSummaryList: components["schemas"]["MCPRegistrationSummary"][]; + /** DatabaseCredentials */ + DatabaseCredentials: { + id: string; + name: string; + credentials: { + host: string; + port: number; + ssl: boolean; + database: string; + user: string; + password: string; + }; + }; + /** DatabaseTable */ + DatabaseTable: ({ + name: string; + type: string; + nullable?: boolean; + default?: string | null; + generated?: boolean; + maxLength?: number | null; + } & { + [key: string]: unknown; + })[]; }; responses: never; parameters: never; @@ -7864,6 +11365,19 @@ export type ApiError = components['schemas']['APIError']; export type PaginationParams = components['schemas']['PaginationParams']; export type PaginationMeta = components['schemas']['PaginationMeta']; export type LinksMeta = components['schemas']['LinksMeta']; +export type Pipeline = components['schemas']['Pipeline']; +export type PipelineList = components['schemas']['PipelineList']; +export type PipelineStage = components['schemas']['PipelineStage']; +export type PipelineStageList = components['schemas']['PipelineStageList']; +export type FlowBlueprintSummary = components['schemas']['FlowBlueprintSummary']; +export type FlowBlueprint = components['schemas']['FlowBlueprint']; +export type FlowBlueprintInput = components['schemas']['FlowBlueprintInput']; +export type FlowBlueprintSummaryList = components['schemas']['FlowBlueprintSummaryList']; +export type FlowBlueprintExport = components['schemas']['FlowBlueprintExport']; +export type McpRegistrationSummary = components['schemas']['MCPRegistrationSummary']; +export type McpRegistrationSummaryList = components['schemas']['MCPRegistrationSummaryList']; +export type DatabaseCredentials = components['schemas']['DatabaseCredentials']; +export type DatabaseTable = components['schemas']['DatabaseTable']; export type $defs = Record; type WithRequired = T & { [P in K]-?: T[P]; diff --git a/scripts/dump-openapi.js b/scripts/dump-openapi.js index 9cdbab779d..c75e9e929c 100644 --- a/scripts/dump-openapi.js +++ b/scripts/dump-openapi.js @@ -87,6 +87,9 @@ function normaliseSchemaNames (spec) { console.error('Failed to generate OpenAPI spec:', err.message || err) process.exit(1) } finally { + await new Promise((resolve) => { + setTimeout(resolve, 3000) + }) if (server) { await server.close() } From 44a4172ee401651b3b2eb8b14d9edb1cca86621c Mon Sep 17 00:00:00 2001 From: Ben Hardill Date: Mon, 6 Jul 2026 14:46:40 +0100 Subject: [PATCH 07/16] Another attempt at types --- frontend/src/types/generated.ts | 236 -------------------------------- 1 file changed, 236 deletions(-) diff --git a/frontend/src/types/generated.ts b/frontend/src/types/generated.ts index 21f6bfa6b9..06f39e2017 100644 --- a/frontend/src/types/generated.ts +++ b/frontend/src/types/generated.ts @@ -7926,53 +7926,6 @@ export interface paths { patch?: never; trace?: never; }; - "/api/v1/flow-blueprints/export-public": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Export one or more Blueprints */ - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - count?: number; - } & components["schemas"]["FlowBlueprintExport"]; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; "/api/v1/flow-blueprints/import": { parameters: { query?: never; @@ -9424,195 +9377,6 @@ export interface paths { patch?: never; trace?: never; }; - "/api/v1/teams/{teamId}/npm/packages": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Gets the private packages owned by this team */ - get: { - parameters: { - query?: never; - header?: never; - path: { - teamId: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/v1/teams/{teamId}/npm/subflow": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - /** Allows Subflow packages to be stored in the Team Registry */ - put: { - parameters: { - query?: never; - header?: never; - path: { - teamId: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - package?: { - name: string; - version: string; - } & { - [key: string]: unknown; - }; - subflow?: { - [key: string]: unknown; - }; - }; - }; - }; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": Record; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/v1/teams/{teamId}/npm/userToken": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Check if user already has a NPM auth token */ - get: { - parameters: { - query?: never; - header?: never; - path: { - teamId: string; - userId: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": Record; - }; - }; - /** @description Default Response */ - 404: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": Record; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - put?: never; - /** Generate a new user password for NPM registry */ - post: { - parameters: { - query?: never; - header?: never; - path: { - teamId: string; - userId: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Default Response */ - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - username?: string; - token?: string; - }; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; "/api/v1/projects/{instanceId}/resources/": { parameters: { query?: never; From 3d808890b54f729039d8d2097b74d065122d1516 Mon Sep 17 00:00:00 2001 From: Ben Hardill Date: Thu, 9 Jul 2026 15:50:20 +0100 Subject: [PATCH 08/16] Fix issues raised by Nick @knolleary fixed things based on first pass comments --- forge/db/models/Team.js | 3 ++- forge/ee/lib/sso/index.js | 2 +- frontend/src/pages/application/Settings/UserAccess.vue | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/forge/db/models/Team.js b/forge/db/models/Team.js index b5d40ddac4..9b5014e09e 100644 --- a/forge/db/models/Team.js +++ b/forge/db/models/Team.js @@ -788,7 +788,8 @@ module.exports = { [Op.or]: [ { name: nameOrId }, { id: applicationId } - ] + ], + TeamId: this.id } }) diff --git a/forge/ee/lib/sso/index.js b/forge/ee/lib/sso/index.js index 771efc7b76..4be1e0a4d8 100644 --- a/forge/ee/lib/sso/index.js +++ b/forge/ee/lib/sso/index.js @@ -556,7 +556,7 @@ module.exports.init = async function (app) { if (application) { if (providerOpts.groupAllTeams || (providerOpts.groupTeams || []).includes(teamSlug)) { if (desiredTeamApplicationroles[team.hashid]) { - desiredTeamApplicationroles[team.hashid][application.hashid] = Math.max(desiredTeamApplicationroles[teamSlug][application.hashid] || 0, applicationRole) + desiredTeamApplicationroles[team.hashid][application.hashid] = Math.max(desiredTeamApplicationroles[team.hashid][application.hashid] || 0, applicationRole) } else { desiredTeamApplicationroles[team.hashid] = {} desiredTeamApplicationroles[team.hashid][application.hashid] = applicationRole diff --git a/frontend/src/pages/application/Settings/UserAccess.vue b/frontend/src/pages/application/Settings/UserAccess.vue index dadf086c71..1392c43482 100644 --- a/frontend/src/pages/application/Settings/UserAccess.vue +++ b/frontend/src/pages/application/Settings/UserAccess.vue @@ -5,8 +5,8 @@ data-el="user-access-table" > From b68ebf1da9407191fadccef9dd162540b714ba03 Mon Sep 17 00:00:00 2001 From: Ben Hardill Date: Tue, 14 Jul 2026 10:10:19 +0100 Subject: [PATCH 09/16] Missed a teamSlug vs team.hashid --- forge/ee/lib/sso/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forge/ee/lib/sso/index.js b/forge/ee/lib/sso/index.js index 4be1e0a4d8..addad3f290 100644 --- a/forge/ee/lib/sso/index.js +++ b/forge/ee/lib/sso/index.js @@ -364,7 +364,7 @@ module.exports.init = async function (app) { if (application) { if (providerOpts.groupAllTeams || (providerOpts.groupTeams || []).includes(teamSlug)) { if (desiredTeamApplicationroles[team.hashid]) { - desiredTeamApplicationroles[team.hashid][application.hashid] = Math.max(desiredTeamApplicationroles[teamSlug][application.hashid] || 0, applicationRole) + desiredTeamApplicationroles[team.hashid][application.hashid] = Math.max(desiredTeamApplicationroles[team.hashid][application.hashid] || 0, applicationRole) } else { desiredTeamApplicationroles[team.hashid] = {} desiredTeamApplicationroles[team.hashid][application.hashid] = applicationRole From 8b2f6dec64c9d49eb1253da1af2c280f9fb95313 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Tue, 14 Jul 2026 17:32:12 +0100 Subject: [PATCH 10/16] Add some debug logging of saml/g-rbac actions --- forge/ee/lib/sso/index.js | 61 ++++++++++++++++++++++----------------- 1 file changed, 34 insertions(+), 27 deletions(-) diff --git a/forge/ee/lib/sso/index.js b/forge/ee/lib/sso/index.js index addad3f290..31e48165c3 100644 --- a/forge/ee/lib/sso/index.js +++ b/forge/ee/lib/sso/index.js @@ -484,36 +484,43 @@ module.exports.init = async function (app) { await Promise.all(promises) // Now all group membership updated apply application overrides - // This needs to do 2 passes, get all the memberships that exist and compare to new list - const existingApplicationOveridesList = (await app.db.models.TeamMember.getTeamsForUser(user.id, true))?.filter(app => { return !!app.permissions }) || [] - const existingApplicationOverides = existingApplicationOveridesList.reduce((prev, tm) => { - const n = {} - n[tm.Team.hashid] = { - overides: tm.permissions - } - return { - ...prev, - ...n + + const desiredTeamApplicationArray = Object.entries(desiredTeamApplicationroles) + if (desiredTeamApplicationArray.length > 0) { + app.log.debug(`Desired Application Roles for ${user.username} ${JSON.stringify(desiredTeamApplicationroles)}`) + // This needs to do 2 passes, get all the memberships that exist and compare to new list + const existingApplicationOveridesList = (await app.db.models.TeamMember.getTeamsForUser(user.id, true))?.filter(app => { return !!app.permissions }) || [] + const existingApplicationOverides = existingApplicationOveridesList.reduce((prev, tm) => { + const n = {} + n[tm.Team.hashid] = { + overides: tm.permissions + } + return { + ...prev, + ...n + } + }, {}) + app.log.debug(`Existing Application Roles for ${user.username} ${JSON.stringify(existingApplicationOverides)}`) + const applicationPromises = [] + for (const [teamId, overides] of Object.entries(desiredTeamApplicationroles)) { + const membership = await app.db.models.TeamMember.getTeamMembership(user.id, teamId) + if (membership) { + const newPermissions = { applications: overides, sso: true } + applicationPromises.push(app.db.controllers.Team.changeUserTeamPermissions(teamId, user.hashid, newPermissions)) + // need to remove from existingApplicationOvervides + delete existingApplicationOverides[teamId] + } else { + app.log.debug(`User ${user.name} not a member of Team ${teamId} so not overriding Application access`) + } } - }, {}) - const applicationPromises = [] - for (const [teamId, overides] of Object.entries(desiredTeamApplicationroles)) { - const membership = await app.db.models.TeamMember.getTeamMembership(user.id, teamId) - if (membership) { - const newPermissions = { applications: overides, sso: true } - applicationPromises.push(app.db.controllers.Team.changeUserTeamPermissions(teamId, user.hashid, newPermissions)) - // need to remove from existingApplicationOvervides - delete existingApplicationOverides.teamId - } else { - app.log.debug(`User ${user.name} not a member of Team ${teamId} so not overriding Application access`) + // Any teamIds in existingApplicationOverides are no longer in the desired list, so remove them + for (const teamId of Object.keys(existingApplicationOverides)) { + const tm = await app.db.models.TeamMember.getTeamMembership(user.hashid, teamId) + tm.permissions = {} + applicationPromises.push(tm.save()) } + await Promise.all(applicationPromises) } - for (const teamId of Object.keys(existingApplicationOverides)) { - const tm = await app.db.models.TeamMember.getTeamMembership(user.hashid, teamId) - tm.permissions = {} - applicationPromises.push(tm.save()) - } - await Promise.all(applicationPromises) } else { const missingGroupAssertions = new Error(`SAML response missing ${providerOpts.groupAssertionName} assertion`) missingGroupAssertions.code = 'unknown_sso_user' From 7726755f1fb53a38ebfbe8fa8a32feea678c3a20 Mon Sep 17 00:00:00 2001 From: Ben Hardill Date: Wed, 15 Jul 2026 10:20:01 +0100 Subject: [PATCH 11/16] Update rest of UI Revert if statement --- forge/ee/lib/sso/index.js | 4 ++-- .../team/Members/components/ApplicationPermissionsRow.vue | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/forge/ee/lib/sso/index.js b/forge/ee/lib/sso/index.js index 31e48165c3..8aa0d93d63 100644 --- a/forge/ee/lib/sso/index.js +++ b/forge/ee/lib/sso/index.js @@ -486,7 +486,7 @@ module.exports.init = async function (app) { // Now all group membership updated apply application overrides const desiredTeamApplicationArray = Object.entries(desiredTeamApplicationroles) - if (desiredTeamApplicationArray.length > 0) { + // if (desiredTeamApplicationArray.length > 0) { app.log.debug(`Desired Application Roles for ${user.username} ${JSON.stringify(desiredTeamApplicationroles)}`) // This needs to do 2 passes, get all the memberships that exist and compare to new list const existingApplicationOveridesList = (await app.db.models.TeamMember.getTeamsForUser(user.id, true))?.filter(app => { return !!app.permissions }) || [] @@ -520,7 +520,7 @@ module.exports.init = async function (app) { applicationPromises.push(tm.save()) } await Promise.all(applicationPromises) - } + // } } else { const missingGroupAssertions = new Error(`SAML response missing ${providerOpts.groupAssertionName} assertion`) missingGroupAssertions.code = 'unknown_sso_user' diff --git a/frontend/src/pages/team/Members/components/ApplicationPermissionsRow.vue b/frontend/src/pages/team/Members/components/ApplicationPermissionsRow.vue index b3af80b89e..2104e25ebc 100644 --- a/frontend/src/pages/team/Members/components/ApplicationPermissionsRow.vue +++ b/frontend/src/pages/team/Members/components/ApplicationPermissionsRow.vue @@ -17,7 +17,7 @@ - + From dfdead3cb16f87f69ca35e4435add41269eb0e5c Mon Sep 17 00:00:00 2001 From: Ben Hardill Date: Wed, 15 Jul 2026 10:37:41 +0100 Subject: [PATCH 12/16] lint fix --- forge/ee/lib/sso/index.js | 65 +++++++++++++++++++-------------------- 1 file changed, 31 insertions(+), 34 deletions(-) diff --git a/forge/ee/lib/sso/index.js b/forge/ee/lib/sso/index.js index 8aa0d93d63..2dada34b9e 100644 --- a/forge/ee/lib/sso/index.js +++ b/forge/ee/lib/sso/index.js @@ -485,42 +485,39 @@ module.exports.init = async function (app) { await Promise.all(promises) // Now all group membership updated apply application overrides - const desiredTeamApplicationArray = Object.entries(desiredTeamApplicationroles) - // if (desiredTeamApplicationArray.length > 0) { - app.log.debug(`Desired Application Roles for ${user.username} ${JSON.stringify(desiredTeamApplicationroles)}`) - // This needs to do 2 passes, get all the memberships that exist and compare to new list - const existingApplicationOveridesList = (await app.db.models.TeamMember.getTeamsForUser(user.id, true))?.filter(app => { return !!app.permissions }) || [] - const existingApplicationOverides = existingApplicationOveridesList.reduce((prev, tm) => { - const n = {} - n[tm.Team.hashid] = { - overides: tm.permissions - } - return { - ...prev, - ...n - } - }, {}) - app.log.debug(`Existing Application Roles for ${user.username} ${JSON.stringify(existingApplicationOverides)}`) - const applicationPromises = [] - for (const [teamId, overides] of Object.entries(desiredTeamApplicationroles)) { - const membership = await app.db.models.TeamMember.getTeamMembership(user.id, teamId) - if (membership) { - const newPermissions = { applications: overides, sso: true } - applicationPromises.push(app.db.controllers.Team.changeUserTeamPermissions(teamId, user.hashid, newPermissions)) - // need to remove from existingApplicationOvervides - delete existingApplicationOverides[teamId] - } else { - app.log.debug(`User ${user.name} not a member of Team ${teamId} so not overriding Application access`) - } + app.log.debug(`Desired Application Roles for ${user.username} ${JSON.stringify(desiredTeamApplicationroles)}`) + // This needs to do 2 passes, get all the memberships that exist and compare to new list + const existingApplicationOveridesList = (await app.db.models.TeamMember.getTeamsForUser(user.id, true))?.filter(app => { return !!app.permissions }) || [] + const existingApplicationOverides = existingApplicationOveridesList.reduce((prev, tm) => { + const n = {} + n[tm.Team.hashid] = { + overides: tm.permissions } - // Any teamIds in existingApplicationOverides are no longer in the desired list, so remove them - for (const teamId of Object.keys(existingApplicationOverides)) { - const tm = await app.db.models.TeamMember.getTeamMembership(user.hashid, teamId) - tm.permissions = {} - applicationPromises.push(tm.save()) + return { + ...prev, + ...n } - await Promise.all(applicationPromises) - // } + }, {}) + app.log.debug(`Existing Application Roles for ${user.username} ${JSON.stringify(existingApplicationOverides)}`) + const applicationPromises = [] + for (const [teamId, overides] of Object.entries(desiredTeamApplicationroles)) { + const membership = await app.db.models.TeamMember.getTeamMembership(user.id, teamId) + if (membership) { + const newPermissions = { applications: overides, sso: true } + applicationPromises.push(app.db.controllers.Team.changeUserTeamPermissions(teamId, user.hashid, newPermissions)) + // need to remove from existingApplicationOvervides + delete existingApplicationOverides[teamId] + } else { + app.log.debug(`User ${user.name} not a member of Team ${teamId} so not overriding Application access`) + } + } + // Any teamIds in existingApplicationOverides are no longer in the desired list, so remove them + for (const teamId of Object.keys(existingApplicationOverides)) { + const tm = await app.db.models.TeamMember.getTeamMembership(user.hashid, teamId) + tm.permissions = {} + applicationPromises.push(tm.save()) + } + await Promise.all(applicationPromises) } else { const missingGroupAssertions = new Error(`SAML response missing ${providerOpts.groupAssertionName} assertion`) missingGroupAssertions.code = 'unknown_sso_user' From 73ddd59de5b3eee22682744dc4048f4a590575b2 Mon Sep 17 00:00:00 2001 From: Ben Hardill Date: Wed, 15 Jul 2026 11:07:30 +0100 Subject: [PATCH 13/16] Update docs --- docs/admin/sso/ldap.md | 11 +++++++++++ docs/admin/sso/saml.md | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/docs/admin/sso/ldap.md b/docs/admin/sso/ldap.md index dc92605eb7..a787a59bd4 100644 --- a/docs/admin/sso/ldap.md +++ b/docs/admin/sso/ldap.md @@ -123,6 +123,17 @@ be done with care. An optional prefix and suffix can be include in the group name to support LDAP providers that have existing naming policies. The SSO configuration can be configured with the lengths of these values so they will be stripped off before the group name is validated. For example, if an organisation requires all groups to begin with `acme-org-`, a prefix length of `9` can be set and the group `acme-org-ff-development-owner` will be handled as `ff-development-owner`. + +### Application Level Groups + +In addition to being able to add Users to Teams using groups, Role overrides for specific Applications within those groups can also be controlled. + +A User must me a member of the group that controls access to a given Team in order for an Application override to take effect. + +Groups for Application overrides use a similar pattern to Team Groups and use the same prefix and suffix length modifiers. They take the form `ff-[application]-role` where `application` can be the application name or id. + +For example, given a Team called `development` and an Application called `test` owner level access would be granted by membership of a group named `ff-development-owner` and an override to viewer for test would be `ff-development[test]-viewer`. + ## Managing Admin users The SSO Configuration can be configured to manage the admin users of the platform by enabling the diff --git a/docs/admin/sso/saml.md b/docs/admin/sso/saml.md index a3a5e298e7..6e3247abce 100644 --- a/docs/admin/sso/saml.md +++ b/docs/admin/sso/saml.md @@ -179,6 +179,17 @@ be done with care. An optional prefix and suffix can be include in the group name to support SAML providers that have existing naming policies. The SSO configuration can be configured with the lengths of these values so they will be stripped off before the group name is validated. For example, if an organisation requires all groups to begin with `acme-org-`, a prefix length of `9` can be set and the group `acme-org-ff-development-owner` will be handled as `ff-development-owner`. + +### Application Level Groups + +In addition to being able to add Users to Teams using groups, Role overrides for specific Applications within those groups can also be controlled. + +A User must me a member of the group that controls access to a given Team in order for an Application override to take effect. + +Groups for Application overrides use a similar pattern to Team Groups and use the same prefix and suffix length modifiers. They take the form `ff-[application]-role` where `application` can be the application name or id. + +For example, given a Team called `development` and an Application called `test` owner level access would be granted by membership of a group named `ff-development-owner` and an override to viewer for test would be `ff-development[test]-viewer`. + ## Managing Admin users The SSO Configuration can be configured to managed the admin users of the platform by enabling the From d257fce5b0ead39177c11bdcd571210b7bde0fd9 Mon Sep 17 00:00:00 2001 From: Ben Hardill Date: Thu, 16 Jul 2026 10:23:36 +0100 Subject: [PATCH 14/16] Fix other team overrides --- forge/ee/lib/sso/index.js | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/forge/ee/lib/sso/index.js b/forge/ee/lib/sso/index.js index 2dada34b9e..84dabdfc5f 100644 --- a/forge/ee/lib/sso/index.js +++ b/forge/ee/lib/sso/index.js @@ -487,7 +487,18 @@ module.exports.init = async function (app) { app.log.debug(`Desired Application Roles for ${user.username} ${JSON.stringify(desiredTeamApplicationroles)}`) // This needs to do 2 passes, get all the memberships that exist and compare to new list - const existingApplicationOveridesList = (await app.db.models.TeamMember.getTeamsForUser(user.id, true))?.filter(app => { return !!app.permissions }) || [] + const existingApplicationOveridesList = (await app.db.models.TeamMember.getTeamsForUser(user.id, true))?.filter(teamMambership => { + // check if users are allowed to be in other groups, filter out groups not SSO controlled + if (providerOpts.groupMapping && providerOpts.groupOtherTeams) { + if (providerOpts.groupTeams.includes(teamMambership.Team.slug)) { + return !!teamMambership.permissions + } else { + return false + } + } else { + return !!teamMambership.permissions + } + }) || [] const existingApplicationOverides = existingApplicationOveridesList.reduce((prev, tm) => { const n = {} n[tm.Team.hashid] = { @@ -680,7 +691,18 @@ module.exports.init = async function (app) { await Promise.all(promises) // Now all group membership updated apply application overrides // This needs to do 2 passes, get all the memberships that exist and compare to new list - const existingApplicationOveridesList = (await app.db.models.TeamMember.getTeamsForUser(user.id, true))?.filter(app => { return !!app.permissions }) || [] + const existingApplicationOveridesList = (await app.db.models.TeamMember.getTeamsForUser(user.id, true))?.filter(teamMambership => { + // check if users are allowed to be in other groups, filter out groups not SSO controlled + if (providerOpts.groupMapping && providerOpts.groupOtherTeams) { + if (providerOpts.groupTeams.includes(teamMambership.Team.slug)) { + return !!teamMambership.permissions + } else { + return false + } + } else { + return !!teamMambership.permissions + } + }) || [] const existingApplicationOverides = existingApplicationOveridesList.reduce((prev, tm) => { const n = {} n[tm.Team.hashid] = { From 316e4ba90b93917c57b4ecae683df47c57a16ba3 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Fri, 17 Jul 2026 13:53:05 +0100 Subject: [PATCH 15/16] Refactor common code (#7847) --- forge/ee/lib/sso/index.js | 246 +++++++++++------------ test/unit/forge/ee/lib/sso/index_spec.js | 53 +++++ 2 files changed, 171 insertions(+), 128 deletions(-) diff --git a/forge/ee/lib/sso/index.js b/forge/ee/lib/sso/index.js index 84dabdfc5f..89b62a8ad1 100644 --- a/forge/ee/lib/sso/index.js +++ b/forge/ee/lib/sso/index.js @@ -317,6 +317,116 @@ module.exports.init = async function (app) { return groupAssertions } + /** + * Given a group-name match (from the `ff-SLUG-ROLE` regex), check if it is an + * Application override group of the form `ff-[]-` and, + * if so, record the desired application role in `desiredTeamApplicationroles`. + * + * @param {object} desiredTeamApplicationroles Accumulator keyed by team hashid -> { applicationHashid: role } + * @param {RegExpExecArray} match The result of running the `ff-(.+)-([^-]+)$` regex on the group name + * @param {object} providerOpts The SSO Provider configuration object + * @returns {Promise} true if the group was an Application override group (and should not + * be treated as a plain team-role group), false otherwise. + */ + async function recordApplicationOverride (desiredTeamApplicationroles, match, providerOpts) { + const applicationRolesMatch = /(.+)\[(.+)\]/.exec(match[1]) + if (!applicationRolesMatch) { + // Not an Application override group + return false + } + const teamSlug = applicationRolesMatch[1] + const applicationId = applicationRolesMatch[2] + const applicationRole = Roles[match[2]] + // From here on this is an Application override group - return true even if + // we cannot apply it, so the caller does not treat it as a team-role group. + if (applicationRole === undefined) { + // Unrecognised role name - ignore + return true + } + // Check if this team is allowed to be managed for this SSO provider before + // doing any database lookups. + if (!(providerOpts.groupAllTeams || (providerOpts.groupTeams || []).includes(teamSlug))) { + return true + } + const team = await app.db.models.Team.bySlug(teamSlug) + if (!team) { + // Unrecognised team - ignore + return true + } + const application = await team.hasApplication(applicationId) + if (!application) { + // Unrecognised application - ignore + return true + } + if (!desiredTeamApplicationroles[team.hashid]) { + desiredTeamApplicationroles[team.hashid] = {} + } + // In case we have multiple assertions for a single application, + // ensure we keep the highest level of access + desiredTeamApplicationroles[team.hashid][application.hashid] = Math.max( + desiredTeamApplicationroles[team.hashid][application.hashid] || 0, + applicationRole + ) + return true + } + + /** + * Apply the desired per-application role overrides to a user's team memberships + * and clear any SSO-managed overrides that are no longer desired. + * + * This is shared between the SAML and LDAP flows. + * + * @param {*} user The FF User object who is logging in + * @param {object} desiredTeamApplicationroles Accumulator keyed by team hashid -> { applicationHashid: role } + * @param {object} providerOpts The SSO Provider configuration object + */ + async function applyApplicationOverrides (user, desiredTeamApplicationroles, providerOpts) { + app.log.debug(`Desired Application Roles for ${user.username} ${JSON.stringify(desiredTeamApplicationroles)}`) + // Work out which teams currently have SSO-managed overrides so we can clear + // any that are no longer desired. Only teams in scope of this provider are + // considered. + const existingOverrideTeamIds = new Set( + ((await app.db.models.TeamMember.getTeamsForUser(user.id, true)) || []) + .filter(teamMembership => { + if (!teamMembership.permissions) { + return false + } + // If the user is allowed to be a member of teams outside of SSO + // control, only manage overrides on teams this provider controls. + if (providerOpts.groupMapping && providerOpts.groupOtherTeams) { + return (providerOpts.groupTeams || []).includes(teamMembership.Team.slug) + } + return true + }) + .map(teamMembership => teamMembership.Team.hashid) + ) + app.log.debug(`Existing Application Roles for ${user.username} ${JSON.stringify([...existingOverrideTeamIds])}`) + + // First pass - apply the desired overrides. Done sequentially so that the + // apply and clear passes cannot race on the same membership. + for (const [teamId, overrides] of Object.entries(desiredTeamApplicationroles)) { + const membership = await app.db.models.TeamMember.getTeamMembership(user.id, teamId) + if (membership) { + const newPermissions = { applications: overrides, sso: true } + await app.db.controllers.Team.changeUserTeamPermissions(teamId, user.hashid, newPermissions) + // This team has been dealt with - don't clear it in the second pass + existingOverrideTeamIds.delete(teamId) + } else { + app.log.debug(`User ${user.name} not a member of Team ${teamId} so not overriding Application access`) + } + } + + // Second pass - any remaining teams had overrides that are no longer + // desired, so clear them. + for (const teamId of existingOverrideTeamIds) { + const membership = await app.db.models.TeamMember.getTeamMembership(user.id, teamId) + if (membership) { + membership.permissions = {} + await membership.save() + } + } + } + /** * Update a user's team memberships according to the SAML Assertions * received when they logged in. @@ -352,26 +462,8 @@ module.exports.init = async function (app) { // Generate a slug->role object (desiredTeamMemberships) const match = /^ff-(.+)-([^-]+)$/.exec(shortGA) if (match) { - // check for Application Overide groups - const applicationRolesMatch = /(.+)\[(.+)\]/.exec(match[1]) - if (applicationRolesMatch) { - const teamSlug = applicationRolesMatch[1] - const applicationId = applicationRolesMatch[2] - const applicationRoleName = match[2] - const applicationRole = Roles[applicationRoleName] - const team = await app.db.models.Team.bySlug(teamSlug) - const application = await team.hasApplication(applicationId) - if (application) { - if (providerOpts.groupAllTeams || (providerOpts.groupTeams || []).includes(teamSlug)) { - if (desiredTeamApplicationroles[team.hashid]) { - desiredTeamApplicationroles[team.hashid][application.hashid] = Math.max(desiredTeamApplicationroles[team.hashid][application.hashid] || 0, applicationRole) - } else { - desiredTeamApplicationroles[team.hashid] = {} - desiredTeamApplicationroles[team.hashid][application.hashid] = applicationRole - } - } - } - } else { + // check for Application override groups of the form `ff-[]-` + if (!await recordApplicationOverride(desiredTeamApplicationroles, match, providerOpts)) { const teamSlug = match[1] const teamRoleName = match[2] const teamRole = Roles[teamRoleName] @@ -483,52 +575,8 @@ module.exports.init = async function (app) { } await Promise.all(promises) - // Now all group membership updated apply application overrides - - app.log.debug(`Desired Application Roles for ${user.username} ${JSON.stringify(desiredTeamApplicationroles)}`) - // This needs to do 2 passes, get all the memberships that exist and compare to new list - const existingApplicationOveridesList = (await app.db.models.TeamMember.getTeamsForUser(user.id, true))?.filter(teamMambership => { - // check if users are allowed to be in other groups, filter out groups not SSO controlled - if (providerOpts.groupMapping && providerOpts.groupOtherTeams) { - if (providerOpts.groupTeams.includes(teamMambership.Team.slug)) { - return !!teamMambership.permissions - } else { - return false - } - } else { - return !!teamMambership.permissions - } - }) || [] - const existingApplicationOverides = existingApplicationOveridesList.reduce((prev, tm) => { - const n = {} - n[tm.Team.hashid] = { - overides: tm.permissions - } - return { - ...prev, - ...n - } - }, {}) - app.log.debug(`Existing Application Roles for ${user.username} ${JSON.stringify(existingApplicationOverides)}`) - const applicationPromises = [] - for (const [teamId, overides] of Object.entries(desiredTeamApplicationroles)) { - const membership = await app.db.models.TeamMember.getTeamMembership(user.id, teamId) - if (membership) { - const newPermissions = { applications: overides, sso: true } - applicationPromises.push(app.db.controllers.Team.changeUserTeamPermissions(teamId, user.hashid, newPermissions)) - // need to remove from existingApplicationOvervides - delete existingApplicationOverides[teamId] - } else { - app.log.debug(`User ${user.name} not a member of Team ${teamId} so not overriding Application access`) - } - } - // Any teamIds in existingApplicationOverides are no longer in the desired list, so remove them - for (const teamId of Object.keys(existingApplicationOverides)) { - const tm = await app.db.models.TeamMember.getTeamMembership(user.hashid, teamId) - tm.permissions = {} - applicationPromises.push(tm.save()) - } - await Promise.all(applicationPromises) + // Now all group membership has been updated, apply application overrides + await applyApplicationOverrides(user, desiredTeamApplicationroles, providerOpts) } else { const missingGroupAssertions = new Error(`SAML response missing ${providerOpts.groupAssertionName} assertion`) missingGroupAssertions.code = 'unknown_sso_user' @@ -559,26 +607,8 @@ module.exports.init = async function (app) { } const match = groupRegEx.exec(shortCN) if (match) { - // check for Application Overide groups - const applicationRolesMatch = /(.+)\[(.+)\]/.exec(match[1]) - if (applicationRolesMatch) { - const teamSlug = applicationRolesMatch[1] - const applicationId = applicationRolesMatch[2] - const applicationRoleName = match[2] - const applicationRole = Roles[applicationRoleName] - const team = await app.db.models.Team.bySlug(teamSlug) - const application = await team.hasApplication(applicationId) - if (application) { - if (providerOpts.groupAllTeams || (providerOpts.groupTeams || []).includes(teamSlug)) { - if (desiredTeamApplicationroles[team.hashid]) { - desiredTeamApplicationroles[team.hashid][application.hashid] = Math.max(desiredTeamApplicationroles[team.hashid][application.hashid] || 0, applicationRole) - } else { - desiredTeamApplicationroles[team.hashid] = {} - desiredTeamApplicationroles[team.hashid][application.hashid] = applicationRole - } - } - } - } else { + // check for Application override groups of the form `ff-[]-` + if (!await recordApplicationOverride(desiredTeamApplicationroles, match, providerOpts)) { app.log.debug(`Found group ${searchEntries[i].cn} for user ${user.username}`) const teamSlug = match[1] const teamRoleName = match[2] @@ -689,48 +719,8 @@ module.exports.init = async function (app) { } await Promise.all(promises) - // Now all group membership updated apply application overrides - // This needs to do 2 passes, get all the memberships that exist and compare to new list - const existingApplicationOveridesList = (await app.db.models.TeamMember.getTeamsForUser(user.id, true))?.filter(teamMambership => { - // check if users are allowed to be in other groups, filter out groups not SSO controlled - if (providerOpts.groupMapping && providerOpts.groupOtherTeams) { - if (providerOpts.groupTeams.includes(teamMambership.Team.slug)) { - return !!teamMambership.permissions - } else { - return false - } - } else { - return !!teamMambership.permissions - } - }) || [] - const existingApplicationOverides = existingApplicationOveridesList.reduce((prev, tm) => { - const n = {} - n[tm.Team.hashid] = { - overides: tm.permissions - } - return { - ...prev, - ...n - } - }, {}) - const applicationPromises = [] - for (const [teamId, overides] of Object.entries(desiredTeamApplicationroles)) { - const membership = await app.db.models.TeamMember.getTeamMembership(user.id, teamId) - if (membership) { - const newPermissions = { applications: overides, sso: true } - applicationPromises.push(app.db.controllers.Team.changeUserTeamPermissions(teamId, user.hashid, newPermissions)) - // need to remove from existingApplicationOvervides - delete existingApplicationOverides.teamId - } else { - app.log.debug(`User ${user.name} not a member of Team ${teamId} so not overriding Application access`) - } - } - for (const teamId of Object.keys(existingApplicationOverides)) { - const tm = await app.db.models.TeamMember.getTeamMembership(user.hashid, teamId) - tm.permissions = {} - applicationPromises.push(tm.save()) - } - await Promise.all(applicationPromises) + // Now all group membership has been updated, apply application overrides + await applyApplicationOverrides(user, desiredTeamApplicationroles, providerOpts) } return { diff --git a/test/unit/forge/ee/lib/sso/index_spec.js b/test/unit/forge/ee/lib/sso/index_spec.js index e4ae564208..90777bd491 100644 --- a/test/unit/forge/ee/lib/sso/index_spec.js +++ b/test/unit/forge/ee/lib/sso/index_spec.js @@ -515,6 +515,59 @@ NOY6Z1oJnpttQ9gwyV8euQ3C0Wcjf3+OVQ== const teamMembership = await app.db.models.TeamMember.getTeamMembership(app.user.id, teams.ATeam.id) should(teamMembership).not.be.ok() }) + + it('applies highest role when multiple overrides for one application', async function () { + await app.sso.updateTeamMembership({ + 'ff-roles': [ + 'ff-ateam-member', + 'ff-ateam[application-1]-viewer', + 'ff-ateam[application-1]-owner' + ] + }, app.user, { + groupAssertionName: 'ff-roles', + groupAllTeams: true, + groupPrefixLength: 0, + groupSuffixLength: 0 + }) + const teamMembership = await app.db.models.TeamMember.getTeamMembership(app.user.id, teams.ATeam.id) + teamMembership.permissions.applications.should.have.property(app.application.hashid, Roles.Owner) + }) + + it('ignores override for an unknown application', async function () { + await app.sso.updateTeamMembership({ + 'ff-roles': [ + 'ff-ateam-member', + 'ff-ateam[does-not-exist]-owner' + ] + }, app.user, { + groupAssertionName: 'ff-roles', + groupAllTeams: true, + groupPrefixLength: 0, + groupSuffixLength: 0 + }) + // Team membership should still be applied, with no application overrides + const teamMembership = await app.db.models.TeamMember.getTeamMembership(app.user.id, teams.ATeam.id) + teamMembership.should.have.property('role', Roles.Member) + should(teamMembership.permissions?.applications || {}).be.empty() + }) + + it('ignores override for an unknown team without erroring', async function () { + // A malformed/unknown team in an override group must not throw and + // must not stop regular team memberships being applied + await app.sso.updateTeamMembership({ + 'ff-roles': [ + 'ff-ateam-member', + 'ff-nosuchteam[application-1]-owner' + ] + }, app.user, { + groupAssertionName: 'ff-roles', + groupAllTeams: true, + groupPrefixLength: 0, + groupSuffixLength: 0 + }) + const teamMembership = await app.db.models.TeamMember.getTeamMembership(app.user.id, teams.ATeam.id) + teamMembership.should.have.property('role', Roles.Member) + }) }) }) describe('find expired SSO SAML Certs', async function () { From 6d5aab9495984bfdee84c1eda9776b5ec36153b9 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Fri, 17 Jul 2026 13:58:37 +0100 Subject: [PATCH 16/16] Update docs --- docs/admin/sso/ldap.md | 10 +++++++--- docs/admin/sso/saml.md | 12 ++++++++---- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/docs/admin/sso/ldap.md b/docs/admin/sso/ldap.md index a787a59bd4..f4c5330df2 100644 --- a/docs/admin/sso/ldap.md +++ b/docs/admin/sso/ldap.md @@ -128,11 +128,15 @@ For example, if an organisation requires all groups to begin with `acme-org-`, a In addition to being able to add Users to Teams using groups, Role overrides for specific Applications within those groups can also be controlled. -A User must me a member of the group that controls access to a given Team in order for an Application override to take effect. +The User must have a membership of the Team the Application belongs to for an Application override to take effect. If the User is not a member of that Team, the override is ignored. -Groups for Application overrides use a similar pattern to Team Groups and use the same prefix and suffix length modifiers. They take the form `ff-[application]-role` where `application` can be the application name or id. +Groups for Application overrides use a similar pattern to Team Groups and use the same prefix and suffix length modifiers. They take the form `ff-[]-`, where `` can be the Application name or id and `` must be one of the valid roles listed above, but can also be `none` to remove access from an Application within the Team. Any unrecognised role is ignored. -For example, given a Team called `development` and an Application called `test` owner level access would be granted by membership of a group named `ff-development-owner` and an override to viewer for test would be `ff-development[test]-viewer`. +For example, given a Team called `development` and an Application called `test`, owner-level access to the Team would be granted by membership of a group named `ff-development-owner`, and an override to `viewer` for the Application `test` would be granted by `ff-development[test]-viewer`. + +If multiple groups grant different roles for the same Application, the highest role is applied. + +Application overrides applied this way are managed by the SSO provider: they cannot be edited in the FlowFuse UI, and if the corresponding group is removed the override is cleared the next time the User logs in. ## Managing Admin users diff --git a/docs/admin/sso/saml.md b/docs/admin/sso/saml.md index 6e3247abce..a3440f1a12 100644 --- a/docs/admin/sso/saml.md +++ b/docs/admin/sso/saml.md @@ -184,15 +184,19 @@ For example, if an organisation requires all groups to begin with `acme-org-`, a In addition to being able to add Users to Teams using groups, Role overrides for specific Applications within those groups can also be controlled. -A User must me a member of the group that controls access to a given Team in order for an Application override to take effect. +The User must have a membership of the Team the Application belongs to for an Application override to take effect. If the User is not a member of that Team, the override is ignored. -Groups for Application overrides use a similar pattern to Team Groups and use the same prefix and suffix length modifiers. They take the form `ff-[application]-role` where `application` can be the application name or id. +Groups for Application overrides use a similar pattern to Team Groups and use the same prefix and suffix length modifiers. They take the form `ff-[]-`, where `` can be the Application name or id and `` must be one of the valid roles listed above, but can also be `none` to remove access from an Application within the Team. Any unrecognised role is ignored. -For example, given a Team called `development` and an Application called `test` owner level access would be granted by membership of a group named `ff-development-owner` and an override to viewer for test would be `ff-development[test]-viewer`. +For example, given a Team called `development` and an Application called `test`, owner-level access to the Team would be granted by membership of a group named `ff-development-owner`, and an override to `viewer` for the Application `test` would be granted by `ff-development[test]-viewer`. + +If multiple groups grant different roles for the same Application, the highest role is applied. + +Application overrides applied this way are managed by the SSO provider: they cannot be edited in the FlowFuse UI, and if the corresponding group is removed the override is cleared the next time the User logs in. ## Managing Admin users -The SSO Configuration can be configured to managed the admin users of the platform by enabling the +The SSO Configuration can be configured to manage the admin users of the platform by enabling the `Manage Admin roles using group assertions` option. Once enabled, the name of a group can be provided that will be used to identify whether a user is an admin or not.