johnbaird Absent Member.
Absent Member.
2275 views

Detecting if /picture is supported

I've been experimenting with the /picture endpoint in R2 which works fine. But if I use this for an earlier version of 2014, I get a 13KB java dump unlike the simple "NOT_FOUND" I get for an invalid endpoint on R2. Is there any way to obtain version information via REST which will allow me to determine if the 2014 version I'm dealing with supports /picture?

I have yet to try adding a picture via the API, but it would be useful to know the required format and dimensions in pixels.

Thanks, John
Labels (1)
Tags (1)
0 Likes
9 Replies
Anonymous_User Absent Member.
Absent Member.

Re: Detecting if /picture is supported


There is no version for the API, but you could check the version of the primary domain (or the domain you are connected to). It would be <domainVersion>1420</domainVersion> for R2.

As far as pictures, we'd recommend jpg for the format. The libraries we use for converting seem to have transparency issues with some png and gif files. Size really doesn't matter as the image will get downsized to a 64 x 64 pixel image. If you can, it would be better to start with a 'square' image. When you add the photo using REST, make sure your header has content-type:application/octet-stream.




--Morris






>>> johnbaird<johnbaird@no-mx.forums.microfocus.com> 3/7/2016 7:36 PM >>>







I've been experimenting with the /picture endpoint in R2 which works

fine. But if I use this for an earlier version of 2014, I get a 13KB

java dump unlike the simple "NOT_FOUND" I get for an invalid endpoint on

R2. Is there any way to obtain version information via REST which will

allow me to determine if the 2014 version I'm dealing with supports

/picture?




I have yet to try adding a picture via the API, but it would be useful

to know the required format and dimensions in pixels.




Thanks, John







--

johnbaird

------------------------------------------------------------------------
johnbaird's Profile: https://forums.novell.com/member.php?userid=41963


View this thread: https://forums.novell.com/showthread.php?t=497233
0 Likes
johnbaird Absent Member.
Absent Member.

Re: Detecting if /picture is supported

Morris Blackham;2422140 wrote:
There is no version for the API, but you could check the version of the primary domain (or the domain you are connected to). It would be <domainVersion>1420</domainVersion> for R2.

As far as pictures, we'd recommend jpg for the format. The libraries we use for converting seem to have transparency issues with some png and gif files. Size really doesn't matter as the image will get downsized to a 64 x 64 pixel image. If you can, it would be better to start with a 'square' image. When you add the photo using REST, make sure your header has content-type:application/octet-stream.
</QUOTE>

Thanks, but list/DOMAIN is showing every domain still having a version of 1400, not 1420 while /picture works. This was an upgrade to R2, not a fresh install. The Admin Console also shows a Database Version of 1400. I vaguely recall that this is not a new issue, that as far back as GW 8, the GroupWise Admin Object API might not show the correct version number after an upgrade.

Do I need to perform some action to upgrade the domain to R2 - I don't see any such option in the Admin Console.

Thanks, John
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Detecting if /picture is supported


To get the domain to R2, you have to do the update from the gwadmin-console/install Url, similar to if you were updating from GW2012. You probably only need to do it for the Primary domain, The ver bump will then get pushed to all doms/pos that are running R2 agents. Not surprised that the pictures work as it's a valid field in the domain.db even though the ver hasn't been bumped.



We discussed having a API version, but not sure it we'll get it implemented anytime soon.



Thanks,



Morris
.



>>> johnbaird<johnbaird@no-mx.forums.microfocus.com> 3/8/2016 1:56 PM >>>







Morris Blackham;2422140 Wrote:


> There is no version for the API, but you could check the version of the



> primary domain (or the domain you are connected to). It would be



> <domainVersion>1420</domainVersion> for R2.



>



> As far as pictures, we'd recommend jpg for the format. The libraries we



> use for converting seem to have transparency issues with some png and



> gif files. Size really doesn't matter as the image will get downsized



> to a 64 x 64 pixel image. If you can, it would be better to start with



> a 'square' image. When you add the photo using REST, make sure your



> header has content-type:application/octet-stream.



> </QUOTE>



>



> Thanks, but list/DOMAIN is showing every domain still having a version



> of 1400, not 1420 while /picture works. This was an upgrade to R2, not a



> fresh install. The Admin Console also shows a Database Version of 1400.



> I vaguely recall that this is not a new issue, that as far back as GW 8,



> the GroupWise Admin Object API might not show the correct version number



> after an upgrade.



>



> Do I need to perform some action to upgrade the domain to R2 - I don't



> see any such option in the Admin Console.



>



> Thanks, John








--

johnbaird

