mchev / laravel-odk

Laravel-ODK is a simple wrapper around the ODK Central API that makes working with its endpoints a breeze!
MIT License
4 stars 1 forks source link

unable to view and edit submissions using the APIs #3

Closed rbhalla81 closed 3 years ago

rbhalla81 commented 3 years ago

I have tried using $submissions = OdkCentral::projects($projectId)->forms($formId)->submissions()->get();

but this just returns the metadata. Unable to retrieve the submission to view on the blade/laravel view.

Also, tried using the $submissionsmeta = OdkCentral::projects($projectId)->forms($xmlFormId)->submissions($instanceId)->xml(); This only returns a token.

Mchev\LaravelOdk\OdkCentralRequest {#1459 ▼
  +api_url: "https://my-odk-central-domain.odk/v1"
  -response: null
  -token: "e275L5b!A7aaaaaaaaaaaaj5GPXcQV9Dpww"

} But unable to download or edit the submissions/ responses.

Please help & guide.

mchev commented 3 years ago

For your information, the issues section is not intended to assist people with usage, but to report errors in the code or version problems. You can always improve this package while creating a pull request.

As described, this package is only a wrapper of the api, so refer to the ODK Central Api doc to find what you need : https://odkcentral.docs.apiary.io/#reference/submissions/submissions

If you want to get or download the xml, just add ->download() method at the end of your request.

rbhalla81 commented 3 years ago

Thanks for the response. Noted your point.