# \[AWX\] \[Rest API\] workflow\_job\_template\_nodes endpoint does not support POST request

**URL:** <https://forum.ansible.com/t/awx-rest-api-workflow-job-template-nodes-endpoint-does-not-support-post-request/2092>\
**Category:** Get Help\
**Tags:** awx\
**Created:** [November 2, 2023, 8:44am UTC](https://forum.ansible.com/t/awx-rest-api-workflow-job-template-nodes-endpoint-does-not-support-post-request/2092 "2023-11-02T08:44:50Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![tom\_capelle](https://avatars.discourse-cdn.com/v4/letter/t/ac8455/32.png) [@tom\_capelle](https://forum.ansible.com/u/tom_capelle)\
**Post date:** [November 2, 2023, 8:44am UTC](https://forum.ansible.com/t/awx-rest-api-workflow-job-template-nodes-endpoint-does-not-support-post-request/2092/1 "2023-11-02T08:44:50Z")

</div>

Hi,

I have an issue with AWX Rest API:

I want to create a new workflow job template node with the REST API. I’ve tried two endpoints:

POST on /api/v2/workflow\_job\_template\_nodes with {“workflow\_job\_template”: 4242, “unified\_job\_template”: 1337} in body

POST on /api/v2/workflow\_job\_templates/4242/workflow\_nodes with {“unified\_job\_template”: 1337} in body

Headers were {“Authorization”: “Bearer SECRET”} (Token with Write scope on the right application)

In both cases I got a 200 response with same result as GET request in body. No node was created.

My **AWX version** is `23.1.0`

**How to reproduce** :

Send POST request to /api/v2/workflow\_job\_template\_nodes with {“workflow\_job\_template”: 4242, “unified\_job\_template”: 1337} in body

OR

POST on /api/v2/workflow\_job\_templates/4242/workflow\_nodes with {“unified\_job\_template”: 1337} in body

workflow\_job\_template 4242 and job\_template 1337 are assumed to exist

Related GitHub Issue with further informations: [[Rest API] workflow\_job\_template\_nodes endpoint does not support POST request · Issue #14599 · ansible/awx · GitHub](https://github.com/ansible/awx/issues/14599)

Thanks by advance for any help

---

<div class="post-metadata">

**Author:** ![djyasin](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/djyasin/32/114_2.png) [@djyasin](https://forum.ansible.com/u/djyasin)\
**Post date:** [November 3, 2023, 5:36pm UTC](https://forum.ansible.com/t/awx-rest-api-workflow-job-template-nodes-endpoint-does-not-support-post-request/2092/2 "2023-11-03T17:36:37Z")

</div>

> [@tom\_capelle](#):
>
> on /api/v2/workflow\_job\_templates/4242/workflow\_nodes with {“unified\_job\_template”: 1337} in body

Hello @tom_capelle,  
Welcome to the Forum!

We would like to get a bit more information from you. Are you able to make any posts via the API?

Thank you for your time!

---

<div class="post-metadata">

**Author:** ![tom\_capelle](https://avatars.discourse-cdn.com/v4/letter/t/ac8455/32.png) [@tom\_capelle](https://forum.ansible.com/u/tom_capelle)\
**Post date:** [November 3, 2023, 6:53pm UTC](https://forum.ansible.com/t/awx-rest-api-workflow-job-template-nodes-endpoint-does-not-support-post-request/2092/3 "2023-11-03T18:53:57Z")

</div>

Hi @djyasin ,

Thank you for your answer.

Yes I am able to do post requests on other endpoints, such as " [/api/v2/job\_templates/]" for example. When I do it, I get a 201 answer and the associated ressource is created. (Or I get a 400 answer if I did something wrong)

What bothers me here is that any request I make with the API to create a workflow\_node seems to be treated as a “get” request, I am not even able to get an error message which indicates me that I am doing something badly.

Curiously, I am able to create a workflow\_node through the UI, and it works just fine even if I can’t see any 201 answer in my web console (see the screenshots posted on the github issue, I can duplicate them here if needed)

Thank you for your time aswell.

---

<div class="post-metadata">

**Author:** ![2and3makes23](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/2and3makes23/32/1406_2.png) [@2and3makes23](https://forum.ansible.com/u/2and3makes23)\
**Post date:** [November 6, 2023, 10:18am UTC](https://forum.ansible.com/t/awx-rest-api-workflow-job-template-nodes-endpoint-does-not-support-post-request/2092/4 "2023-11-06T10:18:04Z")

</div>

I´ve just tried to reproduce your issue with one of our AWX instances, but for me it works. (version 23.3.1)

What I´ve done:  
Go to an already present workflow job template via Browser: /api/v2/workflow\_job\_templates/401/workflow\_nodes/

Send a POST request to that endpoint with data as suggested by the Browser API:

```auto
{
    "extra_data": {},
    "inventory": null,
    "scm_branch": "",
    "job_type": null,
    "job_tags": "",
    "skip_tags": "",
    "limit": "",
    "diff_mode": true,
    "verbosity": null,
    "execution_environment": null,
    "forks": null,
    "job_slice_count": null,
    "timeout": null,
    "unified_job_template": 12345,
    "all_parents_must_converge": false,
    "identifier": "another_node"
}

```

The browser shows a “201 Created” and the expected result is visible within AWX.  
 ![grafik](https://us1.discourse-cdn.com/ansible/original/2X/1/17c0ed97b7fca8d4fa171131a0a62085e702805c.png)

Maybe check, if you supply all required fields to the endpoint. See respective info in the [awx.awx collection documentation](https://docs.ansible.com/ansible/latest/collections/awx/awx/workflow_job_template_node_module.html#ansible-collections-awx-awx-workflow-job-template-node-module) (for the mentioned endpoint, I guess only `identifier` and probably `unified_job_template` are required).

---

<div class="post-metadata">

**Author:** ![tom\_capelle](https://avatars.discourse-cdn.com/v4/letter/t/ac8455/32.png) [@tom\_capelle](https://forum.ansible.com/u/tom_capelle)\
**Post date:** [November 7, 2023, 8:29am UTC](https://forum.ansible.com/t/awx-rest-api-workflow-job-template-nodes-endpoint-does-not-support-post-request/2092/5 "2023-11-07T08:29:49Z")

</div>

After some deeper investigation, we found out that our AWX instance receives GET requests on some endpoints even if we send POST requests, it seems to come from the ingress controller which redirects wrongly our requests, it is not an issue on AWX end.

Sorry for the inconvenience and thank you for the time you spent on my issue.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [December 7, 2023, 8:30am UTC](https://forum.ansible.com/t/awx-rest-api-workflow-job-template-nodes-endpoint-does-not-support-post-request/2092/6 "2023-12-07T08:30:03Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
