Skip to main content

Stream


List streams

Get a list of streams.

const response = await geocore.Stream.find({
isLive: boolean,
placeName: string,
userId: string,
startRange: {
start: "2025-01-01",
end: "2025-01-01",
}
endRange: {
start: "2025-01-01",
end: "2025-01-01",
}
page: 1,
limit: 10,
});

Prerequisites​

Successfully get the IdToken with companyAdmin, groupAdmin or user access level from login API.

Parameters​

nametypedata typedescription
isLiveoptionalbooleanStream is currently live
placeNameoptionalstringSearch by stream place name
userIdoptionalstringSearch by user started the stream
startRange[start]optionaldateSearch by startTime timestamp
startRange[end]optionaldateSearch by startTime timestamp
endRange[start]optionaldateSearch by endTime timestamp
endRange[end]optionaldateSearch by endTime timestamp
pageoptionalnumberPage ordinal number
limitoptionalnumberNumber of records per page
Get stream token

Get stream token.

const response = await geocore.Stream.getToken({
hostId: "hostId",
});

Prerequisites​

Successfully get the IdToken with companyAdmin, groupAdmin or user access level from login API.

Parameters​

nametypedata typedescription
hostIdrequiredstringHost user ID
Create stream

Create a stream with place information.

const formData = new FormData();
formData.append('name', name);
formData.append('description', description);
formData.append('tags[]', tagIds);
formData.append('geometry[type]', 'Point');
formData.append('geometry[overlay][position][lng]', '12');
formData.append('geometry[overlay][position][lat]', '34');

const response = await geocore.Stream.create(formData);

Prerequisites​

Successfully get the IdToken with companyAdmin, groupAdmin or user access level from login API.

Parameters​

nametypedata typedescription
namerequiredstringPlace name
descriptionrequiredstringPlace description
tagsrequiredstringPlace tags
geometry[type]requiredstringLocation geometry type, can be marker, circle, rectangel or polygon
geometry[overlay][position][lng]requiredstringLongitude of place in string, required when geometry type is marker
geometry[overlay][position][lat]requiredstringLatitude of place in string, required when geometry type is marker
geometry[overlay][center][lng]requiredstringLongitude of circle place in string, required when geometry type is circle
geometry[overlay][center][lat]requiredstringLatitude of circle place in string, required when geometry type is circle
geometry[overlay][radius]requiredstringRadius of circle place in string, required when geometry type is circle
geometry[overlay][bounds][north]requiredstringNorth latitude of rectangle place in string, required when geometry type is rectangle
geometry[overlay][bounds][south]requiredstringSouth latitude of rectangle place in string, required when geometry type is rectangle
geometry[overlay][bounds][east]requiredstringEast longitude of rectangle place in string, required when geometry type is rectangle
geometry[overlay][bounds][west]requiredstringWest longitude of rectangle place in string, required when geometry type is rectangle
geometry[overlay][paths][idx][lng]requiredstringLongitude of the vertices in string, required when geometry type is polygon
geometry[overlay][paths][idx][lat]requiredstringLatitude of the vertices in string, required when geometry type is polygon
Start recording

Start stream recording.

const response = await geocore.Stream.startRecording({
streamId: "string",
});

Prerequisites​

Successfully get the IdToken with companyAdmin, groupAdmin or user access level from login API.

Parameters​

nametypedata typedescription
streamIdrequiredstringStream ID
Stop recording

Stop stream recording.

const response = await geocore.Stream.stopRecording({
streamId: "string",
});

Prerequisites​

Successfully get the IdToken with companyAdmin, groupAdmin or user access level from login API.

Parameters​

nametypedata typedescription
streamIdrequiredstringStream ID
Update API key

Update an API key.

const response = await geocore.ApiKey.update(
streamId,
{
isLive: boolean,
}
);

Prerequisites​

Successfully get the IdToken with companyAdmin, groupAdmin or user access level from login API.

Parameters​

nametypedata typedescription
streamIdrequiredstringStream ID
isLiveoptionalstringStream is currently live or not