Describe the bug
In the URL string generated from PxWeb to be used in PxWebApi 2.0 Beta, some character needs to be escaped.
To Reproduce
Steps to reproduce the behavior:
- Have enableApiV2QueryLink set to true
- Make selection for a table and see that some choosen variables contains value codes that needs to be escaped for examle '+',
- Scroll down to "API qurey for this table"
- Choose to copy the URL string under PxWebApi 2.0 Beta
- Get to link adress in for example postman or a web-browser
Expected behavior
Gives values in apiv2Beta
https://api.scb.se/ov0104/v2beta/api/v2/tables/TAB4707/data?lang=sv&valueCodes[Sektor]=030,320,409&valueCodes[Kon]=1,2,1%2B2&valueCodes[ContentsCode]=0000070N,0000070U&valueCodes[Tid]=2024M09
Actual behavior
Gives an error
{
"type": "Parameter error",
"title": "Non-existent value",
"status": 400
}
https://api.scb.se/ov0104/v2beta/api/v2/tables/TAB4707/data?lang=sv&valueCodes[Sektor]=030,320,409&valueCodes[Kon]=1,2,1+2&valueCodes[ContentsCode]=0000070N,0000070U&valueCodes[Tid]=2024M09
Describe the bug
In the URL string generated from PxWeb to be used in PxWebApi 2.0 Beta, some character needs to be escaped.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Gives values in apiv2Beta
https://api.scb.se/ov0104/v2beta/api/v2/tables/TAB4707/data?lang=sv&valueCodes[Sektor]=030,320,409&valueCodes[Kon]=1,2,1%2B2&valueCodes[ContentsCode]=0000070N,0000070U&valueCodes[Tid]=2024M09
Actual behavior
Gives an error
{
"type": "Parameter error",
"title": "Non-existent value",
"status": 400
}
https://api.scb.se/ov0104/v2beta/api/v2/tables/TAB4707/data?lang=sv&valueCodes[Sektor]=030,320,409&valueCodes[Kon]=1,2,1+2&valueCodes[ContentsCode]=0000070N,0000070U&valueCodes[Tid]=2024M09