@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Anchore Engine API Server
@version 0.1.20
@auth ApiKey username in formData
@endpoints 112
@hint download_for_search
@toc root(1), health(1), version(1), policies(5), subscriptions(5), summaries(1), images(28), import(1), repositories(1), registries(5), status(1), system(14), event_types(1), events(4), query(3), accounts(12), account(1), user(3), archives(9), oauth(1), imports(14)

@group root
@endpoint GET /
@returns(200)

@endgroup

@group health
@endpoint GET /health
@returns(200)

@endgroup

@group version
@endpoint GET /version
@returns(200)

@endgroup

@group policies
@endpoint GET /policies
@optional {detail: any, x-anchore-account: any}
@returns(200)

@endpoint POST /policies
@required {bundle: map}
@optional {x-anchore-account: any}
@returns(200)
@errors {500}

@endpoint GET /policies/{policyId}
@required {policyId: any}
@optional {detail: any, x-anchore-account: any}
@returns(200)
@errors {500}

@endpoint PUT /policies/{policyId}
@required {bundle: map, policyId: any}
@optional {active: any, x-anchore-account: any}
@returns(200)
@errors {500}

@endpoint DELETE /policies/{policyId}
@required {policyId: any}
@optional {x-anchore-account: any}
@returns(200)
@errors {404, 500}

@endgroup

@group subscriptions
@endpoint GET /subscriptions
@optional {subscription_key: any, subscription_type: any, x-anchore-account: any}
@returns(200)
@errors {500}

@endpoint POST /subscriptions
@required {subscription: map}
@optional {x-anchore-account: any}
@returns(200)

@endpoint GET /subscriptions/{subscriptionId}
@required {subscriptionId: any}
@optional {x-anchore-account: any}
@returns(200)
@errors {500}

@endpoint PUT /subscriptions/{subscriptionId}
@required {subscriptionId: any, subscription: map}
@optional {x-anchore-account: any}
@returns(200)

@endpoint DELETE /subscriptions/{subscriptionId}
@required {subscriptionId: any}
@optional {x-anchore-account: any}
@returns(200)
@errors {500}

@endgroup

@group summaries
@endpoint GET /summaries/imagetags
@optional {image_status: any, x-anchore-account: any}
@returns(200)
@errors {500}

@endgroup

@group images
@endpoint POST /images
@required {image: map}
@optional {force: any, autosubscribe: any, x-anchore-account: any}
@returns(200)
@errors {500}

@endpoint GET /images
@optional {history: any, fulltag: any, image_status: any, analysis_status: any, x-anchore-account: any}
@returns(200)
@errors {500}

@endpoint DELETE /images
@required {imageDigests: any}
@optional {force: any, x-anchore-account: any}
@returns(200)
@errors {500}

@endgroup

@group import
@endpoint POST /import/images
@required {archive_file: any}
@returns(200)
@errors {500}

@endgroup

@group images
@endpoint GET /images/{imageDigest}
@required {imageDigest: any}
@optional {x-anchore-account: any}
@returns(200)
@errors {500}

@endpoint DELETE /images/{imageDigest}
@required {imageDigest: any}
@optional {force: any, x-anchore-account: any}
@returns(200)

@endpoint GET /images/by_id/{imageId}
@required {imageId: any}
@optional {x-anchore-account: any}
@returns(200)
@errors {500}

@endpoint DELETE /images/by_id/{imageId}
@required {imageId: any}
@optional {force: any, x-anchore-account: any}
@returns(200)
@errors {500}

@endpoint GET /images/{imageDigest}/check
@required {imageDigest: any, tag: any}
@optional {policyId: any, detail: any, history: any, interactive: any, x-anchore-account: any}
@returns(200)
@errors {500}

@endpoint GET /images/by_id/{imageId}/check
@required {imageId: any, tag: any}
@optional {policyId: any, detail: any, history: any, x-anchore-account: any}
@returns(200)
@errors {500}

