Hi,
Is there a multiple endpoint for creating folders and sub-folders?
I know i can create a template and add manually to every project, but i have many (c.2000 jobs) i need to create this folder setup on.
I've tried a few combinations but nothing seems to work.
Thanks
John
POST Folders - Is there Multiple endpoint available?
Forum rules
- Check the documentation first. Before posting questions, please check the documentation to ensure it doesn't already cover what you need.
- No spam. All automated messages, advertisements, and links to competitor websites will be deleted immediately.
- Post in relevant sub-forums only. Messages posted in the wrong topic area will be removed and placed in the correct sub-forum by moderators.
- Respect other users. No flaming or abusing fellow forum members. Users who continue to post inflammatory, abusive comments will be deleted from the forum after two warnings are issued by moderators.
- Harassment. No threats or harassment of other users will be tolerated. Any instance of threatening or harassing behavior is grounds for deletion from the forums.
- Adult content. No profanity or pornography is allowed. Posts containing adult material will be deleted.
- Bandwidth. All images and signatures must be 500 x 500 pixels or smaller. Posts containing over-sized images and signatures will be removed.
- Illegal content. No re-posting of copyrighted materials or other illegal content is allowed. Any posts containing illegal content or copyrighted materials will be deleted.
-
SimproAPITeam
- Posts: 831
- Joined: Wed May 01, 2024 2:31 am
Re: POST Folders - Is there Multiple endpoint available?
Hi jmc,
Post multiple for folders would only allow posting multiple folders on one job. From your question it looks like you want to post multiple jobs.
You can POST Sub resources to see if that works for you on folders to reduce the number of queries. See example here :
https://developer.simprogroup.com/apido ... bresources
Other wise you would have to use post multiple for jobs and then update the jobs individually to create the folders you need.
Regards
Post multiple for folders would only allow posting multiple folders on one job. From your question it looks like you want to post multiple jobs.
You can POST Sub resources to see if that works for you on folders to reduce the number of queries. See example here :
https://developer.simprogroup.com/apido ... bresources
Other wise you would have to use post multiple for jobs and then update the jobs individually to create the folders you need.
Regards
Simpro API Team | Simpro Software Group
Re: POST Folders - Is there Multiple endpoint available?
Thanks for the clarification!
Yes, I only need to create the folder structure on a single job at a time, I can get the API to loop through each job but I want to ensure it’s nested correctly.
Here’s an example of what I’m trying to achieve:
• Root Folder (Project)
• Plans
• Revisions
• Permits
• Photos
• Reports
• Site Inspection
• Completion
I’ve tried constructing the JSON body like this, but it’s not working as expected:
I get the keys might be not be correct but what do they need to be? Could you confirm if this structure is supported, or do I need to make separate API calls for each nested level? Any guidance on the correct approach would be appreciated.
Thanks,
John
Yes, I only need to create the folder structure on a single job at a time, I can get the API to loop through each job but I want to ensure it’s nested correctly.
Here’s an example of what I’m trying to achieve:
• Root Folder (Project)
• Plans
• Revisions
• Permits
• Photos
• Reports
• Site Inspection
• Completion
I’ve tried constructing the JSON body like this, but it’s not working as expected:
Code: Select all
{
"folders": [
{
"name": "Project",
"subFolders": [
{
"name": "Plans",
"subFolders": [
{
"name": "Revisions"
}
]
},
{
"name": "Permits"
},
{
"name": "Photos"
},
{
"name": "Reports",
"subFolders": [
{
"name": "Site Inspection"
},
{
"name": "Completion"
}
]
}
]
}
]
}Thanks,
John
Last edited by jmc2408 on Thu Mar 13, 2025 12:03 pm, edited 1 time in total.
Re: POST Folders - Is there Multiple endpoint available?
Any feedback if a multiple endpoint and array post is possible for Folders?
-
SimproAPITeam
- Posts: 831
- Joined: Wed May 01, 2024 2:31 am
Re: POST Folders - Is there Multiple endpoint available?
Hi jmc2408,
With ur example of creating folder structures, it wouldn't be possible in a single call.
You can only use the Post and Patch Multiple to create multiple folders in a single call: https://developer.simprogroup.com/apido ... h-multiple
But you will need to know the parent folder ID for subfolders.
eg. for Customer Folders - [buildURL]/api/v1.0/companies/[companyID]/customers/[customerID]/attachments/folders/multiple/
Hope that helps.
With ur example of creating folder structures, it wouldn't be possible in a single call.
You can only use the Post and Patch Multiple to create multiple folders in a single call: https://developer.simprogroup.com/apido ... h-multiple
But you will need to know the parent folder ID for subfolders.
eg. for Customer Folders - [buildURL]/api/v1.0/companies/[companyID]/customers/[customerID]/attachments/folders/multiple/
Code: Select all
[
{
"Parent": 43170,
"Name": "3-1"
},
{
"Parent": 43170,
"Name": "3-2"
},
{
"Parent": 43170,
"Name": "3-3"
}
]Simpro API Team | Simpro Software Group
DEVELOPER CENTER