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

NameDescriptionTypeAdditional information
serialNumber

string

Required

Body Parameters

UnitPublicLinkRequest
NameDescriptionTypeAdditional information
PublishFromDate

Publish data from this date and time (UTC). This property is clamped to a time between current UTC time and your earliest data access for this unit. Requesting this timestamp to be set outside this boundary will nudge the actual value, but will not fail the request.

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

Sample:
{
  "PublishFromDate": "2024-05-19T13:37:28.060701+00:00",
  "GrantedAccess": 0,
  "PublishedUrl": "sample string 2"
}

application/xml, text/xml

Sample:
<UnitPublicLinkRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebAPI.Models">
  <GrantedAccess>Default</GrantedAccess>
  <PublishFromDate>2024-05-19T13:37:28.060701+00:00</PublishFromDate>
  <PublishedUrl>sample string 2</PublishedUrl>
</UnitPublicLinkRequest>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

[DEPRECATED] Use [POST]api/Units/PublicLink. Create or update a public link to a unit.

UnitPublicLinkModel
NameDescriptionTypeAdditional information
SerialNumber

ReadOnly. Unit serialnumber.

string

None.

PublishFromDate

Publish data from this date and time (UTC). This property is clamped to a time between current UTC time and your earliest data access for this unit.

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

Sample:
{
  "SerialNumber": "sample string 1",
  "PublishFromDate": "2024-05-19T13:37:28.0656994+00:00",
  "GrantedAccess": 0,
  "PublishedUrl": "sample string 3"
}

application/xml, text/xml

Sample:
<UnitPublicLinkModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebAPI.Models">
  <GrantedAccess>Default</GrantedAccess>
  <PublishFromDate>2024-05-19T13:37:28.0656994+00:00</PublishFromDate>
  <PublishedUrl>sample string 3</PublishedUrl>
  <SerialNumber>sample string 1</SerialNumber>
</UnitPublicLinkModel>