Hi. I tried to solve this with some of the data I have in my lab. You could try using sub-searches and appending the results to the outer search.
First, sub-search does a timechart with a span of 5 minutes for the pageName field. The second sub-search does the average for responseTime by _time (like your original search). And lastly the outer search takes care of the responseCode field with the codes you specified, also a timechart with span=5m.
The results for the two sub-searches get appended to the results for the outer search.
index="webprod" sourcetype=json_auto_timestamp serviceName="/api/more/auth" AND (responseCode=422 OR responseCode=500 OR responseCode=503 OR responseCode=504)
| fields responseCode
| timechart count(responseCode) span=5m by responseCode
| appendcols
[search index="webprod" sourcetype=json_auto_timestamp serviceName="/api/more/auth" AND (pageName="Error : API Failure" OR pageName="Device : Device Wall")
| fields pageName
| timechart span=5m count(pageName) by pageName]
| appendcols
[search index="webprod" sourcetype=json_auto_timestamp serviceName="/api/more/auth"
| fields responseTime
| bin _time span=5m
| stats avg(responseTime) as RspTimeAvg
by _time]
... View more