Response Templates
    • PDF

    Response Templates

    • PDF

    Article summary

    1. Create a Resource Template

    This POST method adds a resource template to be used in check out process.

    POST{{url}}/api/resource-manager/response-templates

    Request Example

    curl --location --request POST '{{url}}/api/resource-manager/response-templates \
    --header 'Authorization: TOKEN {{token}}' \
    --data-raw '{
      "templateId": "string",
      "name": "string",
      "description": "string",
      "template_data": "string",
      "is_console_enabled": false,
      "createdBy": "string",
      "updatedBy": "string",
      "createdOn": "string",
      "updatedOn": "string"
    }'

    Response Example 

    Status: 201 Created
    {
      "templateId": "string",
      "name": "string",
      "description": "string",
      "template_data": "string",
      "is_console_enabled": false,
      "createdBy": "string",
      "updatedBy": "string",
      "createdOn": "string",
      "updatedOn": "string"
    }

    2. Get All Response Templates 

    This GET method is used to get a list of all response templates.

    GET{{url}}/api/resource-manager/response-templates

    Request Example

    curl --location --request GET '{{url}}/api/resource-manager/response-templates' --header 'Authorization: TOKEN {{token}}'

    Response Example 

    Status: 200 OK
    {
      "count": 0,
      "page": 0,
      "size": 0,
      "sort": "string",
      "data": [
        {
          "templateId": "string",
          "name": "string",
          "description": "string",
          "is_console_enabled": false
        }
      ]
    }

    3. Update a Response Template

    This PUT method is used to update response template details for a given template Id.

    PUT{{url}}/api/resource-manager/response-templates/{templateId}

    Request Parameters

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

    ParameterDescriptionData TypeRequired
    templateId
    Response template ID.StringMandatory

    Request Example

    curl --location -g --request PUT '{{url}}/api/resource-manager/response-templates/{templateId}' \
    --header 'Authorization: TOKEN {{token}}'
    --data_raw '{
      "templateId": "string",
      "name": "string",
      "description": "string",
      "template_data": "string",
      "is_console_enabled": false,
      "createdBy": "string",
      "updatedBy": "string",
      "createdOn": "string",
      "updatedOn": "string"
    }'

    Response Example 

    Status: 201 Created
    {
      "templateId": "string",
      "name": "string",
      "description": "string",
      "template_data": "string",
      "is_console_enabled": false,
      "createdBy": "string",
      "updatedBy": "string",
      "createdOn": "string",
      "updatedOn": "string"
    }

    4. Get Response Template Details by a template ID

    The GET method lets you update policy details for a given template Id.

    GET{{url}}/api/resource-manager/response-templates/{templateId}

    Request Parameters

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

    ParameterDescriptionData TypeRequired
    templateId
    Resource Template IDStringMandatory

    Request Example

    curl --location --request GET '{{url}}/api/resource-manager/response-templates/{templateId}' \
    --header 'Authorization: TOKEN {{token}}' \
    --data-raw `{
      "templateId": "string",
      "name": "string",
      "description": "string",
      "template_data": "string",
      "is_console_enabled": false,
      "createdBy": "string",
      "updatedBy": "string",
      "createdOn": "string",
      "updatedOn": "string"
    }`

    Response Example 

    Status: 200 OK

    5. Delete Response Template

    The DELETE method allows you to delete the response template.

    DELETE{{url}}/api/resource-manager/response-templates/{templateId}

    Request Parameters

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

    ParameterDescriptionData TypeRequired
    templateId
    Response Template ID.StringMandatory

    Request Example

    curl --location --request DELETE '{{url}}/api/resource-manager/response-templates/{templateId}' \
    --header 'Authorization: TOKEN {{token}}'

    Response Example 

    The response template is deleted.

    Status: 204 No Content

    Was this article helpful?

    What's Next