Skip to content

Commit 41f12e0

Browse files
Merge pull request #47 from PxTools/feature/add-doc-on-savedquery-usage
Small note on savedQuery usage in new Other section
2 parents b25d63c + 876351a commit 41f12e0

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
### Saved queries in PxWeb2 and PxWebApi2.
2+
A saved query has an output format, which was selected when it was created.
3+
4+
If the output format is "Screen" you should get the table with your selections in the gui.
5+
If the output is "Download" (e.g. excel) the browser should download the data in the chosen format.
6+
7+
In the old classic version, the url of the gui was used for both "screen" and "download", and the output format "screen" got
8+
you pxweb "as it was" when the query was created. If the output format was excel, you would not see the gui, the browser would just start to download a file.
9+
10+
In the new version, the responsibillity is sharded between the api and and gui:
11+
The url to the gui is used to get pxweb "as it was", also for "download" output formats.
12+
The url to the api is used to download the data of any savedquery. For the "sceen" output format will download jsonstat2 files.
13+
14+
`http://mysite/api/pxwebapi/v2/savedqueries/N/data` will download the file.
15+
16+
`http://mysite/api/pxwebapi/v2/savedqueries/N` will get you the definition of the savedquery.

mkdocs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ nav:
2626
- Version 2013: px-file-format/px-2013.md
2727
- User Guides:
2828
- PxWebApi 2 User Guide: PxWebApi/documentation/user-guide.md
29+
- Other:
30+
- Changes in savedquery usage: Other/changes-in-savedquery-usage.md
2931
- Tools:
3032
- PxWeb: tools/pxweb.md
3133

0 commit comments

Comments
 (0)