Broker Pools

Prev Next

These APIs help to manage broker pools for access broker.


1. Create a Broker Pool

This POST method is used to create a new broker pool

POST{{url}}/api/resource-manager/remote-broker/pools

Request Example

An example POST request for creating a broker pool is shown here.

curl --location --request POST '{{url}}/api/resource-manager/remote-broker/pools' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data '{
  "name": "string",
  "description": "string",
  "keep-alive-seconds": 60,
  "disconnect-seconds": 86400
}'

Response Example 

An example response to the POST request for creating a broker pool is shown here.

Status: 201 Created
{
  "pool-id": "string",
  "name": "string",
  "keep-alive-seconds": 60,
  "disconnect-seconds": 86400,
  "authentication-token": "string"
}

2. Get Broker Pool Details by Page

This GET method retrieves the broker pool details specified page.

GET{{url}}/resource-manager/remote-broker/pools

The request parameters used in this method are shown in the following table:

ParameterDescriptionData TypeRequired
name

Filter resource that starts with a name.

String

Optional

exclusiveStartKey
Specifies the exclusive start key used for pagination.StringOptional
pageSizeSpecifies the page size, the default is 10.IntegerOptional

Request Example

An example GET request for retrieving broker pool details specified by the page is shown here.

curl --location --request GET '{{url}}/api/resource-manager/remote-broker/pools?name={{resource_name}}&pageSize={{page_number}}&exclusiveStartKey={{string}}' \
--header 'Accept: application/json'

Response Example 

An example response of the GET request for retrieving the broker pool details is shown here.

Status: 200 OK
{
  "data": [
    {
      "pool-id": "string",
      "pool-name": "string",
      "broker-id": "string",
      "broker-key": "string",
      "broker-name": "string",
      "status": "string",
      "status-timestamp": "string",
      "created": "string"
    },
    {
      "pool-id": "string",
      "name": "string",
      "description": "string",
      "broker-count": 0,
      "keep-alive-seconds": 60,
      "disconnect-seconds": 86400
    }
  ],
  "lastEvaluatedKey": "string",
  "resultSize": 0
}

3. Get Broker Pool Details by ID

This GET method retrieves the broker pool details by a specified ID.

GET{{url}}/api/resource-manager/remote-broker/pools/{pool-id}

Request Parameters

The request parameters used in this method are shown in the following table:

ParameterDescriptionData TypeRequired
pool-id

The unique identifier for the broker pool

String

Mandatory

Request Example

An example GET request for retrieving broker pool details specified by the ID is shown here.

curl --location --request GET '{{url}}/api/resource-manager/remote-broker/pools/{{pool-id}} \
--header 'Accept: application/json'

Response Example 

An example response of the GET request for retrieving the broker pool details is shown here.

Status: 200 OK
{
  "pool-id": "string",
  "name": "string",
  "description": "string",
  "broker-count": 0,
  "keep-alive-seconds": 60,
  "disconnect-seconds": 86400
}

4. Update Broker Pool Details

The PUT method updates the broker pool details.

PUT{{url}}/api/resource-manager/remote-broker/pools/{pool-id}

Request Parameters

The request parameters used in this method are shown in the following table:

ParameterDescriptionData TypeRequired
pool-id

The unique identifier for the broker pool

String

Mandatory

Request Example

An example PUT request which updates the broker pool details is shown here:

curl --location --request PUT '{{url}}/api/resource-manager/remote-broker/pools/{pool-id}'\
--header 'Authorization: TOKEN {{apiToken}}'
{
  "pool-id": "string",
  "name": "string",
  "description": "string",
  "broker-count": 0,
  "keep-alive-seconds": 60,
  "disconnect-seconds": 86400
}

Response Example

Status: 200 OK 
{
  "pool-id": "string",
  "name": "string",
  "description": "string",
  "broker-count": 0,
  "keep-alive-seconds": 60,
  "disconnect-seconds": 86400
}

5. Delete a Broker Pool

This DELETE method deletes a broker pool specified by an ID. This operation deletes all tokens, labels, and resource associations with the pool.

