Resource Types
    • PDF

    Resource Types

    • PDF

    Article summary

    1. Manage Resource Types

    This POST method is used to manage resource types.

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

    Request Example

    curl --location --request POST '{{url}}/api/resource-manager/resource-types' \
    --header 'Authorization: TOKEN {{apiToken}}'
    --data-raw '{
      "resourceTypeId": "string",
      "name": "string",
      "description": "string",
      "parameters": [
        {
          "name": "string",
          "paramType": "string",
          "isMandatory": false
        }
      ],
      "createdBy": 0,
      "updatedBy": 0,
      "resourceCount": 0,
      "createdOn": "string",
      "updatedOn": "string"
    }'

    Response Example 

    Status: 201 Created
    {
      "resourceTypeId": "string",
      "name": "string",
      "description": "string",
      "parameters": [
        {
          "name": "string",
          "paramType": "string",
          "isMandatory": false
        }
      ],
      "createdBy": 0,
      "updatedBy": 0,
      "resourceCount": 0,
      "createdOn": "string",
      "updatedOn": "string"
    }

    2. Retrieve All Resource Types

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

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

    Request Parameters

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

    ParameterDescriptionData TypeRequired
    searchTextFilter resource types by searching text.StringOptional
    pageSpecifies the page number of the resource types records to retrieve.IntegerOptional
    sizeSpecifies the number of resource types 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/resource-types' \
    --header 'Authorization: TOKEN {{apiToken}}'

    Response Example 

    Status: 200 OK
    {
      "count": 0,
      "page": 0,
      "size": 0,
      "sort": "string",
      "data": [
        {
          "resourceTypeId": "string",
          "name": "string",
          "description": "string",
          "parameters": [
            {
              "name": "string",
              "paramType": "string",
              "isMandatory": false
            }
          ],
          "createdBy": 0,
          "updatedBy": 0,
          "resourceCount": 0,
          "createdOn": "string",
          "updatedOn": "string"
        }
      ]
    }

    3. Retrieve Resource Type by ID

    This GET method is used to manage a resource label.

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

    Request Parameters

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

    ParameterDescriptionData TypeRequired
    idResource type ID.StringMandatory

    Request Example

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

    Response Example 

    Status: 201 Created
    {
      "resourceTypeId": "string",
      "name": "string",
      "description": "string",
      "parameters": [
        {
          "name": "string",
          "paramType": "string",
          "isMandatory": false
        }
      ],
      "createdBy": 0,
      "updatedBy": 0,
      "resourceCount": 0,
      "createdOn": "string",
      "updatedOn": "string"
    }

    4. Update Resource Type

    This PUT method is used to update resource type details.

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

    Request Parameters

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

    ParameterDescriptionData TypeRequired
    idResource Type IDStringMandatory

    Request Example

    curl --location --request PUT '{{url}}/api/resource-manager/resource-types/{id}\ --header 'Authorization: TOKEN {{apiToken}}'
    --data-raw '{
      "resourceTypeId": "string",
      "name": "string",
      "description": "string",
      "parameters": [
        {
          "name": "string",
          "paramType": "string",
          "isMandatory": false
        }
      ],
      "createdBy": 0,
      "updatedBy": 0,
      "resourceCount": 0,
      "createdOn": "string",
      "updatedOn": "string"
    }'

    Response Example 

    Status: 201 Created
    {
      "resourceTypeId": "string",
      "name": "string",
      "description": "string",
      "parameters": [
        {
          "name": "string",
          "paramType": "string",
          "isMandatory": false
        }
      ],
      "createdBy": 0,
      "updatedBy": 0,
      "resourceCount": 0,
      "createdOn": "string",
      "updatedOn": "string"
    }

    5. Delete a Resource Type

    This DELETE method deletes a resource type.

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

    Request Parameters

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

    ParameterDescriptionData TypeRequired
    idResource type ID.StringMandatory

    Request Example

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

    Response Example 

    Status: 204 No Content

    Was this article helpful?