@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Shorten.REST API Documentation
@base https://api.shorten.rest
@version 1.0.0
@auth ApiKey x-api-key in header
@endpoints 6
@toc aliases(5), clicks(1)

@group aliases
@endpoint GET /aliases
@desc Get alias
@required {aliasName: any # alias value (without `/` at the beginning)}
@optional {domainName: any # domain which alias belongs to (string without `http/https` or `/`)}
@returns(200) Alias model or **null**

@endpoint POST /aliases
@desc Create alias
@required {alias: map # alias properties}
@optional {domainName: any # domain which alias will belong to (string without `http/https` or `/`), aliasName: any # alias (without `/` at the beginning)}
@returns(200) Response contains aliasName, domainName and full generated short link

@endpoint PUT /aliases
@desc Update alias
@required {aliasName: any # alias (without `/` at the beginning), alias: map # alias properties you wish to be updated}
@optional {domainName: any # domain which alias belongs to (string without `http/https` or `/`)}
@returns(200) Empty response

@endpoint DELETE /aliases
@desc Delete alias
@required {aliasName: any # alias (without `/` at the beginning)}
@optional {domainName: any # domain which alias belongs to (string without `http/https` or `/`)}
@returns(200) Empty response

@endpoint GET /aliases/all
@desc Get aliases by domain
@optional {domainName: any # The domain name to get the aliases for (string without `http/https` or `/`), continueFrom: any # An ID returned by a previous query to continue aliases retrieval (see lastId in response), limit: any # Number of results to return per request}
@returns(200) returns Array of aliases with lastId

@endgroup

@group clicks
@endpoint GET /clicks
@desc Get clicks
@optional {continueFrom: any # An ID returned by a previous query to continue clicks retrieval (see lastId in response), limit: any # Number of results to return per request}
@returns(200) returns Array of Click models, also returns lastId

@endgroup

@end
