Data Sources
Create Data Source
POST
apiKeyAuthheader
x-api-key<token>FastStats API key. Pass it in the x-api-key header or as a Bearer token in the Authorization header.
idOrSlug*stringapplication/json- body
name*stringreferenceId*stringLength
1 <= lengthdataType*stringValue in
"number""string""boolean""json"description?string|null|nullregex?string|null|nullallowNegative?boolean|null|nullallowFloat?boolean|null|nullminValue?number|null|nullmaxValue?number|null|nullisArray?boolean|nullmetricShape*stringValue in
"scalar""array""map"DataSourceRecord
application/json- response
id*stringprojectId*stringname*stringdescription*string|nullreferenceId*stringdataType*stringValue in
"number""string""boolean""json"regex*string|nullallowNegative*boolean|nullallowFloat*boolean|nullminValue*number||nullmaxValue*number||nullisArray*booleanmetricShape*stringValue in
"scalar""array""map"createdAt*stringupdatedAt*stringcurl -X POST 'https://api.faststats.dev/v0/projects/string/data-sources' \ -H 'Content-Type: application/json' \ -d '{ "name": "string", "referenceId": "string", "dataType": "number", "metricShape": "scalar"}'Example Response
{ "id": "string", "projectId": "string", "name": "string", "description": "string", "referenceId": "string", "dataType": "number", "regex": "string", "allowNegative": true, "allowFloat": true, "minValue": 0, "maxValue": 0, "isArray": true, "metricShape": "scalar", "createdAt": "string", "updatedAt": "string"}curl -X POST 'https://api.faststats.dev/v0/projects/string/data-sources' \
-H 'Content-Type: application/json' \
-d '{
"name": "string",
"referenceId": "string",
"dataType": "number",
"metricShape": "scalar"
}'{
"id": "string",
"projectId": "string",
"name": "string",
"description": "string",
"referenceId": "string",
"dataType": "number",
"regex": "string",
"allowNegative": true,
"allowFloat": true,
"minValue": 0,
"maxValue": 0,
"isArray": true,
"metricShape": "scalar",
"createdAt": "string",
"updatedAt": "string"
}