Event types reference

About types

You are free to use any type in your app, but for the sake of interoperability we heavily recommend that you extend the standard types listed here.

To customize your own Pryv.io setup, clone the Data Types repository and follow the guide there.

Basics

An event's type is defined by its type property that indicates how to handle its content (if any). The type itself is specified as {class}/{format}, lowercase (e.g. note/html). Rationale:

  • The class usually specifies the "nature" or "kind" of data represented by the event. Events of the same class are assumed to be comparable and convertible, and will likely be displayed similarly.
  • The format usually specifies how the data is structured. For example, a basic note may just be a single string value, while an rich-text note could be a more complex object structure.

Format specification

For each of the types described below, the event content's structure is specified with JSON-schema. Notes:

  • A "null" content type means that the event has no content property (because the core event structure is sufficient).
  • Any content type other than "null" implies that the event must have a content property of the specified JSON-schema type.
  • If the content is an object, its (sub-)properties are assumed to be optional unless otherwise specified by JSON-schema's "required" field.

JSON file

This directory is available as a JSON file for automated processing:

Submitting types & issues

This directory will keep evolving to match the needs of Pryv apps: issues and pull requests are welcome.

 

 

Directory

Version: 0.3.0

Complex types

Activity

The time spent on a given activity (tasks, sports, etc.).
activity/plainno content 

Plain activity event with no specific content; the activity is defined by the event's stream, time and duration, and possibly description and tags.

Attributes

To record attributes, such as blood type, date of birth or skin type.
attributes/biological-sexstring,enum: notSet, female, male, other

An attribute type for the user’s sex

attributes/blood-typestring,enum: notSet, aPositive, bPositive, oPositive, abPositive, aNegative, bNegative, abNegative, oNegative

An attribute type for the user’s blood type

attributes/skin-typestring,enum: notSet, Pale white skin, White skin, White to light brown skin, Beige-olive skin, Brown skin, Dark brown to black skin

An attribute type for the user’s skin type

Audio

To record audio (conversations, voice messages, etc.).
audio/attachedno content attachment required

The audio source is the file attached to the event (no explicit content defined). You can use the event's duration to mirror the recording's duration.

audio/urlstring,pattern: ^(https?)://.+$

A reference to an audio file online.

Audiogram

To record audiogram data.
audiogram/dataobject
sensitivityPointsarray,items: [object Object],start: [object Object],end: [object Object],metadata: [object Object]

Array of sensitivity points

requiredno content ,0: sensitivityPoints,1: start,2: end

Blood-pressure

To record a blood pressure measurement.
blood-pressure/mmhg-bpmobject,required: systolic, diastolic

The blood pressure measurement. Pressures are stored in mmHg and the heart rate in bpm

systolicnumber

Systolic pressure. Unit: mmHg.

diastolicnumber

Diastolic pressure. Unit: mmHg.

ratenumber

Heart rate. Unit: bpm

Boolean

To record whether an attribute is true, e.g. if the user has a wheelchair.
boolean/boolboolean

An attribute type for true or false

Call

To record references to phone calls (landline, mobile, Skype, etc.).
call/namestring

The contact's name (or a free-form identifier)

call/skypestring

The Skype id

call/telephonestring

The phone number

Clinical

The clinical record stores information about a single condition, procedure, or result, along with a fhir resource underlying data from the user’s healthcare institution.
clinical/fhirobject

Type to record the clinical information, including an attachment, corresponding to the data of the fhir resource.

displayNamestring

The primary display name of the clinical record.

clinicalTypestring,enum: allergyRecord, immunizationRecord, conditionRecord, labResultRecord, medicationRecord, procedureRecord, vitalSignRecord

An identifier that indicates the type of record, such as allergy or condition record.

fhirobjectattachment required,required: identifier, resourceType

The Fast Healthcare Interoperability Resources (FHIR) data for this record.

identifierstring

The value from the FHIR resource’s id field.

resourceTypestring,enum: allergyIntolerance, condition, immunization, medicationOrder, medicationDispense, medicationStatement, observation, procedure
requiredno content ,0: displayName,1: clinicalType

Contact

To record events related to people (meeting someone special, business encounters, etc.).
contact/facebookobject,additional properties: allowed,required: id

A Facebook user as specified in the Graph API: https://developers.facebook.com/docs/reference/api/user/

idstring
contact/vcardstring

A business card in vCard 2.0-3.x format. See: rfc2425, rfc2426.

Credentials

