Skip to content
This repository has been archived by the owner on Nov 20, 2024. It is now read-only.

Add support to push data up to CKAN #78

Open
paulkilla opened this issue Dec 4, 2016 · 1 comment
Open

Add support to push data up to CKAN #78

paulkilla opened this issue Dec 4, 2016 · 1 comment

Comments

@paulkilla
Copy link

paulkilla commented Dec 4, 2016

What are peoples thoughts on adding functionality to push data back up to CKAN (data.gov.au)

Some sample php code:

$ch = curl_init();
curl_setopt_array($ch, array(CURLOPT_HTTPHEADER => array('Expect: ', 'Authorization:   '.rawurlencode($this->api_key), 'X-CKAN-API-Key: '.rawurlencode($this->api_key)),
CURLOPT_HEADER => FALSE,
CURLOPT_USERAGENT => "CKAN PHP Updater",
CURLOPT_URL => $this->ckan_base_url."/api/action/package_create",
CURLOPT_POST => TRUE,
CURLOPT_POSTFIELDS => json_encode($dataset_create_vars),
CURLOPT_RETURNTRANSFER => TRUE));

$response = curl_exec($ch);
curl_close($ch);

The next question would be how does the data get formatted to be pushed back up?

@Podgkin
Copy link

Podgkin commented Sep 5, 2017

its a great idea which could potentially help agencies keep their data.gov datasets up to date. It would also potentially make a great deal of sense to go along with something like content hub, basically allowing data.gov to be a content end point.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants