stdout missing from AWX API

Hello

I am trying to get the stdout from the web interface API (I know it is possible to see the stdout on the web API output on the commercial tower )
The job is fine and went trough with full display , however on the API I only have the message :

Job Stdout

GET /api/v2/jobs/623/stdout/
HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: text/plain ;utf-8
Vary: Accept
X-API-Node: awx
X-API-Time: 0.015s

stdout capture is missing

When I go to the job link via API :

http://my_awx_machine/api/v1/jobs/623/stdout/?format=txt_download
Or:
http://my_awx_machine/api/v2/jobs/623/stdout/?format=txt_download

I only can see the message:


{"detail":"Not found."}


Does anyone have any idea why this feature does not work in AWX ?
I was looking into settings and I could not find anything related.


Kid Regards
Piotr







Unfortunately this is a side effect of our current container layout and
it's something that we'll be fixing in the coming weeks. The stdout itself
is stored on the awx_task container but you are making requests on the
awx_web container. We'll just need to make sure the stdout is available in
both places. In the meantime you can see the output on the job detail page
and you can also get the event level detail at /api/v2/jobs/623/job_events

Hello Mathew

Thank you for your quick response.

Yes I know about the other link you posted , however we need a pure ansi/txt/json/html stdout download as on my sample above , due to fact we want to integrate AWX with the external post from jenkins (via tower-cli ).Our python scrip on Jenkins need to be able to read the full stdout otherwise we cannot know if the job is completed of failed and the job on Jenkins dashboard will never be completed.
I will wait for the fix or will try to de-containerize the AWX and run on the same machine.

Kind Regards
Piotr

What are you using to trigger that? You can certainly get the status of the job itself from the api at /api/v2/jobs/n/

tower-cli has code to re-construct stdout from the job_events stdout. This is what we use for the monitor and stdout commands. Since you’re already using it, this might be a shortcut to your objective without waiting on other fixes.

Alan

I was using python scrip to get the job output :

def _get_tower_job_url(job_id, config, output_format):
“”"
Returns the url
“”"
host = config.get(‘general’, ‘host’)
return ‘https://{0}/api/v1/jobs/{1}/stdout/?format={2}’.format(host,
job_id,
output_format)

I will try to adjust the scrip and will let you know the results.

Hi Alan. Thank you , this is probably better idea.
the API in current state can only display 2 formats: api or json.
We wanted that output in html or ansi ( what was possible to display from tower stdout )