"error": "Body parameter 'names' is missing" with validation api
Hi,
Need assistance with content server api. I get below error when accessing validation api http://extsreamcs1624.lab.opentext.com:8080/OTCS/cs/api/v1/validation/nodes
"error": "Body parameter 'names' is missing"
I added the required data in the body.
{ "parent_id":2000,
"names":["myDocument.doc","myEmail.msg","folder1"]
}
I also tried with the below input in the body. I still get the same error
{\"parent_id\":2000,\"names\":[\"myDocument.doc\",\"myEmail.msg\",\"folder1\"]}
Comments
-
Based on the syntax as specified in the IMPLEMENTATION NOTE of the API Documentation, it seems they are expecting a "body" property in the request body
Hence, we will need to find a way to put a "body" property in the request body.
Here is what I did:
async function testValidation() {let body = {"parent_id": 2000,"names":["myDocument.doc","myEmail.msg","folder1"]};
let reqBody = new FormData();
reqBody.append("body", JSON.stringify(body));
fetch("{your-server-url}/v1/validation/nodes", {
method: "POST",
headers: {
'OTCSTicket': authTicket,
},
body: reqBody
}).then(res => res.json())
.then(data => {
console.log(data)
}).catch(error => {
console.log(error)
})
}
0
Categories
- All Categories
- 122 Developer Announcements
- 53 Articles
- 151 General Questions
- 147 Thrust Services
- 56 OpenText Hackathon
- 35 Developer Tools
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 917 Cloud Fax and Notifications
- 84 Digital Asset Management
- 9.4K Documentum
- 31 eDOCS
- 181 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 8 XM Fax
- Follow Categories