Legacy Custom Objects Events

Important: This API endpoint is deprecated and may be removed in a future release. Access to the endpoint is limited to accounts that were part of a previous EAP. The EAP has now ended and not open to new accounts.

Legacy custom objects events track the user actions executed on legacy object records and legacy object types. The following actions trigger an event:

  • creating an object
  • updating an object
  • deleting an object

JSON format

Object Events are represented as JSON objects with the following properties:

NameTypeRead-onlyMandatoryDescription
created_atstringtruefalseThe time the event was created
event_sourcestringtruefalseCurrently, always "zen:sunshine"
event_typestringtruefalseThe type of the event. Possible values: "create_object", "update_object", or "delete_object"
idstringtruefalseAutomatically assigned when the event is created
object_idstringtruefalseThe id of the object record
object_typestringtruefalseThe type of object
propertiesobjecttruefalseThe attributes object of the object record

Example

{  "created_at": "2019-03-29T01:09:00.000Z",  "event_source": "zen:sunshine",  "event_type": "create_object",  "id": "5a93a697-51bf-11e9-bcd6-63c9631d595a",  "object_id": "5a7967d6-51bf-11e9-bcd6-e1d3e751878e",  "object_type": "test_object",  "properties": {    "attributes": {      "id": "10",      "name": "Macbook Air"    }  }}

List Custom Object Events

  • GET /api/sunshine/objects/events

Retrieves all create, update, delete events for legacy custom object records and types for a given account.

Allowed for

  • Agents

Code Samples

curl
curl https://{subdomain}.zendesk.com/api/sunshine/objects/events \  -v -u {email_address}/token:{api_token}
Go
import (	"fmt"	"io"	"net/http")
func main() {	url := "https://support.zendesk.com/api/sunshine/objects/events"	method := "GET"	req, err := http.NewRequest(method, url, nil)
	if err != nil {		fmt.Println(err)		return	}	req.Header.Add("Content-Type", "application/json")
	client := &http.Client {}	res, err := client.Do(req)	if err != nil {		fmt.Println(err)		return	}	defer res.Body.Close()
	body, err := io.ReadAll(res.Body)	if err != nil {		fmt.Println(err)		return	}	fmt.Println(string(body))}
Java
import com.squareup.okhttp.*;OkHttpClient client = new OkHttpClient();HttpUrl.Builder urlBuilder = HttpUrl.parse("https://support.zendesk.com/api/sunshine/objects/events")		.newBuilder();
Request request = new Request.Builder()		.url(urlBuilder.build())		.method("GET", null)		.addHeader("Content-Type", "application/json")		.build();Response response = client.newCall(request).execute();
Nodejs
var axios = require('axios');
var config = {  method: 'GET',  url: 'https://support.zendesk.com/api/sunshine/objects/events',  headers: {	'Content-Type': 'application/json',  },};
axios(config).then(function (response) {  console.log(JSON.stringify(response.data));}).catch(function (error) {  console.log(error);});
Python
import requests
url = "https://support.zendesk.com/api/sunshine/objects/events"headers = {	"Content-Type": "application/json",}
response = requests.request(	"GET",	url,	headers=headers)
print(response.text)
Ruby
require "net/http"uri = URI("https://support.zendesk.com/api/sunshine/objects/events")request = Net::HTTP::Get.new(uri, "Content-Type": "application/json")response = Net::HTTP.start uri.hostname, uri.port, use_ssl: true do |http|	http.request(request)end

Example response(s)

200 OK
// Status 200 OK
{  "data": [    {      "created_at": "2019-03-29T01:09:00.000Z",      "event_source": "zen:sunshine",      "event_type": "create_object",      "id": "5a93a697-51bf-11e9-bcd6-63c9631d595a",      "object_id": "5a7967d6-51bf-11e9-bcd6-e1d3e751878e",      "object_type": "test_object",      "properties": {        "attributes": {          "id": "10",          "name": "Macbook Air"        }      }    }  ],  "links": {    "next": null,    "previous": null  }}