1
0
mirror of https://github.com/mattermost/focalboard.git synced 2024-11-24 08:22:29 +02:00
focalboard/server/swagger
Jesús Espino a4ef8ec6bc
Permissions integration tests (#2697)
* Initial permissions review infrastructure

* Adding more tests cases

* Modifying a bit the tests approach and adding more tests

* Adding more tests

* Adding more tests for permissions

* Adding more tests

* Adding more permissions tests

* Adding more tests

* Adding more permission checks

* Adding more permissions tests

* Adding more permission tests

* Adding more tests

* Adding subscriptions tests

* Adding more permissions tests

* Adding tests for read tokens in the files

* Update APIs and fix unit tests

* Fix linter errors

* Auto-assign category id from the database (as expected because is serial/auto_increment integer field)

* Revert "Auto-assign category id from the database (as expected because is serial/auto_increment integer field)"

This reverts commit 5c98fd76a3.

* Fixing Category scheme in postgres and MySQL

* Removing restriction about the channel_id and add it to all the databases

* Moving everything to a new migration

* Fix bad merge (?)

* Update 000021_fix_categories.up.sql

Fix Postgres ALTER COLUMN syntax

* Update 000021_fix_categories.down.sql

Fix Postgres ALTER COLUMN syntax

* Update 000021_fix_categories.up.sql

Remove unnecessary, and unsupported MODIFY COLUMNs for SQLite.

* Update 000021_fix_categories.up.sql

Remove not null from categories.channel_id

* Update 000021_fix_categories.down.sql

Migrate down removing not null from categories.channel_id

* Update 000021_fix_categories.up.sql

Fix drop not null on categories.channel_id

* Update 000021_fix_categories.down.sql

Fix down migration of drop not null from categories.channel_id.

* Restore default notification level to debug

Co-authored-by: Chen-I Lim <chenilim@gmail.com>
Co-authored-by: Chen-I Lim <46905241+chenilim@users.noreply.github.com>
2022-04-05 08:00:04 -07:00
..
docs/html joinBoard API (#2660) 2022-03-29 10:14:33 +02:00
README.md API Readme: Add note on Boards API usage. (#2293) 2022-02-08 10:58:24 -08:00
swagger.yml Permissions integration tests (#2697) 2022-04-05 08:00:04 -07:00

Swagger / OpenAPI 2.0 auto-generated files

⚠️ Warning: The API is currently considered Beta and major changes are planned. Please see this note for more details.

This folder is generated by the make swagger command from comments in the server code.

Prerequisites:

  1. go-swagger
  2. openapi-generator

These can be installed via Homebrew:

brew tap go-swagger/go-swagger
brew install go-swagger
brew install openapi-generator

Server API documentation

See the generated server API documentation here.

Differences for Mattermost Boards

The auto-generated Swagger API documentation is for Focalboard Personal Server. If you are calling the API on Mattermost Boards, the additional changes are:

API URLs endpoint

The API endpoint is at https://SERVERNAME/plugins/focalboard/api/, e.g. https://community.mattermost.com/plugins/focalboard/api/.

Use the Mattermost auth token

Refer to the Mattermost API documentation here on how to obtain the auth token.

Pass this token as a bearer token to the Boards APIs, e.g.

curl -i -H "X-Requested-With: XMLHttpRequest" -H 'Authorization: Bearer abcdefghijklmnopqrstuvwxyz' https://community.mattermost.com/plugins/focalboard/api/v1/workspaces

Note that the X-Requested-With: XMLHttpRequest header is required to pass the CSRF check.

We want to hear from you!

If you are planning on using the Boards API, we would love to hear about what you'd like to do, and how we can improve the APIs in the future. See here for more details on how to connect.