Contact
Developers
Get Started
Storage
Definition
Endpoint: https://core.sitemesh.com/v1/storage/
StoragePath: Path to save the data.
StorageData: Data in Base64 string.
StoragePublic: Set to true if you want the file to be publicly available via https://storage.sitemesh.com/{ServiceID}/{StoragePath} or https://storage.sitemesh.com/{ServiceID}/{AccountID}/{StoragePath} if you scope the file under an account.
Get
Retrieve a file as a Base64 string.
await fetch('https://core.sitemesh.com/v1/storage/get, { body: JSON.stringify({ StoragePath: '#PATH-TO-RESOURCE#', }), method: 'POST', headers: { 'Content-Type': 'application/json', 'authorization': 'bearer #YOUR-TOKEN#', } } );
Save
To save a file, submit the path and data as Base64. A flag exists to make the file private or public.
await fetch('https://core.sitemesh.com/v1/storage/save', { body: JSON.stringify({ StoragePath: '#PATH-TO-STORAGE#', StorageData: '#DATA-AS-BASE64#', StoragePublic: false | true, }), method: 'POST', headers: { 'Content-Type': 'application/json', 'api-key': '#API-KEY#', } } );