<h2>API – usage of "arraySupport" parameter</h2><br/><div style="overflow-x:auto"><p style="margin: 0cm 0cm 1.15pt; text-indent: 0cm; line-height: 107%; font-size: 10pt; font-family: Arial, sans-serif; color: #183147;"><span style="font-family: helvetica; color: black; font-size: 10pt;">The argument “arraySupport” can be used for XML, JSON or YAML files to uniquely identify a data item in an array.</span></p> <p style="margin: 0cm 0cm 0.6pt -0.25pt; text-indent: -0.5pt; line-height: 112%; font-size: 10pt; font-family: Arial, sans-serif; color: #183147;"><span style="font-family: helvetica; color: black; font-size: 10pt;">The argument should be set to “true” (“arraySupport=true”) in the API call to display the file in an array.</span></p> <p style="margin: 0cm; text-indent: 0cm; line-height: normal; font-size: 10pt; font-family: Arial, sans-serif; color: #183147;"><span style="font-family: helvetica; color: black; font-size: 10pt;"> </span></p> <p style="margin: 0cm; text-indent: 0cm; line-height: normal; font-size: 10pt; font-family: Arial, sans-serif; color: #183147;"><span style="font-family: helvetica; color: black; font-size: 10pt;">With the API parameter arraySupport=true, </span></p> <ul style="margin-bottom: 0cm; margin-top: 0px; list-style-position: inside;"><li style="font-family: Calibri, sans-serif; color: black; font-size: 10pt;"><span style="font-family: helvetica; font-size: 10pt;">A CDS which has array nodes holds more metadata which is related to the </span><span style="font-family: helvetica; font-size: 10pt;">array typed data.</span></li><li style="font-family: Calibri, sans-serif; color: black; font-size: 10pt;"><span style="font-family: helvetica; font-size: 10pt;">Additional fields such as "swgl_flavor_key" and "swgl_nq_name" are added in the JSON structure to the CDS which will help the parser to deal with the array typed data.</span></li><li style="font-family: Calibri, sans-serif; color: black; font-size: 10pt;"><span style="font-family: helvetica; font-size: 10pt;">These fields will be in the JSON when the parser is working and are dropped before the export.</span></li><li style="font-family: Calibri, sans-serif; color: black; font-size: 10pt;"><span style="font-family: helvetica; font-size: 10pt;">If you are applying any logic in the parser with arraySupport=true, like an iteration to run on all CDIs, then these fields should be skipped in the parser code.</span></li></ul> <p style="margin: 0cm 0cm 0cm 36pt; text-indent: 0cm; line-height: normal; font-size: 10pt; font-family: Arial, sans-serif; color: #183147;"><span style="font-size: 10pt; font-family: helvetica; color: windowtext;"> </span></p> <p style="margin: 0cm 0cm 0.6pt -0.25pt; text-indent: -0.5pt; line-height: 112%; font-size: 10pt; font-family: Arial, sans-serif; color: #183147;"><span style="text-decoration: underline; font-size: 10pt;"><span style="line-height: 112%; font-family: helvetica; color: black; text-decoration: underline;">Example parser logic in JavaScript</span></span></p> <p style="margin: 0cm 0cm 0.6pt -0.75pt; text-indent: 0cm; line-height: 112%; font-size: 10pt; font-family: Arial, sans-serif; color: #183147;"><span style="font-family: helvetica; color: black; font-size: 10pt;"> </span></p> <table class="MsoTableGrid" style="margin-left: -0.25pt; border-collapse: collapse; border: none; height: 130px;" border="1" width="794" cellspacing="0" cellpadding="0"><tbody><tr><td style="width: 777px; border: 1pt solid windowtext; padding: 0cm 5.4pt;" valign="top"> <p style="margin: 0cm 0cm 0.6pt 0.5pt; text-indent: -0.5pt; line-height: 112%; font-size: 10pt; font-family: Arial, sans-serif; color: #183147;"><span style="line-height: 112%; font-family: helvetica; color: black; font-size: 10pt;">...</span></p> <p style="margin: 0cm 0cm 0.6pt 0.5pt; text-indent: -0.5pt; line-height: 112%; font-size: 10pt; font-family: Arial, sans-serif; color: #183147;"><span style="line-height: 112%; font-family: helvetica; color: black; font-size: 10pt;">for (var key in node) {</span></p> <p style="margin: 0cm 0cm 0.6pt 0.5pt; text-indent: -0.5pt; line-height: 112%; font-size: 10pt; font-family: Arial, sans-serif; color: #183147;"><span style="line-height: 112%; font-family: helvetica; color: black; font-size: 10pt;"> if (key == "swgl_nq_name" || key == "swgl_flavor_key"){</span></p> <p style="margin: 0cm 0cm 0.6pt 0.5pt; text-indent: -0.5pt; line-height: 112%; font-size: 10pt; font-family: Arial, sans-serif; color: #183147;"><span style="line-height: 112%; font-family: helvetica; color: black; font-size: 10pt;"> continue;</span></p> <p style="margin: 0cm 0cm 0.6pt 0.5pt; text-indent: -0.5pt; line-height: 112%; font-size: 10pt; font-family: Arial, sans-serif; color: #183147;"><span style="line-height: 112%; font-family: helvetica; color: black; font-size: 10pt;"> }</span></p> <p style="margin: 0cm 0cm 0.6pt 0.5pt; text-indent: -0.5pt; line-height: 112%; font-size: 10pt; font-family: Arial, sans-serif; color: #183147;"><span style="line-height: 112%; font-family: helvetica; color: black; font-size: 10pt;"> ...</span></p> <p style="margin: 0cm 0cm 0.6pt 0.5pt; text-indent: -0.5pt; line-height: 112%; font-size: 10pt; font-family: Arial, sans-serif; color: #183147;"><span style="line-height: 112%; font-family: helvetica; color: black; font-size: 10pt;">}</span></p> <p style="margin: 0cm 0cm 0.6pt 0.5pt; text-indent: -0.5pt; line-height: 112%; font-size: 10pt; font-family: Arial, sans-serif; color: #183147;"><span style="line-height: 112%; font-family: helvetica; color: black; font-size: 10pt;">...</span></p> </td></tr></tbody></table> <p style="margin: 0cm 0cm 0.6pt -0.25pt; text-indent: -0.5pt; line-height: 112%; font-size: 10pt; font-family: Arial, sans-serif; color: #183147;"><span style="line-height: 112%; font-family: helvetica; font-size: 10pt;"> </span></p> <p style="margin: 2.65pt 0cm 0.85pt -0.25pt; line-height: 107%; text-indent: -0.5pt; font-size: 10pt; font-family: Arial, sans-serif; color: #183147;"><span style="line-height: 107%; color: black; font-family: helvetica; font-size: 10pt;"> </span></p> <h1 style="margin: 0cm; text-indent: 0cm; line-height: 107%; break-after: avoid; font-size: 15pt; font-family: Cambria, serif; color: #183147; font-weight: normal;"><span style="font-family: helvetica; font-size: 10pt;"><u><span style="line-height: 107%; color: black;">Exampl</span></u><u><span style="line-height: 107%; color: black;">e </span></u><u><span style="line-height: 107%; color: black;">cURL</span></u><span style="line-height: 107%; color: black;"> </span></span></h1> <p style="margin: 0cm; text-indent: 0cm; line-height: 107%; font-size: 10pt; font-family: Arial, sans-serif; color: #183147;"><span style="font-family: helvetica; color: black; font-size: 10pt;"> </span></p> <table class="MsoTableGrid" style="border-collapse: collapse; border: none; height: 59px; width: 798px;" border="1" width="710" cellspacing="0" cellpadding="0"><tbody><tr style="height: 56px;"><td style="width: 781px; border: 1pt solid windowtext; padding: 0cm 5.4pt; height: 56px;" valign="top"> <p style="margin: 0cm; text-indent: 0cm; line-height: 107%; font-size: 10pt; font-family: Arial, sans-serif; color: #183147;"> </p> <p style="margin: 0cm; text-indent: 0cm; line-height: 107%; font-size: 10pt; font-family: Arial, sans-serif; color: #183147;"><span style="font-family: helvetica; color: black; font-size: 10pt;">curl -X POST https://tenantName.sweagle.com/api/v1/tenant/metadata-parser/parse -H "Authorization: bearer aToken" --data-binary "mds={mdsName}&parser=returnDataForNode&arg=&args{args1}&mdsArgs=&format=YAML&tag=&mdsTags=&arraySupport=true"</span></p> </td></tr></tbody></table> <p style="margin: 0cm; text-indent: 0cm; line-height: 107%; font-size: 10pt; font-family: Arial, sans-serif; color: #183147;"><span style="font-family: helvetica; color: black; font-size: 10pt;"> </span></p> <p style="margin: 0cm 0cm 1.15pt; text-align: justify; text-indent: 0cm; line-height: 107%; font-size: 10pt; font-family: Arial, sans-serif; color: #183147;"><span style="font-family: helvetica; color: black; font-size: 10pt;"> </span></p> <p style="margin: 0cm; text-align: justify; text-indent: 0cm; line-height: 107%; font-size: 10pt; font-family: Arial, sans-serif; color: #183147;"><span style="font-family: helvetica; font-size: 10pt;"><u><span style="line-height: 107%; color: black;">Example Response</span></u></span></p> <p style="margin: 0cm; text-align: justify; text-indent: 0cm; line-height: 107%; font-size: 10pt; font-family: Arial, sans-serif; color: #183147;"><span style="font-size: 10pt; line-height: 107%; font-family: helvetica; color: black;"> </span></p> <table class="MsoTableGrid" style="border-collapse: collapse; border: none; width: 793px; height: 282px;" border="1" cellspacing="0" cellpadding="0"><tbody><tr><td style="width: 776px; border: 1pt solid windowtext; padding: 0cm 5.4pt;" valign="top"> <p style="margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-family: helvetica; font-size: 10pt;"><span class="normaltextrun"><span style="color: black;">allowHTTPStraffic: "false"</span></span><span class="eop"><span style="color: black;"> </span></span></span></p> <p style="margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-family: helvetica; font-size: 10pt;"><span class="normaltextrun"><span style="color: black;">assignedComponents:</span></span><span class="eop"><span style="color: black;"> </span></span></span></p> <p style="margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-family: helvetica; font-size: 10pt;"><span class="normaltextrun"><span style="color: black;"> core:</span></span><span class="eop"><span style="color: black;"> </span></span></span></p> <p style="margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-family: helvetica; font-size: 10pt;"><span class="normaltextrun"><span style="color: black;"> enabled: "true"</span></span><span class="eop"><span style="color: black;"> </span></span></span></p> <p style="margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-family: helvetica; font-size: 10pt;"><span class="normaltextrun"><span style="color: black;"> scriptExecutor:</span></span><span class="eop"><span style="color: black;"> </span></span></span></p> <p style="margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-family: helvetica; font-size: 10pt;"><span class="normaltextrun"><span style="color: black;"> enabled: "true"</span></span><span class="eop"><span style="color: black;"> </span></span></span></p> <p style="margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-family: helvetica; font-size: 10pt;"><span class="normaltextrun"><span style="color: black;"> vault:</span></span><span class="eop"><span style="color: black;"> </span></span></span></p> <p style="margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-family: helvetica; font-size: 10pt;"><span class="normaltextrun"><span style="color: black;"> enabled: "true"</span></span><span class="eop"><span style="color: black;"> </span></span></span></p> <p style="margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-family: helvetica; font-size: 10pt;"><span class="normaltextrun"><span style="color: black;">allowHTTPtraffic: "false"</span></span><span class="eop"><span style="color: black;"> </span></span></span></p> <p style="margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-family: helvetica; font-size: 10pt;"><span class="normaltextrun"><span style="color: black;">IPinternal: 10.0.0.0</span></span><span class="eop"><span style="color: black;"> </span></span></span></p> <p style="margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-family: helvetica; font-size: 10pt;"><span class="normaltextrun"><span style="color: black;">deployed:</span></span><span class="eop"><span style="color: black;"> </span></span></span></p> <p style="margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-family: helvetica; font-size: 10pt;"><span class="normaltextrun"><span style="color: black;"> sweagleCore:</span></span><span class="eop"><span style="color: black;"> </span></span></span></p> <p style="margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-family: helvetica; font-size: 10pt;"><span class="normaltextrun"><span style="color: black;"> buildVersion:</span></span><span class="eop"><span style="color: black;"> </span></span></span></p> <p style="margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-family: helvetica; font-size: 10pt;"><span class="normaltextrun"><span style="color: black;"> buildTypeName: Sweagle_CoreMaster</span></span><span class="eop"><span style="color: black;"> </span></span></span></p> <p style="margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-family: helvetica; font-size: 10pt;"><span class="normaltextrun"><span style="color: black;"> buildNbr: 269</span></span><span class="eop"><span style="color: black;"> </span></span></span></p> </td></tr></tbody></table> <p style="margin: 0cm; text-align: justify; text-indent: 0cm; line-height: 107%; font-size: 10pt; font-family: Arial, sans-serif; color: #183147;"><span style="font-family: helvetica; color: black; font-size: 10pt;"> </span></p></div>