@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Schemas
@version 2019-12-02
@auth AWS SigV4
@endpoints 31
@hint download_for_search
@toc discoverers(7), registries(17), policy(3), discover(1), tags(3)

@group discoverers
@endpoint POST /v1/discoverers
@desc Creates a discoverer.
@required {SourceArn: str}
@optional {Description: str, CrossAccount: bool, Tags: map<str,str>}
@returns(200) {Description: str?, DiscovererArn: str?, DiscovererId: str?, SourceArn: str?, State: str?, CrossAccount: bool?, Tags: map<str,str>?}

@endgroup

@group registries
@endpoint POST /v1/registries/name/{registryName}
@desc Creates a registry.
@required {RegistryName: str}
@optional {Description: str, Tags: map<str,str>}
@returns(200) {Description: str?, RegistryArn: str?, RegistryName: str?, Tags: map<str,str>?}

@endpoint POST /v1/registries/name/{registryName}/schemas/name/{schemaName}
@desc Creates a schema definition. Inactive schemas will be deleted after two years.
@required {RegistryName: str, SchemaName: str, Content: str, Type: str}
@optional {Description: str, Tags: map<str,str>}
@returns(200) {Description: str?, LastModified: str(timestamp)?, SchemaArn: str?, SchemaName: str?, SchemaVersion: str?, Tags: map<str,str>?, Type: str?, VersionCreatedDate: str(timestamp)?}

@endgroup

@group discoverers
@endpoint DELETE /v1/discoverers/id/{discovererId}
@desc Deletes a discoverer.
@required {DiscovererId: str}

@endgroup

@group registries
@endpoint DELETE /v1/registries/name/{registryName}
@desc Deletes a Registry.
@required {RegistryName: str}

@endgroup

@group policy
@endpoint DELETE /v1/policy
@desc Delete the resource-based policy attached to the specified registry.
@optional {registryName: str}

@endgroup

@group registries
@endpoint DELETE /v1/registries/name/{registryName}/schemas/name/{schemaName}
@desc Delete a schema definition.
@required {RegistryName: str, SchemaName: str}

@endpoint DELETE /v1/registries/name/{registryName}/schemas/name/{schemaName}/version/{schemaVersion}
@desc Delete the schema version definition
@required {RegistryName: str, SchemaName: str, SchemaVersion: str}

@endpoint GET /v1/registries/name/{registryName}/schemas/name/{schemaName}/language/{language}
@desc Describe the code binding URI.
@required {Language: str, RegistryName: str, SchemaName: str}
@optional {schemaVersion: str}
@returns(200) {CreationDate: str(timestamp)?, LastModified: str(timestamp)?, SchemaVersion: str?, Status: str?}

@endgroup

@group discoverers
@endpoint GET /v1/discoverers/id/{discovererId}
@desc Describes the discoverer.
@required {DiscovererId: str}
@returns(200) {Description: str?, DiscovererArn: str?, DiscovererId: str?, SourceArn: str?, State: str?, CrossAccount: bool?, Tags: map<str,str>?}

@endgroup

@group registries
@endpoint GET /v1/registries/name/{registryName}
@desc Describes the registry.
@required {RegistryName: str}
@returns(200) {Description: str?, RegistryArn: str?, RegistryName: str?, Tags: map<str,str>?}

@endpoint GET /v1/registries/name/{registryName}/schemas/name/{schemaName}
@desc Retrieve the schema definition.
@required {RegistryName: str, SchemaName: str}
@optional {schemaVersion: str}
@returns(200) {Content: str?, Description: str?, LastModified: str(timestamp)?, SchemaArn: str?, SchemaName: str?, SchemaVersion: str?, Tags: map<str,str>?, Type: str?, VersionCreatedDate: str(timestamp)?}

@endpoint GET /v1/registries/name/{registryName}/schemas/name/{schemaName}/export
@required {RegistryName: str, SchemaName: str, type: str}
@optional {schemaVersion: str}
@returns(200) {Content: str?, SchemaArn: str?, SchemaName: str?, SchemaVersion: str?, Type: str?}

@endpoint GET /v1/registries/name/{registryName}/schemas/name/{schemaName}/language/{language}/source
@desc Get the code binding source URI.
@required {Language: str, RegistryName: str, SchemaName: str}
@optional {schemaVersion: str}
@returns(200) {Body: bytes?}

@endgroup

@group discover
@endpoint POST /v1/discover
@desc Get the discovered schema that was generated based on sampled events.
@required {Events: [str], Type: str}
@returns(200) {Content: str?}

