Hello,
In the Search URL, we have to specify our input criteria in the BODY, and the output attribute list in the URL.
Example for the Search credentials:
7.7.1.2. Credential
POST /v1/credentials
Retrieve a list of credentials that match the given search criteria
Scope required: cms.credential.read
Query Parameters
attributes (array) – The (optional) set of required attributes to retrieve. Array of string.
transactionId (string) – The id of the transaction. Object of type string. (Required)
Form Parameters
body – Array of [Expression](https://osia.readthedocs.io/en/stable/technical/cms.html#f7d92bb084923057b232ced39f0e5d8-components-schemas-expression).
It means that we may have a very long URL if we don't want all of the attributes (which can be numerous), but a subset of them (which can be numerous too).
Why not putting both input and output criterias in the BODY to have something more homogeneous and light for the URL?
For our Search credentials example:
Current
POST /v1/credentials?attributes=["attribute1","attribute2","attribute3"...,"attributeN"]&transactionId=X
with body
[
{"attributeName": "string", "operator": "<", "value": "string"}
]
Couldn't we have something like that?
Includes possible sorting attributes (ASC/DESC)
POST /v1/credentials?transactionId=X
with body
{
"inputQuery": [ {"attributeName": "string", "operator": "<", "value": "string"} ],
"sortingQuery": ["path4.attribute4:ASC","path5.attribute5:DESC"]
"outputAttributes": ["path1.attribute1","path2.attribute2","path3.attribute3"...,"path4.attributeN"],
}
And BTW1, query attributes aren't missing for pagination?
e.g. POST /v1/credentials?limit=10&offset=0
BTW2 we should specify the full path of each attribute, because we may have the same attribute name at different levels (e.g. applicant, parent 1 & parent 2).
It's why I specified path1.attribute1
Hello,
In the Search URL, we have to specify our input criteria in the BODY, and the output attribute list in the URL.
Example for the Search credentials:
It means that we may have a very long URL if we don't want all of the attributes (which can be numerous), but a subset of them (which can be numerous too).
Why not putting both input and output criterias in the BODY to have something more homogeneous and light for the URL?
For our Search credentials example:
Current
Couldn't we have something like that?
Includes possible sorting attributes (ASC/DESC)
And BTW1, query attributes aren't missing for pagination?
e.g. POST /v1/credentials?limit=10&offset=0
BTW2 we should specify the full path of each attribute, because we may have the same attribute name at different levels (e.g. applicant, parent 1 & parent 2).
It's why I specified path1.attribute1