An example calling the Swagger API? #1078
-
Is there an example calling the Swagger API? For example, if the Blog Module is installed, it exposes this: However, I can not come up with the proper values to pass to get any response other than an error. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Swagger has a lot of options to enable functionality in the auto-generated API user interface. I think we need a Swagger expert to help with the configuration. |
Beta Was this translation helpful? Give feedback.
-
@ADefWebserver due to the multi-tenant aspect of Oqtane, calls to the back-end API need to identify the tenant/site. This is currently supported by passing the AliasId as the first element in the Url path ( in your screen shot above it says "site" but the Oqtane core API uses /{alias}/api/entity ). Based on the AliasId the system is able to lookup the Tenant and Site in the database. In addition to multi-tenancy there is also authentication and authorization requirements. Currently Oqtane only supports cookie auth - so if you want to call the API you need to have a valid auth cookie. In addition, most API methods require authorization. Authorization is based on the SiteId and it retrieves permissions from the Tenant database based on the permission type and entityid. |
Beta Was this translation helpful? Give feedback.
@ADefWebserver due to the multi-tenant aspect of Oqtane, calls to the back-end API need to identify the tenant/site. This is currently supported by passing the AliasId as the first element in the Url path ( in your screen shot above it says "site" but the Oqtane core API uses /{alias}/api/entity ). Based on the AliasId the system is able to lookup the Tenant and Site in the database. In addition to multi-tenancy there is also authentication and authorization requirements. Currently Oqtane only supports cookie auth - so if you want to call the API you need to have a valid auth cookie. In addition, most API methods require authorization. Authorization is based on the SiteId and it retrieves…