Inquiry about Managing SMB Shares through the TrueNAS API

OpenCode.dev

Cadet
Joined
Aug 29, 2023
Messages
1
Hello TrueNAS community,

I hope you're all doing well. I'm currently working on an Android application that aims to integrate with TrueNAS and provide cloud storage to our users. Our app's goal is to allow users to connect to their TrueNAS storage through the app and manage their files seamlessly.

I've been exploring the TrueNAS API documentation available at TrueNas API to understand how I can manage SMB shares programmatically. However, I'm seeking some guidance on the specific API endpoints or methods that can be used for this purpose.

Here are the key points I'm interested in:
  1. Creating SMB Shares: I'd like to know if there's a specific API endpoint or method that allows me to create new SMB shares programmatically. Our app's users should be able to create new shares through the app.
  2. Managing Share Permissions: It's important for our users to be able to manage permissions for their shares within the app. Can anyone provide insights on how I can use the API to set and modify permissions for SMB shares?
  3. Quota Management: As part of our app's offering, we'd like to allocate specific storage quotas for each user's SMB shares. Are there API endpoints that allow quota management for shares?
  4. File Upload to Shares: Another essential feature we're aiming for is the ability for users to upload files to their SMB shares directly from the app. Are there API methods that facilitate file upload to SMB shares programmatically?
On a positive note, I've successfully utilized the API to create new users and groups within the TrueNAS system.

I've been through the documentation, but I'm looking for more practical guidance and perhaps some code examples to help me get started on the right track.

If anyone has experience working with the TrueNAS API for SMB share management, file upload, and user/group manipulation, or if you can point me to relevant resources, I would greatly appreciate your assistance. Any insights, tips, or code snippets would be invaluable in helping us bring our app to life.

Thank you in advance for your time and expertise. I'm looking forward to your responses!
 

jose-pr

Dabbler
Joined
Apr 3, 2022
Messages
10
Havent tested file uploads but i have query and created shares through python. I am using the websocket client but I see the same endpoints as the rest api on it.
Of interest the endpoints
sharing.smb
sharing.smb.query ( GET on sharing/smb)
sharing.smb.delete ( DELETE on sharing/smb/id)
sharing.smb.update ( PUT on sharing/smb/id )
sharing.smb.create ( POST on sharing/smb )
filesystem
filesystem.put (POST filesystem/put)
filesystem.get (POST filesystem/post)
 
Top