Resources
    • PDF

    Resources

    • PDF

    Article summary

    Note:
    All APIs (GET/UPDATE/DELETE) using resource ID as path parameter can also use resource name instead of resource ID.

    1. Create a Resource

    This POST method is used to create a resource.

    POST{{url}}/api/resource-manager/resources

    Request Example

    curl --location --request POST '{{url}}/api/resource-manager/resources' \
    --header 'Authorization: TOKEN {{apiToken}}'
    --data-raw '{
      "resourceId": "string",
      "name": "string",
      "description": "string",
      "resourceType": {
        "id": "string",
        "name": "string"
      },
      "origin": "string",
      "createdBy": 0,
      "updatedBy": 0,
      "createdOn": "string",
      "updatedOn": "string",
      "paramValues": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "resourceLabels": {
        "additionalProp1": [
          "string"
        ],
        "additionalProp2": [
          "string"
        ],
        "additionalProp3": [
          "string"
        ]
      }
    }'

    Response Example 

    Status: 201 Created
    {
      "resourceId": "string",
      "name": "string",
      "description": "string",
      "resourceType": {
        "id": "string",
        "name": "string"
      },
      "origin": "string",
      "createdBy": 0,
      "updatedBy": 0,
      "createdOn": "string",
      "updatedOn": "string",
      "paramValues": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "resourceLabels": {
        "additionalProp1": [
          "string"
        ],
        "additionalProp2": [
          "string"
        ],
        "additionalProp3": [
          "string"
        ]
      }
    }

    2. Retrieve All Resources

    This GET method is used to retrieve a list of all resources.

    GET{{url}}/api/resource-manager/resources

    Request Parameters

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

    ParameterDescriptionData TypeRequired
    searchTextFilter resources by searching text.StringOptional
    pageSpecifies the page number of the resource records to retrieve.IntegerOptional
    sizeSpecifies the number of resource records to retrieve per page.IntegerOptional
    sortparameter to specify the sort parameter and direction.StringOptional

    Request Example

    curl --location --request GET '{{url}}/api/resource-manager/resources' \
    --header 'Authorization: TOKEN {{apiToken}}'

    Response Example 

    Status: 200 OK
    {
      "count": 0,
      "page": 0,
      "size": 0,
      "sort": "string",
      "data": [
        {
          "id": "string",
          "name": "string",
          "origin": "string",
          "resourceLabels": {
            "additionalProp1": [
              "string"
            ],
            "additionalProp2": [
              "string"
            ],
            "additionalProp3": [
              "string"
            ]
          }
        }
      ]
    }

    3. Retrieve Broker Pools by Resource ID

    This GET method is used to get broker pools using the resource ID.

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

    Request Parameters

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

    ParameterDescriptionData TypeRequired
    IdResource ID mapped to a broker pool.StringMandatory

    Request Example

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

    Response Example 

    Status: 200 OK
    [
      {
        "brokerPoolId": "string",
        "brokerPoolName": "string",
        "brokerPoolDesc": "string",
        "brokerCount": 0
      }
    ]

    4. Map a Broker Pool to a Resource

    This POST method is used to map a broker pool to a resource.

    POST{{url}}/api/resource-manager/resources/{id}/broker-pools

    Request Parameters

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

    ParameterDescriptionData TypeRequired
    IdResource IDStringMandatory

    Request Example

    curl --location --request GET '{{url}}/api/resource-manager/resources/{id}/broker-pools\ --header 'Authorization: TOKEN {{apiToken}}' --data-raw '[
      "string"
    ]'

    Note:
    The request body can now contain the broker pool name or broker pool ID.

    Response Example 


    Status: 201 Created
    [
      "string"
    ]

    5. Delete a Broker Pool for a Resource

    This DELETE method deletes a broker pool for a specified resource.

    DELETE{{url}}/api/resource-manager/resources/{id}/broker-pools/{brokerPoolId}

    Request Parameters

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

    ParameterDescriptionData TypeRequired
    IdResource ID mapped to a broker pool.StringMandatory
    bokerPoolIdBroker pool ID to be deletd.StringMandatory

    Request Example

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


    Response Example 

    Status: 204 No Content

    6. Retrieve Resource Details

    This GET method is used to get resource details specified by an ID.

    GET{{url}}/api/resource-manager/resources/{id}

    Request Parameters

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

    ParameterDescriptionData TypeRequired
    IdResource ID.StringMandatory

    Request Example

    curl --location --request GET '{{url}}/api/resource-manager/resources/{id}' \
    --header 'Authorization: TOKEN {{apiToken}}

    Response Example 

    Status: 200 OK
    {
      "resourceId": "string",
      "name": "string",
      "description": "string",
      "resourceType": {
        "id": "string",
        "name": "string"
      },
      "origin": "string",
      "createdBy": 0,
      "updatedBy": 0,
      "createdOn": "string",
      "updatedOn": "string",
      "paramValues": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "resourceLabels": {
        "additionalProp1": [
          "string"
        ],
        "additionalProp2": [
          "string"
        ],
        "additionalProp3": [
          "string"
        ]
      }
    }

    7. Update Resource Details

    This PUT method is used to update resource details.

    PUT{{url}}/api/resource-manager/resources/{id}

    Request Parameters

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

    ParameterDescriptionData TypeRequired
    IdResource IDStringMandatory

    Request Example

    curl --location --request GET '{{url}}/api/resource-manager/resources/{id}\ --header 'Authorization: TOKEN {{apiToken}}' --data-raw '{
      "resourceId": "string",
      "name": "string",
      "description": "string",
      "resourceType": {
        "id": "string",
        "name": "string"
      },
      "origin": "string",
      "createdBy": 0,
      "updatedBy": 0,
      "createdOn": "string",
      "updatedOn": "string",
        "paramValues": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "resourceLabels": {
        "additionalProp1": [
          "string"
        ],
        "additionalProp2": [
          "string"
        ],
        "additionalProp3": [
          "string"
        ]
      }
    }'


    Response Example 

    Status: 201 Created
    {
      "resourceId": "string",
      "name": "string",
      "description": "string",
      "resourceType": {
        "id": "string",
        "name": "string"
      },
      "origin": "string",
      "createdBy": 0,
      "updatedBy": 0,
      "createdOn": "string",
      "updatedOn": "string",
      "paramValues": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "resourceLabels": {
        "additionalProp1": [
          "string"
        ],
        "additionalProp2": [
          "string"
        ],
        "additionalProp3": [
          "string"
        ]
      }
    }

    8. Delete a Resource

    This DELETE method deletes a resource.

    DELETE{{url}}/api/resource-manager/resources/{id}

    Request Parameters

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

    ParameterDescriptionData TypeRequired
    IdResource IDStringMandatory

    Request Example

    curl --location --request GET '{{url}}/api/resource-manager/resources/{id}' \ --header 'Authorization: TOKEN {{apiToken}}'

    Response Example 

    Status: 204 No Content

    Was this article helpful?

    What's Next
    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.