How to "Add Watcher" using Rally Rest API? I am unable to locate any keywords "watch", "watcher" or reference to watcher in documentation
Edit 1: Based on Joshua's answer I have tried the below:
DynamicJsonObject watcherToBeAdded = new DynamicJsonObject();
DynamicJsonObject watcherResult;
watcherToBeAdded["UserUUID"] = User's UUID;
watcherToBeAdded["ArtifactUUID"] = Story's UUID;
watcherToBeAdded["zuul_key"] = rallyAPIKey;
watcherResult = restApi.Post("notifications/watch", watcherToBeAdded);
This led to method not allowed.
I have also tried:
string rallyRef = "https://rally1.rallydev.com/notifications/api/v2/watch";
DynamicJsonObject toUpdate = new DynamicJsonObject();
toUpdate["ArtifactUUID"] = StoryUUID;
toUpdate["UserUUID"] = UserUUID;
OperationResult updateResult = restApi.Update(rallyRef, toUpdate);
This is throwing the below exception: Value cannot be null Parameter name: key
Authentication:
All requests to must be authenticated with a valid zsessionid or Rally API Key. You can pass this in a few ways:
As a header:
zuul=[ZSESSIONID]
orzuul=[RALLY_API_KEY]
As a cookie:
ZSESSIONID=[ZSESSIONID]
orZSESSIONID=[RALLY_API_KEY]
As a query parameter:
zuul_key=[ZSESSIONID]
orzuul_key=[RALLY_API_KEY]
To add a "watch", you can send a request like:
To remove a watch, you can send a request like: