Say I'm creating a user or disabling a user via the API. All changes in Version One create a Moment with a change comment. How can I make my API calls submit a comment along with the API call?
For example, when creating a user, perhaps I want a comment saying "Created through automated system". When I'm using the following example to create a user:
POST /VersionOne/rest-1.v1/Data/Member HTTP/1.1
Host: www14.v1host.com
Content-Type: application/xml
<Asset href="/v1sdktesting/rest-1.v1/New/Member">
<Attribute name="Name" act="set">Andre Agile</Attribute>
<Attribute name="Nickname" act="set">Andre</Attribute>
<Attribute name="Username" act="set">andre.agile</Attribute>
<Attribute name="Email" act="set">[email protected]</Attribute>
<Attribute name="IsCollaborator" act="set">false</Attribute>
<Attribute name="NotifyViaEmail" act="set">false</Attribute>
<Attribute name="SendConversationEmails" act="set">false</Attribute>
<Relation name="DefaultRole" act="set">
<Asset href="/v1sdktesting/rest-1.v1/Data/Role/4" idref="Role:4" />
</Relation>
</Asset>
You can set the change comment for an API call by using the comment parameter in the URL of your HTTP POST.
Using your example, the URL would be like this:
The XML payload would be just as you have it.
Note that this also works for asset updates.