Request-Parameter ungültig (request-validation-failed)
Dieser Fehler tritt dann auf, wenn Parameter bei der HTTP-Abfrage ein ungültiges Format haben, also beispielsweise, wenn eine App- oder Datensatz-ID nicht dem vorgeschriebenen Format entspricht.
Beispiel:
>>> api_key = "680a032bdtUrdhiMqYLfCRtAiVLMXxmQuKdvpPSBDGuTGsDpdliRYMGaKYoBOxNYDynSxANtfGyJJwpMGtevJtqEiRwDMfZGFh"
>>> response = requests.get(
... "https://my.living-apps.de/rest/apps/falsch",
... headers={
... "Accept": "application/json",
... "X-API-KEY": api_key,
... },
... )
>>> pprint.pprint(response.json())
{'errors': [{'ctx': {'pattern': '^[0-9a-f]{24,}$'},
'input': 'falsch',
'loc': ['path', 'app_id'],
'msg': "String should match pattern '^[0-9a-f]{24,}$'",
'type': 'string_pattern_mismatch'}],
'status': 422,
'title': 'Request validation error.',
'type': 'request-validation-failed'}