The API needs to be enabled in plugboard. The setup is the same as for any other integration in Plugboard. The first step is to setup a system integration of the type Plugboard API. The integration is added in the admin area for "My Plugboard". The login details you get will allow access to the Plugboard API for a given tenant.
Follow the steps below:- Login to My Plugboard (https://my.plugboard.io)
- Go to System integrations -> Settings
- Click on Add system integration
- Choose Plugboard API as System
- Enter a name e.g. "API"
- Click on API Credentials
- Copy value of field X-ConnectionId and X-Tenant
- Click Save
- A new widget will appear underneath
Parameters
- X-tenant
- is the tenant name. You can see it under API Credentials
- X-ConnectionId
- is a unique id for the API-connection. You can see it under API Credentials
- username
- is the username for the user that you want to use for the API calls. It is recommended that you have a specific user for the API.
- password
- is the login password for the user you selected.
Read more about in the section Authentication
This value is to be used in the top bar of API-reference (together with the other three regular authentication details). See: API-reference documentation
Check Connection
Test the credentials by accessing the root API-endpoint https://api.plugboard.io/api/. Expected response should have HTTP Status Code: 200
and contain some meta data for the API-connection.
Connect using the API-reference page
Test with swagger on the API-reference page.
- Click in Authorize and make sure to authorize all Available authorizations.
- Go to API Root, click on Try it out
- Click on Execute button.
Connect using curl
Test the endpoint with curl.
curl --location --request GET 'https://api.plugboard.io/api/' \
--header 'X-ConnectionId: {connectionId}' \
--header 'X-Tenant: {your tenant}' \
--header 'Authorization: {Base64(username:password)}'
Kommentarer
0 kommentarer
logga in för att lämna en kommentar.