DELETE{{url}}/api/resource-manager/remote-broker/pools/{pool-id}

Request Parameters

The request parameters used in this method are shown in the following table:

ParameterDescriptionData TypeRequired
pool-id

The unique identifier for the broker pool

String

Mandatory

Request Example

An example DELETE request for deleting a broker pool is shown here.

curl --location --request DELETE '{{url}}/api/resource-manager/remote-broker/pools/{pool-id} \
--header 'Authorization: TOKEN {{apiToken}}'

Response Example 

Status: 204 No Content

6. Get an Authentication Token for the Broker Pool

This GET method retrieves the authentication token for the broker pool.

GET{{url}}/api/resource-manager/remote-broker/pools/{pool-id}/tokens

Request Parameters

The request parameters used in this method are shown in the following table:

ParameterDescriptionData TypeRequired
pool-id

The unique identifier for the broker pool

String

Mandatory

Request Example

An example GET request for creating an identity attribute is shown here.

curl --location --request GET '{{url}}/api/resource-manager/remote-broker/pools/{pool-id}/tokens' \
--header 'Authorization: TOKEN {{apiToken}}' \

Response Example 

An example response to the GET request for creating an identity attribute is shown here.

Status: 200 OK
[
  {
    "pool-id": "string",
    "token-name": "string",
    "description": "string",
    "token-value": "string",
    "created": "string",
    "lastAccessed": "string",
    "status": "INACTIVE"
  }
]

7. Create a new Token for a Broker Pool

The POST method creates a new token for a broker pool. Newly created tokens have an INACTIVE status.

POST{{url}}/api/resource-manager/remote-broker/pools/{pool-id}/tokens

Request Parameters

The request parameters used in this method are shown in the following table:

ParameterDescriptionData TypeRequired
pool-id

The unique identifier for the broker pool.

String

Mandatory

Request Example

curl --location --request POST '{{url}}/api/resource-manager/remote-broker/pools/{pool-id}/tokens'\
--header 'Authorization: TOKEN {{apiToken}}'
{
  "token-name": "string",
  "description": "string"
}

Response Example 

Status: 201 Created
{
  "pool-id": "string",
  "token-name": "string",
  "description": "string",
  "token-value": "string",
  "created": "string",
  "lastAccessed": "string",
  "status": "INACTIVE"
}

8. Update a Token by name

The PATCH method updates a broker token specified by a name.

PATCH{{url}}/api/resource-manager/remote-broker/pools/{pool-id}/tokens/{token-name}

Request Parameters

The request parameters used in this method are shown in the following table:

ParameterDescriptionData TypeRequired
pool-id

The unique identifier for the broker pool.

String

Mandatory

token-nameToken name, unique identifier for the tokenStringMandatory

Request Example

An example PATCH request that updates the broker token specified by a name.

curl --location --request PATCH '{{url}}/api/resource-manager/remote-broker/pools/{pool-id}/tokens/{token-name}'\
--header 'Authorization: TOKEN {{apiToken}}'{
  "status": "INACTIVE",
  "description": "string"
}

Response Example

Status: 200 OK 

There can only be two active tokens at a time. Activating a third token fails this call.

{
  "pool-id": "string",
  "token-name": "string",
  "description": "string",
  "token-value": "string",
  "created": "string",
  "lastAccessed": "string",
  "status": "INACTIVE"
}

9. Delete a Broker Token by name

This DELETE method deletes a broker pool token specified by a name.

DELETE{{url}}/api/resource-manager/remote-broker/pools/{pool-id}/tokens/{token-name}

Request Parameters

The request parameters used in this method are shown in the following table:

ParameterDescriptionData TypeRequired
pool-id

The unique identifier for the broker pool

String

Mandatory

token-nameUnique identifier of a tokenStringMandatory

Request Example

An example DELETE request for deleting a broker pool is shown here.

curl --location --request DELETE '{{url}}/api/resource-manager/remote-broker/pools/{pool-id}/tokens/{token-name} \
--header 'Authorization: TOKEN {{apiToken}}'

Response Example 

