I. What is an API?
An application programming interface is a computing interface that defines interactions between multiple software intermediaries.
II. How does the Bunnyshell API works?
Authentication
https://api.bunnyshell.com
This endpoint allows you obtain the authentication token for future requests.
Curl Syntax
curl -X POST https://api.bunnyshell.com/v1/auth \
-H "Content-Type: application/json" \
--data '{"access_key":"<my_access_key>","secret_key":" <my_secret_key>"}'
Get All Servers
https://api.bunnyshell.com
/v1/servers
Curl Syntax
curl -X GET https://api.bunnyshell.com/servers \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN"
Get Server
https://api.bunnyshell.com
/v1/servers/:serverId
Curl Syntax
curl -X GET https://api.bunnyshell.com/v1/<serverId> \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN"
Get All Applications
https://api.bunnyshell.com
/v1/applications
This will get the job status after an Application Deployment.
Curl Syntax
curl -X GET https://api.bunnyshell.com/v1/applications \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN"
Get Application
https://api.bunnyshell.com
/v1/applications/:applicationId
Curl Syntax
curl -X GET https://api.bunnyshell.com/v1/applications/<applicationId> \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN"
Deploy Application
https://api.bunnyshell.com
/v1/applications/:applicationId/deploy
Curl Syntax
curl -X POST https://api.bunnyshell.com/v1/applications/<applicationId>/deploy \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN"
Get All Jobs
https://api.bunnyshell.com
/v1/jobs
Curl Syntax
curl -X POST https://api.bunnyshell.com/v1/jobs \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN"
Get Job
https://api.bunnyshell.com
/v1/jobs/:jobId
Curl Syntax
curl -X POST https://api.bunnyshell.com/v1/jobs/<jobId> \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN"
Get Job Logs
https://api.bunnyshell.com
/v1/jobs/:jobId/logs
Curl Syntax
curl -X POST https://api.bunnyshell.com/v1/jobs/<jobId>/logs \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN"
III. API Tokens
This will help the account owner to create and manage API personal tokens.
-
Generate tokens
a. For a new account, there will be no tokens generated, so you will have to press on "Generate token";
b. A pop-up window will appear where you can enter the token name;
c. After generating the token, you will receive the "Personal Access Token".
Due to security reasons, the personal access token will not be shown again, so you will have to copy and save it.
2. Remove a token
a. You will have to select the token that you want to be removed and press on the "delete" button.
b. A pop-up window will appear. If you are sure that the selected token is the one you want remove, press on "delete".
After pressing on "delete", the token will be removed from Bunnyshell.