@Mahalakshmi Natarajan I believe you are using the v2.1 version of the REST API based on the "source" parameter used in the body of the request.
In any case, you can't pass the path to your local file through REST API directly. You will have to use a tool like postman or convert your PDF to binary data and use the binary data in the request body along with the header application/pdf
to the analyze API. Here is a screen shot of how you can use local file with REST API.
Choose "binary" as the request body and attach your PDF file in the request. Once the request is submitted you will receive a 202 response with operation location.
Use a GET request with the above operation location and retrieve the result to get the analyzed text of your PDF.
I hope this helps!!
If an answer is helpful, please click on or upvote
which might help other community members reading this thread.