POST api/Units/PublicLink?serialNumber={serialNumber}
Create or update a public link to a unit.
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
serialNumber | string |
Required |
Body Parameters
UnitPublicLinkRequestName | Description | Type | Additional information |
---|---|---|---|
PublishFromDate |
Publish data from this date and time (UTC). If set to null, the effective PublishFromDate will be your earliest data access for this device This property cannot be earlier than your earliest data access for this device. Requesting this timestamp to be set outside this boundary will nudge the actual value, but will not fail the request. It is possible to set this to a date and time in the future, and the link will then become available from that time. |
date |
None. |
PublishToDate |
Publish data until this date and time (UTC). If set to null, the public link will show all data after PublishFromDate This property cannot be earlier than the effective PublishFromDate. Requesting this timestamp to be set outside this boundary will nudge the actual value, but will not fail the request. It is possible to set this to a date and time in the future, and the link will then become available from that time. |
date |
None. |
GrantedAccess |
The level of Access granted by this public link. Default (0) gives access to Map only (equivalent to GrantedAccess = 1). This is a flags value. |
PublicLinkGrantedAccess |
None. |
PublishedUrl |
Read only. URL of published link. If this is left null or empty in a POST request, and no link already exists, a new public link will be created. If this is left null or empty in a POST request, and any link already exists, this will result in a BadRequest (400) - The existing link must first be deleted. Setting this to the existing PublishedUrl in a POST request will update the properties of the existing link. Setting this in a POST request, and the value does not match the url of the existing link (or no link exists), this will result in a BadRequest (400). |
string |
None. |
Request Formats
application/json, text/json
{ "PublishFromDate": "2025-02-28T12:00:51.8750475+00:00", "PublishToDate": "2025-02-28T12:00:51.8750475+00:00", "GrantedAccess": 0, "PublishedUrl": "sample string 1" }
application/xml, text/xml
<UnitPublicLinkRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebAPI.Models"> <GrantedAccess>Default</GrantedAccess> <PublishFromDate>2025-02-28T12:00:51.8750475+00:00</PublishFromDate> <PublishToDate>2025-02-28T12:00:51.8750475+00:00</PublishToDate> <PublishedUrl>sample string 1</PublishedUrl> </UnitPublicLinkRequest>
application/x-www-form-urlencoded
Sample not available.
Response Information
Resource Description
Create or update a public link to a unit.
OkNegotiatedContentResultOfUnitPublicLinkModelName | Description | Type | Additional information |
---|---|---|---|
Content | UnitPublicLinkModel |
None. |
|
ContentNegotiator | IContentNegotiator |
None. |
|
Request | HttpRequestMessage |
None. |
|
Formatters | Collection of MediaTypeFormatter |
None. |
Response Formats
application/json, text/json
Sample not available.