------------------------------------------------------------------------
johnbaird's Profile: https://forums.novell.com/member.php?userid=41963


View this thread: https://forums.novell.com/showthread.php?t=497233
0 Likes
johnbaird Absent Member.
Absent Member.

Re: Detecting if /picture is supported

That's worked great for the regular domains, but tomorrow I need to figure out how to add the external domains to the upgrade list.

Thanks, John
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Detecting if /picture is supported


You can't upgrade externals..



--MB




>>> johnbaird<johnbaird@no-mx.forums.microfocus.com> 3/9/2016 1:06 AM >>>







That's worked great for the regular domains, but tomorrow I need to

figure out how to add the external domains to the upgrade list.




Thanks, John







--

johnbaird

------------------------------------------------------------------------
johnbaird's Profile: https://forums.novell.com/member.php?userid=41963


View this thread: https://forums.novell.com/showthread.php?t=497233
0 Likes
johnbaird Absent Member.
Absent Member.

Re: Detecting if /picture is supported

Thanks, that saved me from some wasted effort. Here is a summary of results:

1. Regular domains upgrade to 1420, can retrieve a picture, no problems.

2. External non-GroupWise domain: Stuck on 1400, can retrieve a picture.

3. External domain: Stuck on 1400, Can add picture in Admin Console but not retrieve it (no error, size of return buffer = 0). Tested on several users.

Is there an issue with /picture for external domains, or is my system misbehaving?

With some domains supporting /picture apparently stuck on version number 1400, maybe there is good reason to raise the priority for "system/version" or equivalent.

Thanks, John
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Detecting if /picture is supported


#3, you are not the authoritative source for an external GW domain, so you can't add any photos to their users..

Might have to look into returning an error is it is attempted.



--Morris




>>> johnbaird<johnbaird@no-mx.forums.microfocus.com> 3/9/2016 1:36 PM >>>







Thanks, that saved me from some wasted effort. Here is a summary of

results:




1. Regular domains upgrade to 1420, can retrieve a picture, no

problems.




2. External non-GroupWise domain: Stuck on 1400, can retrieve a

picture.




3. External domain: Stuck on 1400, Can add picture in Admin Console but

not retrieve it (no error, size of return buffer = 0). Tested on several

users.




Is there an issue with /picture for external domains, or is my system

misbehaving?




With some domains supporting /picture apparently stuck on version number

1400, maybe there is good reason to raise the priority for

"system/version" or equivalent.




Thanks, John







--

johnbaird

------------------------------------------------------------------------
johnbaird's Profile: https://forums.novell.com/member.php?userid=41963


View this thread: https://forums.novell.com/showthread.php?t=497233
0 Likes
johnbaird Absent Member.
Absent Member.

Re: Detecting if /picture is supported

I was trying to retrieve the picture, not add one.

Yesterday via the Admin Console, I added pictures to members of both external GW and external non-GW domains, but could retrieve via REST only pictures for the external non-GW domain users. The pictures for external GW domain members appeared to have been set
correctly, I could view members in different domains, switch back to the external GW domain, and the picture for a particular user would be displayed.

Today I can retrieve the picture for both external domain types via REST. I don't know why this has changed. The server was rebooted late yesterday after the latest Windows updates were installed.

I've been trying to add a picture to any domain via command line curl.exe, but have failed to figure out the correct incantation. Any chance you can provide an example?

Thanks, John
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Detecting if /picture is supported


John, sorry for the delay, here's the curl command to upload a picture:



curl -k --user admin:pwd -H "content-type:application/octet-stream" -X PUT --data-binary @skippy.jpg https://151.155.136.215:9710/gwadmin-service/domains/utah/postoffices/provo/users/skippy/picture



Morris




>>> johnbaird<johnbaird@no-mx.forums.microfocus.com> 3/10/2016 6:36 PM >>>







I was trying to retrieve the picture, not add one.




Yesterday via the Admin Console, I added pictures to members of both

external GW and external non-GW domains, but could retrieve via REST

only pictures for the external non-GW domain users. The pictures for

external GW domain members appeared to have been set

correctly, I could view members in different domains, switch back to the

external GW domain, and the picture for a particular user would be

displayed.




Today I can retrieve the picture for both external domain types via

REST. I don't know why this has changed. The server was rebooted late

yesterday after the latest Windows updates were installed.




I've been trying to add a picture to any domain via command line

curl.exe, but have failed to figure out the correct incantation. Any

chance you can provide an example?




Thanks, John







--

johnbaird

------------------------------------------------------------------------
johnbaird's Profile: https://forums.novell.com/member.php?userid=41963


View this thread: https://forums.novell.com/showthread.php?t=497233
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.