Unable to create a workflow template using http request #11821
-
I am using Http POST method to create a argo workflow template , but i am getting invalid character response . I could not able to find proper documentation related to it . Can you please help me in how to create workflow template via HTTP request call . I tried content-type as both JSON and YAML . Note: If I am using the same template data via argo cli I could able to create it successfully. POST URL : https://localhost:2746/api/v1/workflow-templates/argo Template data : apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
name: workflow-template-whalesay-template
spec:
entrypoint: whalesay-template
templates:
- name: whalesay-template
inputs:
parameters:
- name: message
container:
image: docker/whalesay
command:
- cowsay
args:
- "{{inputs.parameters.message}}" |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You're getting a 400 error per the screenshot.
I'm not sure if YAML You also have your
If you turn on debug logging, the CLI will print out the request it's making to the API. |
Beta Was this translation helpful? Give feedback.
You're getting a 400 error per the screenshot.
invalid character 'a'
refers to the first character in your YAML file (the 'a' inapiVersion
).I'm not sure if YAML
Content-Type
is supported. You can use JSON, but you must convert the file to a JSON file. The first character in JSON is an opening brace{
.You also have your
Body
set tobinary
in Postman, but I think you wantraw
.If you turn on debug logging, the CLI will print out the request it's making to the API.