IATI / ckanext-iati

CKAN extension for the IATI Registry
http://iatiregistry.org
9 stars 6 forks source link

Issue - can't publish from AidStream #361

Closed amy-silcock closed 3 years ago

amy-silcock commented 3 years ago

The European Forest Institute has an active account on the IATI Registry and want to publish data direct from AidStream ( https://aidstream.org)

In AidStream their Publisher ID and API Key are correct, AidStream has verified this and I have also checked.

However, when they come to publish their activities they get the message

image

Please can you investigate why this error is occurring and fix it? AidStream can't find anything on their end.

@gtkChop I'll copy you in to the message with AidStream.

amy-silcock commented 3 years ago

Hi,

The organisation's account on the IATI Registry is: https://www.iatiregistry.org/publisher/efi The users can't publish any files from AidStream, neither activity nor organisation files

ss-bhat commented 3 years ago

@amy-silcock

I can publish the dataset for publisher efi with admin rights.

May I know what is the error they are getting? Are files are published by authorized users? (User must be a member of the organization efi with editor or admin roles)

andreaszenasidi commented 3 years ago

@jodiegardiner this is the ticket for the ongoing discussion in Zendesk. Aidstream is getting a 409: Conflict (e.g. name already exists) error when they try to call the package_create API endpoint (https://iatiregistry.org/api/action/package_create). Waiting for the AidStream devs to share the POST.

PetyaKangalova commented 3 years ago

@jodiegardiner this is the response I got from Aidstream and also copied you in the ticket

This issue is related to the prior 409: Conflict (e.g. name already exists) issue and I have included the log below as requested by Jodie.

This is the payload our application is making to the IATI API. ["{\"title\":\"European Forest Institute Activity File\",\"name\":\"efi-activities\",\"author_email\":\" helpdesk@efi.int\",\"owner_org\":\"efi\",\"license_id\":\"other-open\",\"resources\":[{\"format\":\"IATI-XML\",\"mimetype\":\"application\/xml\",\"url\":\"https:\/\/aidstream.s3.us-west-2.amazonaws.com\/xml\/efi-activities.xml\"}],\"filetype\":\"activity\",\"country\":\"\",\"data_updated\":\"2021-09-15 07:55:06\",\"language\":\"en\",\"verified\":\"no\",\"state\":\"active\",\"activity_count\":1}https://iatiregistry.org/api/action/package_create"]

ss-bhat commented 3 years ago

@PetyaKangalova @jodiegardiner

Please see the dataset: https://iatiregistry.org/dataset/efi-activities

Since there is already a dataset with the name efi-activities, you cannot create another dataset with the same name.

If you are trying to update the existing dataset use the package_update endpoint else please create a dataset with a different name.

Please let me know if you have any questions. Thanks

jodiegardiner commented 3 years ago

@gtkChop

No, the problem is still there. This dataset was created recently using a post request from the command line to prove that a) the api worked and b) the payload was valid. There is still a 409 error when trying to post from Aidstream (but only for this publisher).

andreaszenasidi commented 3 years ago

@gtkChop @jodiegardiner Thanks for looking into this. AidStream found out the issue was at their end, was related to the admin user's email address which had an extra space. They updating the error message to be more accurate in the future. The publisher can publish now successfully.