To record credentials, such as secret keys, passwords or access rights.
credentials/pryv-api-endpointstring,pattern: ^(https?)://.+@.+$

Necessary information to access a Pryv.io account. Url in the format of http(s)://{token}@{apiEndpoint}

Date

To record a date and time.
date/iso-8601string

The ISO 8601 format

Encrypted

For client-side-encrypted events. The decrypted payload is expected to be a JSON object with the regular type and content properties (e.g. { "type": "..", "content": ".." }). If the event has attached files, they are expected to be similarly encrypted.
encrypted/aes-text-base64object,required: payload

AES encrypted payload, with a text key and a Base64 payload.

payloadstring

The encrypted data.

keyRefstring

A reference (e.g. id, name in keychain) to the key to use for decryption.

hintstring

Alternative to keyRef. A textual hint about which key to use for decryption.

File

To record a file, or a group of files. A fallback type for data with no specific handling in Pryv.
file/attachedno content attachment required

The file is attached to the event

file/attached-multipleno content attachment required

A set of file attached. Structure can be declared in the filenames.

file/urlstring,pattern: ^(https?)://.+$

A reference to a file hosted elsewhere

Message

To record messages, such as e-mails or posts on social networks.
message/emailobject,required: from, to, body

An e-mail message.

fromstring
tostring
ccstring
bccstring
subjectstring
message-idstring
reply-tostring
x-headersobject,additional properties: allowed

Key/value map of X-* headers

bodystring
message/facebookobject,additional properties: allowed,required: id, message

A Facebook post. See Facebook's API docs for reference. Facebook properties message and created_time map to event description and time respectively. Facebook attached pictures can be directly mapped to attachments. Other Facebook properties such as link, source, privacy are allowed.

idstring
fromobject,required: name, id
namestring
idstring
toobject
dataarray,items: [object Object]
messagestring
sourcestring

Either a fully qualified "URL" for an external source or a "filename" for a Flash Movie or Video attached to this event.

propertiesstring,additional properties: allowed

Relative to source: a list of properties for an uploaded video, for example, the length of the video.

picturestring

Either a fully qualified "URL" for an external picture or a "filename" for a picture attached to this event.

status-typestring

One of mobile_status_update, created_note, added_photos, added_video, shared_story, created_group, created_event, wall_post, app_created_story, published_story, tagged_in_photo, approved_friend

message/twitterobject,additional properties: allowed,required: id, screen-name, text

