Page MenuHomeSoftware Heritage

templates/api: Add section about authentication in documentation
ClosedPublic

Authored by anlambert on Nov 4 2020, 5:57 PM.

Diff Detail

Repository
rDWAPPS Web applications
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build is green

Patch application report for D4412 (id=15632)

Could not rebase; Attempt merge onto 527e7b0a87...

Updating 527e7b0a..08124a35
Fast-forward
 swh/web/templates/api/api.html                | 287 +++++++++++++++++++++-
 swh/web/templates/api/apidoc.html             | 328 +++++++++++++-------------
 swh/web/templates/includes/apidoc-header.html | 198 ----------------
 swh/web/templates/includes/apidoc-header.md   | 197 ----------------
 4 files changed, 446 insertions(+), 564 deletions(-)
 delete mode 100644 swh/web/templates/includes/apidoc-header.html
 delete mode 100644 swh/web/templates/includes/apidoc-header.md
Changes applied before test
commit 08124a35621f87c6afb4649783fd3fa75751f9c4
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Wed Nov 4 17:56:04 2020 +0100

    templates/api: Add section about authentication in documentation
    
    Closes T2717

commit 890431c791164f10cbfa3ba95d1741659a3b66f1
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Mon Oct 26 11:44:11 2020 +0100

    templates/api: Reformat HTML

commit 0ae2626cf4830e2e4372410a7d9732227c8ef575
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Fri Oct 23 15:17:59 2020 +0200

    templates: Merge apidoc-header.html in api.html

See https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/452/ for more details.

Build is green

Patch application report for D4412 (id=15633)

Could not rebase; Attempt merge onto 527e7b0a87...

Updating 527e7b0a..25c7f7e2
Fast-forward
 swh/web/templates/api/api.html                | 287 +++++++++++++++++++++-
 swh/web/templates/api/apidoc.html             | 328 +++++++++++++-------------
 swh/web/templates/includes/apidoc-header.html | 198 ----------------
 swh/web/templates/includes/apidoc-header.md   | 197 ----------------
 4 files changed, 446 insertions(+), 564 deletions(-)
 delete mode 100644 swh/web/templates/includes/apidoc-header.html
 delete mode 100644 swh/web/templates/includes/apidoc-header.md
Changes applied before test
commit 25c7f7e28125d6808e574b6a05efe541235c38db
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Wed Nov 4 17:56:04 2020 +0100

    templates/api: Add section about authentication in documentation
    
    Closes T2717

commit 890431c791164f10cbfa3ba95d1741659a3b66f1
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Mon Oct 26 11:44:11 2020 +0100

    templates/api: Reformat HTML

commit 0ae2626cf4830e2e4372410a7d9732227c8ef575
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Fri Oct 23 15:17:59 2020 +0200

    templates: Merge apidoc-header.html in api.html

See https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/453/ for more details.

zack requested changes to this revision.Nov 4 2020, 6:32 PM
zack added subscribers: rdicosmo, zack.

great stuff, thanks !

I'm just requesting a couple of minor changes (and adding a related suggestion for the contact form).

swh/web/templates/api/api.html
245–248

I'd mention here both anonymous and authenticated users, otherwise this gives the impression only the former exist. Here's a concrete proposal:

"API users can be either anonymous or authenticated. For rate-limiting purposes, anonymous users are identified by their origin IP address; authenticated users identify themselves via user-specific credentials, like <a href="LINK POITING TO TOKENS SECTION">authentication tokens</a>".

287

maybe you can replace ${TOKEN} with an actual (but fake or expired) token string? it would make the example more clear to users

292–293

Linking to the contact form is a good idea.
Proposal: can we add a dedicated topic to the drop-down menu there, specifically to send us inquiries about lifting the API rate limit? What do you think @rdicosmo ?

This revision now requires changes to proceed.Nov 4 2020, 6:32 PM
swh/web/templates/api/api.html
245–248

Much better indeed, thanks !

287

I will add a new line before the call to curl with an export command to clarify.

292–293

I was also thinking adding a new subject related to the Web API rate limit in the contact form.

swh/web/templates/api/api.html
292–293

Good idea, green light on my side for adding this topic.
We will need to flesh out a policy for lifting the rate limiting, but this is a separate issue.

Build is green

Patch application report for D4412 (id=15634)

Could not rebase; Attempt merge onto 527e7b0a87...

Updating 527e7b0a..8daf7a8f
Fast-forward
 swh/web/templates/api/api.html                | 289 ++++++++++++++++++++++-
 swh/web/templates/api/apidoc.html             | 328 +++++++++++++-------------
 swh/web/templates/includes/apidoc-header.html | 198 ----------------
 swh/web/templates/includes/apidoc-header.md   | 197 ----------------
 4 files changed, 448 insertions(+), 564 deletions(-)
 delete mode 100644 swh/web/templates/includes/apidoc-header.html
 delete mode 100644 swh/web/templates/includes/apidoc-header.md
Changes applied before test
commit 8daf7a8fda618024332a48ce249a977c30481024
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Wed Nov 4 17:56:04 2020 +0100

    templates/api: Add section about authentication in documentation
    
    Closes T2717

commit 890431c791164f10cbfa3ba95d1741659a3b66f1
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Mon Oct 26 11:44:11 2020 +0100

    templates/api: Reformat HTML

commit 0ae2626cf4830e2e4372410a7d9732227c8ef575
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Fri Oct 23 15:17:59 2020 +0200

    templates: Merge apidoc-header.html in api.html

See https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/454/ for more details.

This revision is now accepted and ready to land.Nov 4 2020, 7:31 PM