Test Development Environment - Setup SiteTrax.io Test API and JSON
The following article shows how to set up and configure a test environment to configure the SiteTrax.io API to push JSON messages to your REST API server via a webhook call (POST).
Prerequisites:
The following prerequisites are required in order to testing communication from SiteTrax.io REST API Client to your REST API server.
- SiteTrax.io Storage - Storage bucket name, region (default us-east-1), client key, and secret key
- REST API Server - REST API Server set up to receive messages (i.e. Postman www.postman.co or Nightingale www.nightingale.rest)
- SiteTrax.io Router Configured - SiteTrax.io configured REST API router to send messages to the REST API Server above
- Sample Video Payload - Sample video payload to upload to storage
- Bucket Browser Utility - (upload into notprocessed/ folder)
Configure Test REST API or JSON Message Trigger
The following steps define how to trigger a REST API message from the SiteTrax.io REST API Client to your REST API Server.
Step #1: Configure AWS Bucket to Receive Video Payload
You will receive AWS bucket credentials from Netarus. This includes a bucket name, region, client key and secret key. We recommend using a AWS bucket browser app (referenced above) to upload sample payload to your bucket.
Alternatively, you can download the SiteTrax.io Capture Android app here. This is configure easily using a predefined PIN.
Step #2: Configure your REST API Server (Webhook)
A REST API Server will need to be set up to receive JSON messages from SiteTrax.io in order to ingest the data. See our article on SiteTrax.io - Video (Input) REST API and JSON (Output) documentation.
Step #3: Provide REST API Endpoint URL
Once a REST API endpoint URL is provided we will be able to POST our JSON payload of the asset data to the REST API.
Step #4: Upload Video to Bucket to Trigger JSON Payload
You may use the bucket credentials provided or the SiteTrax.io Capture app to upload videos of assets to your bucket, after processing the videos the data will be POSTed to the REST API server.