Hello everyone,
I'm having problems callling the ContentServer REST API in a WebReport. I've seen examples here in the forum and in the knowledge base (for example https://knowledge.opentext.com/knowledge/llisapi.dll/kcs/kbarticle/view/KB19450624) but I cannot get them to work. Even copying and pasting the samples always gives me the same error.
This is the code I'm using (this is a test to just create a folder with a call to the REST API):
<BR><BR><BR><STRONG>TICKET</STRONG><BR><BR><BR>
[LL_REPTAG_OTCSTICKET /]
<BR><BR><BR><STRONG>HEADER</STRONG><BR><BR><BR>
[LL_REPTAG_{ { 'otcsticket', [LL_REPTAG_OTCSTICKET QUOTE /] } } ASSOCACTION:CREATE SETVAR:header /]
[LL_REPTAG_!header INSPECT /]
<BR><BR><BR><STRONG>PARAMETROS</STRONG><BR><BR><BR>
[LL_REPTAG_{ { "type", 0 }, { "parent_id", 110403 }, { "name", "samplefolder" } } ASSOCACTION:CREATE SETVAR:parms /]
[LL_REPTAG_!parms INSPECT /]
<BR><BR><BR><STRONG>WEBSERVICE</STRONG><BR><BR><BR>
[LL_WEBREPORT_RESTCLIENT
@HOST:our.server.address.com
@PORT:8080
@URI:/OTCS/cs.exe/api/v2/nodes
@METHOD:POST
@TIMEOUT:10
@BODY:[LL_REPTAG_!parms /]
@HEADER:[LL_REPTAG_!header /]
@OUTPUT:ASSOC:SALIDA /]
[LL_REPTAG_!SALIDA INSPECT /]
I always get the same error:
I've also seen some other samples that get the ticket by calling the auth service, those samples retrieve the ticket without problems, but the next call fails.
I'm using version 21.3 of Content Server.
The call using PostMan works without problems, I copy and paste the ticket in a PostMan call with those parameters and it creates the new folder perfectly. This makes me think that there is some problem with the way I'm sending the header, the REST service doesn't seem to find the otcsticket...
Am I doing something wrong? Has anyone got this to work?
Thanks in advance
--
Javier