Free Support Forum - groupdocs.cloud

Don't see storage provider documentation for Cloud API


#1

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 (http://groupdocs.com/docs/display/documentation/Configure+Amazon+S3+as+Your+Storage+Provider+in+GroupDocs+Account), 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.

#2

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.

#3

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.

#4

Could you point me to documentation about how to use the https://api.groupdocs.com/v2.0/spec/#!/user/AddStorageProvider_POST endpoint? Note what i already tried from the previous post.


#5

Hello,


Sorry for the delay. I think first you have to run https://api.groupdocs.com/v2.0/spec/#!/user/GetStorageProviders_GET
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.

#6

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?

#7

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

#8

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 https://api.groupdocs.com/v2.0/spec/#!/user/UpdateStorageProvider_PUT 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 https://api.groupdocs.com/v2.0/spec/#!/user/GetStorageProviders_GET 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 https://apps.groupdocs.com/My/Settings#storage.

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