update record using ServiceAPI get 500 error

I was trying to update record using ServiceAPI /Record get 500 error in the DemoDB

- first I upload a file to server using /UploadFile service, it works fine,

- then I when I try to update a record using /Record service with some JSON like this

{
    "Uri":5762,
    "RecordTitle": {
        "Value": "My Title"
    },
    "RecordFilePath": "c:\junk\my file.docx"
}

Then I get a 500 server error.

Furthermore, if I run the same functions with my own test dataset, all works fine.

Can someone shed some lights, appreciate it.

Tags:

  • 0  

    Hi James,

    Possible serialization error? The above doesn't show as valid JSON.

    Does double escaping the path help?

    If you let us know the CM version I can then try on one of my test machines.

    -Scotty

  • 0 in reply to   

    Thanks for your response,  the CM version is 23.4 , the JSON is just a sample,  the RecordFilePath is point to my server path, the actual JSON:

    {"makeNewRevision":true,"RecordFilePath":{"Value":"ForUser\\45\\1660\\G07_14_TRIM User Forum 2007 - New Zealand.PPT"},"RecordRecordType":{"Uri":2},"properties":["RecordTitle","RecordNumber"],"Uri":347}

    as I test the same function with another test dataset I created myself, it works fine, is it possible the permission or configuration issue?

  • 0   in reply to 

    Thanks for confirming James.

    I wouldn't expect it to be a permission or configuration issue in Content Manager as they are normally a 400 type error with the response returning a JSON payload with the relevant error message.

    E.g. If I leave off a required property its a 400 back with the below.

    500 I'd tend to lead towards an IIS issue of sorts (Internal Server Error).

    Does your IIS logs show anything by chance or windows event log on the server in question?

    -Scotty