How to submit "Submission" or workflow using APIs(Documentation too short)

Hi Team,

I need your help to guide me as how to trigger submission using APIs.

I do understand there is "Create a submission" API as "POST /api/workspaces/{workspaceNamespace}/{workspaceName}/submissions" but somehow I'm not able to get as what to write in "submission" field?
Do we need to write method name only? then where to provide "Sample" to perform the analysis? Please provide some sample to trigger analysis if possible.



  • dheimandheiman ✭✭ Member, Broadie ✭✭

    Hi @ssb_cromwell, you may want to check out FISS. It wraps the majority of API calls into both a command-line client and importable python library.

  • ssb_cromwellssb_cromwell Member

    Sure @dheiman, I'll check on this.

    Actually, I'm trying to orchestrate REST services using HTTP for AWS Lambda. That's the reason I'm exploring "!/Submissions/createSubmission" to call HTTP based services. Does FISS provide that capability?

  • dheimandheiman ✭✭ Member, Broadie ✭✭

    FISS is a python package that installs the required credentialing tools (google-cloud-sdk), and provides python bindings to the FireCloud API, including calls involved with running workflows. So if you're asking if it's possible to use it as a tool to orchestrate running FireCloud workflows, the answer is unequivocally yes.

  • ssb_cromwellssb_cromwell Member

    @dheiman, I'm might sound like being lazy but we need quick turnaround on this. Do you have any sample function implementing FISS to call some API? it will quickly tell us how to provide firecloud creds and other required details to trigger API. OR any function invoking FISS can also help!

  • dheimandheiman ✭✭ Member, Broadie ✭✭

    FISS will automatically detect your credentials and use them.

    Simply run the following, and select the account used for FIreCloud:
    gcloud auth login
    gcloud auth application-default login

  • ssb_cromwellssb_cromwell Member

    Thanks for response @dheiman, we are using python lib on AWS lambda to programmatically trigger API calls from python function.

  • dheimandheiman ✭✭ Member, Broadie ✭✭
    edited March 7

    FISS actually has high-level functions that call the low-level API functions. One that is specifically for orchestration is It reads in a DOT file defining how multiple workflows interact, and then runs the ones that can be run, depending on available data, to completion, kicking off new workflows as their dependencies complete.

  • dheimandheiman ✭✭ Member, Broadie ✭✭

    FISS uses google-auth to handle authentication

  • ssb_cromwellssb_cromwell Member

    Thanks @dheiman, I think I can also look at tests folder which are having some HL n low-level usage examples

  • dheimandheiman ✭✭ Member, Broadie ✭✭

    A pattern we've used occasionally, especially if only using HL calls is the following:

    from firecloud.fiss import main as call_fiss
    def fissfc(*args):
        return call_fiss(["fissfc", "-V", "-y"] + list(args))

    then the fissfc() function works very much like running the fissfc CLI, with automatic confirmation of commands that would normally prompt (-y), and increased verbosity to debug errors (-V).

Sign In or Register to comment.