change-metrics / monocle

Monocle helps teams and individual to better organize daily duties and to detect anomalies in the way changes are produced and reviewed.
https://changemetrics.io
GNU Affero General Public License v3.0
372 stars 58 forks source link

Documentation on consuming the API #1022

Closed andre-lima closed 1 year ago

andre-lima commented 1 year ago

Hello,

I'd like to automate some of the data analysis by making API requests to monocle and analyzing the response myself.

Sadly, it's not clear which endpoint does (although we can some times infer from the endpoint name). It's also not clear what the body content should be from the schema name alone.

Also, when querying with /api/2/search/query I'm having a hard time understanding what each query type is supposed to do:

For these reasons, I suggest that you add a section to better explain how to consume the API.

Thanks!

morucci commented 1 year ago

Hi Andre,

Thanks you for that suggestion. The PR #1023 is an attempt to provide explanation about metric API usage. Feel free to comment on the PR if you'd like.

The /api/2/search/query is not suitable for that purpose. There is an effort in progress to make the Web UI to rely on the metric endpoint only.

andre-lima commented 1 year ago

Thanks for the update on the docs. That'll help a lot.