When trying to export a bundle containing only one service (and dependencies), mapping about parent folder id show up but not folder definition (which is normal as not requested).
<l7:Item> <l7:Name>PingFederate_STS</l7:Name> <l7:Id>c630da68059b12c41a24f8f9df4dc70f</l7:Id> <l7:Type>SERVICE</l7:Type> <l7:TimeStamp>2017-05-16T11:26:17.797+02:00</l7:TimeStamp> <l7:Resource> <l7:Service id="c630da68059b12c41a24f8f9df4dc70f" version="52"> <l7:ServiceDetail folderId="d3dfe996ca7aba6eea79e7cf2dd9df90" id="c630da68059b12c41a24f8f9df4dc70f" version="52">
<l7:Mapping action="NewOrExisting" srcId="d3dfe996ca7aba6eea79e7cf2dd9df90" srcUri="https://xsnl50b491a.pharma.aventis.com:7443/restman/1.0/folders/d3dfe996ca7aba6eea79e7cf2dd9df90" type="FOLDER"> <l7:Properties> <l7:Property key="FailOnNew"> <l7:BooleanValue>true</l7:BooleanValue> </l7:Property> </l7:Properties> </l7:Mapping>
As we can't "MapByName" this folder, becuase folder definition is not included, if we then add "requireFolder" along with "service" query params, the mentioned folder does not show up in resulting bundle.
This is the command initiated:
/usr/bin/curl -k -X GET -H "L7-key-passphrase: foobar" -H "Accept: application/xml" -H "Content-Type: application/xml" -u "username:password" --cacert /etc/pki/tls/private/CA_chain.pem "https://apidev-eu-int.sanofi.com:7443/restman/1.0/bundle?requireFolder=d3dfe996ca7aba6eea79e7cf2dd9df90&service=c630da68059b12c41a24f8f9df4dc70f&includeDependencies=true&encassAsPolicyDependency=true&encryptSecrets=true" --output "/var/tmp/restapi_comm31404.xml"
What are we doing wrong here ?
The restman command you included has the "requireFolder" which is not a valid option and is ignored. If you are looking for the folder you have to use "folder".
Director, CA Support
Restman documentation mention this parameter:
to the request url.
The require folder parameter will only take effect if the folder is already included in the bundle export. By having the following in your bundle parameters:
Thank you Victor for the insight.
Phillipe, I've tested it in our lab and it should accomplish what you are looking for. Please let us know if it does.
Thanks. It Works
Deep inside our administration framework it now does:
callGETService -h "L7-key-passphrase: zepass" "/bundle?service=c630da68059b12c41a24f8f9df4dc70f&folder=d3dfe996ca7aba6eea79e7cf2dd9df90&requireFolder=d3dfe996ca7aba6eea79e7cf2dd9df90&includeDependencies=true&encassAsPolicyDependency=true&encryptSecrets=true"
Single service is exported along with Folder mapping and definition. Just had to "MapByName" folder and it does the job.
Kindly suggest to amend the RESTman documentation on this one
That is great to hear. We will definitely look to outline this in our documentation.