@endpoint GET /images/{imageDigest}/vuln
@required {imageDigest: any}
@optional {x-anchore-account: any}
@returns(200)
@errors {500}

@endpoint GET /images/{imageDigest}/vuln/{vtype}
@required {imageDigest: any, vtype: any}
@optional {force_refresh: any, vendor_only: any, x-anchore-account: any}
@returns(200)
@errors {500}

@endpoint GET /images/by_id/{imageId}/vuln
@required {imageId: any}
@optional {x-anchore-account: any}
@returns(200)
@errors {500}

@endpoint GET /images/by_id/{imageId}/vuln/{vtype}
@required {imageId: any, vtype: any}
@optional {x-anchore-account: any}
@returns(200)
@errors {500}

@endpoint GET /images/{imageDigest}/content
@required {imageDigest: any}
@optional {x-anchore-account: any}
@returns(200)
@errors {500}

@endpoint GET /images/by_id/{imageId}/content
@required {imageId: any}
@optional {x-anchore-account: any}
@returns(200)
@errors {500}

@endpoint GET /images/{imageDigest}/content/{ctype}
@required {imageDigest: any, ctype: any}
@optional {x-anchore-account: any}
@returns(200)
@errors {500}

@endpoint GET /images/{imageDigest}/content/files
@required {imageDigest: any}
@optional {x-anchore-account: any}
@returns(200)
@errors {500}

@endpoint GET /images/{imageDigest}/content/java
@required {imageDigest: any}
@optional {x-anchore-account: any}
@returns(200)
@errors {500}

@endpoint GET /images/{imageDigest}/content/malware
@required {imageDigest: any}
@optional {x-anchore-account: any}
@returns(200)
@errors {500}

@endpoint GET /images/by_id/{imageId}/content/{ctype}
@required {imageId: any, ctype: any}
@optional {x-anchore-account: any}
@returns(200)
@errors {500}

@endpoint GET /images/by_id/{imageId}/content/files
@required {imageId: any}
@optional {x-anchore-account: any}
@returns(200)
@errors {500}

@endpoint GET /images/by_id/{imageId}/content/java
@required {imageId: any}
@optional {x-anchore-account: any}
@returns(200)
@errors {500}

@endpoint GET /images/{imageDigest}/artifacts/retrieved_files
@required {imageDigest: any}
@returns(200)
@errors {404}

@endpoint GET /images/{imageDigest}/artifacts/file_content_search
@required {imageDigest: any}
@returns(200)
@errors {404}

@endpoint GET /images/{imageDigest}/artifacts/secret_search
@required {imageDigest: any}
@returns(200)
@errors {404}

@endpoint GET /images/{imageDigest}/metadata
@required {imageDigest: any}
@optional {x-anchore-account: any}
@returns(200)
@errors {500}

@endpoint GET /images/{imageDigest}/sboms/native
@required {imageDigest: any}
@optional {x-anchore-account: any}
@returns(200)
@errors {500}

@endpoint GET /images/{imageDigest}/metadata/{mtype}
@required {imageDigest: any, mtype: any}
@optional {x-anchore-account: any}
@returns(200)
@errors {500}

@endgroup

@group repositories
@endpoint POST /repositories
@required {repository: any}
@optional {autosubscribe: any, dryrun: any, x-anchore-account: any}
@returns(200)

@endgroup

@group registries
@endpoint GET /registries
@optional {x-anchore-account: any}
@returns(200)

@endpoint POST /registries
@required {registrydata: map}
@optional {validate: any, x-anchore-account: any}
@returns(200)
@errors {500}

@endpoint GET /registries/{registry}
@required {registry: any}
@optional {x-anchore-account: any}
@returns(200)

@endpoint PUT /registries/{registry}
@required {registry: any, registrydata: map}
@optional {validate: any, x-anchore-account: any}
@returns(200)
@errors {500}

