API / use of ExternalSyncIdentifier field
Hi,
Checking JAVA & .NET SDK, I can see there is a set/get field call ExternalSyncIdentifier under Group Model.
http://opensource.box.com/box-java-sdk/javadoc/com/box/sdk/BoxGroup.Info.html
However, even if I create a new group with a value, I still have nothing in the response back.
Could u please let me know how to use this field properly ? is it still in used by BOX ?
Thanks, Fred
-
Hi ,
The ExternalSyncIdentifier field is just some arbitrary identifier that you can set on the group to help you maintain syncing services between some external group that you may have.
With that said, let me add some sample code that might help determine what is going on here - I'll use the Java SDK for these.
First, let's say we created a group and want to now set the externalSyncIdentifier field. I would do something like the following to set the field then update the group:
String groupID = "4353453454"; BoxGroup group = new BoxGroup(client, groupID); BoxGroup.Info groupInfo = group.getInfo(); groupInfo.setExternalSyncIdentifier("GroupID123"); group.updateInfo(groupInfo);
Next, let's say I want to fetch the ExternalSyncIdentifier on a group. That field is not returned back in the standard groupInfo object, and needs to be specifically requested in the fields param sent to the API. In the Java SDK if I wanted to fetch that field plus the group ID and name, I would do something like this:
String groupID = "4353453454"; BoxGroup.Info groupInfo = new BoxGroup(client, groupID).getInfo("id", "name", "external_sync_identifier"); System.out.println(groupInfo.getExternalSyncIdentifier());
I hope that helps, but please let me know if any of the above doesn't solve your issue.
- Jon
Please sign in to leave a comment.
Comments
1 comment