A Twitter post. Twitter property created_at maps to event time. Other Twitter properties (see Twitter's API docs) are allowed.

idstring
screen-namestring
textstring

Mood

To record personal mood.
mood/ratingnumber,maximum: 1

Rating of mood (float value) 0:worst -> 1:best

mood/emoticonstring

ASCII Art emoticon

Music

To record references to music, usualy tracks (from Soundcloud, Shazam tags, etc.).
music/basicobject

Inspired from id3 key/pair

titlestring
artiststring
albumstring
trackinteger
yearinteger
genrestring
music/soundcloudobject,additional properties: allowed,required: id
idinteger

Note

To record different kinds of text-based notes, from simple text to more complex formatted content like social network posts.
note/htmlstring,maxLength: 4194304

An HTML-formatted note.

note/txtstring,maxLength: 4194304

A plain-text note.

note/webclipobject,required: url

An HTML-formatted note associated to its source URL.

urlstring,pattern: ^(https?)://.+$
contentstring,maxLength: 4194304

An HTML-formatted string.

Numset

A set of numerical values.
numset/*object,additional properties: allowed

The format key is freely defined.

For example, a heart measurement with type numset/heart and content:

{ 
  "systolic": { "pressure/mmhg": 105 },
  "diastolic": { "pressure/mmhg": 64 },
  "rate": { "frequency/bpm": 88 }
}

Properties unspecified above must match the following pattern:

^(/[^/]+)+$number

Picture

To record any kind of image (photos, designs, screenshots, etc.)
picture/base64string,required: payload, format

The picture is caried in base64 (utf-8) encoded in string

payloadstring

base64 encoded content

formatstring

The data format "gif", "jpeg", "png", "tiff", "vnd.microsoft.com", "svg+xml"

filenamestring

A filename

picture/attachedno content attachment required

The picture is the image file attached to the event (no explicit content defined). TODO: list accepted formats.

picture/urlstring,pattern: ^(https?)://.+$

A reference to a picture file online.

Position

To record a geographical position.
position/wgs84object,required: latitude, longitude

The latest revision of the World Geodetic System (used by GPS).

latitudenumber

Unit: degrees north from the equator.

longitudenumber

Unit: degrees east from the zero meridian.

altitudenumber

Unit: meters above sea level.

horizontalAccuracynumber

The radius of uncertainty for latitude and longitude. Unit: meters. Negative if latitude and longitude are invalid.

verticalAccuracynumber

The radius of uncertainty for altitude. Unit: meters. Negative if altitude is invalid.

speednumber

For informational purposes only. Unit: meters / second. Negative if invalid.

bearingnumber

Unit: degrees clockwise from north. Negative if invalid.

Ratio

To record proportional values (e.g. 1/3, 21.5/100).
ratio/genericobject,required: value, relativeTo

Generic ratio.

valuenumber
relativeTonumber
ratio/percentnumber

A percentage value.

Reproductive-health

To record reproductive health data, such as menstrual flow or ovulation test results.
reproductive-health/sexual-activitystring,enum: notSet, protectionUsed, protectionNotUsed

A type to record sexual activity

reproductive-health/menstrual-flowstring,enum: unspecified, none, light, medium, heavy

A type to record the menstrual cycles

reproductive-health/mucus-qualitystring,enum: dry, sticky, creamy, watery, eggWhite

A type to record the quality of the mucus

reproductive-health/ovulationstring,enum: negative, luteinizingHormoneSurge, indeterminate, estrogenSurge

A type to record the result of an ovulation test

Sleep

To record sleep information.
sleep/analysisobject
analysisstring,enum: inBed, asleep, awake

Symptoms

To record medical symptoms, such as abdominal cramps or chest pain.
symptoms/severitystring,enum: notPresent, mild, moderate, severe, unspecified

A type to record severity of a symptom such as bloating or abdominal cramps.

symptoms/appetite-changesstring,enum: decreased, increased, noChange, unspecified

A type to represent change in appetite.

Url

To record references to online resources. Format ~= protocol.
url/httpstring,pattern: ^(https?)://.+$

An HTTP or HTTPS resource.

Video

To record video (home snippets, Vimeo or YouTube links, etc.).
video/attachedno content attachment required

The video is the file attached to the event (no explicit content defined). TODO: list accepted formats.

video/urlstring,pattern: ^(https?)://.+$

A reference to an video file online.

video/vimeostring

A Vimeo video ID.

video/youtubestring

A YouTube video ID.

Numerical types

Absorbed-dose-equivalent

The radiation absorbed by a fixed mass of biological tissue.
absorbed-dose-equivalent/svSievert

Absorbed-dose-rate

The absorbed dose of ionizing radiation imparted at a given location per unit of time (second, minute, hour, or day).
absorbed-dose-rate/gy-sGray per second

Absorbed-dose

The energy deposited in a medium by ionizing radiation per unit mass.
absorbed-dose/gyGray

Angle

The figure formed by two rays.
angle/degDegrees
angle/gradGrade
angle/radRadians

Angular-acceleration

The rate of change of angular velocity.
angular-acceleration/rad-s2Radians per second squared

Angular-speed

angular-speed/rad-sRadians per second

Area

The extent of a two-dimensional surface or shape, or planar lamina, in the plane.
area/acAcres (imperial)
area/ft2Square feet
area/haHectares
area/in2Square inches
area/km2Square kilometers
area/m2Square meter
area/mm2Square millimeters
area/yd2Square yards
area/mi2Square miles

Capacitance

The ability of a body to store an electrical charge.
capacitance/fFarad

Catalytic-activity

The increase in rate of a chemical reaction due to the participation of a substance called a catalyst.
catalytic-activity/katKatal

Count

To record the counting of objects (eggs, apples, etc.).
count/stepsNumber of steps
count/genericFor general items that demand no particular handling.

Data-quantity

Unit of information in computing and digital communications.
data-quantity/bBytes
data-quantity/bitsBits
data-quantity/gbGigabytes
data-quantity/gbitsGigabits
data-quantity/kbKilobytes
data-quantity/kbitsKilobits
data-quantity/mbMegabytes
data-quantity/mbitsMegabits
data-quantity/tbTerabytes

Density

The density of a material (volumetric mass density).
density/g-dlGrams per deciliter
density/kg-m3Kilograms per cubic meter
density/mmol-lMillimoles per liter
density/mg-dlMilligrams per deciliter

Dynamic-viscosity

The resistance to flow of a fluid under an applied force.
dynamic-viscosity/pa-sPascal second

Electric-charge-line-density

The electric charge per unit volume of space, in one, two or three dimensions.
electric-charge-line-density/c-mCoulomb per meter

Electric-charge

The electric charge of an object.
electric-charge/cCoulomb

Electric-current

A flow of electric charge.
electric-current/aAmpere

Electrical-conductivity

A material that accommodates the transport of electric charge.
electrical-conductivity/sSiemens
electrical-conductivity/usMicro Siemens

Electromotive-force

Voltage generated by a battery or by the magnetic force.
electromotive-force/vVolt

Energy

The capacity of a physical system to perform work.
energy/btuBritish Thermal Units
energy/calCalories
energy/evElectron-Volts
energy/ergErgs
energy/ftlbFoot-Pounds
energy/jJoules
energy/kcalKilo-calories
energy/wsWatt-seconds
energy/kwhKilowatt-hours
energy/nmNewton-meters
energy/whWatt-hours

Force

A push or pull upon an object resulting from the object's interaction with another object.
force/dynDynes
force/nNewtons
force/pdlPoundals

Frequency

The number of occurrences of a repeating event per unit time.
frequency/bpmBeats per minute
frequency/brpmBreaths per minute
frequency/ghzGigahertz
frequency/hzHertz (also known as cycles per second)
frequency/khzKilohertz
frequency/megahzMegahertz
frequency/millihzMillihertz
frequency/nhzNanohertz
frequency/rpmRevolutions per minute
frequency/thzTerahertz
frequency/uhzMicrohertz

Gas-consumption

The quantity of gas consumed.
gas-consumption/mlpkgminMilliliters per kilogram and minute

Length

Length measurements. Format = unit.
length/cmCentimeters
length/mMeters
length/mmMillimeters
length/kmKilometers
length/aÅngströms
length/auAstronomical units
length/chChains
length/leaLeagues
length/ftFeet
length/inInches
length/lyLight-years
length/milMil
length/miMiles
length/furFurlongs
length/nmiMiles (nautical)
length/pPoints
length/picaPicas
length/ftmFathoms
length/cbCables
length/umMicrons
length/ydYards

Linear-acceleration

The rate of change of linear velocity.
linear-acceleration/m-s2Meters per second squared

Luminous-intensity

The wavelength-weighted power emitted by a light source.
luminous-intensity/cdCandela

Mass

The heaviness of an object.
mass/kgKilograms
mass/gGrams
mass/mgMilliGrams
mass/grGrains
mass/drDrams
mass/l-tLong tons
mass/lbPounds
mass/tMetric tons
mass/ozOunces
mass/s-tShort tons
mass/stStone

Mol

The size of an ensemble of elementary entities, such as atoms, molecules, electrons, and other particles.
mol/molMole
mol/lb-molPound-mole.

Money

To record sums of money (expenses, loans, stock values, etc.). Format = currency. Based on ISO 4217.
money/aed
money/angNetherlands Antilles Guilder
money/arsArgentina Peso
money/audAustralia Dollar
money/bgnBulgaria Lev
money/bhd
money/bndBrunei Darussalam Dollar
money/bobBolivia Boliviano
money/brlBrazil Real
money/bwpBotswana Pula
money/cadCanada Dollar
money/chfSwitzerland Franc
money/clpChile Peso
money/cnyChina Yuan Renminbi
money/copColombia Peso
money/crcCosta Rica Colon
money/czkCzech Republic Koruna
money/dkkDenmark Krone
money/dopDominican Republic Peso
money/dzd
money/eekEstonia Kroon
money/egpEgypt Pound
money/eurEuro
money/fjdFiji Dollar
money/gbpUnited Kingdom Pound
money/hkdHong Kong Dollar
money/hnlHonduras Lempira
money/hrkCroatia Kuna
money/hufHungary Forint
money/idrIndonesia Rupiah
money/ilsIsrael Shekel
money/inrIndia Rupee
money/jmdJamaica Dollar
money/jod
money/jpyJapan Yen
money/kes
money/krwKorea (South) Won
money/kwd
money/kydCayman Islands Dollar
money/kztKazakhstan Tenge
money/lbpLebanon Pound
money/lkrSri Lanka Rupee
money/ltlLithuania Litas
money/lvlLatvia Lat
money/mad
money/mdl
money/mkdMacedonia Denar
money/murMauritius Rupee
money/mxnMexico Peso
money/myrMalaysia Ringgit
money/nadNamibia Dollar
money/ngnNigeria Naira
money/nioNicaragua Cordoba
money/nokNorway Krone
money/nprNepal Rupee
money/nzdNew Zealand Dollar
money/omrOman Rial
money/penPeru Nuevo Sol
money/pgk
money/phpPhilippines Peso
money/pkrPakistan Rupee
money/plnPoland Zloty
money/pygParaguay Guarani
money/qarQatar Riyal
money/ronRomania New Leu
money/rsdSerbia Dinar
money/rubRussia Ruble
money/sarSaudi Arabia Riyal
money/scrSeychelles Rupee
money/sekSweden Krona
money/sgdSingapore Dollar
money/skk
money/sll
money/svcEl Salvador Colon
money/thbThailand Baht
money/tnd
money/tryTurkey Lira
money/ttdTrinidad and Tobago Dollar
money/twdTaiwan New Dollar
money/tzs
money/uahUkraine Hryvna
money/ugx
money/usdUnited States Dollar
money/uyuUruguay Peso
money/uzsUzbekistan Som
money/vndViet Nam Dong
money/yerYemen Rial
money/zarSouth Africa Rand
money/zmk
money/btcBitcoin
money/allAlbania Lek
money/afnAfghanistan Afghani
money/awgAruba Guilder
money/aznAzerbaijan New Manat
money/bsdBahamas Dollar
money/bbdBarbados Dollar
money/byrBelarus Ruble
money/bzdBelize Dollar
money/bmdBermuda Dollar
money/bamBosnia and Herzegovina Convertible Marka
money/khrCambodia Riel
money/cupCuba Peso
money/xcdEast Caribbean Dollar
money/fkpFalkland Islands (Malvinas) Pound
money/ghcGhana Cedis
money/gipGibraltar Pound
money/gtqGuatemala Quetzal
money/ggpGuernsey Pound
money/gydGuyana Dollar
money/iskIceland Krona
money/irrIran Rial
money/impIsle of Man Pound
money/jepJersey Pound
money/kpwKorea (North) Won
money/kgsKyrgyzstan Som
money/lakLaos Kip
money/lrdLiberia Dollar
money/mntMongolia Tughrik
money/mznMozambique Metical
money/pabPanama Balboa
money/shpSaint Helena Pound
money/sbdSolomon Islands Dollar
money/sosSomalia Shilling
money/srdSuriname Dollar
money/sypSyria Pound
money/trlTurkey Lira
money/tvdTuvalu Dollar
money/vefVenezuela Bolivar
money/zwdZimbabwe Dollar

Power

The rate at which energy is transferred, used, or transformed.
power/btu-minBTUs/minute
power/ftlb-sFoot-pounds/second
power/hpHorsepower
power/kwKilowatts
power/wWatts

Pressure

The ratio of force to the area over which that force is distributed.
pressure/atAtmospheres
pressure/barBars
pressure/mmhgMillimeters of mercury
pressure/cmhgCentimeters of mercury
pressure/inhgInches of mercury
pressure/kg-m2Kilograms/square meter
pressure/paPascals
pressure/kpaKilo pascals
pressure/psfPounds/square foot
pressure/psiPounds/square inch
pressure/dbDecibels

Speed

The magnitude of the velocity of an object.
speed/ft-mFeet/minute
speed/ft-sFeet/second
speed/km-hKilometers/hour
speed/ktKnots
speed/m-minMiles/minute
speed/m-sMeters/second
speed/mphMiles/hour
speed/lpmLiters/minute

Temperature

Temperature measurements. Format = unit.
temperature/cCelsius
temperature/kKelvin
temperature/fFahrenheit

Time

Amount of time. Use with care! To store an activity or duration the "activity/plain" event type is more appropriate, in most cases.
time/dDays
time/hHours
time/minMinutes
time/msMilliseconds
time/sSeconds
time/yYears

Volume

The quantity of three-dimensional space enclosed by some closed boundary.
volume/lLiters
volume/m3Cubic meters
volume/cCups
volume/cm3Cubic centimeters
volume/flozFluid ounces
volume/ft3Cubic feet
volume/galgbGallons imperial
volume/galusGallons US
volume/in3Cubic inches
volume/yd3Cubic yard
volume/mlMilliliters
volume/ptPints
volume/qtQuarts
volume/bbloilBarrels (oil)
volume/tbsTablespoons
volume/tspTeaspoons
volume/iuUnits of insulin