ServiceFabric® API – Getting Started#
This section will explain how to retrieve an API key from the ServiceFabricTM Portal for use with ServiceFabricTM API supports an interactive UI that can be found at https://api.servicefabric.digitalrealty.com/docs, which can be used to demonstrate authentication and port retrieval.
Obtain API Key for Authentication#
- Go to ServiceFabricTM Portal (ServiceFabric® (digitalrealty.com) and login.
- Go to the top right corner, click on your name.
- Click on “Manage API Key.
- Click on “New API Key”.
- Copy Key and Secret (once pop-up is closed the Secret is unable to retrieve).
- Logout of ServiceFabricTM.
Trying out the API: Getting Authorized#
- Go to https://api.servicefabric.digitalrealty.com/docs
- Scroll down to “Authentication” section and click POST.
- Click “Try it out”.
- Replace the second “password” (keeping the quotes) with the Secret and replace the second “username” (keeping the quotes) with the Key.
- Click “Execute”.
- Scroll down to Response body and Copy “Access token”.
- Scroll to the top of the page to create access to APIs.
- Click “Authorize”.
- Enter the “Access Token”.
- Click “Authorize”.
- Close Pop-Up.
- Utilize APIs on screen.
You are now authorized and ready to perform various API tasks, such as create, read, and update your ServiceFabricTM resources. Continue reading for an example on how to read the list of ports in your Inventory.
Trying out the API: List of Organizations#
- Go to https://api.servicefabric.digitalrealty.com/docs
- Go to “Organization” section.
- Click on “Try it out”.
- Specify any desired parameters, such as sort order or page size.
- Click “Execute”.
- View Results in “Server response” section.
Trying out the API: List of Ports#
- Go to https://api.servicefabric.digitalrealty.com/docs
- Go to “Port” section.
- Click on “Try it out”.
- Copy “id” from Server results (list of organizations above) into Organization ID.
- Specify any desired parameters, such as sort order or page size.
- Click “Execute”.
- View Results in “Server response” section.