API¶
SourceLab has a JSON API under /api/0/. Each instance documents its own API at that address, for the version it runs: see for example pagure.io/api/0/, or /api/0/ on your local instance.
The documentation of each endpoint comes from its docstring in sourcelab/web/api/.
Authentication¶
The API authenticates with a token sent in the Authorization header:
You create tokens in your user settings, or in the settings of a project, and each one is limited to the ACLs you select for it. An instance configures the ACLs available: see API token ACLs.