Hello everyone,
I'm working with Archivematica since a half year right now and i wanted work more and more with the API. But at the moment I'm stucked with starting a transfer.
Everytime I try to start a transfer via API I get an Internal Server Error.
ERROR 2018-06-18 09:07:28 django.request:base:handle_uncaught_exception:256: Internal Server Error: /api/transfer/start_transfer/
Traceback (most recent call last):
File "/usr/share/archivematica/virtualenvs/archivematica-dashboard/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/share/archivematica/dashboard/components/api/views.py", line 73, in wrapper
result = func(request, *args, **kwargs)
File "/usr/share/archivematica/dashboard/components/api/views.py", line 272, in start_transfer_api
response = filesystem_ajax_views.start_transfer(transfer_name, transfer_type, accession, paths, row_ids)
File "/usr/share/archivematica/dashboard/components/filesystem_ajax/views.py", line 241, in start_transfer
raise ValueError('No transfer name provided.')
ValueError: No transfer name provided.
The JSON I sent looks like this:
{
"name": "Tell",
"type": "standard",
"accession": 1231,
"paths[]": [
"MTUxMWVmOTItODY3MS00MzNiLTk4YTUtZGI2NGE0ZmNjNWU4Oi9tbnQvYXJjaGl2ZW1hdGljYS9zb3VyY2UvRmlyc3REaXI="
],
"row_ids[]": [
""
]
}
As I can say it is very similar with the JSON from the API documentation or from the automation-tool I tested.
Could it be I missed something while forming this JSON? Or could it be a general setting problem on my side? GET and DELETE requests works fine. It is only a problem if I make a POST request with a JSON body.
Maybe already had the same problem like me, but I didn't find something in the user groups here.
I'm looking forward to get some help with this problem.
With kind regards,
Benjamin