to get a personalized navigation.
to get a personalized navigation.
Since version 8.19 (18.02.2020), a method for retrieving resources with base64url encoded values has been available for all resource endpoints.
This makes it possible to use characters otherwise reserved in URL, i.e:
: / ? # [ ] @ & * + ;
To use it, one simply adds b64(encodedValue) in place of the resource name when you make your request.
Below is an example of how this works.
Inventory item with several reserved characters:
Getting this without encoding the resource name will result in an error:
GET /Inventory/:/?#[]@&*+;
If you instead encode the value with base64Url encoding: :/?#[]@&*+; ⇾ Oi8_I1tdQCYqKzs, and insert it in the b64 method you will get the wanted item:
GET /inventory/b64(Oi8_I1tdQCYqKzs)
If you want to read more about base64Url encoding, please have a look at the following links:
Why are you doing it this way?
RFC 3389 clearly specifies path encoding rules for such cases:
https://www.rfc-editor.org/rfc/rfc3986.html#section-3.3
Every properly implemented client will support this.
And every competently implemented server code will aswell.
Specifically, your example sku :/?#[]@&*+; will yield the uri path /api/v1/inventory/:%2F%3F%23%5B%5D@&*+; according to rfc3986 3.3.
Copyright © 2022 Visma.com. All rights reserved.