Skip to content

Regex Search Product ID's

Daniel Cronqvist edited this page Dec 11, 2020 · 2 revisions

Regex Search Product ID's - HTTP POST

Endpoint: https://co2.dcronqvist.se/products/search/id/regex

Example cURL POST:

$ curl -X POST -d '{ "search": "accumu" }' -H "Content-Type: application/json" 127.0.0.1:5000/products/search/id/regex

Expected payload format (EPF)

The following rules are applied to all keys in the payload using the EPF as a sample:

  1. Keys with arrays of specified types specify which types that are allowed for that specific key.
  2. Keys with specific values only allow that specific value in the payload.
  3. Keys that contain objects are recursively checked using rule 1 and 2.
{
    "search": ["str"],
}

Responses

200 OK

{
    "response": [
        "accumulator",
        "accumulator-big",
        ...
    ],
    "status_code": 200,
    "status": "200 OK"
}