All URIs are relative to https://api.crowdemotion.co.uk/v1
Method | HTTP request | Description |
---|---|---|
metric_get | GET /metric | List all registered metrics |
metric_metric_id_delete | DELETE /metric/{metric_id} | Delete a Metric |
metric_metric_id_get | GET /metric/{metric_id} | Find a Metric |
metric_post | POST /metric | Create Metric |
list[Metric] metric_get(skip=skip, limit=limit, where=where, sort=sort)
List all registered metrics
Metrics are linked to time-series and define their meaning.
Common metric ID are listed below:
id | Value |
1 | Timestamp |
2 | Neutral |
3 | Happiness |
4 | Surprise |
5 | Puzzlement |
6 | Disgust |
7 | Fear |
8 | Sadness |
Permissions: ✗ Respondent ✗ Customer ✓ Manager
import time
import crowdemotion_api_client_python
from crowdemotion_api_client_python.rest import ApiException
from pprint import pprint
# Configure API key authorization: api_key
crowdemotion_api_client_python.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# crowdemotion_api_client_python.configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = crowdemotion_api_client_python.MetricApi()
skip = 56 # int | The number of results to skip. (optional)
limit = 56 # int | The maximum number of results to return. (optional)
where = 'where_example' # str | JSON formatted string condition. (optional)
sort = 'sort_example' # str | Attribute used to sort results. (optional)
try:
# List all registered metrics
api_response = api_instance.metric_get(skip=skip, limit=limit, where=where, sort=sort)
pprint(api_response)
except ApiException as e:
print "Exception when calling MetricApi->metric_get: %s\n" % e
Name | Type | Description | Notes |
---|---|---|---|
skip | int | The number of results to skip. | [optional] |
limit | int | The maximum number of results to return. | [optional] |
where | str | JSON formatted string condition. | [optional] |
sort | str | Attribute used to sort results. | [optional] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Metric metric_metric_id_delete(metric_id)
Delete a Metric
Permissions: ✗ Respondent ✗ Customer ✓ Manager
import time
import crowdemotion_api_client_python
from crowdemotion_api_client_python.rest import ApiException
from pprint import pprint
# Configure API key authorization: api_key
crowdemotion_api_client_python.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# crowdemotion_api_client_python.configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = crowdemotion_api_client_python.MetricApi()
metric_id = 56 # int | ID of Metric to be deleted.
try:
# Delete a Metric
api_response = api_instance.metric_metric_id_delete(metric_id)
pprint(api_response)
except ApiException as e:
print "Exception when calling MetricApi->metric_metric_id_delete: %s\n" % e
Name | Type | Description | Notes |
---|---|---|---|
metric_id | int | ID of Metric to be deleted. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Metric metric_metric_id_get(metric_id)
Find a Metric
Metrics are linked to time-series and define their meaning.
Common metric ID are listed below:
id | Value |
1 | Timestamp |
2 | Neutral |
3 | Happiness |
4 | Surprise |
5 | Puzzlement |
6 | Disgust |
7 | Fear |
8 | Sadness |
Permissions: ✗ Respondent ✗ Customer ✓ Manager
import time
import crowdemotion_api_client_python
from crowdemotion_api_client_python.rest import ApiException
from pprint import pprint
# Configure API key authorization: api_key
crowdemotion_api_client_python.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# crowdemotion_api_client_python.configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = crowdemotion_api_client_python.MetricApi()
metric_id = 56 # int | ID of Metric to find.
try:
# Find a Metric
api_response = api_instance.metric_metric_id_get(metric_id)
pprint(api_response)
except ApiException as e:
print "Exception when calling MetricApi->metric_metric_id_get: %s\n" % e
Name | Type | Description | Notes |
---|---|---|---|
metric_id | int | ID of Metric to find. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Metric metric_post(body)
Create Metric
Permissions: ✗ Respondent ✗ Customer ✓ Manager
import time
import crowdemotion_api_client_python
from crowdemotion_api_client_python.rest import ApiException
from pprint import pprint
# Configure API key authorization: api_key
crowdemotion_api_client_python.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# crowdemotion_api_client_python.configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = crowdemotion_api_client_python.MetricApi()
body = crowdemotion_api_client_python.MetricCreation() # MetricCreation | Request body
try:
# Create Metric
api_response = api_instance.metric_post(body)
pprint(api_response)
except ApiException as e:
print "Exception when calling MetricApi->metric_post: %s\n" % e
Name | Type | Description | Notes |
---|---|---|---|
body | MetricCreation | Request body |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]