Hi John Flavin ,
Thank you so much.
In my case , I really have the assessor (dicom) can be uploaded via Xnat RoiUploadAssistant.
But I have a job needed to upload many assessor (dicoms) automatically via calling api.
I follow your recommendation ,
writing a xml file to try creating the assessors ,
but I still meet some problems.
My curl command (user/pass is fake)
```
curl -X POST '
http://xnat-nginx/data/experiments/XNAT_E00003/assessors?inbody=true' -u fakeUser:fakePass -H 'Content-Type: application/json' -d '{"file": "/var/www/storage/xml/test.xml"}'
```
Should I follow the "Image Assessor Data REST XML Path Shortcuts" , is it right ?
`
https://wiki.xnat.org/xnat-api/image-assessor-data-rest-xml-path-shortcuts`The xml I used is below , but I am not sure is it correct ?
```
<?xml version="1.0" encoding="UTF-8"?>
<xnat xmlns:xnat="
http://xnat-nginx">
<xnat:visit_id>visit_id</xnat:visit_id>
<xnat:date>2024-03-14</xnat:date>
<xnat:time>10:32:27</xnat:time>
<xnat:note>note</xnat:note>
<xnat:pi_firstname>test</xnat:pi_firstname>
<xnat:pi_lastname>test</xnat:pi_lastname>
<xnat:validation_method>test</xnat:validation_method>
<xnat:validation_status>test</xnat:validation_status>
<xnat:validation_date>2024-03-14</xnat:validation_date>
<xnat:validation_notes>test</xnat:validation_notes>
<xnat:last_modified>10:32:27</xnat:last_modified>
<xnat:insert_date>2024-03-14</xnat:insert_date>
<xnat:insert_user>test</xnat:insert_user>
</xnat>
```
I don't know what the "xmlns:xnat={url}" should be ,
but I know `
http://xnat-nginx` can point to my xnat server, same as my curl command.
It returns HTTP 422 Unprocessable Entity
```
<html>
<head>
<title>Status page</title>
</head>
<body>
<h3>org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.</h3><p>You can get technical details <a href="
http://www.webdav.org/specs/rfc2518.html#STATUS_422">here</a>.<br>
Please continue your visit at our <a href="/">home page</a>.
</p>
</body>
</html>
```
`restlet.log` :
```
2024-03-14 07:47:34,681 [http-nio-8080-exec-2] ERROR org.nrg.xnat.restlet.resources.SecureResource - An error occurred parsing the XML
org.xml.sax.SAXParseException: Content is not allowed in prolog.
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1239)
```
The detail of `restlet.log` is attached below.
Hope these can help a bit.
Sincerely
唐國庭
John Flavin 在 2024年3月13日 星期三凌晨12:19:27 [UTC+8] 的信中寫道: