PredictHQ API
{
"swagger": "2.0",
"info": {
"version": "1.0",
"title": "PredictHQ API",
"description": "TODO: Add Description"
},
"host": "api.predicthq.com",
"basePath": "/",
"securityDefinitions": {
"auth": {
"type": "oauth2",
"flow": "implicit",
"authorizationUrl": "https://api.predicthq.com",
"scopes": {},
"x-skip-client-authentication": false
}
},
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/v1/signals/{signal_id}/analysis/": {
"get": {
"description": "This action returns a complete analysis of your Signal, which includes what your actual figures were, what could be expected, and what was in excess in terms of **demand**, **lead time** and **duration** and can be explained using events. Note that lead time (`lead`) and duration (`span`) analysis are only available when an `initiated` and `completed` dates are provided with data points, respectively.\n\nTo retrieve a list of events that we estimate impacted your business at a specific date in the past, use the `signal.id` and `signal.explain` parameters with the events endpoint.\n\nAlternatively, to retrieve a list of predicted events that we estimate will impact your business in the future, use the `signal.id` parameter and the date range you wish a prediction for using `active` or `start`.\n\nSee the events endpoint for more details.\n\nThe `significance` parameter corresponds to percentage of variation in your data that is considered normal when computing excess that can be attributed to events. If you were to look at a normal distribution, it would correspond to the percentage of values that lie within a band around the mean.\n\nAs an example:\n- ~68.27% = 1 standard deviation from the mean\n- ~95.45% = 2 standard deviations from the mean\n- ~99.73% = 3 standard deviations from the mean\n\nA high `significance` means that only extreme spikes and troughs will be attributed to events. We use 50% as a default, which corresponds to ~0.68 standard deviations.\n",
"summary": "Retrieve Analysis",
"tags": [
"signals"
],
"operationId": "V1SignalsAnalysisBySignalIdGet",
"produces": [
"application/json"
],
"parameters": [
{
"name": "signal_id",
"in": "path",
"required": true,
"type": "string",
"description": ""
}
],
"responses": {
"200": {
"description": ""
}
},
"security": [
{
"auth": []
}
],
"x-unitTests": [
{
"request": {
"method": "GET",
"uri": "/v1/signals/%7B%7Bsignal_id%7D%7D/analysis/"
},
"expectedResponse": {
"x-allowExtraHeaders": true,
"x-bodyMatchMode": "NONE",
"x-arrayOrderedMatching": false,
"x-arrayCheckCount": false,
"x-matchResponseSchema": true,
"headers": {}
},
"x-testShouldPass": true,
"x-testEnabled": true,
"x-testName": "Retrieve Analysis",
"x-testDescription": "This action returns a complete analysis of your Signal, which includes what your actual figures were, what could be expected, and what was in excess in terms of **demand**, **lead time** and **duration** and can be explained using events. Note that lead time (`lead`) and duration (`span`) analysis are only available when an `initiated` and `completed` dates are provided with data points, respectively.\n\nTo retrieve a list of events that we estimate impacted your business at a specific date in the past, use the `signal.id` and `signal.explain` parameters with the events endpoint.\n\nAlternatively, to retrieve a list of predicted events that we estimate will impact your business in the future, use the `signal.id` parameter and the date range you wish a prediction for using `active` or `start`.\n\nSee the events endpoint for more details.\n\nThe `significance` parameter corresponds to percentage of variation in your data that is considered normal when computing excess that can be attributed to events. If you were to look at a normal distribution, it would correspond to the percentage of values that lie within a band around the mean.\n\nAs an example:\n- ~68.27% = 1 standard deviation from the mean\n- ~95.45% = 2 standard deviations from the mean\n- ~99.73% = 3 standard deviations from the mean\n\nA high `significance` means that only extreme spikes and troughs will be attributed to events. We use 50% as a default, which corresponds to ~0.68 standard deviations.\n"
}
],
"x-operation-settings": {
"CollectParameters": false,
"AllowDynamicQueryParameters": false,
"AllowDynamicFormParameters": false,
"IsMultiContentStreaming": false
}
}
},
"/v1/signals/{signal_id}/": {
"get": {
"description": "This action returns a Signal according to the unique identifier you provide.",
"summary": "Retrieve A Signal",
"tags": [
"signals"
],
"operationId": "V1SignalsBySignalIdGet",
"produces": [
"application/json"
],
"parameters": [
{
"name": "signal_id",
"in": "path",
"required": true,
"type": "string",
"description": ""
}
],
"responses": {
"200": {
"description": ""
}
},
"security": [
{
"auth": []
}
],
"x-unitTests": [
{
"request": {
"method": "GET",
"uri": "/v1/signals/%7B%7Bsignal_id%7D%7D/"
},
"expectedResponse": {
"x-allowExtraHeaders": true,
"x-bodyMatchMode": "NONE",
"x-arrayOrderedMatching": false,
"x-arrayCheckCount": false,
"x-matchResponseSchema": true,
"headers": {}
},
"x-testShouldPass": true,
"x-testEnabled": true,
"x-testName": "Retrieve A Signal",
"x-testDescription": "This action returns a Signal according to the unique identifier you provide."
}
],
"x-operation-settings": {
"CollectParameters": false,
"AllowDynamicQueryParameters": false,
"AllowDynamicFormParameters": false,
"IsMultiContentStreaming": false
}
},
"put": {
"description": "This action modifies a Signal according to the unique identifier you provide.",
"summary": "Update a Signal",
"tags": [
"signals"
],
"operationId": "V1SignalsBySignalIdPut",
"produces": [
"application/json"
],
"parameters": [
{
"name": "signal_id",
"in": "path",
"required": true,
"type": "string",
"description": ""
},
{
"name": "Body",
"in": "body",
"required": true,
"description": "",
"schema": {
"$ref": "#/definitions/UpdateASignalrequest"
}
},
{
"name": "Content-Type",
"in": "header",
"required": true,
"type": "string",
"description": ""
}
],
"responses": {
"200": {
"description": ""
}
},
"security": [
{
"auth": []
}
],
"x-unitTests": [
{
"request": {
"method": "PUT",
"uri": "/v1/signals/%7B%7Bsignal_id%7D%7D/",
"headers": {
"Content-Type": "application/json"
},
"body": "{\"name\":\"My Bookings\",\"country\":\"NZ\",\"dimensions\":[{\"type\":\"category\",\"name\":\"my_dimension\"}]}"
},
"expectedResponse": {
"x-allowExtraHeaders": true,
"x-bodyMatchMode": "NONE",
"x-arrayOrderedMatching": false,
"x-arrayCheckCount": false,
"x-matchResponseSchema": true,
"headers": {}
},
"x-testShouldPass": true,
"x-testEnabled": true,
"x-testName": "Update a Signal",
"x-testDescription": "This action modifies a Signal according to the unique identifier you provide."
}
],
"x-operation-settings": {
"CollectParameters": false,
"AllowDynamicQueryParameters": false,
"AllowDynamicFormParameters": false,
"IsMultiContentStreaming": false
}
},
"delete": {
"description": "This action will delete a Signal altogether along with the Data Points associated with it, according to the unique identifier you provide.",
"summary": "Delete A Signal",
"tags": [
"signals"
],
"operationId": "V1SignalsBySignalIdDelete",
"produces": [
"application/json"
],
"parameters": [
{
"name": "signal_id",
"in": "path",
"required": true,
"type": "string",
"description": ""
}
],
"responses": {
"200": {
"description": ""
}
},
"security": [
{
"auth": []
}
],
"x-unitTests": [
{
"request": {
"method": "DELETE",
"uri": "/v1/signals/%7B%7Bsignal_id%7D%7D/"
},
"expectedResponse": {
"x-allowExtraHeaders": true,
"x-bodyMatchMode": "NONE",
"x-arrayOrderedMatching": false,
"x-arrayCheckCount": false,
"x-matchResponseSchema": true,
"headers": {}
},
"x-testShouldPass": true,
"x-testEnabled": true,
"x-testName": "Delete A Signal",
"x-testDescription": "This action will delete a Signal altogether along with the Data Points associated with it, according to the unique identifier you provide."
}
],
"x-operation-settings": {
"CollectParameters": false,
"AllowDynamicQueryParameters": false,
"AllowDynamicFormParameters": false,
"IsMultiContentStreaming": false
}
}
},
"/v1/places/": {
"get": {
"description": "Use the below parameters to search and filter all places. Places are sorted by relevance (location or text query proximity).\n\nA search requires at least one of the `q`, `id`, `country` or `location` parameters.\n",
"summary": "Search Places",
"tags": [
"places"
],
"operationId": "V1PlacesGet",
"produces": [
"application/json"
],
"parameters": [],
"responses": {
"200": {
"description": ""
}
},
"security": [
{
"auth": []
}
],
"x-unitTests": [
{
"request": {
"method": "GET",
"uri": "/v1/places/"
},
"expectedResponse": {
"x-allowExtraHeaders": true,
"x-bodyMatchMode": "NONE",
"x-arrayOrderedMatching": false,
"x-arrayCheckCount": false,
"x-matchResponseSchema": true,
"headers": {}
},
"x-testShouldPass": true,
"x-testEnabled": true,
"x-testName": "Search Places",
"x-testDescription": "Use the below parameters to search and filter all places. Places are sorted by relevance (location or text query proximity).\n\nA search requires at least one of the `q`, `id`, `country` or `location` parameters.\n"
}
],
"x-operation-settings": {
"CollectParameters": false,
"AllowDynamicQueryParameters": false,
"AllowDynamicFormParameters": false,
"IsMultiContentStreaming": false
}
}
},
"/v1/signals/{signal_id}/sink/": {
"post": {
"description": "Every Signal needs a series of Data Points for the API to do its job.\n\nUnlike the other endpoints, the Data Point sink accepts three content types for uploading your data:\n- `application/json`: A JSON array of Data Points.\n- `application/x-ldjson`: A list of JSON Data Points, one on each line.\n- `text/csv`: A list of Data Points with each column comma-separated, and column names on the first row.\n\nAs a rule of thumb, you should limit the number of records you upload with any single request to 1,000. If you use the CSV format, make sure to repeat the CSV header with each call.\n\nThe global rate limit applies, but to prevent any disruption on critical aspects of your systems, this endpoint will never respond with a `402 Payment Required` in case your subscription expires.\n\nWhen required details are missing for some Data Points, instead of rejecting the whole batch, the valid Data Points will be accepted, and the invalid ones will be returned as an array in the body of the response along with a description of the problem.\nIf this is the case, the response code will be `202 Accepted` instead of `201 Created`.\n",
"summary": "Create Data Points",
"tags": [
"signals"
],
"operationId": "V1SignalsSinkBySignalIdPost",
"produces": [
"application/json"
],
"parameters": [
{
"name": "signal_id",
"in": "path",
"required": true,
"type": "string",
"description": ""
},
{
"name": "Body",
"in": "body",
"required": true,
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/CreateDataPointsrequest"
}
}
},
{
"name": "Content-Type",
"in": "header",
"required": true,
"type": "string",
"description": ""
}
],
"responses": {
"200": {
"description": ""
}
},
"security": [
{
"auth": []
}
],
"x-unitTests": [
{
"request": {
"method": "POST",
"uri": "/v1/signals/%7B%7Bsignal_id%7D%7D/sink/",
"headers": {
"Content-Type": "application/json"
},
"body": "[{\"uid\":\"1354861a5\",\"date\":\"2015-09-01T00:00:00Z\",\"latitude\":-27.46846,\"longitude\":153.02342,\"initiated\":\"2015-08-25T00:00:00Z\",\"completed\":\"2015-09-03T00:00:00Z\"}]"
},
"expectedResponse": {
"x-allowExtraHeaders": true,
"x-bodyMatchMode": "NONE",
"x-arrayOrderedMatching": false,
"x-arrayCheckCount": false,
"x-matchResponseSchema": true,
"headers": {}
},
"x-testShouldPass": true,
"x-testEnabled": true,
"x-testName": "Create Data Points",
"x-testDescription": "Every Signal needs a series of Data Points for the API to do its job.\n\nUnlike the other endpoints, the Data Point sink accepts three content types for uploading your data:\n- `application/json`: A JSON array of Data Points.\n- `application/x-ldjson`: A list of JSON Data Points, one on each line.\n- `text/csv`: A list of Data Points with each column comma-separated, and column names on the first row.\n\nAs a rule of thumb, you should limit the number of records you upload with any single request to 1,000. If you use the CSV format, make sure to repeat the CSV header with each call.\n\nThe global rate limit applies, but to prevent any disruption on critical aspects of your systems, this endpoint will never respond with a `402 Payment Required` in case your subscription expires.\n\nWhen required details are missing for some Data Points, instead of rejecting the whole batch, the valid Data Points will be accepted, and the invalid ones will be returned as an array in the body of the response along with a description of the problem.\nIf this is the case, the response code will be `202 Accepted` instead of `201 Created`.\n"
}
],
"x-operation-settings": {
"CollectParameters": false,
"AllowDynamicQueryParameters": false,
"AllowDynamicFormParameters": false,
"IsMultiContentStreaming": false
}
}
},
"/oauth2/revoke/": {
"post": {
"description": "Access Tokens never expire so once you have it, it's yours for the life of your PredictHQ API subscription.\n\nHowever, if you think your token may have been compromised, you have the power to revoke it at any time.\n",
"summary": "Revoking an Access Token",
"tags": [
"oauth2"
],
"operationId": "Oauth2RevokePost",
"produces": [
"application/json"
],
"consumes": [
"application/x-www-form-urlencoded"
],
"parameters": [
{
"name": "token_type_hint",
"in": "formData",
"required": true,
"type": "string",
"description": ""
},
{
"name": "token",
"in": "formData",
"required": true,
"type": "string",
"description": ""
}
],
"responses": {
"200": {
"description": ""
}
},
"security": [
{
"auth": []
}
],
"x-unitTests": [
{
"request": {
"method": "POST",
"uri": "/oauth2/revoke/",
"headers": {
"Content-Type": "application/x-www-form-urlencoded"
},
"body": "token_type_hint={{token_type_hint}}&token={{token}}"
},
"expectedResponse": {
"x-allowExtraHeaders": true,
"x-bodyMatchMode": "NONE",
"x-arrayOrderedMatching": false,
"x-arrayCheckCount": false,
"x-matchResponseSchema": true,
"headers": {}
},
"x-testShouldPass": true,
"x-testEnabled": true,
"x-testName": "Revoking an Access Token",
"x-testDescription": "Access Tokens never expire so once you have it, it's yours for the life of your PredictHQ API subscription.\n\nHowever, if you think your token may have been compromised, you have the power to revoke it at any time.\n"
}
],
"x-operation-settings": {
"CollectParameters": false,
"AllowDynamicQueryParameters": false,
"AllowDynamicFormParameters": false,
"IsMultiContentStreaming": false
}
}
},
"/v1/accounts/self/": {
"get": {
"description": "If you need your account details for whatever reason, it's really easy to get them.",
"summary": "Retrieve Account Details",
"tags": [
"accounts"
],
"operationId": "V1AccountsSelfGet",
"produces": [
"application/json"
],
"parameters": [],
"responses": {
"200": {
"description": ""
}
},
"security": [
{
"auth": []
}
],
"x-unitTests": [
{
"request": {
"method": "GET",
"uri": "/v1/accounts/self/"
},
"expectedResponse": {
"x-allowExtraHeaders": true,
"x-bodyMatchMode": "NONE",
"x-arrayOrderedMatching": false,
"x-arrayCheckCount": false,
"x-matchResponseSchema": true,
"headers": {}
},
"x-testShouldPass": true,
"x-testEnabled": true,
"x-testName": "Retrieve Account Details",
"x-testDescription": "If you need your account details for whatever reason, it's really easy to get them."
}
],
"x-operation-settings": {
"CollectParameters": false,
"AllowDynamicQueryParameters": false,
"AllowDynamicFormParameters": false,
"IsMultiContentStreaming": false
}
}
},
"/v1/signals/": {
"get": {
"description": "It's easy to get a list of all Signals that are associated with your account.",
"summary": "Retrieve All Signals",
"tags": [
"signals"
],
"operationId": "V1SignalsGet",
"produces": [
"application/json"
],
"parameters": [],
"responses": {
"200": {
"description": ""
}
},
"security": [
{
"auth": []
}
],
"x-unitTests": [
{
"request": {
"method": "GET",
"uri": "/v1/signals/"
},
"expectedResponse": {
"x-allowExtraHeaders": true,
"x-bodyMatchMode": "NONE",
"x-arrayOrderedMatching": false,
"x-arrayCheckCount": false,
"x-matchResponseSchema": true,
"headers": {}
},
"x-testShouldPass": true,
"x-testEnabled": true,
"x-testName": "Retrieve All Signals",
"x-testDescription": "It's easy to get a list of all Signals that are associated with your account."
}
],
"x-operation-settings": {
"CollectParameters": false,
"AllowDynamicQueryParameters": false,
"AllowDynamicFormParameters": false,
"IsMultiContentStreaming": false
}
},
"post": {
"description": "Before you do anything else, you need to create a new Signal that represents a time series that's important to your business.",
"summary": "Create a Signal",
"tags": [
"signals"
],
"operationId": "V1SignalsPost",
"produces": [
"application/json"
],
"parameters": [
{
"name": "Body",
"in": "body",
"required": true,
"description": "",
"schema": {
"$ref": "#/definitions/CreateASignalrequest"
}
},
{
"name": "Content-Type",
"in": "header",
"required": true,
"type": "string",
"description": ""
}
],
"responses": {
"200": {
"description": ""
}
},
"security": [
{
"auth": []
}
],
"x-unitTests": [
{
"request": {
"method": "POST",
"uri": "/v1/signals/",
"headers": {
"Content-Type": "application/json"
},
"body": "{\"name\":\"My Bookings\",\"country\":\"NZ\",\"dimensions\":[{\"type\":\"category\",\"name\":\"my_dimension\"}]}"
},
"expectedResponse": {
"x-allowExtraHeaders": true,
"x-bodyMatchMode": "NONE",
"x-arrayOrderedMatching": false,
"x-arrayCheckCount": false,
"x-matchResponseSchema": true,
"headers": {}
},
"x-testShouldPass": true,
"x-testEnabled": true,
"x-testName": "Create a Signal",
"x-testDescription": "Before you do anything else, you need to create a new Signal that represents a time series that's important to your business."
}
],
"x-operation-settings": {
"CollectParameters": false,
"AllowDynamicQueryParameters": false,
"AllowDynamicFormParameters": false,
"IsMultiContentStreaming": false
}
}
},
"/v1/events/calendar/": {
"get": {
"description": "This endpoint accepts the same parameters as the ones described in Retrieve All Events and can be used to get a calendar view of all matching events that are available to your account.\n\nEach day in the calendar contains aggregate counts of all _active_ events for that day.\n",
"summary": "Retrieve Events Calendar",
"tags": [
"events"
],
"operationId": "V1EventsCalendarGet",
"produces": [
"application/json"
],
"parameters": [],
"responses": {
"200": {
"description": ""
}
},
"security": [
{
"auth": []
}
],
"x-unitTests": [
{
"request": {
"method": "GET",
"uri": "/v1/events/calendar/"
},
"expectedResponse": {
"x-allowExtraHeaders": true,
"x-bodyMatchMode": "NONE",
"x-arrayOrderedMatching": false,
"x-arrayCheckCount": false,
"x-matchResponseSchema": true,
"headers": {}
},
"x-testShouldPass": true,
"x-testEnabled": true,
"x-testName": "Retrieve Events Calendar",
"x-testDescription": "This endpoint accepts the same parameters as the ones described in Retrieve All Events and can be used to get a calendar view of all matching events that are available to your account.\n\nEach day in the calendar contains aggregate counts of all _active_ events for that day.\n"
}
],
"x-operation-settings": {
"CollectParameters": false,
"AllowDynamicQueryParameters": false,
"AllowDynamicFormParameters": false,
"IsMultiContentStreaming": false
}
}
},
"/v1/events/count/": {
"get": {
"description": "This endpoint accepts the same parameters as the ones described in Retrieve All Events and can be used to get aggregated counts of all matching events that are available to your account.",
"summary": "Retrieve Events Count",
"tags": [
"events"
],
"operationId": "V1EventsCountGet",
"produces": [
"application/json"
],
"parameters": [],
"responses": {
"200": {
"description": ""
}
},
"security": [
{
"auth": []
}
],
"x-unitTests": [
{
"request": {
"method": "GET",
"uri": "/v1/events/count/"
},
"expectedResponse": {
"x-allowExtraHeaders": true,
"x-bodyMatchMode": "NONE",
"x-arrayOrderedMatching": false,
"x-arrayCheckCount": false,
"x-matchResponseSchema": true,
"headers": {}
},
"x-testShouldPass": true,
"x-testEnabled": true,
"x-testName": "Retrieve Events Count",
"x-testDescription": "This endpoint accepts the same parameters as the ones described in Retrieve All Events and can be used to get aggregated counts of all matching events that are available to your account."
}
],
"x-operation-settings": {
"CollectParameters": false,
"AllowDynamicQueryParameters": false,
"AllowDynamicFormParameters": false,
"IsMultiContentStreaming": false
}
}
},
"/v1/events/": {
"get": {
"description": "Use the below parameters to search and filter all events that are available to your account.",
"summary": "Retrieve All Events",
"tags": [
"events"
],
"operationId": "V1EventsGet",
"produces": [
"application/json"
],
"parameters": [],
"responses": {
"200": {
"description": ""
}
},
"security": [
{
"auth": []
}
],
"x-unitTests": [
{
"request": {
"method": "GET",
"uri": "/v1/events/"
},
"expectedResponse": {
"x-allowExtraHeaders": true,
"x-bodyMatchMode": "NONE",
"x-arrayOrderedMatching": false,
"x-arrayCheckCount": false,
"x-matchResponseSchema": true,
"headers": {}
},
"x-testShouldPass": true,
"x-testEnabled": true,
"x-testName": "Retrieve All Events",
"x-testDescription": "Use the below parameters to search and filter all events that are available to your account."
}
],
"x-operation-settings": {
"CollectParameters": false,
"AllowDynamicQueryParameters": false,
"AllowDynamicFormParameters": false,
"IsMultiContentStreaming": false
}
}
},
"/oauth2/token/": {
"post": {
"description": "When requesting an Access Token, use the `client_credentials` grant type, then request the scope or scopes you wish to have access to.\n\nThese scopes can be any or all of the following, separated by a space:\n - `account` Grants access to the account endpoint.\n - `events` Grants access to the events endpoint.\n - `places` Grants access to the places endpoint.\n - `signals` Grants access to the signals endpoint.\n\nPlease note that Access Tokens requested via the client_credentials grant type never expire.\n",
"summary": "Requesting an Access Token",
"tags": [
"oauth2"
],
"operationId": "Oauth2TokenPost",
"produces": [
"application/json"
],
"consumes": [
"application/x-www-form-urlencoded"
],
"parameters": [
{
"name": "grant_type",
"in": "formData",
"required": true,
"type": "string",
"description": ""
},
{
"name": "scope",
"in": "formData",
"required": true,
"type": "string",
"description": ""
}
],
"responses": {
"200": {
"description": ""
}
},
"security": [
{
"auth": []
}
],
"x-unitTests": [
{
"request": {
"method": "POST",
"uri": "/oauth2/token/",
"headers": {
"Content-Type": "application/x-www-form-urlencoded"
},
"body": "grant_type={{grant_type}}&scope={{scope}}"
},
"expectedResponse": {
"x-allowExtraHeaders": true,
"x-bodyMatchMode": "NONE",
"x-arrayOrderedMatching": false,
"x-arrayCheckCount": false,
"x-matchResponseSchema": true,
"headers": {}
},
"x-testShouldPass": true,
"x-testEnabled": true,
"x-testName": "Requesting an Access Token",
"x-testDescription": "When requesting an Access Token, use the `client_credentials` grant type, then request the scope or scopes you wish to have access to.\n\nThese scopes can be any or all of the following, separated by a space:\n - `account` Grants access to the account endpoint.\n - `events` Grants access to the events endpoint.\n - `places` Grants access to the places endpoint.\n - `signals` Grants access to the signals endpoint.\n\nPlease note that Access Tokens requested via the client_credentials grant type never expire.\n"
}
],
"x-operation-settings": {
"CollectParameters": false,
"AllowDynamicQueryParameters": false,
"AllowDynamicFormParameters": false,
"IsMultiContentStreaming": false
}
}
},
"/v1/signals/{signal_id}/dimensions/": {
"get": {
"description": "This action returns a summary for each dimension of your Signal.\n",
"summary": "Retrieve All Dimensions",
"tags": [
"signals"
],
"operationId": "V1SignalsDimensionsBySignalIdGet",
"produces": [
"application/json"
],
"parameters": [
{
"name": "signal_id",
"in": "path",
"required": true,
"type": "string",
"description": ""
}
],
"responses": {
"200": {
"description": ""
}
},
"security": [
{
"auth": []
}
],
"x-unitTests": [
{
"request": {
"method": "GET",
"uri": "/v1/signals/%7B%7Bsignal_id%7D%7D/dimensions/"
},
"expectedResponse": {
"x-allowExtraHeaders": true,
"x-bodyMatchMode": "NONE",
"x-arrayOrderedMatching": false,
"x-arrayCheckCount": false,
"x-matchResponseSchema": true,
"headers": {}
},
"x-testShouldPass": true,
"x-testEnabled": true,
"x-testName": "Retrieve All Dimensions",
"x-testDescription": "This action returns a summary for each dimension of your Signal.\n"
}
],
"x-operation-settings": {
"CollectParameters": false,
"AllowDynamicQueryParameters": false,
"AllowDynamicFormParameters": false,
"IsMultiContentStreaming": false
}
}
}
},
"definitions": {
"CreateDataPointsrequest": {
"title": "Create Data PointsRequest",
"example": {
"uid": "1354861a5",
"date": "2015-09-01T00:00:00Z",
"latitude": -27.46846,
"longitude": 153.02342,
"initiated": "2015-08-25T00:00:00Z",
"completed": "2015-09-03T00:00:00Z"
},
"type": "object",
"properties": {
"uid": {
"description": "",
"example": "1354861a5",
"type": "string"
},
"date": {
"description": "",
"example": "9/1/2015 12:00:00 AM",
"type": "string"
},
"latitude": {
"description": "",
"example": -27.46846,
"type": "number",
"format": "double"
},
"longitude": {
"description": "",
"example": 153.02342,
"type": "number",
"format": "double"
},
"initiated": {
"description": "",
"example": "8/25/2015 12:00:00 AM",
"type": "string"
},
"completed": {
"description": "",
"example": "9/3/2015 12:00:00 AM",
"type": "string"
}
},
"required": [
"uid",
"date",
"latitude",
"longitude",
"initiated",
"completed"
]
},
"UpdateASignalrequest": {
"title": "Update a SignalRequest",
"example": {
"name": "My Bookings",
"country": "NZ",
"dimensions": [
{
"type": "category",
"name": "my_dimension"
}
]
},
"type": "object",
"properties": {
"name": {
"description": "",
"example": "My Bookings",
"type": "string"
},
"country": {
"description": "",
"example": "NZ",
"type": "string"
},
"dimensions": {
"description": "",
"example": [
{
"type": "category",
"name": "my_dimension"
}
],
"type": "array",
"items": {
"$ref": "#/definitions/Dimension"
}
}
},
"required": [
"name",
"country",
"dimensions"
]
},
"Dimension": {
"title": "Dimension",
"example": {
"type": "category",
"name": "my_dimension"
},
"type": "object",
"properties": {
"type": {
"description": "",
"example": "category",
"type": "string"
},
"name": {
"description": "",
"example": "my_dimension",
"type": "string"
}
},
"required": [
"type",
"name"
]
},
"CreateASignalrequest": {
"title": "Create a SignalRequest",
"example": {
"name": "My Bookings",
"country": "NZ",
"dimensions": [
{
"type": "category",
"name": "my_dimension"
}
]
},
"type": "object",
"properties": {
"name": {
"description": "",
"example": "My Bookings",
"type": "string"
},
"country": {
"description": "",
"example": "NZ",
"type": "string"
},
"dimensions": {
"description": "",
"example": [
{
"type": "category",
"name": "my_dimension"
}
],
"type": "array",
"items": {
"$ref": "#/definitions/Dimension"
}
}
},
"required": [
"name",
"country",
"dimensions"
]
}
}
}