Managing Collections via the REST Platform API
API collections are a valuable tool to organize APIs, manage API access, and help developers discover and connect to APIs.
You can create, read, update, and delete collections using the Platform API.
(Environment Admin) Endpoints
Note that the Create Collection, Update Collection, and Delete Collection endpoints are all tagged (Environment Admin). This means you must select a context with Environment Admin Access to the Platform API to use these endpoints.
Create a collection (via the Platform API)
To create a Collection via that Platform API, navigate to the COLLECTIONS endpoint group and select the Create API endpoint. Complete the following steps:
-
Select the proper account context. If you aren't sure what this means, learn more about contexts here.
-
Select the desired RapidAPI App and Request URL from the dropdowns.
-
Fill out the request body:
name
: The desired collection name.brand
: Default.type
: ORG_CUSTOMorganizationId
: A number associated with a specific Organization. You can get the organizationId from the "Organization" tab on the Admin Panel, or by using the GET All Organizations endpoint of the Platform API.shortDescription
: A short explanation of the collection. Will be displayed on the Marketplace when users select the collection.longDescription
: A longer description of the collection.thumbnail
: An image for the collections cover that will be displayed on the Marketplace.weight
: Determines the order of the collection on the Marketplace, beginning with 0 (first displayed).apis
: The API ID is a unique identifier for the API(s) you want to include in the collection. You can get this value from the Admin Panel or by using the GET All APIs endpoint of the Platform API.
-
Click "Test Endpoint" to call the Platform API from your browser, or copy the code snippet to call the API from your application.
-
You will see a 200 status code if the call was successful and the Collection was created.
Update a collection (via the Platform API)
To update a collection, navigate to the COLLECTIONS endpoints group and select the Update Collection endpoint. Follow steps 2 through 5 above for Creating a Collection with the Platform API.
In addition to those steps, you will also need to provide a collectionID
which is the unique identifier for the collection. You can find this on the Admin Panel or by using the GET All Collections endpoint.
Delete a collection (via the Platform API)
To delete a Collection, navigate to the COLLECTIONS endpoints group and select the Delete Collection endpoint.
-
Provide a
collectionID
which is the unique identifier for the collection. You can find this on the Admin Panel or by using the GET All Collections endpoint. -
Click "Test Endpoint" to call the Platform API from your browser, or copy the code snippet to call the API from your application.
Please note that deleting a collection is not reversible.
Updated 12 months ago