- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
Our community just got stronger! Explore new identity security resources, connect with experts, and discover more ways to learn and collaborate.
06-26-2023 10:15 AM
Is there any way to add a file to a safe using REST API?
I found this one how-to article https://community.cyberark.com/s/article/How-to-upload-files-using-REST-and-Powershell but it seems misleading as to what it actually does.
When I go looking for more information on "api/platforms/import" I find this documentation https://docs.cyberark.com/Product-Doc/OnlineHelp/PAS/12.2/en/Content/WebServices/ImportPlatform.htm?tocpath=Developer%7CREST%20APIs%7CPlatforms%7C_____3 which seems to indicate the true purpose is for importing platforms and not uploading \ importing files.
The only other mention I find of somewhat programmatic import is PACLI which isn't what we're looking for.
06-27-2023 01:54 AM
This isn't possible. The only 'workaround' is treating an account object like a file object and storing the file content in the Password field (first serializing to base64 beforehand) but this feels a bit dirty and who knows what the limitations are (file size, etc.)
06-27-2023 01:54 AM
This isn't possible. The only 'workaround' is treating an account object like a file object and storing the file content in the Password field (first serializing to base64 beforehand) but this feels a bit dirty and who knows what the limitations are (file size, etc.)
06-27-2023 06:21 AM
Thanks, Tim. That's the general sense I was getting after looking around. I know we can add files to safe using PVWA or PrivateArk client, but we were hoping this was exposed via API.
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!

