API documentation for configure_measuring_point

Back to main page
URL
/api/v1/configure_measuring_point

Configure a measuring point.

Parameters:
measuring_point_id:
The ID of the measuring point which you'd like to configure. If omitted it will create a new measuring point.

Expects the body of the request to be a JSON dictionary. Note that all values passed are expected to be in the user profiles unit of distance. Also note that it will be removed from a project if coupled to one when using the API.

The following can be set using the API

Body options:
name:
Name for the measuring point
sensor_name:
six letter name which is located on the front sticker, can be blank for no Swarm connected
postal_code (optional):
Postal code
house_number (optional):
House number
street_name (optional):
Street name
city (optional):
City
disable_led:
true or false, setting it to true will turn of the led on the front of the Swarm when there is an active connection to the server.
log_flush_interval:
Interval in seconds, when there are measurements which didn't cause an alarm they will be send at this interval.
timezone:
The timezone in which the Swarm is. One of: Asia/Qostanay, Australia/Lord_Howe, PST8PDT, Australia/Adelaide, America/Guatemala, Mexico/General, America/Kralendijk, Europe/Podgorica, Etc/Greenwich, ROC, Etc/GMT+12, Canada/Saskatchewan, Australia/Sydney, America/Guadeloupe, Pacific/Apia, Africa/Cairo, Indian/Comoro, America/Indiana/Petersburg, Brazil/DeNoronha, HST, Pacific/Niue, America/Resolute, America/Pangnirtung, America/Argentina/Rio_Gallegos, Antarctica/Rothera, Africa/Tripoli, America/Edmonton, Asia/Dushanbe, Europe/Monaco, Etc/UTC, GMT0, America/Porto_Acre, Europe/Kirov, Europe/Vilnius, Atlantic/Canary, Africa/Casablanca, America/Lower_Princes, Africa/Khartoum, Canada/Eastern, America/Indiana/Vincennes, America/Phoenix, Antarctica/Davis, Australia/West, Kwajalein, Africa/Maseru, Pacific/Wallis, Asia/Chongqing, Pacific/Guam, US/Hawaii, America/Indiana/Tell_City, Etc/GMT+11, Africa/Lagos, Pacific/Yap, America/Cayman, Europe/Saratov, America/St_Vincent, Asia/Ulaanbaatar, Etc/GMT-13, America/Recife, Asia/Jakarta, ROK, America/Blanc-Sablon, Africa/Douala, Asia/Ashgabat, Asia/Vientiane, Europe/Ulyanovsk, America/Belem, America/Jujuy, Pacific/Wake, America/New_York, America/Dawson_Creek, Antarctica/South_Pole, Australia/LHI, Europe/Tiraspol, Asia/Famagusta, Portugal, America/Indiana/Marengo, America/Montreal, Europe/Belfast, America/Merida, Asia/Krasnoyarsk, Europe/London, America/Campo_Grande, Pacific/Chatham, Etc/GMT-12, US/Arizona, America/Montevideo, America/Danmarkshavn, Antarctica/Syowa, America/Managua, Etc/Universal, America/Paramaribo, Europe/Nicosia, Antarctica/Vostok, Navajo, America/Antigua, America/Swift_Current, America/Catamarca, Etc/GMT-6, Europe/Madrid, Asia/Thimphu, Antarctica/Casey, America/North_Dakota/Center, America/Mexico_City, Atlantic/Faroe, Canada/Central, Pacific/Guadalcanal, Australia/Melbourne, Australia/South, Asia/Ulan_Bator, Europe/Zaporozhye, America/Rosario, Europe/Jersey, US/Pacific, America/Denver, Asia/Tokyo, Atlantic/South_Georgia, PRC, Europe/Isle_of_Man, Africa/Kampala, Africa/Abidjan, Asia/Atyrau, America/Argentina/ComodRivadavia, America/Sitka, Pacific/Tarawa, America/Marigot, Asia/Riyadh, Etc/GMT-1, America/Argentina/Mendoza, Africa/Malabo, Asia/Jayapura, Etc/GMT+9, Asia/Dili, America/Argentina/San_Juan, America/Winnipeg, Europe/Gibraltar, America/Panama, Pacific/Johnston, Africa/Ndjamena, Asia/Nicosia, Asia/Brunei, Africa/Lubumbashi, EST5EDT, America/Kentucky/Monticello, America/Indiana/Vevay, Europe/Oslo, Africa/Juba, America/Tegucigalpa, America/Metlakatla, America/Fortaleza, Europe/Kaliningrad, Africa/El_Aaiun, Asia/Novokuznetsk, Europe/Zagreb, Asia/Katmandu, Europe/Mariehamn, Etc/GMT-9, Europe/Rome, Europe/Dublin, America/Santarem, Africa/Windhoek, America/Puerto_Rico, America/Buenos_Aires, America/St_Thomas, GB, Asia/Rangoon, Pacific/Kwajalein, Pacific/Port_Moresby, Pacific/Saipan, Asia/Chita, Australia/Lindeman, Asia/Kuala_Lumpur, America/Los_Angeles, Europe/Copenhagen, America/Knox_IN, Asia/Novosibirsk, Pacific/Kosrae, Africa/Dakar, Pacific/Kiritimati, Africa/Johannesburg, Asia/Kathmandu, EET, Asia/Manila, Africa/Monrovia, America/Moncton, Asia/Hovd, Europe/Amsterdam, Africa/Mbabane, Pacific/Truk, Chile/EasterIsland, America/Adak, Europe/Minsk, Indian/Mahe, Africa/Asmara, Europe/Sarajevo, America/Noronha, Asia/Chungking, Eire, Indian/Chagos, Antarctica/Palmer, America/Santiago, Pacific/Palau, Pacific/Noumea, Africa/Bamako, America/Yellowknife, America/Rankin_Inlet, US/Michigan, America/Grenada, Asia/Khandyga, Asia/Bangkok, Pacific/Auckland, Africa/Harare, US/Samoa, Indian/Reunion, Europe/Bratislava, America/Coral_Harbour, Pacific/Rarotonga, Singapore, Pacific/Enderbury, Europe/Athens, Etc/GMT0, Atlantic/Reykjavik, America/Boa_Vista, Asia/Shanghai, Asia/Irkutsk, Asia/Sakhalin, Pacific/Fiji, Europe/Busingen, Africa/Mogadishu, America/Hermosillo, Europe/Guernsey, Atlantic/Madeira, Asia/Qatar, Australia/Darwin, Africa/Lome, Asia/Yekaterinburg, Asia/Macao, Hongkong, America/Belize, America/Godthab, Asia/Magadan, Africa/Conakry, Canada/Newfoundland, Asia/Barnaul, America/Barbados, America/Creston, Pacific/Tongatapu, America/Shiprock, Australia/North, GMT-0, Etc/GMT-11, Asia/Harbin, Canada/Yukon, Pacific/Ponape, America/Montserrat, Asia/Tehran, America/Mazatlan, MET, America/St_Johns, UCT, Europe/Sofia, Asia/Kamchatka, Europe/Paris, Europe/Lisbon, America/Aruba, Asia/Samarkand, America/Argentina/La_Rioja, Asia/Baku, America/Manaus, Pacific/Honolulu, NZ-CHAT, Africa/Tunis, Asia/Makassar, GMT, GMT+0, America/Rio_Branco, Africa/Maputo, Antarctica/Troll, Africa/Dar_es_Salaam, Africa/Algiers, Africa/Kigali, Pacific/Midway, Asia/Jerusalem, Europe/Warsaw, Etc/GMT+6, America/Tortola, Europe/Berlin, Asia/Gaza, America/Bahia_Banderas, Asia/Dacca, Africa/Kinshasa, America/Bogota, Australia/Perth, America/Argentina/Salta, Asia/Yerevan, America/Maceio, Pacific/Gambier, Asia/Ujung_Pandang, Iceland, Asia/Kolkata, Asia/Bishkek, NZ, Indian/Mauritius, Etc/GMT+0, America/St_Barthelemy, Etc/GMT, Indian/Cocos, Egypt, Pacific/Samoa, America/Louisville, Pacific/Marquesas, Asia/Bahrain, Europe/Belgrade, America/Indiana/Knox, America/Goose_Bay, Asia/Kashgar, Universal, Europe/Malta, Africa/Ceuta, America/Whitehorse, America/Argentina/Tucuman, Asia/Calcutta, MST7MDT, Brazil/Acre, Africa/Nouakchott, Australia/Victoria, Etc/UCT, America/Santo_Domingo, Asia/Kuwait, Etc/GMT-14, America/Cancun, America/Lima, Etc/GMT-2, Asia/Yangon, Pacific/Nauru, US/East-Indiana, America/Inuvik, Europe/Zurich, Australia/Currie, Pacific/Tahiti, Etc/GMT-5, Mexico/BajaNorte, America/St_Lucia, Asia/Thimbu, America/Chicago, Etc/GMT+10, Mexico/BajaSur, Asia/Anadyr, Pacific/Pohnpei, America/St_Kitts, America/Dawson, Etc/GMT-8, US/Central, Africa/Ouagadougou, Asia/Aqtobe, Africa/Bujumbura, America/Cambridge_Bay, Brazil/East, Asia/Muscat, America/Ensenada, Europe/Budapest, Europe/Uzhgorod, America/Mendoza, Australia/Tasmania, Pacific/Efate, Europe/Istanbul, America/Indiana/Winamac, US/Indiana-Starke, America/Argentina/Cordoba, Africa/Luanda, Australia/Broken_Hill, Europe/Kiev, Europe/Prague, Pacific/Pago_Pago, Asia/Ashkhabad, Pacific/Funafuti, Australia/Queensland, America/Anchorage, Etc/GMT+2, Africa/Nairobi, Asia/Istanbul, Europe/San_Marino, America/Monterrey, Antarctica/McMurdo, Europe/Tirane, Asia/Taipei, America/La_Paz, America/Argentina/Catamarca, Antarctica/Macquarie, Africa/Addis_Ababa, Asia/Pyongyang, Libya, Asia/Pontianak, Asia/Kabul, Asia/Almaty, America/Fort_Wayne, America/Anguilla, Atlantic/Azores, Asia/Omsk, Etc/GMT-7, America/Guyana, America/Grand_Turk, America/El_Salvador, Africa/Bissau, America/Cuiaba, America/North_Dakota/Beulah, Asia/Ho_Chi_Minh, America/Virgin, Etc/GMT-0, Atlantic/Faeroe, Asia/Dubai, Australia/Hobart, Europe/Vatican, Asia/Phnom_Penh, America/Menominee, Atlantic/Cape_Verde, Atlantic/St_Helena, America/Curacao, W-SU, America/Argentina/Ushuaia, America/Martinique, Asia/Saigon, Australia/Brisbane, Australia/Eucla, US/Mountain, Africa/Libreville, America/Atikokan, Europe/Andorra, MST, Europe/Luxembourg, America/Nome, Europe/Samara, America/Guayaquil, America/Tijuana, Africa/Timbuktu, Asia/Kuching, Asia/Seoul, Europe/Simferopol, Europe/Skopje, Europe/Astrakhan, Antarctica/DumontDUrville, Europe/Chisinau, Canada/Atlantic, America/Matamoros, Asia/Hebron, Poland, GB-Eire, Greenwich, Asia/Beirut, Asia/Tbilisi, Pacific/Pitcairn, Asia/Aden, Asia/Ust-Nera, Asia/Srednekolymsk, America/Argentina/Buenos_Aires, Africa/Freetown, Asia/Macau, Africa/Accra, Brazil/West, Europe/Moscow, Zulu, Asia/Vladivostok, America/Scoresbysund, Asia/Qyzylorda, Atlantic/Bermuda, Australia/Canberra, Atlantic/Jan_Mayen, Africa/Asmera, Indian/Mayotte, Africa/Banjul, Africa/Niamey, America/Argentina/Jujuy, America/Detroit, Australia/ACT, Europe/Vienna, Antarctica/Mawson, America/North_Dakota/New_Salem, America/Eirunepe, Atlantic/Stanley, America/Ojinaga, Asia/Karachi, Asia/Singapore, Indian/Christmas, Europe/Ljubljana, Asia/Colombo, Indian/Kerguelen, America/Yakutat, Etc/Zulu, Asia/Tashkent, America/Juneau, Canada/Pacific, CST6CDT, Etc/GMT+8, Etc/GMT+5, America/Chihuahua, America/Costa_Rica, America/Thule, US/Alaska, Japan, America/Bahia, America/Atka, Africa/Porto-Novo, America/Araguaina, Africa/Djibouti, America/Kentucky/Louisville, Etc/GMT+3, Europe/Tallinn, Etc/GMT+7, US/Aleutian, Africa/Bangui, Asia/Yakutsk, US/Eastern, Europe/Stockholm, Iran, America/Nassau, America/Sao_Paulo, Africa/Gaborone, Europe/Bucharest, America/Toronto, Chile/Continental, America/Halifax, Israel, America/Dominica, Pacific/Fakaofo, America/Glace_Bay, Pacific/Chuuk, Asia/Baghdad, America/Punta_Arenas, America/Argentina/San_Luis, EST, America/Santa_Isabel, Canada/Mountain, Etc/GMT+4, Asia/Damascus, Etc/GMT+1, America/Boise, Europe/Volgograd, America/Port_of_Spain, Etc/GMT-4, Pacific/Galapagos, Pacific/Majuro, Indian/Antananarivo, Asia/Urumqi, America/Vancouver, America/Rainy_River, Asia/Tel_Aviv, America/Porto_Velho, Turkey, America/Iqaluit, Australia/NSW, America/Cordoba, UTC, America/Nipigon, Pacific/Norfolk, Asia/Hong_Kong, Asia/Choibalsan, America/Miquelon, Asia/Amman, Europe/Brussels, Jamaica, America/Havana, Arctic/Longyearbyen, Africa/Blantyre, WET, Indian/Maldives, America/Asuncion, Europe/Vaduz, Europe/Helsinki, America/Fort_Nelson, Pacific/Easter, America/Port-au-Prince, America/Cayenne, America/Regina, America/Caracas, Australia/Yancowinna, America/Jamaica, Asia/Tomsk, Asia/Aqtau, Etc/GMT-3, America/Thunder_Bay, Africa/Sao_Tome, Pacific/Bougainville, America/Indiana/Indianapolis, Etc/GMT-10, Africa/Brazzaville, Asia/Oral, Africa/Lusaka, America/Indianapolis, Europe/Riga, Asia/Dhaka, CET, Cuba
guide_line:
One of: SBR_A_2010, DIN4150_3_80Hz, ISEE_250Hz, BS7385_250Hz, Circulaire86, SN640312a, SBR_B_2002, DIN4150_2, SBR_A_2017
category (optional):
One of: CAT2, CAT3, CAT1
building_level:
One of: foundation, floorSlabs, dinFoundation, pipeline, USBM_RI8507_plaster, unspecified, guidelineValues, highestFloor, OSMRE_1983, undergroundCavities, lowerLevel, selfDefined, USBM_RI8507_drywall
flat_level:
Only available when the building_level is set to unspecified. This will be an absolute value as alarm level.
vector_enabled:
On, Off, setting it to On will store the PVS (peak vector sum) and also trigger (non frequency dependend) alarms based on PVS.
vdv_enabled:
On, Off, setting it to On will calculate and store VDV (vibration dose value)
atop_enabled:
On, Off, setting it to On will calculate and store PPA (peak particle acceleration)
vtop_enabled:
On, Off, setting it to Off will prevent calculating and storing PPV (peak particle acceleration)
vdv_period:
Will be used as the measurement duration for calculating VDV
vdv_x:
One of: BS6841_Wb, BS6841_Wg, ISO2631_Wk, ISO2631_Wj, ISO2631_Wm, BS6841_Wc, ISO2631_We, BS6841_Wd, BS6841_We, ISO2631_Wf, ISO2631_Wc, ISO8041_Wh, BS6841_Wf, ISO2631_Wd, ISO5349_Wh
vdv_y:
One of: BS6841_Wb, BS6841_Wg, ISO2631_Wk, ISO2631_Wj, ISO2631_Wm, BS6841_Wc, ISO2631_We, BS6841_Wd, BS6841_We, ISO2631_Wf, ISO2631_Wc, ISO8041_Wh, BS6841_Wf, ISO2631_Wd, ISO5349_Wh
vdv_z:
One of: BS6841_Wb, BS6841_Wg, ISO2631_Wk, ISO2631_Wj, ISO2631_Wm, BS6841_Wc, ISO2631_We, BS6841_Wd, BS6841_We, ISO2631_Wf, ISO2631_Wc, ISO8041_Wh, BS6841_Wf, ISO2631_Wd, ISO5349_Wh
measuring_type:
Needed with SBR, DIN 4150-3 and Circulaire86 measurements. One of limited, indicative, extensive
vibration_type:
Needed with SBR, DIN 4150-3 and Circulaire86 measurements. One of shortTerm, repeated, continuous, peak, longTerm
building_state:
Needed with SBR 2017. One of sensitive, normal
zet_gev_laagdikte:
Needed with SBR 2017 when the category is foundation. One of H_5m, H_8m, H_3m, H_7m, H_1m, H_4m, H_6m, H_2m
lining_material:
One of: concreteAndStone, reinforcedConcreteAndTubing, masonry
construction_type:
One of: resistantConstruction, verySensitiveConstruction, sensitiveConstruction
pipeline_type:
One of: concreteAndSteel, brickworkAndPlastic, weldedSteel
data_save_level:
float number in mm/s, threshold for storing measurement samples
measurement_duration:
Interval in seconds, at this interval samples will be taken
trace_save_level:
float number in mm/s, threshold for storing traces
trace_pre_trigger:
float number in seconds: when trace_save_level was passed how many seconds before are included in the trace
trace_post_trigger:
float number in seconds: when trace_save_level was passed how many seconds after are included in the trace
alarm_value:
int number in percentage: percentage of the guideline which will cause an alarm
email_delay:
int number in seconds: how much time will there be between two e-mails
alarm_recipients:
a list of lists containing 3 strings: where the first element is the type, the second element the value for the type and the last element which alarm level should trigger sending the notification.
webhook_recipient (optional):
an extra recipient that sends alarm notifications to a webhook. The webhook will send POST requests with a UTF-8-encoded JSON body containing the notification info. The secret provided combined with the request body will be hashed using HMAC sha-256. The hash will be placed inside of the http-header: X-Omnidots-Notifier-Signature. Make sure to calculate the hash on the receiving end as well and to compare these hashes.
There will be some variation between the different types and categories of notifications but all of them will atleast contain the following information:
{
    "measuring_point_id": 1337,
    "category": "sensor_went_online",
    "level": "success",
    "created_at": 1618488056.925577,
    "data": { "sensor": "HOSEVE", "datetime": 1618488056.922907 },
    "text": "Your Swarm HOSEVE went online on April 15, 2021, 2:00:56 p.m. CEST."
}
enable_time_[0-6]:
Scheduled start time of the Swarm, note that 0 is Sunday
disable_time_[0-6]:
Scheduled end time of the Swarm, note that 0 is Sunday

