Enabling Event Storage

As discussed earlier, enabling Event Storage is a prerequisite for using Hooks.

caution

Please note that by enabling storage, you implicitly allow storing all data and images sent to the API endpoints for 24 hours.

You can enable storage using two methods:

  • On the Cloud Dashboard (web UI)
  • Via the Carmen Cloud API (HTTP API)

Enabling Storage using the Cloud Dashboardโ€‹

Go to the Storage & Hooks page on the Cloud Dashboard and log in if you haven't already done so.

Storage disabled on the console

Click the "Configure" button in the lower right corner next to the "Disabled" label.

Confirm enabling storage

Read the warning in the popup window carefully, and if you understand and accept the data security implications, click Yes.

Empty hook list

The toggle in the upper right corner turns on and its text changes to "Enabled" indicating that temporary storage is now enabled and hooks are available.

Enabling Storage using the Carmen Cloud APIโ€‹

You can also enable storage programmatically using the Carmen Cloud API.

First exchange your API key for a short-lived bearer access token (see the Authentication reference):

curl -X POST \
-H 'x-api-key: <api-key>' \
https://api.carmencloud.com/auth/token

The response contains an access_token and your workspace_id. Then send an HTTP PATCH request to the /workspace/{workspaceId}/storage/status endpoint:

curl -X PATCH \
-d '{ "vehicle": true }' \
-H 'Authorization: Bearer <access-token>' \
-H 'Content-Type: application/json' \
https://api.carmencloud.com/workspace/<workspace-id>/storage/status

The token is valid for 60 minutes; request a new one when it expires. See the Carmen Cloud API reference for the full contract.