Description
I understand the default answer to requests is HTML.
When a request to
https://<pygeoapi_installation>/jobs/<job_id>
is performed it returns an JSON formatted response.
To get the HTML the following must be requested:
https://<pygeoapi_installation>/jobs/<job_id>?f=html
In the response the JSON includes a links attribute, with one element, whose type is application/json,
and the href is https://<pygeoapi_installation>/jobs/<job_id>/results
The link returns an HTML page.
To get the JSON the following href must be requested: https://<pygeoapi_installation>/jobs/<job_id>/results?f=json
Steps to Reproduce
Using the hello-world example and curl.
Initial request:
$ curl -i -k -L -X POST "http://localhost:5000/processes/hello-world/execution" -H "Content-Type: application/json" -d '{ "inputs":{"name": "Tom", "message": "test"}} '
HTTP/1.1 200 OK
Server: Werkzeug/3.1.5 Python/3.12.12
Date: Tue, 26 May 2026 07:23:46 GMT
Content-Type: application/json
X-Powered-By: pygeoapi 0.24.dev0
Content-Language: en-US
Preference-Applied: wait
Location: http://localhost:5000/jobs/d322848e-58d3-11f1-8c9e-299b212adee9
Content-Length: 39
Connection: close
{"id":"echo","value":"Hello Tom! test"}
Request of job status on URL provided in Location (returns JSON, expected HTML):
$ curl -i "http://localhost:5000/jobs/d322848e-58d3-11f1-8c9e-299b212adee9"
HTTP/1.1 200 OK
Server: Werkzeug/3.1.5 Python/3.12.12
Date: Tue, 26 May 2026 07:24:30 GMT
Content-Type: application/json
X-Powered-By: pygeoapi 0.24.dev0
Content-Language: en-US
Content-Length: 720
Connection: close
{
"type":"process",
"processID":"hello-world",
"jobID":"d322848e-58d3-11f1-8c9e-299b212adee9",
"status":"successful",
"message":"Job complete",
"progress":100,
"parameters":null,
"created":"2026-05-26T07:23:42.879791",
"started":"2026-05-26T07:23:42.879808",
"finished":"2026-05-26T07:23:46.224351",
"updated":"2026-05-26T07:23:46.224407",
"links":[
{
"href":"http://localhost:5000/jobs/d322848e-58d3-11f1-8c9e-299b212adee9/results",
"rel":"http://www.opengis.net/def/rel/ogc/1.0/results",
"type":"application/json",
"title":"Results of job d322848e-58d3-11f1-8c9e-299b212adee9 as application/json"
}
]
}
Request of job results on URL provided in links, which is declared to be "type":"application/json" (returns HTML):
$ curl -i "http://localhost:5000/jobs/d322848e-58d3-11f1-8c9e-299b212adee9/results"
HTTP/1.1 200 OK
Server: Werkzeug/3.1.5 Python/3.12.12
Date: Tue, 26 May 2026 07:25:06 GMT
Content-Type: text/html
X-Powered-By: pygeoapi 0.24.dev0
Content-Language: en-US
Content-Length: 4912
Connection: close
<!doctype html>
<html lang="it" dir="text_direction" >
<head>
<meta charset="utf-8">
<title> Job result </title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="language" content="">
<meta name="description" content="Geo-INQUIRE Saas WP5 (based on pygeoapi)">
<meta name="keywords" content="geospaziale,processing service,api">
<link rel="shortcut icon" href="http://localhost:5000/static/img/favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="https://unpkg.com/bootstrap@5.1.3/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="http://localhost:5000/static/css/default.css">
...
Expected behavior
- the response to
https://<pygeoapi_installation>/jobs/<job_id> should be an HTML.
- the
type in the link currently present in the links section of the job status is not consistent with what is returned.
Additionally, the URL https://<pygeoapi_installation>/jobs/<job_id>/results,
according to 7.13.2, requirement 39 /req/core/job-results-async-raw-value-one,
"The server SHALL response as per requirement /req/core/process-execute-sync-raw-value-one.",
and requirement 28, /req/core/process-execute-sync-raw-value-one state:
C - The content of response SHALL be the requested process output in the requested output format.
Then the expected output to:
$ curl "http://localhost:5000/jobs/d322848e-58d3-11f1-8c9e-299b212adee9/results"
is what was returned to the execution request:
{"id":"echo","value":"Hello Tom! test"}
Description
I understand the default answer to requests is
HTML.When a request to
https://<pygeoapi_installation>/jobs/<job_id>is performed it returns an
JSONformatted response.To get the
HTMLthe following must be requested:https://<pygeoapi_installation>/jobs/<job_id>?f=htmlIn the response the
JSONincludes alinksattribute, with one element, whosetypeisapplication/json,and the
hrefishttps://<pygeoapi_installation>/jobs/<job_id>/resultsThe link returns an
HTMLpage.To get the
JSONthe followinghrefmust be requested:https://<pygeoapi_installation>/jobs/<job_id>/results?f=jsonSteps to Reproduce
Using the hello-world example and curl.
Initial request:
Request of job status on
URLprovided inLocation(returnsJSON, expectedHTML):Request of job results on
URLprovided inlinks, which is declared to be"type":"application/json"(returnsHTML):Expected behavior
https://<pygeoapi_installation>/jobs/<job_id>should be an HTML.typein thelinkcurrently present in thelinkssection of the job status is not consistent with what is returned.Additionally, the URL
https://<pygeoapi_installation>/jobs/<job_id>/results,according to 7.13.2, requirement 39
/req/core/job-results-async-raw-value-one,"The server SHALL response as per requirement /req/core/process-execute-sync-raw-value-one.",
and requirement 28,
/req/core/process-execute-sync-raw-value-onestate:C - The content of response SHALL be the requested process output in the requested output format.Then the expected output to:
$ curl "http://localhost:5000/jobs/d322848e-58d3-11f1-8c9e-299b212adee9/results"is what was returned to the execution request:
{"id":"echo","value":"Hello Tom! test"}