/api/v1/locations/{id}/share-links (POST)
POST
/api/v1/locations/{id}/share-links
const url = 'https://example.com/api/v1/locations/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/share-links';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"thingId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","placeId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","view":{"q":"example","filters":{"place":["2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"],"type":["2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"],"tag":["2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"]},"not":["place"]},"title":"example","expiresInDays":30}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/locations/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/share-links \ --header 'Content-Type: application/json' \ --data '{ "thingId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "placeId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "view": { "q": "example", "filters": { "place": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "type": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "tag": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ] }, "not": [ "place" ] }, "title": "example", "expiresInDays": 30 }'Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string format: uuid
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
thingId
string format: uuid
placeId
string format: uuid
view
object
q
string
filters
object
place
Array<string>
type
Array<string>
tag
Array<string>
not
Array<string>
title
string
expiresInDays
integer
Responses
Section titled “Responses”Default Response
Media typeapplication/json
object
link
required
object
id
required
string format: uuid
locationId
required
string format: uuid
scope
required
string
subject
required
title
required
string | null
view
required
state
required
string
expiresAt
required
string format: date-time
createdAt
required
string format: date-time
createdBy
required
object
id
required
string format: uuid
displayName
required
string
views
required
integer
url
required
string
Example
{ "link": { "scope": "thing", "view": { "not": [ "place" ] }, "state": "active" }}