Manage Access


While consuming the content of your portal, you may not be able to access some of the available products due to prior access restrictions. However, you can request access to these products. Product access requests are granted only by your portal administrator.

The following API endpoints are leveraged:

Let's use the first one to grant access to a private product.

Sample cURL request:

curl --location --request POST 'https://api.portal.swaggerhub.com/v1/access-requests/<YOUR-REQUEST-ID>' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <YOUR-SWAGGERHUB-APIKEY>' \

--data '{
  "status": "APPROVED"
}'

Now let's use the other one to get all access requests with statuses for a portal.

Sample response body:

{
  "page": {
    "number": 1,
    "size": 20,
    "totalElements": 100,
    "totalPages": 5
  },
  "items": [
    {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "product": {
        "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "name": "string"
      },
      "fullName": "string",
      "email": "string",
      "note": "string",
      "status": "PENDING",
      "actionedAt": "2024-04-16T13:44:30.116Z",
      "createdAt": "2024-04-16T13:44:30.116Z"
    }
  ]
}