Public API
Connect any third party tool that can make HTTP requests to Codesphere via our public API.
There are many scenarios where you may want to connect Codesphere to a third party system or automate certain workflows related to Codesphere to fit your teams needs.
The actually available endpoints in the most up to date version can be found at https://codesphere.com/api/swagger-ui or if your company is running their own Codesphere installations at https://[Your_Base_URL]/api/swagger-ui.
The swagger UI is always up to date and allows testing each endpoint directly from the UI. The rest of this document walks through the authentication process and showcases some examples how to use the API.
Authentication
Many endpoints require authentication via an API key. You can create those inside of Codesphere through the account avatar menu in the top right corner. Under API keys
you can create as many tokens as you need. Be sure to copy the token after it is created - you won't be able to retrieve it later.
This token currently acts as a personal access token to authorize the API to act on your behalt. That means it has the same access level as your account - it will be able to see and interact with all resources of teams that you are part of. We will be adding fine-grained tokens with more granular control down the road.
Once you have your API key ready you can start interacting with the endpoints. The Swagger UI also has an option to drop in the API key as bearerAuth
- once entered you can start testing the endpoints.
Popular API testing tools like Postman also allow adding these tokens for more extensive testing.