Page MenuHomePhabricator

Editor access for the API Gateway documentation for the ML team
Closed, ResolvedPublic

Description

Hi everybody!

The ML team would like to add documentation for its Lift Wing endpoints, currently being served via api.wikimedia.org (still experimental but we'd like to add some docs about how to use it).

We'd need access for the following users:

The last two users don't have their mediawiki accounts registered in Phab, I'll ping them to fix it.

We'd be ready to start adding documentation, but I noticed T289791 so I am wondering if we'd need to wait or not. There is also T329946 that would benefit from this documentation (I'd imagine folks asking for it after a more public presentation).

Thanks in advance!

Event Timeline

To add more context: the ML team is interested in adding documentation like

https://api.wikimedia.org/wiki/API_reference/Service/Link_recommendation/Get_link_recommendations

We don't have a lot of documentation for the moment, but these are examples of what we have configured so far in the API gateway:

curl -s "https://api.wikimedia.org/service/lw/inference/v1/models/enwiki-articletopic:predict" -X POST -d '{ 
"rev_id": 123555 }'  -H "Authorization: Bearer $ACCESSTOKEN"

curl -s "https://api.wikimedia.org/service/lw/inference/v1/models/enwiki-articlequality:predict" -X POST -d '{ 
"rev_id": 123555 }'  -H "Authorization: Bearer $ACCESSTOKEN"

curl -s "https://api.wikimedia.org/service/lw/inference/v1/models/enwiki-draftquality:predict" -X POST -d '{ 
"rev_id": 123555 }'  -H "Authorization: Bearer $ACCESSTOKEN"

curl -s "https://api.wikimedia.org/service/lw/inference/v1/models/enwiki-drafttopic:predict" -X POST -d '{ 
"rev_id": 123555 }'  -H "Authorization: Bearer $ACCESSTOKEN"

curl -s "https://api.wikimedia.org/service/lw/inference/v1/models/enwiki-damaging:predict" -X POST -d '{ 
"rev_id": 123555 }'  -H "Authorization: Bearer $ACCESSTOKEN"

curl -s "https://api.wikimedia.org/service/lw/inference/v1/models/enwiki-goodfaith:predict" -X POST -d '{ 
"rev_id": 123555 }'  -H "Authorization: Bearer $ACCESSTOKEN"

curl -s "https://api.wikimedia.org/service/lw/inference/v1/models/enwiki-reverted:predict" -X POST -d '{ 
"rev_id": 123555 }'  -H "Authorization: Bearer $ACCESSTOKEN"

For the moment we require the use of the Bearer token, but in the future we may change it (also depending on what are the guidelines for the API Gateway etc..). All the above links vary for the "models" part, because they are more similar than the rest.

A newer model is the following:

curl -s "https://api.wikimedia.org/service/lw/inference/v1/models/outlink-topic-model:predict" -X POST -d '{ 
"lang": "en", "page_title": "Victoria_Jubilee_Government_High_School"}'  -H "Authorization: Bearer $ACCESSTOKEN"

We are planning to add more models in the future: "https://api.wikimedia.org/service/lw/inference/v1/models/ remains fixed, but the rest may change (including POST's parameters etc..).

Hi @elukey, I've added everyone on the list to the documentation editors group 🎉 You all should now be able to create, edit, and move pages in the API Portal. I'll follow up about creating the content in T325759: Add documentation about LiftWing to the API Portal