-
Download plugin:
curl -v -L -H "Authorization: Automation <your_token>"https://tbe.labs.jb.gg/api/plugin-repository/com.intellij.ml.llm.matterhorn/242.11544 -
Best way to check server reachability:
https://<tbe-server-url>/actuator/healthcurl -H "Authorization: Automation <your token>" -L https://<source-url>/actuator/health | jq{ "status": "UP", "components": { "com.jetbrains.tbe.server.cache.Cache": { "status": "UP", "details": { "url-mapper": { "estimatedSize": 0, "requestCount": 0, "hitCount": 0, "hitRate": 1, "missCount": 0, "missRate": 0 }, "available-updates-service": { "estimatedSize": 1, "requestCount": 10, "hitCount": 5, "hitRate": 0.5, "missCount": 5, "missRate": 0.5 }, "allowed-tool-list": { "estimatedSize": 1, "requestCount": 21, "hitCount": 9, "hitRate": 0.42857142857142855, "missCount": 12, "missRate": 0.5714285714285714 }, "toolbox-raw-feeds": { "estimatedSize": 0, "requestCount": 0, "hitCount": 0, "hitRate": 1, "missCount": 0, "missRate": 0 }, "toolbox-filtering-feeds": { "estimatedSize": 8, "requestCount": 104, "hitCount": 62, "hitRate": 0.5961538461538461, "missCount": 42, "missRate": 0.40384615384615385 }, "fus-tbe-server-reporter": { "estimatedSize": 1, "requestCount": 3, "hitCount": 0, "hitRate": 0, "missCount": 3, "missRate": 1 } } }, "com.jetbrains.tbe.server.cwm.qp": { "status": "UP" }, "com.jetbrains.tbe.server.lv.LicenseVaultReactive": { "status": "UP" }, "diskSpace": { "status": "UP", "details": { "total": 9223372036854772000, "free": 9223372036854772000, "threshold": 10485760, "path": "/home/app/.", "exists": true } }, "ping": { "status": "UP" }, "r2dbc": { "status": "UP", "details": { "database": "PostgreSQL", "validationQuery": "validate(REMOTE)" } }, "reactiveDiscoveryClients": { "description": "Discovery Client not initialized", "status": "UNKNOWN", "components": { "Simple Reactive Discovery Client": { "description": "Discovery Client not initialized", "status": "UNKNOWN" } } }, "refreshScope": { "status": "UP" } } } -
curl -H "Authorization: Automation <your token>" https://<source-url>/api/ping | jq{ "message": "pong" } -
curl -H "Authorization: Automation <your token>" -Lv https://<source-url>/api/users/meWe use it in our FE for a multitude of tasks. You can see that on the
Network tabin your browser when you refresh the page:- It changes what the FE displays (e.g. ADMIN/USER links and data)
- whether the EAP agreement has been accepted
- which TBE features are enabled and so on.
-
Postman usage example:
-
impersonation token and api/plugins/*archive:
-
curl -X 'GET' 'https://tbe.labs.jb.gg/api/plugins/org.jetbrains.toolbox-enterprise-client/archive?toolbox-version=2.3.1.31116&os=macOS&os-version=14.4.1&arch=arm64&product=PY&version=PY-241.15989.155&appType=PyCharm-P&build=241.15989.155&channel\[\]=Stable&source=TBE' -H 'accept: */*' -H "Authorization: Automation <TOKEN>" -H 'X-IDES-USER-EMAIL: <EMAIL>' -v -L -o output.zip
-
-
To add a user
curl -v -L -X 'POST' \ 'https://<SOURCE_URL>/api/v1/users' \ -H 'accept: */*' \ -H 'Authorization: Automation <TOKEN>' \ -H 'Content-Type: application/json' \ -d '{ "email": "<EMAIL>", "isActive": true, "profiles": [ { "id": "<PROFILE_ID>" } ], "role": "<ROLE>", "subject": "<USERNAME>", "username": "<USERNAME>" }'
-
Check User list
curl -v -L \ 'https://<SOURCE_URL>/api/v1/users?limit=15&offset=0' \ -H 'accept: */*' \ -H 'Authorization: Automation <TOKEN>'
-
To upload plugins
- Download plugin ZIP from JetBrains Marketplace (i.e. - Dart or Coder)
curl -v \ 'https://<SOURCE_URL>/api/plugins' \ -H 'Authorization: Automation <TOKEN>' \ -F "file=@<App PATH>" \ -F channel=Stable \ -F comment="<Comment>"
Comments
0 comments
Please sign in to leave a comment.