Chilkat Online Tools

Python / Zoho CRM REST APIs / Events

Back to Collection Items

import sys
import chilkat

# This example assumes the Chilkat API to have been previously unlocked.
# See Global Unlock Sample for sample code.

http = chilkat.CkHttp()

queryParams = chilkat.CkJsonObject()
queryParams.UpdateString("module","Events")

# Adds the "Authorization: Bearer <access_token>" header.
http.put_AuthToken("<access_token>")

# resp is a CkHttpResponse
resp = http.QuickRequestParams("GET","https://domain.com/crm/v2.1/settings/tags/{{tag_id}}/actions/records_count",queryParams)
if (http.get_LastMethodSuccess() == False):
    print(http.lastErrorText())
    sys.exit()

print(str(resp.get_StatusCode()))
print(resp.bodyStr())

Curl Command

curl -G -d "module=Events"
	-H "Authorization: Bearer <access_token>"
https://domain.com/crm/v2.1/settings/tags/{{tag_id}}/actions/records_count

Postman Collection Item JSON

{
  "name": "Events",
  "request": {
    "auth": {
      "type": "bearer",
      "bearer": [
        {
          "key": "token",
          "value": "{{access-token}}",
          "type": "string"
        }
      ]
    },
    "method": "GET",
    "header": [
    ],
    "url": {
      "raw": "{{api-domain}}/crm/v2.1/settings/tags/{{tag_id}}/actions/records_count?module=Events",
      "host": [
        "{{api-domain}}"
      ],
      "path": [
        "crm",
        "v2.1",
        "settings",
        "tags",
        "{{tag_id}}",
        "actions",
        "records_count"
      ],
      "query": [
        {
          "key": "module",
          "value": "Events"
        }
      ]
    },
    "description": "To get the total number of records under a tag."
  },
  "response": [
  ]
}