POST api/Units/Publish?serialNumber={serialNumber}
[DEPRECATED] Use [POST]api/Units/PublicLink. 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:06:00.4488611+00:00", "PublishToDate": "2025-02-28T12:06:00.4488611+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:06:00.4488611+00:00</PublishFromDate> <PublishToDate>2025-02-28T12:06:00.4488611+00:00</PublishToDate> <PublishedUrl>sample string 1</PublishedUrl> </UnitPublicLinkRequest>
application/x-www-form-urlencoded
Sample not available.
Response Information
Resource Description
[DEPRECATED] Use [POST]api/Units/PublicLink. Create or update a public link to a unit.
UnitPublicLinkModelName | Description | Type | Additional information |
---|---|---|---|
SerialNumber |
ReadOnly. Unit serialnumber. |
string |
None. |
PublishFromDate |
Published data begins from this date and time (UTC). This property can be in the future, for a link that will activate later. This property cannot be earlier than your earliest data access for this unit. |
date |
None. |
PublishToDate |
Published 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. |
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. |
string |
None. |
Response Formats
application/json, text/json
{ "SerialNumber": "sample string 1", "PublishFromDate": "2025-02-28T12:06:00.4488611+00:00", "PublishToDate": "2025-02-28T12:06:00.4488611+00:00", "GrantedAccess": 0, "PublishedUrl": "sample string 3" }
application/xml, text/xml
<UnitPublicLinkModel 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:06:00.4488611+00:00</PublishFromDate> <PublishToDate>2025-02-28T12:06:00.4488611+00:00</PublishToDate> <PublishedUrl>sample string 3</PublishedUrl> <SerialNumber>sample string 1</SerialNumber> </UnitPublicLinkModel>