Create

Grants access to the device for new user. This endpoint can be used by owner or administrator of the device.

Note

User can have only one active access to the device at the time.

POST https://api.tedee.com/api/v1.34/my/device/{deviceId}/access

Body Parameters

Name

Type

Description

accessLevel

Access level

represents user access level

remoteAccessDisabled

boolean

represents if remote access is disabled

userEmail

string

user email that device will be shared with

weekDays

string

allowed week days when user can access the device

startDate

string

start date of period when user can access the device

endDate

string

end date of period when user can access the device

dayStartTime

string

start time of the day when user can access the device

dayEndTime

string

end time of the day when user can access the device

Responses

Name

Type

Description

201 Created

Device Access Success | successful operation

Scopes

Name

Description

DeviceShare.ReadWrite

Grants user possibility to read and write data connected with device access

Examples

Grant permanent administrator access

Sample request

curl -X POST "https://api.tedee.com/api/v1.34/my/device/{deviceId}/access" -H "accept: application/json" -H "Content-Type: application/json-patch+json" -H "Authorization: Bearer <<access token>>" -d "<<body>>"

Body:

{
    "accessLevel": 1,
    "userEmail": "[email protected]",
    "weekDays": null,
    "dayStartTime": null,
    "dayEndTime": null,
    "startDate": null,
    "endDate": null,
    "remoteAccessDisabled" : false
}

Sample response

HTTP status code: 201

{
    "result": {
        "id": 1,
        "sharedUserDisplayName": "John Doe"
    }
    "success": true,
    "errorMessages": [],
    "statusCode": 201
}

Grant guest time restricted access

Sample request

curl -X POST "https://api.tedee.com/api/v1.34/my/device/{deviceId}/access" -H "accept: application/json" -H "Content-Type: application/json" -H "Authorization: Bearer <<access token>>" -d "<<body>>"

Body:

{
    "accessLevel": 0,
    "userEmail": "[email protected]"
    "weekDays": null,
    "dayStartTime": null,
    "dayEndTime": null,
    "startDate": "2020-12-14T08:09:57.781Z",
    "endDate": "2020-12-31T08:10:57.781Z",
    "remoteAccessDisabled" : false
}

Sample response

HTTP status code: 201

{
    "result": {
        "id": 1,
        "sharedUserDisplayName": "John Doe"
    }
    "success": true,
    "errorMessages": [],
    "statusCode": 201
}

Grant guest custom access

Sample request

curl -X POST "https://api.tedee.com/api/v1.34/my/device/{deviceId}/access" -H "accept: application/json" -H "Content-Type: application/json" -H "Authorization: Bearer <<access token>>" -d "<<body>>"

Body:

{
    "accessLevel": 0,
    "userEmail": "[email protected]"
    "weekDays": 7,
    "dayStartTime": "2020-12-01T08:00:00.000Z",
    "dayEndTime": "2020-12-31T20:00:00.000Z",
    "startDate": "2020-12-01T08:09:57.781Z",
    "endDate": "2020-12-31T23:10:57.781Z",
    "remoteAccessDisabled" : false
}

Sample response

HTTP status code: 201

{
    "result": {
        "id": 1,
        "sharedUserDisplayName": "John Doe"
    }
    "success": true,
    "errorMessages": [],
    "statusCode": 201
}