Files
upstream-mattermost/api/v4/source/views.yaml
upstream-mirror 240db4e2a7
Some checks failed
Server CI / Postgres (shard 0) (push) Has been skipped
Server CI / Postgres (shard 3) (push) Has been skipped
BuildEnv Docker Image / build-image (push) Failing after 4s
BuildEnv Docker Image / build-image-fips (push) Failing after 4s
Migration Review & Release Notes / Generate migration review & release notes (push) Failing after 3s
Server CI / Build Environment (push) Failing after 3s
Server CI / Postgres (shard 1) (push) Has been skipped
Tools CI / check-style (mattermost-govet) (push) Failing after 4s
Server CI / Postgres (shard 2) (push) Has been skipped
Tools CI / check-style (mmgotool) (push) Failing after 3s
Server CI / Elasticsearch v8 Compatibility (push) Has been skipped
Server CI / OpenSearch v2 Compatibility (push) Has been skipped
Server CI / Postgres FIPS (shard 0) (push) Has been skipped
Tools CI / Test (mattermost-govet) (push) Failing after 3s
Server CI / Postgres FIPS (shard 1) (push) Has been skipped
Server CI / Postgres FIPS (shard 2) (push) Has been skipped
Tools CI / Test (mmgotool) (push) Failing after 3s
Server CI / Postgres FIPS (shard 3) (push) Has been skipped
Server CI / Run mmctl tests (push) Has been skipped
Server CI / Run mmctl tests (FIPS) (push) Has been skipped
Server CI / Merge Postgres Test Results (push) Has been skipped
Server CI / Merge Postgres FIPS Test Results (push) Has been skipped
Server CI / Check backport migrations (push) Has been skipped
Server CI / Check generated files (push) Has been skipped
Server CI / check-style (push) Has been skipped
Server CI / Vet API (push) Has been skipped
Server CI / Build mattermost server app (push) Has been skipped
Server CI / Server CI Complete (push) Failing after 2s
Server CI / Server CI Artifacts (push) Has been skipped
Server CI / Sentry Upload (push) Has been skipped
Server CI / Server CI Report (push) Failing after 5m1s
Server CI Nightly Race / Race Detector (push) Has been skipped
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
Webapp CI Cache Warm / Warm Webapp node_modules Cache (push) Has been cancelled
E2E CI Cache Warm / Warm E2E npm Registry Cache (push) Has been cancelled
API / build (push) Has been cancelled
Web App CI / check-types (push) Has been cancelled
Web App CI / check-lint (push) Has been cancelled
Web App CI / check-i18n (push) Has been cancelled
Web App CI / check-external-links (push) Has been cancelled
Web App CI / test (platform) (push) Has been cancelled
Web App CI / test (mattermost-redux) (push) Has been cancelled
Web App CI / test (channels shard 1/4) (push) Has been cancelled
Web App CI / test (channels shard 2/4) (push) Has been cancelled
Web App CI / test (channels shard 3/4) (push) Has been cancelled
Web App CI / test (channels shard 4/4) (push) Has been cancelled
Web App CI / upload-coverage (push) Has been cancelled
Web App CI / build (push) Has been cancelled
YAML Lint / yamllint (push) Has been cancelled
Push mirrored docker images / cd/Push mirrored docker images (push) Has been cancelled
docs-cd / Build and deploy docs (push) Has been cancelled
Docs CI / build (push) Has been cancelled
E2E Cache Warm: Cypress deps / Warm Cypress deps cache (push) Has been cancelled
Scorecards supply-chain security / Scorecard analysis (push) Has been cancelled
Server CI Weekly / Postgres FIPS (push) Has been skipped
Server CI Weekly / Run mmctl tests (FIPS) (push) Has been skipped
Server CI Weekly / Postgres with binary parameters (push) Has been skipped
Server CI Weekly / Build Environment (push) Failing after 1s
Server CI Cache Warm / Warm Go Module and Build Cache (push) Failing after 2s
Server CI Nightly Race / Build Environment (push) Failing after 1s
snapshot of https://github.com/mattermost/mattermost.git (master, 2026-09-16; blobs > 131072B omitted)
2026-09-16 00:29:55 +05:00

407 lines
12 KiB
YAML

