@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api WeGA API
@base http://localhost:8080/exist/apps/WeGA-WebApp/api/v1
@version 1.0.0
@endpoints 10
@toc documents(5), search(1), code(1), application(2), facets(1)

@group documents
@endpoint GET /documents
@optional {docType: any, offset: any, limit: any}
@returns(200)

@endgroup

@group search
@endpoint GET /search/entity
@optional {docType: any, q: any, offset: any, limit: any}
@returns(200)

@endgroup

@group documents
@endpoint GET /documents/{docID}
@required {docID: any}
@returns(200)

@endpoint GET /documents/findByDate
@required {fromDate: any}
@optional {toDate: any, docType: any, offset: any, limit: any}
@returns(200)

@endpoint GET /documents/findByMention/{docID}
@required {docID: any}
@optional {docType: any, offset: any, limit: any}
@returns(200)

@endpoint GET /documents/findByAuthor/{authorID}
@required {authorID: any}
@optional {docType: any, offset: any, limit: any}
@returns(200)

@endgroup

@group code
@endpoint GET /code/findByElement/{element}
@required {element: any}
@optional {namespace: any, docType: any, offset: any, limit: any}
@returns(200)

@endgroup

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

@endpoint GET /application/newID
@required {docType: any}
@returns(200)
@errors {403}

@endgroup

@group facets
@endpoint GET /facets/{facet}
@required {facet: any, scope: any, docType: any}
@optional {term: any, offset: any, limit: any}
@returns(200)

@endgroup

@end
