{{sidenavigation.sidenavigationExpandLabel}}
{{getMsg('Help_YouAreHere')}}: {{page.title}} {{page.title}}
{{$root.getMsg("downLoadHelpAsPdf")}} {{helpModel.downloadHelpPdfDataStatus}}

Publishing

Comparisons can only be shared if a comparison name has been set and the owner has the permissions to publish comparisons. The owner can grant and revoke access to a comparison using the commands publish and unpublish. Shared (aka published) comparisons can be accessed by every user that can authenticate against the server and has access to the Comparison Module.

GET /api/comparison/<GUID>/publish

Grants access to the specified comparison to other users. The response contains a URL to the shared comparison. The request can be executed multiple times to receive the URL again.

REQUEST Parameter Value Description
format html Defines the type of the response
json (default)
onetime false (Default) If true the published comparison will be automatically removed if no longer viewed by any user. This holds true even if a title is set for the comparison. If false the comparison will just be published. The default removal rules will apply.
true
RESPONSE Fields Value Type Description
isPublic boolean TRUE, if published
sharedLink URL Share-URL of the comparison

Example Request: json-format

# Request
# Use user:password for authorization
GET /api/comparison/3lw250npgu9903b4nwp6mzr6k/publish?format=json HTTP/1.1
Accept: application/json
Authorization: Bearer VGhpcyBpcyBqdXN0IGEgZGVtbyBhY2Nlc3MgdG9rZW4u
 
# Response
HTTP/1.1 200 OK
Content-Type: application/json
{
  "isPublic"   : true,
  "sharedLink" : "http://myserver.com/comparison/3lw250npgu9903b4nwp6mzr6k"
}

Example Request: plain-format

# Request
# Use user:password for authorization
GET /api/comparison/3lw250npgu9903b4nwp6mzr6k/publish HTTP/1.1
Authorization: Bearer VGhpcyBpcyBqdXN0IGEgZGVtbyBhY2Nlc3MgdG9rZW4u
 
# Response
HTTP/1.1 200 OK
Content-Type: plain/text
http://myserver.com/comparison/3lw250npgu9903b4nwp6mzr6k

Application Example

# Browser access: use the following URL
http://127.0.0.1:9900/api/comparison/TG9yZW0gaXBzdW0gZG9sb3Igc2l0IG1ldC4/publish
 
# Shell access using curl
curl -Lsu <USERNAME>:<PASSWORD> 'http://127.0.0.1:9900/api/comparison/TG9yZW0gaXBzdW0gZG9sb3Igc2l0IG1ldC4/publish'
i-net PDFC
This application uses cookies to allow login. By continuing to use this application, you agree to the use of cookies.


Help - /<GUID>/publish