https://flyte.org logo
Title
a

Augie Palacios

09/02/2022, 11:38 PM
I have a question about creating an
ExecutionCreateRequest
via a POST to the
/api/v1/executions
endpoint (sorry if this is the wrong place to post this). Having trouble getting the payload for the inputs
LiteralMap
correct
Below is a mock payload for the POST
{
    "project": "flytesnacks",
    "domain": "development",
    "spec": {...},
    "inputs": {
        "literals": {
            "username": {
                "scalar": {
                    "primitive": {
                        "string_literal": "testuser"
                    }
                }
            }
        }
    }
}
I keep getting
invalid username input wrong type
....I'm assuming I am creating the
inputs
object incorrectly. Have played around with omitting keys and things like that but usually get the same error or the admin pod panics and restarts. Any help is much appreciated!
@workflow
def workflow(username: str) -> Union[dict, bool]:
k

Ketan (kumare3)

09/03/2022, 3:53 AM
What language are you using
Prefer to use python Flyte remote, go Use Flyteidl client
a

Augie Palacios

09/05/2022, 1:31 AM
im using python at the moment but was calling the grpc endpoint via
postman
. have my kind cluster forwarding 30081. hitting this endpoint
localhost:30081/api/v1/executions
so just need to get the POST body sorted out
s

Samhita Alla

09/05/2022, 3:55 AM
Can you try
string_value
instead of
string_literal
?
a

Augie Palacios

09/06/2022, 2:09 AM
oof thank you! idk how I mixed that up...appreciate the help Samhita and Ketan