Sending files to other systems via Rest API

I am new to this system and I would like to know how is the correct way to send files and photos through the APIs for another system.

Thank you.

Hi @viperboys are you referring to the REST Services or just accessing media through the kobo API endpoints?

1 Like

Hi @Josh Through REST service.

Hi @viperboys, you are only able to send JSON or XML through the REST Service. You can however pull the media files using the API endpoints.

1 Like

Hi @Josh
My idea is to send the KoboToolBox data to a website made in WordPress. I tried it and it only worked for me sending basic fields. When I submitted a photo I got an error. So I wanted to know if KoboToolBox could do it. If the answer is yes then I have to check on the WordPress side.

Hi @viperboys, I’m not sure how WordPress will handle things, but from the kobo side, you can see the media attachment URLs by navigating to the /data API V2 endpoint, in the _attachments array for each submission.


Hi @Josh
This is not very clear to me since I am new. Is there anything you can read to learn more about it?

Hi @viperboys, you can get started here on the support page for the API:

And look at the API docs for V2 here:

1 Like

As an example, if I navigate to this URL, this is what I will find for a simple form with a single media upload question:

  "count": 1,
  "next": null,
  "previous": null,
  "results": [
      "_id": 94571949,
      "_notes": [],
      "_validation_status": {},
      "_uuid": "44113165-acdf-448d-b984-f5952d10974b",
      "_tags": [],
      "submit_an_image": "image-8_58_16.jpg",
      "_submitted_by": null,
      "_xform_id_string": "apKQ7eoSRB2Bk8wD2uMjkx",
      "meta/instanceID": "uuid:44113165-acdf-448d-b984-f5952d10974b",
      "formhub/uuid": "03788f6c0cab449aa6e2de65ad271382",
      "end": "2021-05-05T08:58:19.349-07:00",
      "_submission_time": "2021-05-05T15:58:22",
      "_attachments": [
          "mimetype": "image/jpeg",
          "download_small_url": "",
          "download_large_url": "",
          "download_url": "",
          "filename": "joshuaberetta/attachments/03788f6c0cab449aa6e2de65ad271382/44113165-acdf-448d-b984-f5952d10974b/image-8_58_16.jpg",
          "instance": 94571949,
          "download_medium_url": "",
          "id": 33444831,
          "xform": 672795
      "start": "2021-05-05T08:58:06.698-07:00",
      "_geolocation": [
      "_status": "submitted_via_web",
      "__version__": "vLoBqVZebAJpZcDw9kb37c"
1 Like

Thank you… :wink: