System ====== Health Check ------------ .. code-block:: http http https://api.sheepcrm.com/api/v1/health/ HTTP/1.1 200 OK { "message": "ok" } Worker Queues (Internal use only) --------------------------------- Super users only .. code-block:: http http https://api.sheepcrm.com/api/v1/queues/ HTTP/1.1 200 OK UPDATE NEEDED 'sheepapi.system.queues' { "queue1": 0, "queue2": 0 } Validate an email address ------------------------- The `validate_email` python package checks if the host has SMTP Server and the email really exists. .. code-block:: http http https://api.sheepcrm.com/api/v1/validate/email/ email==james@sheepcrm.com HTTP/1.1 200 OK { "email": "james@sheepcrm.com", "valid": true } http https://api.sheepcrm.com/api/v1/validate/email/ email==james@example.com HTTP/1.1 200 OK { "email": "james@example.com", "valid": false } Group by and Count ------------------ Group any resource_type by any field. (All field permutations are returned - data packet may be large!) .. code-block:: http http https://sls-api.sheepcrm.com/api/v2/{flock}/groupby/{resource_type}/{field}/count/ "Authorization: Bearer $API_KEY" HTTP/1.1 200 OK { "results": [ { "count": 2, "value": "New York" }, { "count": 1, "value": "Pretendsville" }, ... } Data lookups ------------ Data lookups are designed to drive auto-complete form elements. :q: search term :callback: provide a callback to get the results as jsonp Not all lookups require a flock param or authentication. Public datasets are `timezones`, `connection_types` and `taxonomy` (taxonomy requires a subtype of `genera` or `families`) GDPR Purposes ------------- :channel: optional - filter by channel .. code-block:: http http https://sls-api.sheepcrm.com/api/v2/{flock}/system/gdpr_purpose "Authorization: Bearer $API_KEY" HTTP/1.1 200 OK { "purposes": [ { "channel": "process, email & post", "legal": "legitimate interests", "legal_purpose": "legitimate interests: to process, manage and communicate with you about your forms.", "purpose": "to process, manage and communicate with you about your forms." }, { "channel": "process, email & post", "legal": "legitimate interests", "legal_purpose": "legitimate interests: to process, manage and communicate with you about your groups.", "purpose": "to process, manage and communicate with you about your groups." }, { "channel": "process, email & post", "legal": "legitimate interests", "legal_purpose": "legitimate interests: to process, manage and communicate with you about your membership.", "purpose": "to process, manage and communicate with you about your membership." }, { "channel": "process, email & post", "legal": "legitimate interests", "legal_purpose": "legitimate interests: to process, manage and communicate with you about your tickets.", "purpose": "to process, manage and communicate with you about your tickets." } ] } .. code-block:: http $ http https://sls-api.sheepcrm.com/api/v2/$FLOCK/lookup/{data_type}/ "Authorization: Bearer $API_KEY" $ http https://sls-api.sheepcrm.com/api/v2/$FLOCK/lookup/{data_type}/ q==abc "Authorization: Bearer $API_KEY" $ http https://api.sheepcrm.com/api/v1/$FLOCK/lookup/{data_type}/{field}/ "Authorization: Bearer $API_KEY" $ http https://api.sheepcrm.com/api/v1/$FLOCK/lookup/{data_type}/{field}/ q==abc "Authorization: Bearer $API_KEY" $ http https://api.sheepcrm.com/api/v1/lookup/{data_type}/ $ http https://api.sheepcrm.com/api/v1/lookup/{data_type}/ q==abc $ http https://api.sheepcrm.com/api/v1/lookup/{data_type}/{subtype}/ $ http https://api.sheepcrm.com/api/v1/lookup/{data_type}/{subtype}/ q==abc $ http https://api.sheepcrm.com/api/v1/$FLOCK/lookup/badge/name/ q==a "Authorization: Bearer $API_KEY" [ { "id": "Magazine", "text": "Magazine" }, { "id": "attendance", "text": "attendance" }, { "id": "self_service_useraccount", "text": "self_service_useraccount" }, { "id": "useraccount", "text": "useraccount" } ] $ http https://api.sheepcrm.com/api/v1/$FLOCK/lookup/badge/name/ q==a callback==abc "Authorization: Bearer $API_KEY" HTTP/1.1 200 OK Content-Type: application/jsonp abc([{"text": "Magazine", "id": "Magazine"}, {"text": "attendance", "id": "attendance"}, {"text": "self_service_useraccount", "id": "self_service_useraccount"}, {"text": "useraccount", "id": "useraccount"}]) .. still to do | | ``/api/v1/$FLOCK/system/asset_categories/`` | ``/api/v1/$FLOCK/system/asset_subcategories/`` | ``/api/v1/$FLOCK/system/asset_testers/`` | ``/api/v1/$FLOCK/system/booking_types/`` | ``/api/v1/$FLOCK/system/calendar_groups/`` | ``/api/v1/$FLOCK/system/connections/`` | ``/api/v1/$FLOCK/system/default_checklist/`` | ``/api/v1/$FLOCK/system/flock_users/`` | ``/api/v1/$FLOCK/system/import_templates/`` | ``/api/v1/$FLOCK/system/index/{resource_type}/`` | ``/api/v1/$FLOCK/system/index/{resource_type}/{field}/`` | ``/api/v1/$FLOCK/system/locked_tags/`` | ``/api/v1/$FLOCK/system/purchases/`` | ``/api/v1/$FLOCK/system/resource_types/`` | ``/api/v1/$FLOCK/system/settings/`` | ``/api/v1/$FLOCK/system/settings/full/`` | ``/api/v1/$FLOCK/system/settings/{field}/`` | ``/api/v1/$FLOCK/system/settings/{field}/{view}/`` | ``/api/v1/$FLOCK/system/tags/`` | ``/api/v1/$FLOCK/system/{resource_type}/`` | ``/api/v1/$FLOCK/system/{resource_type}/refresh/`` | ``/api/v1/$FLOCK/system/{resource_type}/{view}/``