/api/v4/channels/{channel_id}/views:
get:
tags:
- views
summary: List channel views
description: |
*__Experimental__: This endpoint is experimental and may change or be removed in a future release.*
Get a list of views for a channel.
__Minimum server version__: 11.6
##### Permissions
Must have `read_channel_content` permission for the channel.
operationId: ListChannelViews
parameters:
- name: channel_id
in: path
description: Channel GUID
required: true
schema:
type: string
- name: per_page
in: query
description: The number of views per page (default 60, max 200)
required: false
schema:
type: integer
default: 60
maximum: 200
- name: page
in: query
description: The 0-based page number for pagination (default 0)
required: false
schema:
type: integer
default: 0
minimum: 0
- name: include_total_count
in: query
description: >
When true, the response is a ViewsWithCount object containing
a views array and a total_count integer. When false or omitted,
the response is a plain JSON array of View objects.
required: false
schema:
type: boolean
default: false
responses:
"200":
description: Channel views retrieval successful
content:
application/json:
schema:
oneOf:
- type: array
items:
$ref: "#/components/schemas/View"
description: Plain array of views (default, when include_total_count is false)
- $ref: "#/components/schemas/ViewsWithCount"
description: Views with total count (when include_total_count is true)
"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"404":
$ref: "#/components/responses/NotFound"
"500":
$ref: "#/components/responses/InternalServerError"
post:
tags:
- views
summary: Create channel view
description: |
*__Experimental__: This endpoint is experimental and may change or be removed in a future release.*
Create a new view for a channel.
__Minimum server version__: 11.6
##### Permissions
Must have `create_post` permission for the channel.
operationId: CreateChannelView
parameters:
- name: channel_id
in: path
description: Channel GUID
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
required:
- title
- type
properties:
title:
type: string
description: The title of the view
maxLength: 256
type:
type: string
enum: [kanban]
description: |
The type of the view.
* `kanban` - a kanban view
description:
type: string
description: The description of the view
maxLength: 1024
sort_order:
type: integer
description: The display order of the view within the channel
props:
type: object
description: Arbitrary key-value properties for the view
additionalProperties: true
description: View object to be created
required: true
responses:
"201":
description: Channel view creation successful
content:
application/json:
schema:
$ref: "#/components/schemas/View"
"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"404":
$ref: "#/components/responses/NotFound"
"500":
$ref: "#/components/responses/InternalServerError"
/api/v4/channels/{channel_id}/views/{view_id}:
get:
tags:
- views
summary: Get a channel view
description: |
*__Experimental__: This endpoint is experimental and may change or be removed in a future release.*
Get a single view by its ID.
__Minimum server version__: 11.6
##### Permissions
Must have `read_channel_content` permission for the channel.
operationId: GetChannelView
parameters:
- name: channel_id
in: path
description: Channel GUID
required: true
schema:
type: string
- name: view_id
in: path
description: View GUID
required: true
schema:
type: string
responses:
"200":
description: Channel view retrieval successful
content:
application/json:
schema:
$ref: "#/components/schemas/View"
"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"404":
$ref: "#/components/responses/NotFound"
"500":
$ref: "#/components/responses/InternalServerError"
patch:
tags:
- views
summary: Update a channel view
description: |
*__Experimental__: This endpoint is experimental and may change or be removed in a future release.*
Partially update a channel view by providing only the fields
you want to update. Omitted fields will not be updated.
__Minimum server version__: 11.6
##### Permissions
Must have `create_post` permission for the channel.
operationId: UpdateChannelView
parameters:
- name: channel_id
in: path
description: Channel GUID
required: true
schema:
type: string
- name: view_id
in: path
description: View GUID
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/ViewPatch"
description: View fields to be updated
required: true
responses:
"200":
description: Channel view update successful
content:
application/json:
schema:
$ref: "#/components/schemas/View"
"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"404":
$ref: "#/components/responses/NotFound"
"500":
$ref: "#/components/responses/InternalServerError"
delete:
tags:
- views
summary: Delete a channel view
description: |
*__Experimental__: This endpoint is experimental and may change or be removed in a future release.*
Soft-deletes a channel view. Sets `delete_at` to current timestamp.
__Minimum server version__: 11.6
##### Permissions
Must have `create_post` permission for the channel.
operationId: DeleteChannelView
parameters:
- name: channel_id
in: path
description: Channel GUID
required: true
schema:
type: string
- name: view_id
in: path
description: View GUID
required: true
schema:
type: string
responses:
"200":
description: Channel view deletion successful
content:
application/json:
schema:
$ref: "#/components/schemas/StatusOK"
"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"404":
$ref: "#/components/responses/NotFound"
"500":
$ref: "#/components/responses/InternalServerError"
/api/v4/channels/{channel_id}/views/{view_id}/posts:
get:
tags:
- views
summary: Get posts for a view
description: |
*__Experimental__: This endpoint is experimental and may change or be removed in a future release.*
Get a paginated list of posts that belong to a specific view.
__Minimum server version__: 11.6
##### Permissions
Must have `read_channel_content` permission for the channel.
operationId: GetPostsForView
parameters:
- name: channel_id
in: path
description: Channel GUID
required: true
schema:
type: string
- name: view_id
in: path
description: View GUID
required: true
schema:
type: string
- name: page
in: query
description: The 0-based page number for pagination (default 0)
required: false
schema:
type: integer
default: 0
minimum: 0
- name: per_page
in: query
description: The number of posts per page (default 60, max 200)
required: false
schema:
type: integer
default: 60
maximum: 200
responses:
"200":
description: Post list retrieval successful
content:
application/json:
schema:
$ref: "#/components/schemas/PostList"
"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"404":
$ref: "#/components/responses/NotFound"
"500":
$ref: "#/components/responses/InternalServerError"
/api/v4/channels/{channel_id}/views/{view_id}/sort_order:
post:
tags:
- views
summary: Update a channel view's sort order
description: |
*__Experimental__: This endpoint is experimental and may change or be removed in a future release.*
Updates the sort order of a channel view, setting its new index
from the request body and updating the rest of the views in the
channel to accommodate the change.
__Minimum server version__: 11.6
##### Permissions
Must have `create_post` permission for the channel.
operationId: UpdateChannelViewSortOrder
parameters:
- name: channel_id
in: path
description: Channel GUID
required: true
schema:
type: string
- name: view_id
in: path
description: View GUID
required: true
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
type: integer
format: int64
description: The new sort order index for the view
responses:
"200":
description: Channel view sort order update successful
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/View"
"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"404":
$ref: "#/components/responses/NotFound"
"500":
$ref: "#/components/responses/InternalServerError"