qnabot-on-aws icon indicating copy to clipboard operation
qnabot-on-aws copied to clipboard

document the API

Open matthewberryman opened this issue 8 years ago • 4 comments

What I'd like to do is to use the API from other software (in this case https://github.com/MSFREACH/msf-reach ) for updating the list of questions and answers in JSON format, to match new events and reporting links in that software. I've been able to reverse engineer an understanding from the code and Chrome developer tools running on the chatbot designer, but API docs would be nice.

matthewberryman avatar Dec 01 '17 09:12 matthewberryman

Matthewberryman, I aggree, we are working on the v2 of QnA which will alter the api a little (will make it more REST compliant) and we will provide better documentation as part of that change.

The Api is a AWS ApiGateway so you can go into the AWS Console, got to ApiGateway, find your api, and you can see all the available resources and methods.

If this an urgent need than i would be happy to write up how the api works before v2.

JohnCalhoun avatar Dec 01 '17 19:12 JohnCalhoun

@JohnCalhoun I'd found the API GW and that helped me figure out what APIs map to what bit of code. 👍
I think I have enough of an understanding for now, so I'm happy to wait until v2 since you have changes planned and it's less work for you to just document the new one. Thanks.

matthewberryman avatar Dec 01 '17 21:12 matthewberryman

so plan here is

  1. add documentation resources in api template "AWS::ApiGateway::DocumentationPart"
  2. use the apigateway to export the swagger file describing API

this swagger file will be the documentation. there are a number of swagger file viewers you could then use.

(swagger file will update as we add new routes)

JohnCalhoun avatar Dec 13 '17 18:12 JohnCalhoun

I know this is an old issue, but did you ever upload the swagger file?

emerham avatar Apr 16 '19 17:04 emerham