Incorrect contentAnalyzerRequests json values = 400 status "invalid JSON in request"
Working in Postman and going off of the Postman Collection for that particular service, the problem arises for both HTML to PDF request and Extract PDF requests. I have valid auth bearer token and nothing else seems amiss.
My contentAnalyzerRequests value for HTML to PDF:
{\n \"cpf:inputs\": {\n \"params\": {\n \"cpf:inline\": {\n \"print\": {\n \"includeHeaderFooter\": true\n },\n \"pageLayout\": {\n \"pageHeight\": 8.5,\n \"pageWidth\": 11\n },\n \"json\": \"{\\\"k1\\\": \\\"v1\\\", \\\"k2\\\": \\\"v2\\\"}\"\n }\n },\n \"documentIn\": {\n \"cpf:location\": \"InputFile0\",\n \"dc:format\": \"application/zip\"\n }\n },\n \"cpf:engine\": {\n \"repo:assetId\": \"urn:aaid:cpf:Service-e2ee120a2b06427cb449592f5db967e7\"\n },\n \"cpf:outputs\": {\n \"documentOut\": {\n \"cpf:location\": \"multipartLabelOut\",\n \"dc:format\": \"application/pdf\"\n }\n }\n}
My contentAnalyzerRequests value for Extract PDF:
{\n \"cpf:engine\": {\n \"repo:assetId\": \"urn:aaid:cpf:58af6e2c-1f0c-400d-9188-078000185695\"\n },\n \"cpf:inputs\": {\n \"documentIn\": {\n \"cpf:location\": \"InputFile0\",\n \"dc:format\": \"application/pdf\"\n },\n \"params\": {\n \"cpf:inline\": {\n \"elementsToExtract\": [\n \"text\", \"tables\"\n ],\n \"renditionsToExtract\": [ \"tables\", \"figures\"]\n }\n }\n },\n \"cpf:outputs\": {\n \"elementsInfo\": {\n \"cpf:location\": \"jsonoutput\",\n \"dc:format\": \"application/json\"\n },\n \"elementsRenditions\": {\n \"cpf:location\": \"fileoutpart\",\n \"dc:format\": \"text/directory\"\n }\n }\n}
It could be that I don't understand what I'm doing with regard to these values. Do they need to be adjusted based on whatever PDF is being fed to it?
