Custom Data Points

You can use GitView’s api to create custom datapoints inside the GitView system which you can then leverage inside of alerts and reports.
Examples of how you might leverage this include:
  • Track c.i. restarts to determine how flakey your test suite is and how much development is being wasted waiting on flakey tests
  • Track deployments and deployment failures
  • Insert custom data into the system from external platforms that GitView does not yet support

Api Documentation

Grab your API key from the Billing and Other Settings section of GitView. If you don’t see it enabled, make sure you contact or message in the intercom to get access.
Image without caption

Custom Data Point Schema

t.text "tag", null: false # Required tag i.e. Deploy, Test Flake, or C.I Restart t.datetime "datetime" # Optional datetime to provide, defaults to current server time t.decimal "decimal" # Optional number to provide i.e. 100, 5.3, or 0.10 t.boolean "boolean" # Optional boolean if tracking if something occured or didn't occur t.text "metadata" # Optional metadata for reference t.uuid "organization_id", null: false # Added automatically, not overridable t.datetime "created_at", null: false # Added automatically, not overridable t.datetime "updated_at", null: false # Updated automatically, not overridable t.datetime "soft_deleted_at" # Optional if you want to leave data around without deleting

Create Example

curl -X POST "" \ -H "Content-Type: application/json" \ -d '{ "api_key": "<your uuid key here>", "tag": "deploy", }'
or alternatively, a one liner approach (easy to use within C.I. setups):
curl -X POST "<your uuid key here>&tag=deploy"

Update Example

curl -X PUT "<custom data point id>" \ -H "Content-Type: application/json" \ -d '{ "api_key": "<your uuid key here>", "decimal": 3.0, }'

Delete Example

If you’d like to soft delete a record, you can simply update it with the soft_deleted_at value. Just be sure to filer them out in your queries.
curl -X PUT "<custom data point id>" \ -H "Content-Type: application/json" \ -d '{ "api_key": "<your uuid key here>", "soft_deleted_at": "2024-01-01", }'
To hard delete the record, you can use the DELETE endpoint:
curl -X DELETE "<custom data point id>?api_key=<your uuid key here>"

Index Example

If you’d like to search across your custom data records, for the purpose of updating or deleting them, you can do so with the index endpoint
curl "<your uuid key here>"
The response will include the data as well as pagination information. The page numbers use zero-base indexing.
{ "data": [{ "id": "a94db3f7-e3fd-4c86-ab09-e66c79bf238c", "tag": "deploy", "datetime": "2023-05-21T20:48:21.331Z", "decimal": "3.0", "boolean": null, "metadata": null, "organization_id": "3f637416-b8b4-4734-bf42-0262b3462248", "created_at": "2023-05-21T20:48:21.531Z", "updated_at": "2023-05-21T20:56:55.184Z", "soft_deleted_at": "2023-05-21T20:48:21.000Z" }], "pagination_info": { "page": 0, "limit": 2 } }
To request the next page, simply provide the page number
curl "<your uuid key here>&page=1"
If you need to filter by specific attribute you can do so using the various filters that are available:
  • tag
  • datetime
  • decimal
  • boolean
  • metadata - exact match
  • metadata_search - partial match
  • created_at
  • updated_at
  • soft_deleted_at
  • datetime_min
  • datetime_max
  • created_at_min
  • created_at_max
  • updated_at_min
  • updated_at_max
  • soft_deleted_at_min
  • soft_deleted_at_max
  • decimal_min
  • decimal_max
For example, this is how you would find all deploys tags created between two dates and who’s metadata contains a specific key word
curl "<your uuid key here>"