How to use the API to manage my projects? #1435
Replies: 5 comments
-
One problem seems to be that the documentation page shows http: instead of https: URLS and curl by default does not automatically use the https URL (wget or the browser does), so even get requests for public info fail with curl when the example command shown is used. |
Beta Was this translation helpful? Give feedback.
-
However trying to use this"
where KEY and TOKEN are the values the doc page fills in after logging in, still gives this response:
So how do I get the credentials and then specify them correctly to see the submission scores for my projects or a specific project or all the submissions for a project/phase? For example I tried:
and just got: |
Beta Was this translation helpful? Give feedback.
-
I used the API from python for my own instance (so not sure if it works properly with codabench.org) using these as a starting point: I mostly used them for fetching some competition data and making submissions, not managing the competition. |
Beta Was this translation helpful? Give feedback.
-
Thanks @curious-broccoli the example script
So it should be easy to then use the same request as in curl in Python ... |
Beta Was this translation helpful? Give feedback.
-
To summarize the answer: What works for me is to first get the authentication token for my username and password like this:
This returns something like: Then run the actual API commands similar to this, replacing
Doing the equivalent in Python works as well, of course. |
Beta Was this translation helpful? Give feedback.
-
I found this page: https://www.codabench.org/api/docs/ but there seems to be no documentation in the Wiki about how this can be actually used to manage my projects or how to properly authenticate.
When I try this directly in the api docs page, all I get is "Network error" responses: "TypeError: NetworkError when attempting to fetch resource."
I would have hoped that perhaps using this approach would make it easier to do certain things which are not or only very tediously supported in the web interface (e.g. download all submissions is impossible for some reason, as are straightforward ways to clean up storage by deleting multiple submissions).
When I instead try and run the curl the page shows me for an (authenticated) example request, I always get the error response: "Moved Permanently(base)"
Beta Was this translation helpful? Give feedback.
All reactions