Superflag Cleanup API
The Cleanup API from Superflag — 1 operation(s) for cleanup.
The Cleanup API from Superflag — 1 operation(s) for cleanup.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/superflag-sh:superflag-sh-cleanup-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Superflag control-plane evaluation and advanced…
version: 1.0.0
description: 'Public Superflag HTTP API. Discovery documents at /openapi.json and /api/v1/contract do not require auth. Delivery and management routes require Authorization: Bearer with a cli_, admin_, sdk_, or pub_ credential. See https://superflag.sh/docs/api-reference/overview.'
servers:
- url: https://superflag.sh
description: Production
tags:
- name: Cleanup
paths:
/api/v1/cleanup:
post:
operationId: cleanupReadiness
security:
- BearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CleanupRequest'
responses:
'200':
description: Inventory, reconcile, readiness, and staged cleanup plan
content:
application/json:
schema:
$ref: '#/components/schemas/CleanupResponse'
'400':
description: Invalid cleanup request
'401':
description: Unauthorized bearer or API key
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'403':
description: Forbidden
'404':
description: Environment not found
'413':
description: Cleanup request exceeds 256 KiB
description: Cleanup Readiness
tags:
- Cleanup
summary: Cleanup readiness
x-summary-source: derived
components:
schemas:
CleanupResponse:
type: object
additionalProperties: false
required:
- apiVersion
- report
properties:
apiVersion:
const: 1
report:
$ref: '#/components/schemas/CleanupReport'
CleanupRequest:
type: object
additionalProperties: false
required:
- appId
- environments
properties:
operation:
type: string
enum:
- inventory
- reconcile
- readiness
- plan
appId:
type: string
minLength: 1
maxLength: 256
environments:
type: array
minItems: 1
maxItems: 20
items:
type: string
minLength: 1
maxLength: 256
manifests:
type: array
items:
$ref: '#/components/schemas/ConsumerManifest'
scans:
type: array
items:
$ref: '#/components/schemas/RepositoryScan'
flagKeys:
type: array
items:
type: string
minLength: 1
maxLength: 256
now:
type: string
format: date-time
evidenceWindowMs:
type: integer
minimum: 1
maximum: 7776000000
CleanupReport:
type: object
additionalProperties: false
required:
- schemaVersion
- kind
- operation
- target
- now
- evidenceWindow
- repositories
- flags
- findings
properties:
schemaVersion:
const: 1
kind:
const: SuperflagCleanupReport
operation:
enum:
- inventory
- reconcile
- readiness
- plan
target:
type: object
now:
type: string
format: date-time
evidenceWindow:
type: object
repositories:
type: array
items:
type: object
flags:
type: array
items:
type: object
findings:
type: array
items:
type: object
ConsumerManifest:
type: object
additionalProperties: false
required:
- schemaVersion
- kind
- consumer
- flags
properties:
schemaVersion:
const: 1
kind:
const: SuperflagConsumerManifest
consumer:
type: object
additionalProperties: false
required:
- package
- repository
properties:
package:
type: string
repository:
type: string
commit:
type: string
flags:
type: array
items:
type: object
RepositoryScan:
type: object
additionalProperties: false
required:
- schemaVersion
- kind
- repository
- commit
- coverage
- references
- unsupported
properties:
schemaVersion:
const: 1
kind:
const: SuperflagRepositoryScan
repository:
type: string
commit:
type: string
coverage:
enum:
- complete
- partial
- unknown
references:
type: array
items:
type: object
additionalProperties: false
required:
- key
- repository
- commit
- path
- line
- form
properties:
key:
type: string
repository:
type: string
commit:
type: string
path:
type: string
line:
type: integer
minimum: 1
form:
enum:
- literal
- generated
unsupported:
type: array
items:
type: object
additionalProperties: false
required:
- repository
- commit
- path
- line
- reasonCode
properties:
repository:
type: string
commit:
type: string
path:
type: string
line:
type: integer
minimum: 1
reasonCode:
const: dynamic_key_construction
ApiError:
type: object
additionalProperties: false
required:
- error
properties:
apiVersion:
type: integer
const: 1
code:
type: string
message:
type: string
resolution:
type: string
error:
oneOf:
- type: string
- type: object
required:
- code
- message
properties:
code:
type: string
message:
type: string
resolution:
type: string
retryable:
type: boolean
metadata:
type: object
securitySchemes:
BearerAuth:
type: http
scheme: bearer
ApiKeyAuth:
type: apiKey
in: header
name: X-API-Key