Enable/Disable Data Template

Open in ChatGPT Open in ChatGPT to ask questions about this page
Open in Claude Open in Claude to ask questions about this page
Copy as MarkdownCopy this page as markdown to use with AI assistants
View as Markdown Open this page as markdown in a new tab

This API helps in enabling or disabling a data template.

When you disable a template, you will not be able to edit the template. You must enable the template again to make any changes. Also, you cannot associate new files and folders with a disabled data template, but you can still disassociate files and folders from it.

Endpoints

OAuth Scope

WorkDrive.datatemplates.UPDATECopied!

Request Example

cURL
cURL
Deluge
Copied!
curl --request PATCH \
  --url https://www.zohoapis.com/workdrive/api/v1/datatemplates/{data_template_id} \
  --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \
  --header 'content-type: application/vnd.api+json' \
  --data '{"data":{"attributes":{"status":false},"type":"datatemplates"}}'

Path Parameters

data_template_idstring(Required)

A unique ID of the data template.

Request Body

application/vnd.api+json
dataJSON Object(Required)
Hide Sub-Attributes
attributesJSON Object(Required)
Hide Sub-Attributes
statusboolean(Required)

Mention "true" if you want to keep the data template in an active state and "false" to disable the data template.

typestring(Required)

The JSON:API resource type. Always "datatemplates".

Allowed Values :
Show Values
datatemplatesCopied!
Copied!Copy all as JSON Array

Body Parameters

Copied!
  {
    "data": {
      "attributes": {
        "status": false
      },
      "type": "datatemplates"
    }
  }
                
Show full

Response Example

CF036

CF036

CF037

CF050

F000

200
200
500
Copied!
  {
    "data": {
      "id": "nrkroc4c5f3259e2a410da17c3915ea990dde-24000000581001",
      "type": "datatemplates",
      "attributes": {
        "name": "Recruitment - 2021",
        "modified_by": "15077877",
        "description": "Associate files and folders of all candidates registered for recruitment in 2021",
        "modified_by_user": "Anna Baker",
        "team_id": "nrkroc4c5f3259e2a410da17c3915ea990dde",
        "custom_fields_count": 0,
        "created_time_in_millisecond": 0,
        "created_by": "15077877",
        "created_by_user": "Anna Baker",
        "status": false
      },
      "relationships": {
        "customfields": {
          "links": {
            "self": "https://www.zohoapis.com/workdrive/api/v1/datatemplates/nrkroc4c5f3259e2a410da17c3915ea990dde-24000000581001/relationships/customfields",
            "related": "https://www.zohoapis.com/workdrive/api/v1/datatemplates/nrkroc4c5f3259e2a410da17c3915ea990dde-24000000581001/customfields"
          }
        }
      },
      "links": {
        "self": "https://www.zohoapis.com/workdrive/api/v1/datatemplates/nrkroc4c5f3259e2a410da17c3915ea990dde-24000000581001"
      }
    }
  }
                
  {
    "errors": [
      {
        "id": "CF036",
        "title": "Duplicate dataTemplateName found"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "CF037",
        "title": "This template is not enabled"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "CF050",
        "title": "Empty or same dataTemplate Name is not allowed"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "F000",
        "title": "General Exception"
      }
    ]
  }
                
Show full