Micro Focus Expert
Micro Focus Expert
135 views

GroupWise REST API

Good morning,
 
Customer is attempting to use REST to move a GW Resource, the Resource has a "/" symbol in it, for example: my/resource~ when they attempt to perform the move there is an error, which we are assuming is the issue with the "/" is there a way to encapsulate that Resource name such as in single quotes 'my/resource' or double quotes "my/resource"
 
Thank you for any assistance that can be offered
 
Daniel
Labels (1)
0 Likes
8 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: GroupWise REST API

@dschaldenovell 

Hi Daniel,

Please give us the full command being used.  Thanks 😀

Cheers,

 

Laura Buckley

Views/comments expressed here are entirely my own.
If you find this post helpful, please show your appreciation and click on "Like" below...
0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: GroupWise REST API

Good morning, 

 

This is command that they used, (with names blocked out of course)

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: GroupWise REST API

@dschaldenovell 

Hi Daniel

To move a resource:

 

curl -k --user admin:novell -H "Content-Type:application/json" -X POST https://192.168.90.10:9710/gwadmin-service/system/moverequests --data '{"sources":[{"id":"RESOURCE.dom1.po1.testmove","resourceOwnerId":"USER.dom2.po2.user1"}],"postOfficeId":"POST_OFFICE.dom2.po2"}'

 

admin = GW Admin User
novell = password
change IP to that of the correct server
"testmove" is the name of the resource being moved.
ResourceOwnerID is the NEW resource owner
postOfficeID is the post office the resource is being moved to.

 

Cheers,

 

Laura Buckley

Views/comments expressed here are entirely my own.
If you find this post helpful, please show your appreciation and click on "Like" below...
0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: GroupWise REST API

Good morning 

 

So in your example "testmove" can be replaced by Cxx/Rexxxls~ as long as it's inside the "" (Double Quotes)
192.168.90.10 would be replaced by 10.xx.xx.xx

 

Thank you, 

 

Daniel 

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: GroupWise REST API

Good morning 

 

This is from the customer 

 

Not sure I am following what this is. Is this a command that should allow us to move the resource without worrying about the association?

 

Basically when we tried to move the object previously, it was encountering an error with a Sync Error. So to the question above would this take into account any Associations? 

 

Thank you, 

 

Daniel  

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: GroupWise REST API

Hi,

A resource should not have any association. It does not have an LDAP counterpart.

Cheers,

 

Laura Buckley

Views/comments expressed here are entirely my own.
If you find this post helpful, please show your appreciation and click on "Like" below...
0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: GroupWise REST API

Good morning, 

 

That is part of the issue, the Resource in Question was created in an earlier version of GroupWise (prior to GW 2012) back-line provided us/customer with a script that was supposed to sever that association so that the Resource could then be moved.

The customer is/was attempting to run the script on that Resource, and that's when they are receiving the error, which again seems to be because the Resource has a "/" in it's name. Another Engineer suggested doing the following: "Cxx%2FRexxxls" or "Cxx\/Rexxxls" so the command would look something like this, https://10.xx.xx.xx:9710/gwadmin-service/domains/BxxMxxO/postoffices/PO1/users/Cxx%2FRexxxls~/directorylink

 

The customer is going to be trying again today

 

Thank you, 

Daniel 

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: GroupWise REST API

Hi Daniel,

If that doesn't work you could consider renaming the resource first to remove the illegal characters:

 

curl -k --user admin:password -H "Content-Type:application/json" -X POST https://ipofserver:9710/gwadmin-service/domains/domain-name/postoffices/po-name/rename --data '{"objectId":"RESOURCE.dom1.po1.Test Resource","newObjectId":"TestResource"}'

 

In the example above the resource had a space in the name.  This should work with any other illegal character.

 

Cheers,

 

Laura Buckley

Views/comments expressed here are entirely my own.
If you find this post helpful, please show your appreciation and click on "Like" below...
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.