Status: 204 No Content

This method sends a response as 400 if the last active token is deleted.

10. Get Broker Details by Broker Pool ID

This GET method retrieves the broker details by a specified broker pool ID.

GET{{url}}/api/resource-manager/remote-broker/pools/{pool-id}/brokers

Request Parameters

The request parameters used in this method are shown in the following table:

ParameterDescriptionData TypeRequired
pool-id

The unique identifier for the broker pool

String

Mandatory

Request Example

An example GET request for retrieving broker details specified by the broker pool ID is shown here.

curl --location --request GET '{{url}}/api/resource-manager/remote-broker/pools/{pool-id}/brokers} \
--header 'Accept: application/json'

Response Example 

An example response of the GET request for retrieving the broker pool details is shown here.

Status: 200 OK
[
  {
    "pool-id": "string",
    "pool-name": "string",
    "broker-id": "string",
    "broker-key": "string",
    "broker-name": "string",
    "status": "string",
    "status-timestamp": "string",
    "created": "string"
  }
]

11. Create a Broker Pool Label

This POST method is used to create a new label for a broker pool.

POST{{url}}/api/resource-manager/remote-broker/pools/{pool-id}/labels

Request Example

An example POST request for creating a new label for a broker pool is shown here.

curl --location --request POST '{{url}}/api/resource-manager/remote-broker/pools/{pool-id}/labels' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data '
{
  "key": "string",
  "label-values": [
    "string"
  ]
}

Response Example 

An example response to the POST request for creating a broker pool is shown here.

Status: 201 Created
{
  "key": "string",
  "label-values": [
    "string"
  ]
}

12. Get Broker Pool Labels by Broker Pool ID

This GET method retrieves the broker pool labels specified by a broker pool ID.

GET{{url}}/api/resource-manager/remote-broker/pools/{pool-id}/labels

Request Parameters

The request parameters used in this method are shown in the following table:

ParameterDescriptionData TypeRequired
pool-id

The unique identifier for the broker pool

String

Mandatory

Request Example

An example GET request for retrieving broker details specified by the broker pool ID is shown here.

curl --location --request GET '{{url}}/api/resource-manager/remote-broker/pools/{pool-id}/labels \ --header 'Accept: application/json'

Response Example 

An example response of the GET request for retrieving the broker pool details is shown here.

Status: 200 OK
[
  {
    "key": "string",
    "label-values": [
      "string"
    ]
  }
]

13. Update a Broker Pool Label

The PUT method updates a broker token specified by a name.

PUT{{url}}/api/resource-manager/remote-broker/pools/{pool-id}/labels/{label-key}

Request Parameters

The request parameters used in this method are shown in the following table:

ParameterDescriptionData TypeRequired
pool-id

The unique identifier for the broker pool.

String

Mandatory

label-keyLabel key, unique identifier for the labelStringMandatory

Request Example

An example PUT request that updates the broker token specified by a name.

curl --location --request PUT '{{url}}/api/resource-manager/remote-broker/pools/{pool-id}/labels/{label-key}'\
--header 'Authorization: TOKEN {{apiToken}}'{
  "label-values": [
    "string"
  ]
}

Response Example

Status: 200 OK
{
  "key": "string",
  "label-values": [
    "string"
  ]
}

14. Delete a Broker Pool Label

This DELETE method deletes a broker pool token specified by a name.

DELETE{{url}}/api/resource-manager/remote-broker/pools/{pool-id}/labels/{label-key}

Request Parameters

The request parameters used in this method are shown in the following table:

ParameterDescriptionData TypeRequired
pool-id

The unique identifier for the broker pool

String

Mandatory

token-nameUnique identifier of a tokenStringMandatory

Request Example

An example DELETE request for deleting a broker pool label is shown here.

curl --location --request DELETE '{{url}}/api/resource-manager/remote-broker/pools/{pool-id}/labels/{label-key} \ --header 'Authorization: TOKEN {{apiToken}}'

Response Example 

Status: 204 No content
{
  "errorCode": "RA-0001",
  "message": "Conflict occurred while processing the request."
}