This guide is under-construction.
We have an endpoint to allow the pushing of entities to Sypht's storage and index for entity matching.
dev: https://pr2owfayxe.execute-api.ap-southeast-2.amazonaws.com/dev/
prod: https://pr2owfayxe.execute-api.ap-southeast-2.amazonaws.com/prod/
BearerToken
BearerToken authentication is required as per normal Sypht requests. Please see: https://docs.sypht.com/#section/Authentication for details on how to retrieve a Bearer token to include with your entity storage request.
PUT storage/{company_id}/entity/{entity_type}/{entity_id}
Path Parameters:
company_id: your Sypht company id
entity_type: type of entity e.g. vehicle
entity_id: Unique identifier of the entity
Request Body:
JSON string of a single entity
None/null values should be represented as null in the json string
e.g.
{"rego":"foo","rego_state":"bar","VIN":null,"Contract Start":"2020-11-03","Contract End":"2023-11-02","Status":"active","Client Name":"exampleclient","entity_id":"exampleid"}
DELETE storage/{company_id}/entity/{entity_type}/{entity_id}
Path Parameters:
company_id: your Sypht company id
entity_type: type of entity e.g. vehicle
entity_id: Unique identifier of the entity
GET storage/{company_id}/entity/{entity_type}/{entity_id}
Path Parameters:
company_id: your Sypht company id
entity_type: the entity type e.g. vehicle
entity_id: Unique identifier of entity to delete
Response Body:
e.g.
{"rego": "foo","rego_state": "bar","VIN": null,"Contract Start": "2020-11-03","Contract End": "2023-11-02","Status": "active","Client Name": "exampleclient","entity_id": "exampleid"}
POST storage/{company_id}/bulkentity/{entity_type}
Path Parameters:
company_id: your Sypht company id
entity_type: the entity type e.g. vehicle
Request Body:
JSON string of a list of entity_id and associated data
e.g. To store entities with ids: id0, id1, id2:
[{"entity_id":"id0","data":{"rego_no":"qwer","Contract Start":"2020-11-04"}},{"entity_id":"id1","data":{"rego_no":"wert","Contract Start":"2020-11-05"}},{"entity_id":"id2","data":{"rego_no":"erty","Contract Start":"2020-11-06"}}]
id_field?
{"id_field":"rego_no","data":[{"rego_no":"qwer","Contract Start":"2020-11-04"},{"rego_no":"wert","Contract Start":"2020-11-05"},{"rego_no":"erty","Contract Start":"2020-11-06"}]}
POST storage/{company_id}/entitysearch/{entity_type}/
Path Parameters:
company_id: your Sypht company id
entity_type: the entity type e.g. vehicle
Request Body:
Json string containing exact and fuzzy match query
e.g. To search for exact match for "rego_no" == "qwer"
{"exact": {"rego_no":"qwer"},"fuzzy": {}}
Response Body:
[{"item": {"rego_no": "qwer","Contract Start": "2020-11-04"},"score": 0.5753642},{"item": {"rego_no": "wert","Contract Start": "2020-11-05"},"score": 0.2876821}]