Just try by adding the field "url" to your data. It can be empty as CKAN will complete it for you: p=requests.post('https://data.lab.fiware.org/api/action/resource_create', data={"package_id":"medical-records", "url":""}, headers={"X-CKAN-API-Key": "YOUR_KEY"}, files=[('upload', file('/home/jaime/prueba.txt'))]) Do not forget to restart your API Key as this list is public and anyone will be able to perform any operation in CKAN on your behalf! BR Aitor 2015-12-04 17:49 GMT+01:00 <jaime at infinbox.com>: > Jaime Loureiro sent a message using the contact form at > http://catalogue.fiware.org/. > > Hi, I have a problem with the CKAN API when I try creating a new resource > in > my public domain dataset located on https://data.lab.fiware.org. > > My request in python is: > > import requests > import json > r=requests.post('https://data.lab.fiware.org/api/action/resource_create', > data={"package_id":"medical-records"}, > headers={"X-CKAN-API-Key": > "515f8152-53ae-4e24-97fe-1f15875e9130"}, > files=[('upload', file('/home/jaime/prueba.txt'))]) > > print r.text > print r.status_code > > and I get the next error: > > {"help": > "https://data.lab.fiware.org/api/3/action/help_show?name=resource_create", > "success": false, "error": {"url": ["Missing value"], "__type": "Validation > Error"}} > 409 > > It run fine the last week but suddenly it stopped working and I get before > erorr. My company is in a phase 4 of the FIWARE-FINODEX accelerator program > and it is very important that my application run fine ASAP. Thanks for > your > attention. > > BR > > Since January 1st, old domains won't be supported and messages sent to any > domain different to @lists.fiware.org will be lost. > Please, send your messages using the new domain ( > Fiware-tech-help at lists.fiware.org) instead of the old one. > _______________________________________________ > Fiware-tech-help mailing list > Fiware-tech-help at lists.fiware.org > https://lists.fiware.org/listinfo/fiware-tech-help > -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://lists.fiware.org/private/fiware-tech-help/attachments/20151207/04944f10/attachment.html>
You can get more information about our cookies and privacy policies clicking on the following links: Privacy policy Cookies policy