Is there a programattic way to list the GPT assistants and the files

Is there an API that can list the existing GPT assistant and the uploaded files. I wanted to check if there is an assistant with the same name available, then will use it else create it.

I got it. It is as below. It can be called through the api also

assistants = openai.beta.assistants.list()