@endpoint DELETE /registries/{registry}
@required {registry: any}
@optional {x-anchore-account: any}
@returns(200)
@errors {500}

@endgroup

@group status
@endpoint GET /status
@returns(200)
@errors {500}

@endgroup

@group system
@endpoint GET /system
@returns(200)
@errors {500}

@endpoint GET /system/feeds
@returns(200)
@errors {500}

@endpoint POST /system/feeds
@optional {flush: any, sync: any}
@returns(200)
@errors {500}

@endpoint PUT /system/feeds/{feed}
@required {feed: any, enabled: any}
@returns(200)
@errors {400, 500}

@endpoint DELETE /system/feeds/{feed}
@required {feed: any}
@returns(200)
@errors {404, 500}

@endpoint PUT /system/feeds/{feed}/{group}
@required {feed: any, group: any, enabled: any}
@returns(200)
@errors {400, 500}

@endpoint DELETE /system/feeds/{feed}/{group}
@required {feed: any, group: any}
@returns(200)
@errors {404, 500}

@endpoint GET /system/services
@returns(200)
@errors {500}

@endpoint GET /system/services/{servicename}
@required {servicename: any}
@returns(200)
@errors {500}

@endpoint GET /system/services/{servicename}/{hostid}
@required {servicename: any, hostid: any}
@returns(200)
@errors {500}

@endpoint DELETE /system/services/{servicename}/{hostid}
@required {servicename: any, hostid: any}
@returns(200)
@errors {500}

@endpoint GET /system/policy_spec
@returns(200)

@endpoint GET /system/error_codes
@returns(200)

@endgroup

@group event_types
@endpoint GET /event_types
@returns(200)

@endgroup

@group events
@endpoint GET /events
@optional {source_servicename: any, source_hostid: any, event_type: any, resource_type: any, resource_id: any, level: any, since: any, before: any, page: any, limit: any, x-anchore-account: any}
@returns(200)

@endpoint DELETE /events
@optional {before: any, since: any, level: any, x-anchore-account: any}
@returns(200)
@errors {500}

@endpoint GET /events/{eventId}
@required {eventId: any}
@optional {x-anchore-account: any}
@returns(200)

@endpoint DELETE /events/{eventId}
@required {eventId: any}
@optional {x-anchore-account: any}
@returns(200)

@endgroup

@group query
@endpoint GET /query/images/by_vulnerability
@required {vulnerability_id: any}
@optional {namespace: any, affected_package: any, severity: any, vendor_only: any, page: any, limit: any, x-anchore-account: any}
@returns(200)
@errors {400}

@endpoint GET /query/images/by_package
@required {name: any}
@optional {package_type: any, version: any, page: any, limit: any, x-anchore-account: any}
@returns(200)
@errors {400}

@endpoint GET /query/vulnerabilities
@required {id: any}
@optional {affected_package: any, affected_package_version: any, page: any, limit: any, namespace: any}
@returns(200)
@errors {400}

@endgroup

@group accounts
@endpoint GET /accounts
@optional {state: any}
@returns(200)
@errors {500}

@endpoint POST /accounts
@required {account: map}
@returns(200)
@errors {409, 500}

@endpoint GET /accounts/{accountname}
@required {accountname: any}
@returns(200)
@errors {500}

@endpoint DELETE /accounts/{accountname}
@required {accountname: any}
@returns(204)
@errors {500}

@endpoint PUT /accounts/{accountname}/state
@required {accountname: any, desired_state: map}
@returns(200)
@errors {400, 500}

@endpoint GET /accounts/{accountname}/users
@required {accountname: any}
@returns(200)
@errors {500}

@endpoint POST /accounts/{accountname}/users
@required {accountname: any, user: map}
@returns(200)

@endpoint DELETE /accounts/{accountname}/users/{username}
@required {accountname: any, username: any}
@returns(204)
@errors {500}

@endpoint GET /accounts/{accountname}/users/{username}
@required {accountname: any, username: any}
@returns(200)
@errors {500}

