TMF908 IoT Agent and Device Management API v4.0.0 Beta Specification
TMF908 IoT Agent and Device Management API v4.0.0 Beta Specification
TMF908
Team Approved Date: 17/Oct/2019
NOTICE
Copyright © TM Forum 2020. All Rights Reserved.
This document and translations of it may be copied and furnished to others, and derivative works that comment on
or otherwise explain it or assist in its implementation may be prepared, copied, published, and distributed, in whole
or in part, without restriction of any kind, provided that the above copyright notice and this section are included on
all such copies and derivative works. However, this document itself may not be modified in any way, including by
removing the copyright notice or references to TM FORUM, except as needed for the purpose of developing any
document or deliverable produced by a TM FORUM Collaboration Project Team (in which case the rules applicable
to copyrights, as set forth in the TM FORUM IPR Policy, must be followed) or as required to translate it into languages
other than English.
The limited permissions granted above are perpetual and will not be revoked by TM FORUM or its successors or
assigns.
This document and the information contained herein is provided on an "AS IS" basis and TM FORUM DISCLAIMS ALL
WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
INFORMATION HEREIN WILL NOT INFRINGE ANY OWNERSHIP RIGHTS OR ANY IMPLIED WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
TM FORUM invites any TM FORUM Member or any other party that believes it has patent claims that would
necessarily be infringed by implementations of this TM Forum Standards Final Deliverable, to notify the TM FORUM
Team Administrator and provide an indication of its willingness to grant patent licenses to such patent claims in a
manner consistent with the IPR Mode of the TM FORUM Collaboration Project Team that produced this deliverable.
The TM FORUM invites any party to contact the TM FORUM Team Administrator if it is aware of a claim of
ownership of any patent claims that would necessarily be infringed by implementations of this TM FORUM
Standards Final Deliverable by a patent holder that is not willing to provide a license to such patent claims in a
manner consistent with the IPR Mode of the TM FORUM Collaboration Project Team that produced this TM FORUM
Standards Final Deliverable. TM FORUM may include such claims on its website but disclaims any obligation to do
so.
TM FORUM takes no position regarding the validity or scope of any intellectual property or other rights that might
be claimed to pertain to the implementation or use of the technology described in this TM FORUM Standards Final
Deliverable or the extent to which any license under such rights might or might not be available; neither does it
represent that it has made any effort to identify any such rights. Information on TM FORUM's procedures with
respect to rights in any document or deliverable produced by a TM FORUM Collaboration Project Team can be
found on the TM FORUM website. Copies of claims of rights made available for publication and any assurances of
licenses to be made available, or the result of an attempt made to obtain a general license or permission for the
use of such proprietary rights by implementers or users of this TM FORUM Standards Final Deliverable, can be
obtained from the TM FORUM Team Administrator. TM FORUM makes no representation that any information or
list of intellectual property rights.
Table of Contents
NOTICE ....................................................................................................................................................................... 2
Table of Contents ..................................................................................................................................................... 4
List of Tables ............................................................................................................................................................. 7
Introduction .............................................................................................................................................................. 8
SAMPLE USE CASES ......................................................................................................................................................... 9
Support of polymorphism and extension patterns ...................................................................................................... 10
RESOURCE MODEL ........................................................................................................................................................ 11
Managed Entity and Task Resource Models ............................................................................................................. 11
Iot Device resource................................................................................................................................................ 11
Data Access Endpoint resource ............................................................................................................................. 23
Iot Device Specification resource .......................................................................................................................... 26
Iot Data Event resource ......................................................................................................................................... 33
Iot Management Event resource........................................................................................................................... 34
Resource Specification resource ........................................................................................................................... 35
Alarm resource ...................................................................................................................................................... 41
Notification Resource Models .................................................................................................................................. 47
Iot Device Create Event ......................................................................................................................................... 49
Iot Device Change Event ........................................................................................................................................ 49
Iot Device Batch Event........................................................................................................................................... 49
Iot Device Delete Event ......................................................................................................................................... 50
Iot Device Heart Beat Event .................................................................................................................................. 50
Iot Device State Change Event .............................................................................................................................. 50
Iot Device Specification Create Event ................................................................................................................... 51
Iot Device Specification Change Event .................................................................................................................. 51
Iot Device Specification Batch Event ..................................................................................................................... 52
Iot Device Specification Delete Event.................................................................................................................... 52
Alarm Create Event................................................................................................................................................ 52
Alarm Change Event .............................................................................................................................................. 53
Alarm Delete Event................................................................................................................................................ 53
API OPERATIONS ........................................................................................................................................................... 54
Acknowledgements ...................................................................................................................................................... 90
Document History ..................................................................................................................................................... 90
Version History ...................................................................................................................................................... 90
Release History ...................................................................................................................................................... 90
Contributors to Document........................................................................................................................................ 90
List of Tables
N/A
Introduction
The following document is the specification of the REST API for Any management. It includes the model definition
as well as all available operations.
Support of polymorphic collections and types and schema-based extension is provided by means of a list of generic
meta-attributes that we describe below. Polymorphism in collections occurs when entities inherit from base entities,
for instance a BillingAccount and SettlementAccount inheriting properties from the abstract Account entity.
Generic support of polymorphism and pattern extensions is described in the TMF API Guidelines v3.0 Part 2
document.
The @type attribute provides a way to represent the actual class type of an entity. For example, within a list of
Account instances some may be instances of BillingAccount where other could be instances of SettlementAccount.
The @type gives this information. All resources and sub-resources of this API have a @type attributes that can be
provided when this is useful.
The @referredType can be used within reference entities (like for instance an AccountRef object) to explicitly denote
the actual entity type of the referred class. Notice that in reference entities the @type, when used, denotes the class
type of the reference itself, such as BillingAccountRef or SettlementAccountRef, and not the class type of the referred
object. However, since reference classes are rarely sub-classed, @type is generally not useful in reference objects.
The @schemaLocation property can be used in resources to allow specifying user-defined properties of an Entity or
to specify the expected characteristics of an entity.
The @baseType attribute gives a way to provide explicitly the base of class of a given resource that has been
extended.
RESOURCE MODEL
#TODO.
Resource model
Field descriptions
IotDevice fields
batteryLevel A float.
deviceState A string.
firmwareVersion A string.
hardwareVersion A string.
mnc A string.
osVersion A string.
provider A string.
softwareVersion A string.
value A string.
alternateName A string.
dataProvider A string.
source A string.
areaServed A string.
endDate A date time (DateTime). A date time( DateTime). The date till the resource is effective.
manufactureDate A date time (DateTime). This is a string attribute that defines the date of manufacture
of this item in the fixed format "dd/mm/yyyy". This is an optional attribute.
powerState A string. This defines the current power status of the hardware item. Values include:
0: Unknown
1: Not Applicable
2: No Power Applied
3: Full Power Applied
4: Power Save - Normal
5: Power Save - Degraded
6: Power Save - Standby
7: Power Save - Critical
8: Power Save - Low Power Mode
9: Power Save - Unknown
10: Power Cycle
11: Power Warning
12: Power Off.
startDate A date time (DateTime). A date time ( DateTime). The date from which the resource is
effective.
version A string. A field that identifies the specific version of an instance of a resource.
versionNumber A string. This is a string that identifies the version of this object. This is an optional
attribute.
dataAccessEndPoint A list of data access endpoints (DataAccessEndpoint [*]). This is the endpoint exposed
by the IoT Device to authorized users.
address An address (Address). Structured textual way of describing how to find a Property in
an urban area (country properties are often
defined differently).
Note: Address corresponds to SID UrbanPropertyAddress.
note A list of notes (Note [*]). Extra information about a given entity.
partyRole A list of party role references (PartyRoleRef [*]). A party role represents the part
played by a party in a given context.
place A place (Place). Place reference. Place defines the places where the products are sold
or delivered.
relatedParty A list of related parties (RelatedParty [*]). Related Entity reference. A related party
defines party or party role linked to a specific entity.
Address sub-resource
Structured textual way of describing how to find a Property in an urban area (country properties are often
defined differently).
Note: Address corresponds to SID UrbanPropertyAddress.
locality A string. "An area of defined or undefined boundaries within a local authority or other
legislatively defined area, usually rural or semi-rural in nature." [ANZLIC-STREET], or a
suburb "a bounded locality within a city, town or shire principally of urban character "
[ANZLICSTREET].
postcode A string. descriptor for a postal delivery area, used to speed and simplify the delivery
of mail (also known as zipcode).
streetNr A string. Number identifying a specific property on a public street. It may be combined
with streetNrLast for ranged addresses.
streetType A string. alley, avenue, boulevard, brae, crescent, drive, highway, lane, terrace,
parade, place, tarn, way, wharf.
subAddress A sub address (SubAddress). Within a property in an urban area, may refer to a
building, building cluster, or a floor of a multistory building.
DataAccessEndpoint sub-resource
category A string. Category of the concrete resource, such as: Gold, Silver for MSISDN concrete
resource.
endDate A date time (DateTime). The date till the resource is effective.
startDate A date time (DateTime). A date time (DateTime). The date from which the resource is
effective.
value A string. The value of the logical resource, such as: 0044746712345 for an MSISDN.
version A string. A field that identifies the specific version of an instance of a resource.
apiType A string.
note A list of notes (Note [*]). Extra information about a given entity.
partyRole A list of party role references (PartyRoleRef [*]). A party role represents the part
played by a party in a given context.
place A place (Place). Place reference. Place defines the places where the products are sold
or delivered.
relatedParty A list of related parties (RelatedParty [*]). Related Entity reference. A related party
defines party or party role linked to a specific entity.
GeographicLocation sub-resource
name A string. A user-friendly name for the place, such as [Paris Store], [London Store],
[Main Home].
MacAddressType sub-resource
#TODO.
MacAddressType A string.
Note sub-resource
id A string. Identifier of the note within its containing entity (may or may not be globally
unique, depending on provider implementation).
Place sub-resource
Place reference. Place defines the places where the products are sold or delivered.
name A string. A user-friendly name for the place, such as [Paris Store], [London Store],
[Main Home].
RelatedParty sub-resource
Related Entity reference. A related party defines party or party role linked to a specific entity.
@referredType A string. The actual type of the target instance when needed for disambiguation.
ResourceCharacteristic sub-resource
ResourceRelationship sub-resource
SubAddress sub-resource
Representation of a SubAddress
It is used for addressing within a property in an urban area (country properties are often defined differently). It may
refer to a building, a building cluster, or a floor of a multistory building.
href A string.
levelNumber A string. Used where a level type may be repeated e.g. BASEMENT 1, BASEMENT 2.
privateStreetName A string. Private streets internal to a property (e.g. a university) may have internal
names that are not recorded by the land title office.
subUnitNumber A string. The discriminator of the subunit, often just a simple number e.g. FLAT 5, may
also be a range.
subUnitType A string. The type of subunit, such as BERTH, FLAT, PIER, SUITE, SHOP, TOWER, UNIT,
WHARF.
PartyRoleRef relationship
Party role reference. A party role represents the part played by a party in a given context.
@referredType A string. The actual type of the target instance when needed for disambiguation.
partyId A string. The identifier of the engaged party that is linked to the PartyRole object.
partyName A string. The name of the engaged party that is linked to the PartyRole object.
ResourceRef relationship
@referredType A string. The actual type of the target instance when needed for disambiguation.
value A string. The resource value that can be used to identify a resource with a public key
(e.g.: a tel nr, an msisdn).
{
"dateFirstUsed": "2019-05-13T00:00",
"dateInstalled": "2019-05-13T00:00",
"dateLastCalibration": "2019-05-13T00:00",
"dateLastValueReported": "2019-05-13T00:00",
"dateManufactured": "2019-05-13T00:00",
"deviceState": "ok",
"deviceType": "Temperature",
"firmwareVersion": "1.0.0",
"hardwareVersion": "1.0.0",
"mnc": "01",
"osVersion": "1.0.0",
"provider": "Mandat International",
"serialNumber": "12345",
"softwareVersion": "1.0.0",
"value": "0041227744222",
"alternateName": "CoAP temperature sensor 3",
"dataProvider": "https://www.mandint.org",
"dateCreated": "2019-05-13T00:00",
"dateModified": "2019-05-13T00:00",
"description": "This is a temperature sensor using CoAP and 6LoWPAN.",
"name": "temp_3",
"source": "coap://[2001:41e0:6002:1800:0:0:0:3]:61616/temp ",
"areaServed": "Switzerland ",
"category": "Gold ",
"endDate ": "2019-05-13T00:00",
"href ": "https//host:port/tmf-api/iotDevice/v1/iotDevice/temp_3",
"lifecycleState": "InService",
"manufactureDate": "2019-05-13T00:00",
"powerState": "3",
"startDate": "2019-05-13T00:00",
"version": "1.0",
"versionNumber": "1.0.0",
"dataAccessEndPoint": {
"category": "Gold",
"description": "This is a temperature sensor using CoAP and 6LoWPAN.",
"endDate": "2019-05-13T00:00",
"href": "https://host:port/tmf-api/iotDevice/v1/iotDevice/temp_3",
"id": "3",
"lifecycleState": "InService",
"name": "temp_3",
"startDate": "2019-05-03T00:00",
"value": "0041227744222",
"version": "1.0",
"apiType": "NGSI",
"uri": "https://host:port/tmf-api/iotDevice/v1/iotDevice/temp_3/dataAccessEndpoint/3"
},
"batteryLevel": 1.0,
"configuration": {
"timeout": 5,
"reportingPeriod ": 300
},
"macAddress": [
"02:00:00:00:00:03"
],
"$id": "Device.schema.json",
"address": {
"addressLocality": "Geneva",
"postalCode": "1209",
"streetAddress": "Chemin du Champ-Baron 3"
},
"location": {
" attrName": "position",
"coords": {
"type": "Point",
"coordinates": [
46.223064,
6.1305982
]
}
},
"characteristic": [
{
"name": "accuracy",
"value": "1.0"
}
],
"note": [
{
"author": "Cedric Crettaz",
"date": "2019-05-13T00:00",
"id": "txt001",
"text": "This is a CoAP temperature sensor."
}
],
© TM Forum 2020. All Rights Reserved. Page 21 of 91
TMF908 IoT Device Management API REST Specification
"partyRole": [
{
"@referredType": "temperatureSensor",
"href": "https://www.mandint.org/temperatureSensor",
"id": "CoapTempSensor",
"name": "Mandat International",
"partyId": "MI",
"partyName": "Mandat International"
}
],
"place": {
"href": "Chemin du Champ-Baron 3",
"id": "1209",
"name": "Geneva Office"
},
"relatedParty": [
{
"@referredType": "temperatureSensor",
"href": "https://www.mandint.org/temperatureSensor",
"id": "CoapTempSensor",
"name": "Mandat International",
"role": "vendor"
}
],
"resourceRelationship": [
{
"@Type": "IotAgent",
"href": "https://www.mandint.org/iotAgent",
"id": "MI",
"name": "UDG",
"value": "0041227744222"
}
],
"iotAgent": [
{
"name": "UDG",
"objectId": "udgmi",
"href": "https://www.mandint.org/iotAgent",
"@referredType": "IotAgent",
"dataAccessEndPoint": {
"category": "Gold",
"description": "This is a temperature sensor using CoAP and 6LoWPAN.",
"endDate": "2019-05-13T00:00",
"href": "https://host:port/tmf-api/iotDevice/v1/iotDevice/temp_3",
"id": "3",
"lifecycleState": "InService",
"name": "temp_3",
"startDate": "2019-05-03T00:00",
"value": "0041227744222",
"version": "1.0",
"apiType": "NGSI",
"uri": "https://host:port/tmf-api/iotDevice/v1/iotDevice/temp_3/dataAccessEndpoint/3"
}
}
]
}
Resource model
Field descriptions
DataAccessEndpoint fields
category A string. Category of the concrete resource, such as: Gold, Silver for MSISDN concrete
resource.
endDate A date time (DateTime). The date till the resource is effective.
startDate A date time (DateTime). A date time (DateTime). The date from which the resource is
effective.
value A string. The value of the logical resource, such as: 0044746712345 for an MSISDN.
version A string. A field that identifies the specific version of an instance of a resource.
apiType A string.
note A list of notes (Note [*]). Extra information about a given entity.
partyRole A list of party role references (PartyRoleRef [*]). A party role represents the part
played by a party in a given context.
place A place (Place). Place reference. Place defines the places where the products are sold
or delivered.
relatedParty A list of related parties (RelatedParty [*]). Related Entity reference. A related party
defines party or party role linked to a specific entity.
Note sub-resource
id A string. Identifier of the note within its containing entity (may or may not be globally
unique, depending on provider implementation).
Place sub-resource
Place reference. Place defines the places where the products are sold or delivered.
name A string. A user-friendly name for the place, such as [Paris Store], [London Store],
[Main Home].
RelatedParty sub-resource
Related Entity reference. A related party defines party or party role linked to a specific entity.
@referredType A string. The actual type of the target instance when needed for disambiguation.
ResourceCharacteristic sub-resource
ResourceRelationship sub-resource
PartyRoleRef relationship
Party role reference. A party role represents the part played by a party in a given context.
@referredType A string. The actual type of the target instance when needed for disambiguation.
partyId A string. The identifier of the engaged party that is linked to the PartyRole object.
partyName A string. The name of the engaged party that is linked to the PartyRole object.
ResourceRef relationship
@referredType A string. The actual type of the target instance when needed for disambiguation.
value A string. The resource value that can be used to identify a resource with a public key
(e.g.: a tel nr, an msisdn).
{
"category": "Gold",
"description": "This is a temperature sensor using CoAP and 6LoWPAN.",
"endDate": "2019-05-13T00:00",
"href": "https://host:port/tmf-api/iotDevice/v1/iotDevice/temp_3",
"id": "3",
"lifecycleState": "InService",
"name": "temp_3",
"startDate": "2019-05-03T00:00",
"value": "0041227744222",
"version": "1.0",
"apiType": "NGSI",
"uri": "https://host:port/tmf-api/iotDevice/v1/iotDevice/temp_3/dataAccessEndpoint/3"
}
Resource model
Field descriptions
IotDeviceSpecification fields
description A string. A narrative that explains in detail what the service specification is.
lastUpdate A date time (DateTime). Date and time of the last update of the service
specification.
lifecycleStatus A string. Used to indicate the current lifecycle status of the service specification.
relatedParty A list of related parties (RelatedParty [*]). A list of related party references
(RelatedParty [*]). A related party defines party or party role linked to a specific
entity.
validFor A time period. The period for which the service specification is valid.
RelatedParty sub-resource
Related Entity reference. A related party defines party or party role linked to a specific entity.
@referredType A string. The actual type of the target instance when needed for disambiguation.
ResourceSpecCharRelationship sub-resource
validFor A time period. The period for which the serviceSpecCharRelationship is valid.
ResourceSpecCharacteristic sub-resource
This class represents the key features of this service specification. For example, bandwidth is a characteristic of
many different types of services; if bandwidth is a relevant characteristic (e.g., from the point-of-view of a
Customer obtaining this Service via a Product) then bandwidth would be a ServiceSpecCharacteristic for that
particular Service.
@valueSchemaLocation A string. This (optional) field provides a link to the schema describing the
value type.
extensible A boolean. An indicator that specifies that the values for the characteristic
can be extended by adding new values when instantiating a characteristic for
an Entity.
isUnique A boolean. An indicator that specifies if a value is unique for the specification.
Possible values are; "unique while value is in effect" and "unique whether
value is in effect or not".
validFor A time period. The period for which the serviceSpecCharacteristic is valid.
valueType A string. A kind of value that the characteristic can take on, such as numeric,
text and so forth.
ResourceSpecCharacteristicValue sub-resource
A ResourceSpecCharacteristicValue object is used to define a set of attributes, each of which can be assigned to a
corresponding set of attributes in a ResourceSpecCharacteristic object. The values of the attributes in the
ResourceSpecCharacteristicValue object describe the values of the attributes that a corresponding
ResourceSpecCharacteristic object can take on.
© TM Forum 2020. All Rights Reserved. Page 30 of 91
TMF908 IoT Device Management API REST Specification
isDefault A boolean. Indicates if the value is the default value for a characteristic.
rangeInterval A string. An indicator that specifies the inclusion or exclusion of the valueFrom and
valueTo attributes. If applicable, possible values are "open", "closed", "closedBottom"
and "closedTop".
unitOfMeasure A string. A length, surface, volume, dry measure, liquid measure, money, weight,
time, and the like. In general, a determinate quantity or magnitude of the kind
designated, taken as a standard of comparison for others of the same kind, in
assigning to them numerical values, as 1 foot, 1 yard, 1 mile, 1 square foot.
validFor A time period. The period of time for which a value is applicable.
value An any (Any). A discrete value that the characteristic can take on, or the actual value
of the characteristic.
valueFrom An integer. The low range value that a characteristic can take on.
valueTo An integer. The upper range value that a characteristic can take on.
valueType A string. A kind of value that the characteristic can take on, such as numeric, text, and
so forth.
ResourceSpecRelationship sub-resource
name A string. The name given to the target Resource specification instance.
validFor A time period. The period for which the ResourceSpecRelationship is valid.
TargetServiceSchema sub-resource
The reference object to the schema and type of target service which is described by service specification.
@schemaLocation A string. This field provides a link to the schema describing the target service.
AttachmentRef relationship
Attachment reference. An attachment complements the description of an element (for instance a product) through
video, pictures.
@referredType A string. The actual type of the target instance when needed for disambiguation.
ResourceSpecificationRef relationship
@referredType A string. The actual type of the target instance when needed for disambiguation.
{
"description": "This iot device specification ...",
"href": "https:/host:port/tmf-api/iotDeviceSpecification/v1/iotDeviceSpecification/4976",
"id": "4976",
"isBundle": true,
"lastUpdate": "2019-10-03T00:00",
"lifecycleStatus": "a string ...",
"name": "a string ...",
"version": "a string ...",
"attachment": [
{}
],
"relatedParty": [
{}
],
"resourceSpecRelationship": [
{}
],
"resourceSpecCharacteristic": [
{}
© TM Forum 2020. All Rights Reserved. Page 32 of 91
TMF908 IoT Device Management API REST Specification
],
"resourceSpecification": [
{}
],
"targetServiceSchema": {},
"validFor": {}
}
Resource model
Field descriptions
IotDataEvent fields
{
"correlationId": "413",
"description": "This iot data event ...",
"domain": "a string ...",
"eventId": "374",
"eventTime": "2019-10-03T00:00",
"eventType": "a string ...",
"priority": "a string ...",
"timeOcurred": "2019-10-03T00:00",
"title": "a string ...",
"event": {}
}
Resource model
Field descriptions
IotManagementEvent fields
description A string.
description A string.
{
"correlationId": "423",
"description": "This iot management event ...",
"domain": "a string ...",
"eventId": "536",
"eventTime": "2019-10-03T00:00",
"eventType": "a string ...",
"priority": "a string ...",
"timeOcurred": "2019-10-03T00:00",
"title": "a string ...",
"event": {}
}
Resource model
Field descriptions
ResourceSpecification fields
description A string. A narrative that explains in detail what the service specification is.
lastUpdate A date time (DateTime). Date and time of the last update of the service
specification.
lifecycleStatus A string. Used to indicate the current lifecycle status of the service specification.
relatedParty A list of related parties (RelatedParty [*]). A list of related party references
(RelatedParty [*]). A related party defines party or party role linked to a specific
entity.
validFor A time period. The period for which the service specification is valid.
RelatedParty sub-resource
Related Entity reference. A related party defines party or party role linked to a specific entity.
@referredType A string. The actual type of the target instance when needed for disambiguation.
ResourceSpecCharRelationship sub-resource
validFor A time period. The period for which the serviceSpecCharRelationship is valid.
ResourceSpecCharacteristic sub-resource
This class represents the key features of this service specification. For example, bandwidth is a characteristic of
many different types of services; if bandwidth is a relevant characteristic (e.g., from the point-of-view of a
Customer obtaining this Service via a Product) then bandwidth would be a ServiceSpecCharacteristic for that
particular Service.
@valueSchemaLocation A string. This (optional) field provides a link to the schema describing the
value type.
extensible A boolean. An indicator that specifies that the values for the characteristic
can be extended by adding new values when instantiating a characteristic for
an Entity.
isUnique A boolean. An indicator that specifies if a value is unique for the specification.
Possible values are; "unique while value is in effect" and "unique whether
value is in effect or not".
validFor A time period. The period for which the serviceSpecCharacteristic is valid.
valueType A string. A kind of value that the characteristic can take on, such as numeric,
text and so forth.
ResourceSpecCharacteristicValue sub-resource
A ResourceSpecCharacteristicValue object is used to define a set of attributes, each of which can be assigned to a
corresponding set of attributes in a ResourceSpecCharacteristic object. The values of the attributes in the
ResourceSpecCharacteristicValue object describe the values of the attributes that a corresponding
ResourceSpecCharacteristic object can take on.
© TM Forum 2020. All Rights Reserved. Page 39 of 91
TMF908 IoT Device Management API REST Specification
isDefault A boolean. Indicates if the value is the default value for a characteristic.
rangeInterval A string. An indicator that specifies the inclusion or exclusion of the valueFrom and
valueTo attributes. If applicable, possible values are "open", "closed", "closedBottom"
and "closedTop".
unitOfMeasure A string. A length, surface, volume, dry measure, liquid measure, money, weight,
time, and the like. In general, a determinate quantity or magnitude of the kind
designated, taken as a standard of comparison for others of the same kind, in
assigning to them numerical values, as 1 foot, 1 yard, 1 mile, 1 square foot.
validFor A time period. The period of time for which a value is applicable.
value An any (Any). A discrete value that the characteristic can take on, or the actual value
of the characteristic.
valueFrom An integer. The low range value that a characteristic can take on.
valueTo An integer. The upper range value that a characteristic can take on.
valueType A string. A kind of value that the characteristic can take on, such as numeric, text, and
so forth.
ResourceSpecRelationship sub-resource
name A string. The name given to the target Resource specification instance.
validFor A time period. The period for which the ResourceSpecRelationship is valid.
TargetServiceSchema sub-resource
The reference object to the schema and type of target service which is described by service specification.
@schemaLocation A string. This field provides a link to the schema describing the target service.
AttachmentRef relationship
Attachment reference. An attachment complements the description of an element (for instance a product) through
video, pictures.
@referredType A string. The actual type of the target instance when needed for disambiguation.
ResourceSpecificationRef relationship
@referredType A string. The actual type of the target instance when needed for disambiguation.
{
"href": "https://mycsp.com:8080/tmf-api/resourceCatalogManagement/v3/resourceSpecification/42",
"id": "42",
"name": "Firewall",
"version": "1.0",
"@referredType": "ResourceFunctionSpec"
}
Alarm resource
This resource represents an alarm supporting the information model defined in ITU-T X.733.
Resource model
Field descriptions
Alarm fields
ackSystemId A string. Provides the name of the system that last changed the ackState of an
alarm, i.e. acknowledged or unacknowledged the alarm.
ackUserId A string. Provides the id of the user who has last changed the ack state of the
alarm, i.e. acknowledged or unacknowledged the alarm.
alarmChangedTime A date time (DateTime). Indicates the last date and time when the alarm is
changed on the alarm-owning system. Any change to the alarm whether coming
from the alarmed resource or triggered by a change from the client is changing
this time.
alarmClearedTime A date time (DateTime). Indicates the time (as a date + time) at which the alarm
is cleared at the source.
alarmRaisedTime A date time (DateTime). Indicates the time (as a date + time) at which the alarm
occurred at its source.
alarmReportingTime A date time (DateTime). Indicates the time (as a date + time) at which the alarm
was reported by the owning OSS. It might be different from the
alarmRaisedTime. For instance, if the alarm list is maintained by an EMS, the
alarmRaisedtime would be the time the alarm
was detected by the NE, while the alarmReportingTime would be the time this
alarm was stored in the alarm list of the EMS.
alarmType A string. Categorize the alarm. Should be one of the values defined in X.733 8.1.1
or 3GPP TS 32.111-2 Annex A:
Communications Alarm
Processing Error Alarm
Environmental Alarm
alarmedObjectType A string. The type (class) of the managed object associated with the event.
clearSystemId A string. Provides the id of the system where the user who invoked the
alarmCleared operation is located.
clearUserId A string. Provides the id of the user who invoked the alarmCleared operation.
comments A list of comments (Comment [*]). Indicates the comments entered on the
alarm.
correlatedAlarm A list of correlated alarms (CorrelatedAlarm [*]). Indicates the alarms attached to
this alarm as correlated alarms from a correlation point of view. An alarm can be
correlated to one or more underlying alarms. There might be multiple levels of
alarm correlation and an underlying alarm in one relation can be itself a parent
alarm for other underlying alarms.
parentAlarm A list of parent alarms (ParentAlarm [*]). Indicates the alarms attached to this
alarm as parent alarms from a correlation point of view.
perceivedSeverity A string. Lists the possible severities that can be allocated to an Alarm. The
values are consistent with ITU-T Recommendation X.733:
CRITICAL
MAJOR
MINOR
WARNING
INDETERMINATE
© TM Forum 2020. All Rights Reserved. Page 44 of 91
TMF908 IoT Device Management API REST Specification
CLEARED
Once an alarm has been cleared, its perceived severity is set to CLEARED and can
no longer be set.
plannedOutageIndicator A string. Indicates that the Managed Object (related to this alarm) is in planned
outage (in planned maintenance, or out-of-service).
probableCause A string. Provides the probable cause of the alarm. The values are consistent
with ITU-T Recommendation X.733 or 3GPP TS 32.111-2 Annex B.
proposedRepairedActions A string. Indicates proposed repair actions, if known to the system emitting the
alarm.
sourceSystemId A string.
state A string. Defines the alarm state during its life cycle RAISED, UPDATED or
CLEARED.
AffectedService sub-resource
href A string. Provides the identifier of the service affected by the alarm.
id A string.
AlarmedObject sub-resource
href A string. A reference to the managed object associated with the event.
id A string. The identifier of the managed object associated with the event.
Comment sub-resource
systemId A string. Indicates the system identifier on which the client set the comment.
time A date time (DateTime). Indicates the time commenting the alarm.
CorrelatedAlarm sub-resource
Indicates the alarms attached to this alarm as correlated alarms from a correlation point of view. An alarm can be
correlated to one or more underlying alarms. There might be multiple levels of alarm correlation and an underlying
alarm in one relation can be itself a parent alarm for other underlying alarms.
href A string.
id A string.
CrossedThresholdInformation sub-resource
granularity A string. Indicates the granularity at which the indicator is evaluated for
threshold crossing.
indicatorName A string. Indicates the name of indicator which crossed the threshold.
indicatorUnit A string. Indicates the unit of the measurement of the indicator corresponding to
the threshold that has been crossed.
observedValue A string. Indicates the value of the indicator which crossed the threshold.
thresholdRef A string.
ParentAlarm sub-resource
Indicates the alarms attached to this alarm as parent alarms from a correlation point of view.
href A string.
id A string.
{
"id": "8675309",
"href": "https://host:port/alarmManagement/v4/alarm/8675309",
"@baseType": "Alarm",
"@type": "Alarm",
"@schemaLocation": "https:://host:port/Alarm.schema.json",
"externalAlarmId": "5551212",
"state": "UPDATED",
© TM Forum 2020. All Rights Reserved. Page 46 of 91
TMF908 IoT Device Management API REST Specification
The notification structure for all notifications in this API follow the pattern depicted by the figure below.
A notification event resource (depicted by "SpecificEvent" placeholder) is a sub class of a generic Event structure
containing at least an id of the event occurrence (eventId), an event timestamp (eventTime), and the name of the
resource (eventType).
This notification structure owns an event payload structure ("SpecificEventPayload" placeholder) linked to the
resource concerned by the notification using the resource name as access field ("resourceName" placeholder).
We provide below the json representation of an example of an 'IotDeviceCreateEvent' notification event object
{
"eventId":"00001",
"eventTime":"2015-11-16T16:42:25-04:00",
"eventType":"IotDeviceCreateEvent",
"event": {
"iotDevice" :
{-- SEE IotDevice RESOURCE SAMPLE --}
}
}
We provide below the json representation of an example of an 'IotDeviceChangeEvent' notification event object
{
"eventId":"00001",
"eventTime":"2015-11-16T16:42:25-04:00",
"eventType":"IotDeviceChangeEvent",
"event": {
"iotDevice" :
{-- SEE IotDevice RESOURCE SAMPLE --}
}
}
We provide below the json representation of an example of an 'IotDeviceBatchEvent' notification event object
{
"eventId":"00001",
"eventTime":"2015-11-16T16:42:25-04:00",
"eventType":"IotDeviceBatchEvent",
"event": {
"iotDevice" :
{-- SEE IotDevice RESOURCE SAMPLE --}
© TM Forum 2020. All Rights Reserved. Page 49 of 91
TMF908 IoT Device Management API REST Specification
}
}
We provide below the json representation of an example of an 'IotDeviceDeleteEvent' notification event object
{
"eventId":"00001",
"eventTime":"2015-11-16T16:42:25-04:00",
"eventType":"IotDeviceDeleteEvent",
"event": {
"iotDevice" :
{-- SEE IotDevice RESOURCE SAMPLE --}
}
}
We provide below the json representation of an example of an 'IotDeviceHeartBeatEvent' notification event object
{
"eventId":"00001",
"eventTime":"2015-11-16T16:42:25-04:00",
"eventType":"IotDeviceHeartBeatEvent",
"event": {
"iotDevice" :
{-- SEE IotDevice RESOURCE SAMPLE --}
}
}
{
"eventId":"00001",
"eventTime":"2015-11-16T16:42:25-04:00",
"eventType":"IotDeviceStateChangeEvent",
"event": {
"iotDevice" :
{-- SEE IotDevice RESOURCE SAMPLE --}
}
}
{
"eventId":"00001",
"eventTime":"2015-11-16T16:42:25-04:00",
"eventType":"IotDeviceSpecificationCreateEvent",
"event": {
"iotDeviceSpecification" :
{-- SEE IotDeviceSpecification RESOURCE SAMPLE --}
}
}
{
"eventId":"00001",
"eventTime":"2015-11-16T16:42:25-04:00",
"eventType":"IotDeviceSpecificationChangeEvent",
"event": {
"iotDeviceSpecification" :
{-- SEE IotDeviceSpecification RESOURCE SAMPLE --}
}
}
{
"eventId":"00001",
"eventTime":"2015-11-16T16:42:25-04:00",
"eventType":"IotDeviceSpecificationBatchEvent",
"event": {
"iotDeviceSpecification" :
{-- SEE IotDeviceSpecification RESOURCE SAMPLE --}
}
}
{
"eventId":"00001",
"eventTime":"2015-11-16T16:42:25-04:00",
"eventType":"IotDeviceSpecificationDeleteEvent",
"event": {
"iotDeviceSpecification" :
{-- SEE IotDeviceSpecification RESOURCE SAMPLE --}
}
}
We provide below the json representation of an example of an 'AlarmCreateEvent' notification event object
{
"eventId":"00001",
"eventTime":"2015-11-16T16:42:25-04:00",
"eventType":"AlarmCreateEvent",
"event": {
© TM Forum 2020. All Rights Reserved. Page 52 of 91
TMF908 IoT Device Management API REST Specification
"alarm" :
{-- SEE Alarm RESOURCE SAMPLE --}
}
}
We provide below the json representation of an example of an 'AlarmChangeEvent' notification event object
{
"eventId":"00001",
"eventTime":"2015-11-16T16:42:25-04:00",
"eventType":"AlarmChangeEvent",
"event": {
"alarm" :
{-- SEE Alarm RESOURCE SAMPLE --}
}
}
We provide below the json representation of an example of an 'AlarmDeleteEvent' notification event object
{
"eventId":"00001",
"eventTime":"2015-11-16T16:42:25-04:00",
"eventType":"AlarmDeleteEvent",
"event": {
"alarm" :
{-- SEE Alarm RESOURCE SAMPLE --}
}
}
API OPERATIONS
Remember the following Uniform Contract:
Execute an Action POST on TASK Resource POST must be used to execute Task
on an Entity Resources
Other Request POST on TASK Resource GET and POST must not be used to
Methods tunnel other request methods.
Filtering and attribute selection rules are described in the TMF REST Design Guidelines.
GET /iotDevice?fields=...&{filtering}
Description
Usage Samples
Request
GET /tmf-api/iotdevicemanagement/v4/iotDevice
Accept: application/json
Response
200
[
{
"dateFirstUsed": "2019-05-13T00:00",
"dateInstalled": "2019-05-13T00:00",
"dateLastCalibration": "2019-05-13T00:00",
"dateLastValueReported": "2019-05-13T00:00",
"dateManufactured": "2019-05-13T00:00",
"deviceState": "ok",
"deviceType": "Temperature",
"firmwareVersion": "1.0.0",
"hardwareVersion": "1.0.0",
"mnc": "01",
"osVersion": "1.0.0",
"provider": "Mandat International",
"serialNumber": "12345",
"softwareVersion": "1.0.0",
"value": "0041227744222",
"alternateName": "CoAP temperature sensor 3",
"dataProvider": "https://www.mandint.org",
"dateCreated": "2019-05-13T00:00",
"dateModified": "2019-05-13T00:00",
"description": "This is a temperature sensor using CoAP and 6LoWPAN.",
© TM Forum 2020. All Rights Reserved. Page 55 of 91
TMF908 IoT Device Management API REST Specification
"name": "temp_3",
"source": "coap://[2001:41e0:6002:1800:0:0:0:3]:61616/temp ",
"areaServed": "Switzerland ",
"category": "Gold ",
"endDate ": "2019-05-13T00:00",
"href ": "https//host:port/tmf-api/iotDevice/v1/iotDevice/temp_3",
"lifecycleState": "InService",
"manufactureDate": "2019-05-13T00:00",
"powerState": "3",
"startDate": "2019-05-13T00:00",
"version": "1.0",
"versionNumber": "1.0.0",
"dataAccessEndPoint": {
"category": "Gold",
"description": "This is a temperature sensor using CoAP and 6LoWPAN.",
"endDate": "2019-05-13T00:00",
"href": "https://host:port/tmf-api/iotDevice/v1/iotDevice/temp_3",
"id": "3",
"lifecycleState": "InService",
"name": "temp_3",
"startDate": "2019-05-03T00:00",
"value": "0041227744222",
"version": "1.0",
"apiType": "NGSI",
"uri": "https://host:port/tmf-api/iotDevice/v1/iotDevice/temp_3/dataAccessEndpoint/3"
},
"batteryLevel": 1.0,
"configuration": {
"timeout": 5,
"reportingPeriod ": 300
},
"macAddress": [
"02:00:00:00:00:03"
],
"$id": "Device.schema.json",
"address": {
"addressLocality": "Geneva",
"postalCode": "1209",
"streetAddress": "Chemin du Champ-Baron 3"
},
"location": {
" attrName": "position",
"coords": {
"type": "Point",
"coordinates": [
46.223064,
6.1305982
]
}
},
"characteristic": [
{
"name": "accuracy",
"value": "1.0"
}
],
"note": [
{
"author": "Cedric Crettaz",
"date": "2019-05-13T00:00",
"id": "txt001",
"text": "This is a CoAP temperature sensor."
}
],
"partyRole": [
{
"@referredType": "temperatureSensor",
"href": "https://www.mandint.org/temperatureSensor",
"id": "CoapTempSensor",
"name": "Mandat International",
"partyId": "MI",
"partyName": "Mandat International"
}
],
"place": {
"href": "Chemin du Champ-Baron 3",
"id": "1209",
"name": "Geneva Office"
},
"relatedParty": [
{
"@referredType": "temperatureSensor",
"href": "https://www.mandint.org/temperatureSensor",
"id": "CoapTempSensor",
"name": "Mandat International",
"role": "vendor"
}
],
"resourceRelationship": [
{
"@Type": "IotAgent",
"href": "https://www.mandint.org/iotAgent",
"id": "MI",
"name": "UDG",
"value": "0041227744222"
}
],
"iotAgent": [
{
"name": "UDG",
"objectId": "udgmi",
"href": "https://www.mandint.org/iotAgent",
"@referredType": "IotAgent",
"dataAccessEndPoint": {
"category": "Gold",
"description": "This is a temperature sensor using CoAP and 6LoWPAN.",
"endDate": "2019-05-13T00:00",
"href": "https://host:port/tmf-api/iotDevice/v1/iotDevice/temp_3",
"id": "3",
"lifecycleState": "InService",
"name": "temp_3",
"startDate": "2019-05-03T00:00",
"value": "0041227744222",
"version": "1.0",
"apiType": "NGSI",
"uri": "https://host:port/tmf-api/iotDevice/v1/iotDevice/temp_3/dataAccessEndpoint/3"
}
}
]
}
]
GET /iotDevice/{id}?fields=...&{filtering}
Description
Usage Samples
Request
GET /tmf-api/iotdevicemanagement/v4/iotDevice/42
Accept: application/json
Response
200
{
"dateFirstUsed": "2019-05-13T00:00",
"dateInstalled": "2019-05-13T00:00",
"dateLastCalibration": "2019-05-13T00:00",
"dateLastValueReported": "2019-05-13T00:00",
"dateManufactured": "2019-05-13T00:00",
"deviceState": "ok",
"deviceType": "Temperature",
"firmwareVersion": "1.0.0",
"hardwareVersion": "1.0.0",
"mnc": "01",
© TM Forum 2020. All Rights Reserved. Page 58 of 91
TMF908 IoT Device Management API REST Specification
"osVersion": "1.0.0",
"provider": "Mandat International",
"serialNumber": "12345",
"softwareVersion": "1.0.0",
"value": "0041227744222",
"alternateName": "CoAP temperature sensor 3",
"dataProvider": "https://www.mandint.org",
"dateCreated": "2019-05-13T00:00",
"dateModified": "2019-05-13T00:00",
"description": "This is a temperature sensor using CoAP and 6LoWPAN.",
"name": "temp_3",
"source": "coap://[2001:41e0:6002:1800:0:0:0:3]:61616/temp ",
"areaServed": "Switzerland ",
"category": "Gold ",
"endDate ": "2019-05-13T00:00",
"href ": "https//host:port/tmf-api/iotDevice/v1/iotDevice/temp_3",
"lifecycleState": "InService",
"manufactureDate": "2019-05-13T00:00",
"powerState": "3",
"startDate": "2019-05-13T00:00",
"version": "1.0",
"versionNumber": "1.0.0",
"dataAccessEndPoint": {
"category": "Gold",
"description": "This is a temperature sensor using CoAP and 6LoWPAN.",
"endDate": "2019-05-13T00:00",
"href": "https://host:port/tmf-api/iotDevice/v1/iotDevice/temp_3",
"id": "3",
"lifecycleState": "InService",
"name": "temp_3",
"startDate": "2019-05-03T00:00",
"value": "0041227744222",
"version": "1.0",
"apiType": "NGSI",
"uri": "https://host:port/tmf-api/iotDevice/v1/iotDevice/temp_3/dataAccessEndpoint/3"
},
"batteryLevel": 1.0,
"configuration": {
"timeout": 5,
"reportingPeriod ": 300
},
"macAddress": [
"02:00:00:00:00:03"
],
"$id": "Device.schema.json",
"address": {
"addressLocality": "Geneva",
"postalCode": "1209",
"streetAddress": "Chemin du Champ-Baron 3"
},
"location": {
" attrName": "position",
"coords": {
"type": "Point",
"coordinates": [
46.223064,
6.1305982
]
}
},
"characteristic": [
{
"name": "accuracy",
"value": "1.0"
}
],
"note": [
{
"author": "Cedric Crettaz",
"date": "2019-05-13T00:00",
"id": "txt001",
"text": "This is a CoAP temperature sensor."
}
],
"partyRole": [
{
"@referredType": "temperatureSensor",
"href": "https://www.mandint.org/temperatureSensor",
"id": "CoapTempSensor",
"name": "Mandat International",
"partyId": "MI",
"partyName": "Mandat International"
}
],
"place": {
"href": "Chemin du Champ-Baron 3",
"id": "1209",
"name": "Geneva Office"
},
"relatedParty": [
{
"@referredType": "temperatureSensor",
"href": "https://www.mandint.org/temperatureSensor",
"id": "CoapTempSensor",
"name": "Mandat International",
"role": "vendor"
}
],
"resourceRelationship": [
{
"@Type": "IotAgent",
"href": "https://www.mandint.org/iotAgent",
"id": "MI",
"name": "UDG",
"value": "0041227744222"
}
],
"iotAgent": [
{
"name": "UDG",
"objectId": "udgmi",
"href": "https://www.mandint.org/iotAgent",
"@referredType": "IotAgent",
"dataAccessEndPoint": {
"category": "Gold",
"description": "This is a temperature sensor using CoAP and 6LoWPAN.",
"endDate": "2019-05-13T00:00",
"href": "https://host:port/tmf-api/iotDevice/v1/iotDevice/temp_3",
"id": "3",
"lifecycleState": "InService",
"name": "temp_3",
"startDate": "2019-05-03T00:00",
"value": "0041227744222",
"version": "1.0",
"apiType": "NGSI",
"uri": "https://host:port/tmf-api/iotDevice/v1/iotDevice/temp_3/dataAccessEndpoint/3"
}
}
]
}
POST /iotDevice
Description
The following tables provide the list of mandatory and non mandatory attributes when creating an IotDevice,
including any possible rule conditions and applicable default values. Notice that it is up to an implementer to add
additional mandatory attributes.
Usage Samples
Here's an example of a request for creating an IotDevice resource. In this example the request only passes
mandatory attributes.
Request
POST /tmf-api/iotdevicemanagement/v4/iotDevice
Content-Type: application/json
{
"category": "Gold "
}
Response
201
{
"category": "Gold "
}
PATCH /iotDevice/{id}
Description
This operation allows partial updates of an iot device entity. Support of json/merge
(https://tools.ietf.org/html/rfc7386) is mandatory, support of json/patch (http://tools.ietf.org/html/rfc5789) is
optional.
Note: If the update operation yields to the creation of sub-resources or relationships, the same rules concerning
mandatory sub-resource attributes and default value settings in the POST operation applies to the PATCH
operation. Hence these tables are not repeated here.
The tables below provide the list of patchable and non patchable attributes, including constraint rules on their
usage.
Usage Samples
Request
PATCH /tmf-api/iotdevicemanagement/v4/iotDevice/42
Content-Type: application/merge-patch+json
{
"name": "new name"
}
Response
200
{
"dateFirstUsed": "2019-05-13T00:00",
"dateInstalled": "2019-05-13T00:00",
"dateLastCalibration": "2019-05-13T00:00",
"dateLastValueReported": "2019-05-13T00:00",
"dateManufactured": "2019-05-13T00:00",
"deviceState": "ok",
"deviceType": "Temperature",
"firmwareVersion": "1.0.0",
"hardwareVersion": "1.0.0",
"mnc": "01",
"osVersion": "1.0.0",
"provider": "Mandat International",
"serialNumber": "12345",
"softwareVersion": "1.0.0",
"value": "0041227744222",
"alternateName": "CoAP temperature sensor 3",
"dataProvider": "https://www.mandint.org",
"dateCreated": "2019-05-13T00:00",
"dateModified": "2019-05-13T00:00",
"description": "This is a temperature sensor using CoAP and 6LoWPAN.",
"name": "new name",
"source": "coap://[2001:41e0:6002:1800:0:0:0:3]:61616/temp ",
"areaServed": "Switzerland ",
"category": "Gold ",
"endDate ": "2019-05-13T00:00",
"href ": "https//host:port/tmf-api/iotDevice/v1/iotDevice/temp_3",
"lifecycleState": "InService",
"manufactureDate": "2019-05-13T00:00",
"powerState": "3",
"startDate": "2019-05-13T00:00",
"version": "1.0",
"versionNumber": "1.0.0",
"dataAccessEndPoint": {
© TM Forum 2020. All Rights Reserved. Page 65 of 91
TMF908 IoT Device Management API REST Specification
"category": "Gold",
"description": "This is a temperature sensor using CoAP and 6LoWPAN.",
"endDate": "2019-05-13T00:00",
"href": "https://host:port/tmf-api/iotDevice/v1/iotDevice/temp_3",
"id": "3",
"lifecycleState": "InService",
"name": "temp_3",
"startDate": "2019-05-03T00:00",
"value": "0041227744222",
"version": "1.0",
"apiType": "NGSI",
"uri": "https://host:port/tmf-api/iotDevice/v1/iotDevice/temp_3/dataAccessEndpoint/3"
},
"batteryLevel": 1.0,
"configuration": {
"timeout": 5,
"reportingPeriod ": 300
},
"macAddress": [
"02:00:00:00:00:03"
],
"$id": "Device.schema.json",
"address": {
"addressLocality": "Geneva",
"postalCode": "1209",
"streetAddress": "Chemin du Champ-Baron 3"
},
"location": {
" attrName": "position",
"coords": {
"type": "Point",
"coordinates": [
46.223064,
6.1305982
]
}
},
"characteristic": [
{
"name": "accuracy",
"value": "1.0"
}
],
"note": [
{
"author": "Cedric Crettaz",
"date": "2019-05-13T00:00",
"id": "txt001",
"text": "This is a CoAP temperature sensor."
}
],
"partyRole": [
{
"@referredType": "temperatureSensor",
"href": "https://www.mandint.org/temperatureSensor",
"id": "CoapTempSensor",
"name": "Mandat International",
"partyId": "MI",
"partyName": "Mandat International"
}
],
"place": {
"href": "Chemin du Champ-Baron 3",
"id": "1209",
"name": "Geneva Office"
},
"relatedParty": [
{
"@referredType": "temperatureSensor",
"href": "https://www.mandint.org/temperatureSensor",
"id": "CoapTempSensor",
"name": "Mandat International",
"role": "vendor"
}
],
"resourceRelationship": [
{
"@Type": "IotAgent",
"href": "https://www.mandint.org/iotAgent",
"id": "MI",
"name": "UDG",
"value": "0041227744222"
}
],
"iotAgent": [
{
"name": "UDG",
"objectId": "udgmi",
"href": "https://www.mandint.org/iotAgent",
"@referredType": "IotAgent",
"dataAccessEndPoint": {
"category": "Gold",
"description": "This is a temperature sensor using CoAP and 6LoWPAN.",
"endDate": "2019-05-13T00:00",
"href": "https://host:port/tmf-api/iotDevice/v1/iotDevice/temp_3",
"id": "3",
"lifecycleState": "InService",
"name": "temp_3",
"startDate": "2019-05-03T00:00",
"value": "0041227744222",
"version": "1.0",
"apiType": "NGSI",
"uri": "https://host:port/tmf-api/iotDevice/v1/iotDevice/temp_3/dataAccessEndpoint/3"
}
}
],
"id": "42"
DELETE /iotDevice/{id}
Description
Usage Samples
Request
DELETE /tmf-api/iotdevicemanagement/v4/iotDevice/42
Response
204
GET /dataAccessEndpoint?fields=...&{filtering}
Description
Usage Samples
Request
GET /tmf-api/iotdevicemanagement/v4/dataAccessEndpoint
Accept: application/json
Response
200
[
{
"category": "Gold",
"description": "This is a temperature sensor using CoAP and 6LoWPAN.",
"endDate": "2019-05-13T00:00",
"href": "https://host:port/tmf-api/iotDevice/v1/iotDevice/temp_3",
"id": "3",
"lifecycleState": "InService",
"name": "temp_3",
"startDate": "2019-05-03T00:00",
"value": "0041227744222",
"version": "1.0",
"apiType": "NGSI",
"uri": "https://host:port/tmf-api/iotDevice/v1/iotDevice/temp_3/dataAccessEndpoint/3"
}
]
GET /dataAccessEndpoint/{id}?fields=...&{filtering}
Description
Usage Samples
Request
GET /tmf-api/iotdevicemanagement/v4/dataAccessEndpoint/3
Accept: application/json
Response
200
{
"category": "Gold",
"description": "This is a temperature sensor using CoAP and 6LoWPAN.",
"endDate": "2019-05-13T00:00",
"href": "https://host:port/tmf-api/iotDevice/v1/iotDevice/temp_3",
"id": "3",
"lifecycleState": "InService",
"name": "temp_3",
"startDate": "2019-05-03T00:00",
"value": "0041227744222",
"version": "1.0",
"apiType": "NGSI",
"uri": "https://host:port/tmf-api/iotDevice/v1/iotDevice/temp_3/dataAccessEndpoint/3"
}
GET /iotDeviceSpecification?fields=...&{filtering}
Description
Usage Samples
Request
GET /tmf-api/iotdevicemanagement/v4/iotDeviceSpecification
Accept: application/json
Response
200
[
{
GET /iotDeviceSpecification/{id}?fields=...&{filtering}
Description
Usage Samples
Request
GET /tmf-api/iotdevicemanagement/v4/iotDeviceSpecification/4976
Accept: application/json
Response
200
{
"description": "This iot device specification ...",
"href": "https:/host:port/tmf-api/iotDeviceSpecification/v1/iotDeviceSpecification/4976",
"id": "4976",
"isBundle": true,
"lastUpdate": "2019-10-03T00:00",
"lifecycleStatus": "a string ...",
"name": "a string ...",
"version": "a string ...",
"attachment": [
{}
],
"relatedParty": [
{}
],
"resourceSpecRelationship": [
{}
],
"resourceSpecCharacteristic": [
{}
],
"resourceSpecification": [
{}
],
"targetServiceSchema": {},
"validFor": {}
}
POST /iotDeviceSpecification
Description
The following tables provide the list of mandatory and non mandatory attributes when creating an
IotDeviceSpecification, including any possible rule conditions and applicable default values. Notice that it is up to an
implementer to add additional mandatory attributes.
Usage Samples
Here's an example of a request for creating an IotDeviceSpecification resource. In this example the request only
passes mandatory attributes.
Request
POST /tmf-api/iotdevicemanagement/v4/iotDeviceSpecification
Content-Type: application/json
{
"name": "a string ..."
}
Response
201
{
"href": "https:/host:port/tmf-api/iotDeviceSpecification/v1/iotDeviceSpecification/4976",
"id": "4976",
"name": "a string ..."
}
PATCH /iotDeviceSpecification/{id}
Description
This operation allows partial updates of an iot device specification entity. Support of json/merge
(https://tools.ietf.org/html/rfc7386) is mandatory, support of json/patch (http://tools.ietf.org/html/rfc5789) is
optional.
Note: If the update operation yields to the creation of sub-resources or relationships, the same rules concerning
mandatory sub-resource attributes and default value settings in the POST operation applies to the PATCH
operation. Hence these tables are not repeated here.
The tables below provide the list of patchable and non patchable attributes, including constraint rules on their
usage.
Usage Samples
Request
PATCH /tmf-api/iotdevicemanagement/v4/iotDeviceSpecification/4976
Content-Type: application/merge-patch+json
{
"name": "new name"
}
© TM Forum 2020. All Rights Reserved. Page 74 of 91
TMF908 IoT Device Management API REST Specification
Response
200
{
"description": "This iot device specification ...",
"href": "https:/host:port/tmf-api/iotDeviceSpecification/v1/iotDeviceSpecification/4976",
"id": "4976",
"isBundle": true,
"lastUpdate": "2019-10-03T00:00",
"lifecycleStatus": "a string ...",
"name": "new name",
"version": "a string ...",
"attachment": [
{}
],
"relatedParty": [
{}
],
"resourceSpecRelationship": [
{}
],
"resourceSpecCharacteristic": [
{}
],
"resourceSpecification": [
{}
],
"targetServiceSchema": {},
"validFor": {}
}
DELETE /iotDeviceSpecification/{id}
Description
Usage Samples
Request
DELETE /tmf-api/iotdevicemanagement/v4/iotDeviceSpecification/42
Response
204
GET /iotDataEvent?fields=...&{filtering}
Description
Usage Samples
Request
GET /tmf-api/iotdevicemanagement/v4/iotDataEvent
Accept: application/json
Response
200
[
{
"correlationId": "413",
"description": "This iot data event ...",
"domain": "a string ...",
"eventId": "374",
"eventTime": "2019-10-03T00:00",
"eventType": "a string ...",
"priority": "a string ...",
"timeOcurred": "2019-10-03T00:00",
"title": "a string ...",
© TM Forum 2020. All Rights Reserved. Page 76 of 91
TMF908 IoT Device Management API REST Specification
"event": {}
}
]
GET /iotDataEvent/{id}?fields=...&{filtering}
Description
Usage Samples
Request
GET /tmf-api/iotdevicemanagement/v4/iotDataEvent/42
Accept: application/json
Response
200
{
"correlationId": "413",
"description": "This iot data event ...",
"domain": "a string ...",
"eventId": "374",
"eventTime": "2019-10-03T00:00",
"eventType": "a string ...",
"priority": "a string ...",
"timeOcurred": "2019-10-03T00:00",
"title": "a string ...",
"event": {}
}
GET /iotManagementEvent?fields=...&{filtering}
Description
Usage Samples
Request
GET /tmf-api/iotdevicemanagement/v4/iotManagementEvent
Accept: application/json
Response
200
[
{
"correlationId": "423",
"description": "This iot management event ...",
"domain": "a string ...",
"eventId": "536",
"eventTime": "2019-10-03T00:00",
"eventType": "a string ...",
"priority": "a string ...",
"timeOcurred": "2019-10-03T00:00",
"title": "a string ...",
"event": {}
}
]
GET /iotManagementEvent/{id}?fields=...&{filtering}
Description
Usage Samples
Request
GET /tmf-api/iotdevicemanagement/v4/iotManagementEvent/42
Accept: application/json
Response
200
{
"correlationId": "423",
"description": "This iot management event ...",
"domain": "a string ...",
"eventId": "536",
"eventTime": "2019-10-03T00:00",
"eventType": "a string ...",
"priority": "a string ...",
"timeOcurred": "2019-10-03T00:00",
"title": "a string ...",
"event": {}
}
Operations on Alarm
List alarms
GET /alarm?fields=...&{filtering}
Description
Usage Samples
Request
GET /tmf-api/iotdevicemanagement/v4/alarm
Accept: application/json
Response
200
[
{
"id": "8675309",
"href": "https://host:port/alarmManagement/v4/alarm/8675309",
"@baseType": "Alarm",
"@type": "Alarm",
"@schemaLocation": "https:://host:port/Alarm.schema.json",
"externalAlarmId": "5551212",
"state": "UPDATED",
"alarmType": "Environmental Alarm",
"perceivedSeverity": "MAJOR",
"probableCause": "Rectifier Low voltage",
"specificProblem": "ps=3,sl=1,in=8",
"alarmedObjectType": "Rectifier",
"alarmedObject": {
"id": "93051825",
"href": "https://host:port/resourceInventoryManagement/v4/resource/93051825"
},
"sourceSystemId": "ems-1",
"alarmDetails": "voltage=95",
"alarmRaisedTime": "2019-07-03T03:32:17.235Z",
"alarmReportingTime": "2019-07-03T03:32:17.552Z",
"alarmChangedTime": "2019-07-03T03:32:52.744Z",
"ackSystemId": "ems-1",
"ackUserId": "[email protected]",
"ackTime": "2019-07-03T03:33:12.623Z",
"ackState": "ACKNOWLEDGED",
"isRoot": false,
"parentAlarm": {
"id": "8675300"
},
© TM Forum 2020. All Rights Reserved. Page 80 of 91
TMF908 IoT Device Management API REST Specification
"correlatedAlarm": [
{
"id": "8675399",
"href": "https://host:port/alarmManagement/v4/alarm/868675399"
}
],
"comments": [
{
"userId": "[email protected]",
"systemId": "ems-1",
"time": "2019-07-03T03:37:33.827Z",
"comment": "Dispatched"
}
]
}
]
Retrieve alarm
GET /alarm/{id}?fields=...&{filtering}
Description
Usage Samples
Request
GET /tmf-api/iotdevicemanagement/v4/alarm/8675309
Accept: application/json
Response
200
{
"id": "8675309",
"href": "https://host:port/alarmManagement/v4/alarm/8675309",
"@baseType": "Alarm",
"@type": "Alarm",
"@schemaLocation": "https:://host:port/Alarm.schema.json",
© TM Forum 2020. All Rights Reserved. Page 81 of 91
TMF908 IoT Device Management API REST Specification
"externalAlarmId": "5551212",
"state": "UPDATED",
"alarmType": "Environmental Alarm",
"perceivedSeverity": "MAJOR",
"probableCause": "Rectifier Low voltage",
"specificProblem": "ps=3,sl=1,in=8",
"alarmedObjectType": "Rectifier",
"alarmedObject": {
"id": "93051825",
"href": "https://host:port/resourceInventoryManagement/v4/resource/93051825"
},
"sourceSystemId": "ems-1",
"alarmDetails": "voltage=95",
"alarmRaisedTime": "2019-07-03T03:32:17.235Z",
"alarmReportingTime": "2019-07-03T03:32:17.552Z",
"alarmChangedTime": "2019-07-03T03:32:52.744Z",
"ackSystemId": "ems-1",
"ackUserId": "[email protected]",
"ackTime": "2019-07-03T03:33:12.623Z",
"ackState": "ACKNOWLEDGED",
"isRoot": false,
"parentAlarm": {
"id": "8675300"
},
"correlatedAlarm": [
{
"id": "8675399",
"href": "https://host:port/alarmManagement/v4/alarm/868675399"
}
],
"comments": [
{
"userId": "[email protected]",
"systemId": "ems-1",
"time": "2019-07-03T03:37:33.827Z",
"comment": "Dispatched"
}
]
}
Create alarm
POST /alarm
Description
The following tables provide the list of mandatory and non mandatory attributes when creating an Alarm, including
any possible rule conditions and applicable default values. Notice that it is up to an implementer to add additional
mandatory attributes.
Usage Samples
Here's an example of a request for creating an Alarm resource. In this example the request only passes mandatory
attributes.
Request
POST /tmf-api/iotdevicemanagement/v4/alarm
Content-Type: application/json
{}
Response
201
{
"id": "8675309",
"href": "https://host:port/alarmManagement/v4/alarm/8675309"
}
Patch alarm
PATCH /alarm/{id}
Description
Note: If the update operation yields to the creation of sub-resources or relationships, the same rules concerning
mandatory sub-resource attributes and default value settings in the POST operation applies to the PATCH
operation. Hence these tables are not repeated here.
The tables below provide the list of patchable and non patchable attributes, including constraint rules on their
usage.
Usage Samples
Request
PATCH /tmf-api/iotdevicemanagement/v4/alarm/8675309
Content-Type: application/merge-patch+json
{
"name": "new name"
}
Response
200
{
"id": "8675309",
"href": "https://host:port/alarmManagement/v4/alarm/8675309",
"@baseType": "Alarm",
"@type": "Alarm",
"@schemaLocation": "https:://host:port/Alarm.schema.json",
"externalAlarmId": "5551212",
"state": "UPDATED",
"alarmType": "Environmental Alarm",
"perceivedSeverity": "MAJOR",
"probableCause": "Rectifier Low voltage",
"specificProblem": "ps=3,sl=1,in=8",
"alarmedObjectType": "Rectifier",
"alarmedObject": {
"id": "93051825",
"href": "https://host:port/resourceInventoryManagement/v4/resource/93051825"
},
"sourceSystemId": "ems-1",
"alarmDetails": "voltage=95",
"alarmRaisedTime": "2019-07-03T03:32:17.235Z",
"alarmReportingTime": "2019-07-03T03:32:17.552Z",
"alarmChangedTime": "2019-07-03T03:32:52.744Z",
"ackSystemId": "ems-1",
"ackUserId": "[email protected]",
"ackTime": "2019-07-03T03:33:12.623Z",
"ackState": "ACKNOWLEDGED",
"isRoot": false,
"parentAlarm": {
"id": "8675300"
},
"correlatedAlarm": [
{
"id": "8675399",
"href": "https://host:port/alarmManagement/v4/alarm/868675399"
}
],
"comments": [
{
"userId": "[email protected]",
"systemId": "ems-1",
"time": "2019-07-03T03:37:33.827Z",
"comment": "Dispatched"
}
],
"name": "new name"
}
API NOTIFICATIONS
For every single of operation on the entities use the following templates and provide sample REST notification POST
calls.
It is assumed that the Pub/Sub uses the Register and UnRegister mechanisms described in the REST Guidelines
reproduced below.
Register listener
POST /hub
Description
Sets the communication endpoint address the service instance must use to deliver information about its health
state, execution state, failures and metrics. Subsequent POST calls will be rejected by the service if it does not
support multiple listeners. In this case DELETE /api/hub/{id} must be called before an endpoint can be created
again.
Behavior
Usage Samples
Request
POST /api/hub
Accept: application/json
{"callback": "http://in.listener.com"}
Response
201
Content-Type: application/json
Location: /api/hub/42
{"id":"42","callback":"http://in.listener.com","query":null}
Unregister listener
DELETE /hub/{id}
Description
Clears the communication endpoint address that was set by creating the Hub.
Behavior
Usage Samples
Request
DELETE /api/hub/42
Accept: application/json
Response
204
Clears the communication endpoint address that was set by creating the Hub.
Provides to a registered listener the description of the event that was raised. The /client/listener url is the callback
url passed when registering the listener.
Behavior
Returns HTTP/1.1 status code 201 if the service is able to set the configuration.
Usage Samples
Here's an example of a notification received by the listener. In this example “EVENT TYPE” should be replaced by
one of the notification types supported by this API (see Notification resources Models section) and EVENT BODY
refers to the data structure of the given notification type.
Request
POST /client/listener
Accept: application/json
{
"event": {
EVENT BODY
},
"eventType": "EVENT_TYPE"
}
Response
201
For detailed examples on the general TM Forum notification mechanism, see the TMF REST Design Guidelines.
Acknowledgements
Document History
Version History
Release History
Contributors to Document
Name Affiliation
Name Affiliation