Develop Applications
Applications are the main way to extend Space functionality. An application is an external server-side service or a client-side program (JavaScript, desktop, or mobile) that can interact with Space through:
Interaction between Space and applications
Space and applications can communicate with each other in both directions:
An application can send data to Space. For example, send a message to a chat channel, request data on Space entities like projects, team members, and so on.
Space can send data to the application. For example, send notifications about events via webhooks, send user messages, and so on.
A Space user can interact with the application in several ways:
Send a chat message to the application (e.g., a chatbot).
Click buttons in a chat message received from the application.
Click buttons in link unfurls provided by the application.
Click a custom menu item added by the application to a particular Space entity.
Interact with the application user interface via an
iframe
.Interact with Space from a static web page (running entirely in the client browser).
Hosting of applications
Currently, the only option is to host your application on your own server. In the future, it'll be possible to host applications right in Space.
Authentication and authorization
All requests to Space have to come from an authorized caller. To send requests to Space, the application must first obtain an access token. The most secure way to do this is by using one of the OAuth 2.0 authorization flows, though, you can also provide the application with a permanent token. Learn more.
Distribution
There are two application types depending on how they are distributed:
Single-org applications
These are applications intended only for a particular (typically, your own) Space organization. To install such an application, you must manually register it in Space. When registering the application, you specify all the required data: an authorization way, application endpoints, required permissions, and so on.
Multi-org applications
These applications are intended for public distribution and can be installed to multiple Space organizations.
There are two ways to distribute such an application: via an installation link or via JetBrains Marketplace. When a user installs the application, Space sends an
InitPayload
to the application endpoint. Upon receivingInitPayload
, the application saves a new Space organization with Space access credentials. Then it configures itself in Space through API calls, for example, requests permissions and creates webhooks.
Space HTTP API
Space HTTP API is the main and the only way for an application to communicate with Space. By making HTTP calls to Space endpoints, you can access any Space module: Teams, Chats, Projects, Issues, Packages, etc.
The best way to explore the API is to use API Playground.
Space SDK
You can develop your Space application using any language or framework. But if you write it in Kotlin or .NET, we recommend that you use Space SDK. The SDK lets you perform all common tasks: authorization, invocation of API methods, etc. It also provides additional support for Ktor server, making it easier to process requests from Space in your application.
API Playground can generate code snippets for Space SDK.
Sample applications
To help you get started, we provide a number of sample applications in our public GitHub repository.
JetBrains Platform Slack community
The JetBrains Platform Slack community is a place where you can talk with other developers and JetBrains employees. Get invite.