@endpoint GET /accounts/{accountname}/users/{username}/credentials
@required {accountname: any, username: any}
@returns(200)
@errors {500}

@endpoint POST /accounts/{accountname}/users/{username}/credentials
@required {accountname: any, username: any, credential: map}
@returns(200)
@errors {500}

@endpoint DELETE /accounts/{accountname}/users/{username}/credentials
@required {accountname: any, username: any, credential_type: any}
@returns(204)
@errors {400, 500}

@endgroup

@group account
@endpoint GET /account
@returns(200)
@errors {500}

@endgroup

@group user
@endpoint GET /user
@returns(200)
@errors {500}

@endpoint GET /user/credentials
@returns(200)
@errors {500}

@endpoint POST /user/credentials
@required {credential: map}
@returns(200)
@errors {500}

@endgroup

@group archives
@endpoint GET /archives
@returns(200)
@errors {500}

@endpoint GET /archives/rules
@optional {system_global: any}
@returns(200)
@errors {500}

@endpoint POST /archives/rules
@required {rule: map}
@returns(200)
@errors {500}

@endpoint GET /archives/rules/{ruleId}
@required {ruleId: any}
@returns(200)
@errors {500}

@endpoint DELETE /archives/rules/{ruleId}
@required {ruleId: any}
@returns(200)
@errors {500}

@endpoint GET /archives/images
@returns(200)
@errors {500}

@endpoint POST /archives/images
@required {imageReferences: [str]}
@returns(200)
@errors {500}

@endpoint GET /archives/images/{imageDigest}
@required {imageDigest: any}
@returns(200)
@errors {500}

@endpoint DELETE /archives/images/{imageDigest}
@required {imageDigest: any}
@optional {force: any}
@returns(200)
@errors {500}

@endgroup

@group oauth
@endpoint POST /oauth/token
@optional {grant_type: any, username: any, password: any, client_id: any}
@returns(200)
@errors {500}

@endgroup

@group system
@endpoint POST /system/webhooks/{webhook_type}/test
@required {webhook_type: any}
@optional {notification_type: any}
@returns(200)
@errors {400, 500}

@endgroup

@group imports
@endpoint POST /imports/images
@returns(200)
@errors {500}

@endpoint GET /imports/images
@returns(200)
@errors {500}

@endpoint GET /imports/images/{operation_id}
@required {operation_id: any}
@returns(200)
@errors {500}

@endpoint DELETE /imports/images/{operation_id}
@required {operation_id: any}
@returns(200)
@errors {500}

@endpoint GET /imports/images/{operation_id}/packages
@required {operation_id: any}
@returns(200)
@errors {500}

@endpoint POST /imports/images/{operation_id}/packages
@required {operation_id: any, sbom: map}
@returns(200)
@errors {500}

@endpoint GET /imports/images/{operation_id}/dockerfile
@required {operation_id: any}
@returns(200)
@errors {500}

@endpoint POST /imports/images/{operation_id}/dockerfile
@required {operation_id: any, contents: str}
@returns(200)
@errors {500}

@endpoint GET /imports/images/{operation_id}/manifest
@required {operation_id: any}
@returns(200)
@errors {500}

@endpoint POST /imports/images/{operation_id}/manifest
@required {operation_id: any, contents: map}
@returns(200)
@errors {500}

@endpoint GET /imports/images/{operation_id}/parent_manifest
@required {operation_id: any}
@returns(200)
@errors {500}

@endpoint POST /imports/images/{operation_id}/parent_manifest
@required {operation_id: any, contents: map}
@returns(200)
@errors {500}

@endpoint GET /imports/images/{operation_id}/image_config
@required {operation_id: any}
@returns(200)
@errors {500}

@endpoint POST /imports/images/{operation_id}/image_config
@required {operation_id: any, contents: map}
@returns(200)
@errors {500}

@endgroup

@end
