Configure Amazon S3 Storage with GroupDocs Cloud via API

Where can i find documentation on implementing storage providers? Would i be able to find a file GUID by referring to its path in S3, for example? i see documentation on how to configure a storage provider via the web console (Configure Amazon S3 Storage | GroupDocs.Total Cloud | Documentation), but not about how to leverage it via the API.

In addition, i get an error at https://apps.groupdocs.com/My/Settings#storage for my key, secret, and bucket name: “Unable to recognize that Account Name/Account Key.”

Hello,


Thank you for your request. To configure the storage provider via the API please use this method .

As for the error - please make sure that you use correct account data from the S3.

Best regards.

i copy/pasted the key, secret, and bucket name exactly as AWS IAM returned them. Perhaps there is an escaping issue in the web form? The character ‘+’ and the string ‘//’ exist in the secret.


Thank you for the swagger endpoint for adding a new storage provider, but without documentation about the parameters, i have been unable to get it working. For one, i cannot determine what a valid “provider” value is. i tried “S3”, “s3”, “AWS”… The error message “Unknown storage provider.” does not indicate valid options, nor to the Swagger docs. It doesn’t appear that OPTIONS is available for this endpoint, either.

Apart from that, i’m presuming that “publicKey” and “privateKey” are the S3 IAM keys, and that “rootFolder” is the bucket name. i don’t know what all the other options are for, and would have appreciated some documentation in the Swagger interface.

Could you point me to documentation about how to use the Swagger API Explorer endpoint? Note what i already tried from the previous post.

Hello,


Sorry for the delay. I think first you have to run Swagger API Explorer
so you know what to put into the provider name. Public key and private key it’s obvious, are the ones you get from Amazon, root folder is the root folder name on the amazon storage, servicehost can stay null, same for the alternate publickey and alternateprivatekey.

Best regards.

Sorry, that doesn’t help. GET will return a list of providers, but i don’t have any set up. So it returns an empty list. i’m having trouble setting a single S3 provider up.


i see how to set public and private keys, but without docs on the rest of the values, i’m getting errors that i don’t know how to resolve. For example, i set “userId”, “provider” (i called that “s3”; i’m just guessing, and it’s a required field), and in “providerInfo” i set “publicKey” and “privateKey”.

Here is the response:

{
“result”: {},
“status”: “Failed”,
“error_message”: “Unknown storage provider.”,
“composedOn”: 1466717665720
}

i think that means that the value i included for “provider” is invalid, or that the “provider” attribute of “providerInfo” needs to be set to some value. But i don’t know what value it is looking for. Is there a list of valid provider values?

Can you tell me the minimum attributes for a working S3 provider setup?

Hi,


Here is a description for the parameters:
UserID: User GUID (GroupDocs user’s GUID)
provider: AmazonS3
providerInfo.Id : 0
provider: AmazonS3
type: 1 (means Individual)
isPrimary: false
SyncOptions : 0 (means None)

If you will have more question please feel free to contact us.

Best regards

Thank you, i was able to get a provider created. For the record, i don’t think that would have been possible with the existing Swagger documentation alone.


Next, i’m having trouble learning how to update and delete storage providers via the API.

i see the update docs at Swagger API Explorer but i’m getting “Unable to recognize that Account Name/Account Key.” with any of my attempts. i was presuming that the “providerInfo > id” is an ID found the list of providers at Swagger API Explorer but that doesn’t seem to work. Also, do i have to send all the values in the PUT, or is this implemented as a partial update? i’ve tried both.

Interestingly, i get the same error when i try to create an S3 provider (primary) at Containerize.IdentityServer - Single sign-on to access all applications and services of Aspose Pty Ltd.

Also, how does one remove a storage provider once added? i didn’t see a DELETE method.