KoBo API examples, using new KPI endpoints

Welcome to the community, @sulimandanish! Would you mind providing more details on odoo modules, so that the community should be able to help you if possible?

sir i wana integrate my odoo modules such as activity_extension module or program management module so that user can enter data and that data is available on data base as kobotollbox works but the form data is also available on our database

Hey man, I wanted to say you are a lifesaver. How the hell was I supposed to know how to upload a .xlsx file to /api/v2/imports. I couldn’t find it in the documentation anyway.

Cheers!

For me this worked:
https://kf.kobotoolbox.org/api/v2/assets/aYPF4AcaS2kRtrustmeamfake/data.json

1 Like

Welcome to the community, @jicuby! Thank you for sharing this with the entire community and making the community rich with documentation :clap: Expecting the same in the upcoming days too :heart:

Thank you for your response
sir basically i want to integrate kobotoolbox with ERP system to fetch submitted data from kobotoolbox forms and deploy them on ERP system but i am not able to fetch data from kobo API’s on postman once i got data from API’s it will be easy to deploy on ERP.Sir basically there is no any proper documentation through which i can fetch data from API’s in json format. Sir if possible kindly guide.Thank You Sir…

hi guys I want to access kobo toolbox data in my web site and I try to access in JavaScript ajax

the code is

$.ajax({
                 type: 'Get',
                 url: 'https://kf.kobotoolbox.org/assets/a7GG9SXYtLTCS4FLm4mjjP/submissions/?format=json',
                 dataType : 'jsonp',
                 success: function(data) {
                  console.log(data);
                 },
                 error: function(data) {
                     console.log("error");
                 }
              });

https://kf.kobotoolbox.org/assets/a7GG9SXYtLTCS4FLm4mjjP/submissions/?format=json <---- when I write this URL on web browser it retrieve JSON data but in JavaScript i can’t access it

I have the same issue. Do you find a solution? Thanks!

Thanks @jnm for sharing this.
Could anyone advise how to use partial_submissions:“make partial actions on submitted data for asset for specific users” .
I tried many times but couldn’t develop the correct code.

best

@Josh i am struggling with the redeployment api, after i pull my version_id and make the PATCH request i keep getting a 500 server error. here is a snippet of my code, what could be the issue

const formData = new URLSearchParams();
formData.append('version_id', versionId);
                formData.append('active', true.toString());
                    return fetch('https://kf.kobotoolbox.org/api/v2/assets/aHZVifqvuT9dbi7YKYJhw7/deployment/', {
                        method: 'PATCH',
                        headers: {
                          'Accept': 'application/json',
                          'Authorization': 'Token <My Token>',
                        },
                        body: formData,
                      })
                        .then(response => response.json())
                        .then(data => {
                          console.log('Redeployed successfully');
                        })
                        .catch(error => console.error('Error:', error));