Example body:

{
    "name": "Test 123",
    "sensor_name": "BANANA"
    "postal_code": "1234 AB",
    "house_number": 56,
    "street_name": "Test road",
    "city": "Awesome town",
    "disable_led": true,
    "log_flush_interval": 60,
    "timezone": "Europe/Amsterdam",
    "guide_line": "SBR_A",
    "category": "CAT1",
    "measuring_type": "Extensive",
    "vibration_type": "Repeated",
    "data_save_level": 0.2,
    "measurement_duration": 2.0,
    "trace_save_level": 10.0,
    "trace_pre_trigger": 3.0,
    "trace_post_trigger": 3.0,
    "alarm_level_1": 90,
    "alarm_level_2": 100,
    "alarm_level_3": 100,
    "email_delay": 120,
    "alarm_recipients": [
        ["phone_number", "+31850070336", "alarm_level_3"],
        ["phone_number", "+31850070336", "measuring_point_administrator"],
        ["email", "info@omnidots.com", "alarm_level_1"]
    ],
    "webhook_recipient": {
        "url": "https://your-web-address.domain/webhook",
        "secret": "high-entropy-secret-0l25a9df7d8afd5ec",
        "alarm_level_1": false,
        "alarm_level_2": false,
        "alarm_level_3": false,
        "measuring_point_administrator": true
    },
    "enable_time_0": "00:00:00",
    "disable_time_0": "23:59:59",
    "enable_time_1": "00:08:00",
    "disable_time_1": "18:00:00",
    "enable_time_2": "00:00:00",
    "disable_time_2": "23:59:59",
    "enable_time_3": "00:00:00",
    "disable_time_3": "23:59:59",
    "enable_time_4": "00:00:00",
    "disable_time_4": "23:59:59",
    "enable_time_5": "00:00:00",
    "disable_time_5": "23:59:59",
    "enable_time_6": "00:00:00",
    "disable_time_6": "23:59:59",
}

Available API endpoints:

URL Description
/api/v1/user/authenticate Athenticate user and return a temperary API token.
/api/v1/user/account Get user account by API token.
/api/v1/token_details Tests the token and returns account info if the token is valid.
/api/v1/list_measuring_points Gives a list of measuring points that this token can access.
/api/v1/configure_measuring_point Configure a measuring point.
/api/v1/list_sensors Gives a list of sensors that this token can access.
/api/v1/get_peak_records Fetch peak particle velocity/acceleration records for a given measuring point.
/api/v1/get_vdv_records Fetch VDV records for a given measuring point.
/api/v1/get_veff_records Fetch Veff/KB records for a given measuring point.
/api/v1/get_traces_list Get a list of traces for a given time range.
/api/v1/get_traces Get detailed traces for a given time range.