Interacting With the Shipa API
Leveraging the Shipa API can be a powerful and programmatic way to have access to Shipa.
Getting Started with the Shipa API
The first step you will need to grab is your Shipa API Endpoint. Communicating with the Shipa API is your Shipa Target e.g https://target.address:port. Running the Shipa CLI Command shipa target list or in the Shipa UI under Settings -> General -> Target Address. In Shipa Cloud, the API Endpoint is https://target.shipa.cloud:443.
shipa target list
* shipa (https://elbaddress.us-east-1.elb.amazonaws.com:443)
shipa-cloud (https://target.shipa.cloud:443)
Now you can interact with the Shipa API. The target address is the root of the Shipa API.
API Authentication
Your Shipa Token e.g API Key can be used to authenticate with the Shipa API. Can run shipa token show from the Shipa CLI to get.
shipa token show
API key: Some_API_Key
API Reference
The Shipa API has Swagger Documentation.
Swagger Docs
Sample Queries Using cURL
There are many ways to interact with the Shipa API. You can use tools like Postman, etc. Here are some raw cURL commands.
Let's say you want to run the App List call on a self-managed version of Shipa.
The URL will be as follows:
https://elbaddress.us-east-1.elb.amazonaws.com.com:443/apps?locked=false
The cURL Query will be as follows:
curl --request GET \
--insecure --url 'https://elbaddress.us-east-1.elb.amazonaws.com:443/apps?locked=false' \
--header 'Authorization: Bearer YourShipaToken'
Or let's say you want to list out your Plans in Shipa Cloud.
The URL will be as follows:
https://target.shipa.cloud:443/plans
curl --request GET \
--url 'https://target.shipa.cloud:443/plans' \
--header 'Authorization: Bearer YourShipaToken'
SSL Validation and cURL
There are a few ways to validate SSL Certs with cURL.
https://curl.se/docs/sslcerts.htmlYou can use the
--insecure
flag to ignore the SSL warnings generated by cURL.
Updated 10 months ago