@endgroup

@group policy
@endpoint GET /v1/policy
@desc Retrieves the resource-based policy attached to a given registry.
@optional {registryName: str}
@returns(200) {Policy: str?, RevisionId: str?}

@endgroup

@group discoverers
@endpoint GET /v1/discoverers
@desc List the discoverers.
@optional {discovererIdPrefix: str, limit: int, nextToken: str, sourceArnPrefix: str}
@returns(200) {Discoverers: [DiscovererSummary]?, NextToken: str?}

@endgroup

@group registries
@endpoint GET /v1/registries
@desc List the registries.
@optional {limit: int, nextToken: str, registryNamePrefix: str, scope: str}
@returns(200) {NextToken: str?, Registries: [RegistrySummary]?}

@endpoint GET /v1/registries/name/{registryName}/schemas/name/{schemaName}/versions
@desc Provides a list of the schema versions and related information.
@required {RegistryName: str, SchemaName: str}
@optional {limit: int, nextToken: str}
@returns(200) {NextToken: str?, SchemaVersions: [SchemaVersionSummary]?}

@endpoint GET /v1/registries/name/{registryName}/schemas
@desc List the schemas.
@required {RegistryName: str}
@optional {limit: int, nextToken: str, schemaNamePrefix: str}
@returns(200) {NextToken: str?, Schemas: [SchemaSummary]?}

@endgroup

@group tags
@endpoint GET /tags/{resource-arn}
@desc Get tags for resource.
@required {ResourceArn: str}
@returns(200) {Tags: map<str,str>?}

@endgroup

@group registries
@endpoint POST /v1/registries/name/{registryName}/schemas/name/{schemaName}/language/{language}
@desc Put code binding URI
@required {Language: str, RegistryName: str, SchemaName: str}
@optional {schemaVersion: str}
@returns(200) {CreationDate: str(timestamp)?, LastModified: str(timestamp)?, SchemaVersion: str?, Status: str?}

@endgroup

@group policy
@endpoint PUT /v1/policy
@desc The name of the policy.
@required {Policy: str}
@optional {registryName: str, RevisionId: str}
@returns(200) {Policy: str?, RevisionId: str?}

@endgroup

@group registries
@endpoint GET /v1/registries/name/{registryName}/schemas/search
@desc Search the schemas
@required {keywords: str, RegistryName: str}
@optional {limit: int, nextToken: str}
@returns(200) {NextToken: str?, Schemas: [SearchSchemaSummary]?}

@endgroup

@group discoverers
@endpoint POST /v1/discoverers/id/{discovererId}/start
@desc Starts the discoverer
@required {DiscovererId: str}
@returns(200) {DiscovererId: str?, State: str?}

@endpoint POST /v1/discoverers/id/{discovererId}/stop
@desc Stops the discoverer
@required {DiscovererId: str}
@returns(200) {DiscovererId: str?, State: str?}

@endgroup

@group tags
@endpoint POST /tags/{resource-arn}
@desc Add tags to a resource.
@required {ResourceArn: str, Tags: map<str,str>}

@endpoint DELETE /tags/{resource-arn}
@desc Removes tags from a resource.
@required {ResourceArn: str, tagKeys: [str]}

@endgroup

@group discoverers
@endpoint PUT /v1/discoverers/id/{discovererId}
@desc Updates the discoverer
@required {DiscovererId: str}
@optional {Description: str, CrossAccount: bool}
@returns(200) {Description: str?, DiscovererArn: str?, DiscovererId: str?, SourceArn: str?, State: str?, CrossAccount: bool?, Tags: map<str,str>?}

@endgroup

@group registries
@endpoint PUT /v1/registries/name/{registryName}
@desc Updates a registry.
@required {RegistryName: str}
@optional {Description: str}
@returns(200) {Description: str?, RegistryArn: str?, RegistryName: str?, Tags: map<str,str>?}

@endpoint PUT /v1/registries/name/{registryName}/schemas/name/{schemaName}
@desc Updates the schema definition Inactive schemas will be deleted after two years.
@required {RegistryName: str, SchemaName: str}
@optional {ClientTokenId: str, Content: str, Description: str, Type: str}
@returns(200) {Description: str?, LastModified: str(timestamp)?, SchemaArn: str?, SchemaName: str?, SchemaVersion: str?, Tags: map<str,str>?, Type: str?, VersionCreatedDate: str(timestamp)?}

@endgroup

@end
