Update an event subscription
patch
/services/rest/connect/v1.4/eventSubscriptions/{id}
Request
Path Parameters
-
id(required): integer
The unique identifier of the event subscription.
The event-based subscription management object that allows external applications to discover objects that can be subscribed.
Root Schema : eventSubscriptions
Type:
objectThe event-based subscription management object that allows external applications to discover objects that can be subscribed.
Show Source
-
class:
string
Maximum Length:
256Pattern:^(Contact|Organization|Incident)$The string which represents the type of object in the ObjectShapeXML. -
createdTime:
string
The date and time when the event subscription was created. This attribute is read-only.
-
endPoint:
string
Maximum Length:
1333The URL to post the notification event. Note: If an endpoint is registered as a callback, it should contain the fully qualified domain name. For example: "endpoint" : "https://mydomain-name.com:[port-number]/myEventReceiverService" -
eventType:
object namedIDs-eventSubscriptions-eventType
An ID which has an associated name string. These IDs can be set by either value or name. If the name cannot uniquely determine the value, an error is generated.
-
id:
integer
Minimum Value:
1Maximum Value:9223372036854776000The unique identifier of the event subscription. -
integrationUser:
object namedIDs-eventSubscriptions-integrationUser
An ID which has an associated name string. These IDs can be set by either value or name. If the name cannot uniquely determine the value, an error is generated.
-
lookupName:
string
Maximum Length:
255The name used to look up the event subscription. -
name:
string
Maximum Length:
255Pattern:^[^ ]*$The unique name of the event subscription. -
objectShapeXml:
string
Maximum Length:
349525The shape of the template object used to send the notification. -
objectVersion:
object namedIDs-eventSubscriptions-objectVersion
An ID which has an associated name string. These IDs can be set by either value or name. If the name cannot uniquely determine the value, an error is generated.
-
status:
object namedIDs-eventSubscriptions-status
An ID which has an associated name string. These IDs can be set by either value or name. If the name cannot uniquely determine the value, an error is generated.
-
updatedTime:
string
The date and time when the event subscription was last updated. This attribute is read-only.
Nested Schema : namedIDs-eventSubscriptions-eventType
Type:
objectAn ID which has an associated name string. These IDs can be set by either value or name. If the name cannot uniquely determine the value, an error is generated.
Show Source
-
id:
integer
Minimum Value:
0ID value -
lookupName:
string
Maximum Length:
255Name used to lookup this object
Nested Schema : namedIDs-eventSubscriptions-integrationUser
Type:
objectAn ID which has an associated name string. These IDs can be set by either value or name. If the name cannot uniquely determine the value, an error is generated.
Show Source
-
id:
integer
Minimum Value:
0ID value -
lookupName:
string
Maximum Length:
255Name used to lookup this object
Nested Schema : namedIDs-eventSubscriptions-objectVersion
Type:
objectAn ID which has an associated name string. These IDs can be set by either value or name. If the name cannot uniquely determine the value, an error is generated.
Show Source
-
id:
integer
Minimum Value:
0ID value -
lookupName:
string
Maximum Length:
255Name used to lookup this object
Nested Schema : namedIDs-eventSubscriptions-status
Type:
objectAn ID which has an associated name string. These IDs can be set by either value or name. If the name cannot uniquely determine the value, an error is generated.
Show Source
-
id:
integer
Minimum Value:
0ID value -
lookupName:
string
Maximum Length:
255Name used to lookup this object
Response
Default Response
Examples
Use the PATCH operation with the following syntax to partially update an event subscription object:
https://your_site_interface/services/rest/connect/version/eventSubscriptions/event_subscription_idInclude the data to be updated in the request body. Only the fields present in the request JSON data are updated. All other fields remain the same.
Request URI example
https://mysite.example.com/services/rest/connect/v1.4/eventSubscriptions/10001Request body example
{
"objectShapeXml": "<n0:TriggeringObject xmlns:n0=\"urn:messages.ws.rightnow.com/v1_4\"
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:type=\"n1:Organization\"
xmlns:n1=\"urn:objects.ws.rightnow.com/v1_4\"><n1:Notes></n1:Notes></n0:TriggeringObject>"
}Note:
Quotation marks inside theobjectShapeXml field value must be escaped (replaced with " or \") to avoid JSON syntax errors. You must also
preserve spaces between XML namespace attributes.
Response example
The status 200
OK is returned. Then getting the data for event subscription
10001 returns the following:
{
"id": 10001,
"lookupName": "OrgCreateSubscription",
"createdTime": "2016-03-21T16:56:05.000Z",
"updatedTime": "2016-03-22T14:17:48.000Z",
"class": "Organization",
"endPoint": "https://myEventReceiverService",
"eventType": {
"id": 1,
"lookupName": "Create"
},
"integrationUser": {
"id": 1,
"lookupName": "ICS Integration"
},
"name": "OrgCreateSubscription",
"objectShapeXml": "<n0:TriggeringObject xmlns:n0="urn:messages.ws.rightnow.com/v1_4"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="n1:Organization"
xmlns:n1="urn:objects.ws.rightnow.com/v1_4"><n1:Notes></n1:Notes></n0:TriggeringObject>",
"objectVersion": {
"id": 100300,
"lookupName": "v1.4"
},
"status": {
"id": 1,
"lookupName": "Active"
},
"links": [
{
"rel": "self",
"href": "https://mysite.example.com/services/rest/connect/v1.4/eventSubscriptions/10001"
},
{
"rel": "canonical",
"href": "https://mysite.example.com/services/rest/connect/v1.4/eventSubscriptions/10001"
},
{
"rel": "describedby",
"href": "https://mysite.example.com/services/rest/connect/v1.4/metadata-catalog/
eventSubscriptions",
"mediaType": "application/schema+json"
}
]
}