Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

FileOrFolder.link documentation issues #9

Open
acosand opened this issue Sep 15, 2017 · 4 comments
Open

FileOrFolder.link documentation issues #9

acosand opened this issue Sep 15, 2017 · 4 comments

Comments

@acosand
Copy link

acosand commented Sep 15, 2017

Comment for FileOrFolder.link says:

  • accessibility: Determines how the link can be accessed ('Anyone', 'Password', 'Domain', 'Recipients')"

but I've had to use 'anyone' and 'domain'.
It also says that expiry_date and expiry_clicks are optional, but I was required to use one. (Ideally, both could be used, but that's probably not a python-egnyte issue).

@dsoloviov
Copy link
Contributor

Hi @acosand,

You mean the capital letter: "Anyone" vs. "anyone"? If so, I can confirm that's a misprint, we'll update this comment.

As for expiration, you're probably having some configuration problems. Could you please log in to you Egnyte Connect and proceed to Settings -> Configuration -> General (you should have the admin user in order to do that)?

You should see something like

sharing

Check "Maximum file and folder link expiration" settings. If this options is enabled, expiration values become mandatory (we'll reflect this in documentation as well). Note that both cannot be used, you'll get 400 from the Public API. It's either date or number of clicks.

@acosand
Copy link
Author

acosand commented Sep 15, 2017

Yes, I meant the capitalization. Thanks.
WRT the expiration, I'm not an admin so I'm probably not going to be able to see those settings. I actually do want my links to expire, but when I was trying to get something working it just seemed like one more thing that wasn't working as documented.
I understand that I can't currently use both, but ideally I would like to be able to provide a link which can only be used once, and must be used within an hour.
Thank you.

@dsoloviov
Copy link
Contributor

dsoloviov commented Sep 15, 2017

I'm not an admin so I'm probably not going to be able to see those settings

Actually you should be able to get (but not set) those settings through Public API

curl -X GET https://<DOMAIN>.egnyte.com/pubapi/v1/links/settings -H 'authorization: Bearer <YOUR_TOKEN>'

will return something like:

{
    "expiration": {
        "default": {
            "value": 3,
            "unit": "week"
        },
        "max_allowed": {
            "expiry_time_value": 5,
            "expiry_time_unit": "months",
            "expiry_clicks": 6
        },
        "upload_links": true
    },
    "file_links": {
        "anyone": true,
        "password": true,
        "domain": true,
        "recipients": true,
        "default_type": "recipients"
    },
    "folder_links": {
        "anyone": true,
        "password": true,
        "domain": true,
        "recipients": true,
        "default_type": "anyone"
    }
}

Based on that you can easily calculate valid settings. Hope it helps!

@dsoloviov
Copy link
Contributor

I would like to be able to provide a link which can only be used once, and must be used within an hour

Actually it makes sense. Let me check with engineers from the team responsible for Public API if it's on the roadmap.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants