Our community is getting a makeover! We will be migrating to a new community that integrates more closely with our support and knowledge base tools, as well as the core Domino product, to give you a more unified experience. Existing community articles have been added to our knowledge base, which you can preview here with your community credentials: https://tickets.dominodatalab.com/hc/en-us/community/topics Watch this space for further updates and send any feedback to [email protected] with subject "Community Feedback".

How to request.get file from FILE directory using Domino API

sean.mcclure Member Posts: 2
edited November 2020 in Q&A

Trying to figure out how to read data from the FILE directory in a Domino Project, through a published Model API.

I am currently using the Domino API to make a request, since any python invoked by the model API is inside an executor at runtime, and thus doesn't have direct access to the FILE directory.

This is my code:

from domino import Domino

import requests

def fetch_file(filename):

headers = {'X-Domino-Api-Key': 'my_api_key'}

request = requests.get('https://domino.my_comp_url.com/v1/projects/my_username/project_name/data/' + filename + '.json', headers=headers, verify=False)


But this doesn't work. Domino API seems to suggest using Blobs, but I would need the Blob ID and not sure where to find that.


  • katie.shakman
    katie.shakman Administrator, Domino Posts: 258 admin

    Hi @sean.mcclure,

    I noticed this was still open -- from our records I believe you worked with @akshay.ambekar to resolve your model API usage questions. Indeed, by default your model can access files in the Domino project directly by path, as those files are included when the model container is built. If you still have any issues accessing files from your model APIs please let us know.


    Field Data Scientist @ Domino

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!