Resource Types

Prev Next

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 the details of a resource type.

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

Resource Type Icon Methods

1. Get Resource Type Icon Data

This GET method retrieves resource type icon data in SVG XML format.

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

Request Parameters

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

ParameterDescriptionData TypeRequired
idID of the resource type to retrieve icon data.StringMandatory

Request Example

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

Response Example 

Status: 200 OK

2. Save Resource Type Icon Data

This PUT method saves icon data for a given resource type.

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

Request Parameters

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

ParameterDescriptionData TypeRequired
idID of the resource type
StringMandatory

Request Example

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

Response Example 

Status: 204 No Content

3. Delete Resource Type Icon Data

This DELETE method deletes icon data for a given resource type.

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

Request Parameters

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

ParameterDescriptionData TypeRequired
idID of the resource type
StringMandatory

Request Example

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

Response Example 

Status: 204 No Content

4. Get Resource Type Icon Image

This GET method returns an icon SVG image configured for the resource type. The icon image is returned from the cache, and any updates to the icon take time to refresh the cache. The other APIs to retrieve the icon data or the icon with the updatedTimestamp can be used to obtain the updated icon without delay.

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

Request Parameters

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

ParameterDescriptionData TypeRequired
idID of the resource type
StringMandatory

Request Example

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

Response Example 

Status: 200 OK

5. Get Resource Type Updated Icon Image 

This GET method returns an icon SVG image configured for the resource type. The icon image is returned from the cache. The updatedTimestamp value is changed in case any updates to an icon are made, use the latest updatedTimestamp value to get the updated icon. The APIs that return the resource types have the updated icon URL in the response.

GET{{url}}/api/resource-manager/resource-types/{resourceTypeId}/{updatedTimestamp}/icon

Request Parameters

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

ParameterDescriptionData TypeRequired
idID of the resource type
StringMandatory
updatedTimestampTimestamp of the last update to the icon for the resource type icon.
String Mandatory

Request Example

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

Response Example 

Status: 200 OK