How to distinguish Syncope 1.2.x and 2.x

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

How to distinguish Syncope 1.2.x and 2.x

XiLai Dai

Hi, there,


In our product we want to let it support both Syncope 1.2.x and the new 2.x, but seems there is no REST api e.g. "/rest/version" to get the version info. the only way I could find is get version from the WADL response xml of http://localhost:9080/syncope/rest/?_wadl


<doc title="Apache Syncope 2.0.1"/>


Is there other more convenient way to get the version info?  Thanks!


Thanks.

Xilai

Reply | Threaded
Open this post in threaded view
|

Re: How to distinguish Syncope 1.2.x and 2.x

ilgrosso
Administrator
On 12/01/2017 08:35, XiLai Dai wrote:

Hi, there,


In our product we want to let it support both Syncope 1.2.x and the new 2.x, but seems there is no REST api e.g. "/rest/version" to get the version info. the only way I could find is get version from the WADL response xml of http://localhost:9080/syncope/rest/?_wadl


<doc title="Apache Syncope 2.0.1"/>


Is there other more convenient way to get the version info?  Thanks!


Hi,
you can look at

GET /syncope/rest/platform

the returned object has a 'version' field.

You can check the REST reference [1][2] or exploit the Swagger extension [3] to get details about the available endpoints;

Please consider that such call requires authentication (as it discloses several data about the given deployment); you can however empower the anonymousUser / anonymousKey values as specified in the security.properties file.

HTH

Regards.

[1] http://syncope.apache.org/rest/2.0/index.html
[2] http://localhost:9080/syncope/rest/
[3] https://syncope.apache.org/docs/reference-guide.html#swagger
-- 
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Member at The Apache Software Foundation
Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
http://home.apache.org/~ilgrosso/
Reply | Threaded
Open this post in threaded view
|

Re: How to distinguish Syncope 1.2.x and 2.x

XiLai Dai

Thanks Francesco! yes, I saw this /rest/platform api from the swagger doc of Syncope 2.0.1, but it's only existing from Syncope 2.x, for Syncope 1.2.x, it doesn't provide this api and nothing response returned when GET it.


Thanks.


From: Francesco Chicchiriccò <[hidden email]>
Sent: Thursday, January 12, 2017 3:45:12 PM
To: [hidden email]
Subject: Re: How to distinguish Syncope 1.2.x and 2.x
 
On 12/01/2017 08:35, XiLai Dai wrote:

Hi, there,


In our product we want to let it support both Syncope 1.2.x and the new 2.x, but seems there is no REST api e.g. "/rest/version" to get the version info. the only way I could find is get version from the WADL response xml of http://localhost:9080/syncope/rest/?_wadl


<doc title="Apache Syncope 2.0.1"/>


Is there other more convenient way to get the version info?  Thanks!


Hi,
you can look at

GET /syncope/rest/platform

the returned object has a 'version' field.

You can check the REST reference [1][2] or exploit the Swagger extension [3] to get details about the available endpoints;

Please consider that such call requires authentication (as it discloses several data about the given deployment); you can however empower the anonymousUser / anonymousKey values as specified in the security.properties file.

HTH

Regards.

[1] http://syncope.apache.org/rest/2.0/index.html
[2] http://localhost:9080/syncope/rest/
[3] https://syncope.apache.org/docs/reference-guide.html#swagger
-- 
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Member at The Apache Software Foundation
Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
http://home.apache.org/~ilgrosso/
Reply | Threaded
Open this post in threaded view
|

Re: How to distinguish Syncope 1.2.x and 2.x

ilgrosso
Administrator
On 12/01/2017 09:10, XiLai Dai wrote:

Thanks Francesco! yes, I saw this /rest/platform api from the swagger doc of Syncope 2.0.1, but it's only existing from Syncope 2.x, for Syncope 1.2.x, it doesn't provide this api and nothing response returned when GET it.


True, Syncope 1.2 does not provide anything similar.
I  got the impression from your text below that you were not even aware of the REST endpoint in 2.0 as you only mentioned the WADL content, hence I provided the related info.

About 1.2, you might want to either add something similar to your own overlay or backport the 2.0 feature (possibly strimmed down) in the 1.2.10-SNAPSHOT. The former option has the advantage for you to be immediately available without waiting for the 1.2.10 release.

Regards.


From: Francesco Chicchiriccò [hidden email]
Sent: Thursday, January 12, 2017 3:45:12 PM
To: [hidden email]
Subject: Re: How to distinguish Syncope 1.2.x and 2.x
 
On 12/01/2017 08:35, XiLai Dai wrote:

Hi, there,


In our product we want to let it support both Syncope 1.2.x and the new 2.x, but seems there is no REST api e.g. "/rest/version" to get the version info. the only way I could find is get version from the WADL response xml of http://localhost:9080/syncope/rest/?_wadl


<doc title="Apache Syncope 2.0.1"/>


Is there other more convenient way to get the version info?  Thanks!


Hi,
you can look at

GET /syncope/rest/platform

the returned object has a 'version' field.

You can check the REST reference [1][2] or exploit the Swagger extension [3] to get details about the available endpoints;

Please consider that such call requires authentication (as it discloses several data about the given deployment); you can however empower the anonymousUser / anonymousKey values as specified in the security.properties file.

HTH

Regards.

[1] http://syncope.apache.org/rest/2.0/index.html
[2] http://localhost:9080/syncope/rest/
[3] https://syncope.apache.org/docs/reference-guide.html#swagger
-- 
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Member at The Apache Software Foundation
Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
http://home.apache.org/~ilgrosso/