How to use Basic Authentication with RAML 1.0?


I try to describe my API in RAML 1.0 which uses Basic Authentication. I use two different users (or groups) with different access rights. The RAML spec mentions to support Basic Authentication but doesn’t state any details. I tried definitions similar than those for OAuth 2.0 like “basic_authentication: !include securitySchemes/basic_authentication.raml” and “basic: !include securitySchemes/basic.raml” but according to API Workbench those are wrong. I could find some example regarding RAML 0.8 but don’t know how to adapt it to RAML 1.0.

I would be very much appreciated if somebody could provide a simple example how to use Basic Authentication, ideally with two different users/groups. Thanks a lot.


There is an example in the spec:

#%RAML 1.0
title: Dropbox API
version: 1
    description: |
      This API supports Basic Authentication.
    type: Basic Authentication

And the spec also describes that the basic authentication has no further facets that you can define. That means the above example should basically be fully enough.


Thank you. So there is no way to express different users or groups each with different permissions?


Maybe that helps you a bit


There are vary good example in Raml spec you can check them out.