* merge mattermost-api-reference unchanged * api: update repostiory paths * api: drop GitPod for api (for now) * api: improved node_modules target * api: relocate GitHub actions to root * Update .github/workflows/api.yml Co-authored-by: Antonis Stamatiou <stamatiou.antonis@gmail.com> * fix cache-dependency-path * adopt node-version-file * pin versions for uses * tidy steps/runs * api/.gitpod.yml: tidy * api: rm now unused .gitlab-ci.yml --------- Co-authored-by: Antonis Stamatiou <stamatiou.antonis@gmail.com>
40 строки
1.1 KiB
YAML
40 строки
1.1 KiB
YAML
"/api/v4/imports":
|
|
get:
|
|
tags:
|
|
- imports
|
|
summary: List import files
|
|
description: >
|
|
Lists all available import files.
|
|
|
|
|
|
__Minimum server version__: 5.31
|
|
|
|
##### Permissions
|
|
|
|
Must have `manage_system` permissions.
|
|
operationId: ListImports
|
|
responses:
|
|
"400":
|
|
$ref: "#/components/responses/BadRequest"
|
|
"401":
|
|
$ref: "#/components/responses/Unauthorized"
|
|
"403":
|
|
$ref: "#/components/responses/Forbidden"
|
|
"404":
|
|
$ref: "#/components/responses/NotFound"
|
|
x-code-samples:
|
|
- lang: Go
|
|
source: >
|
|
import "github.com/mattermost/mattermost-server/v5/model"
|
|
|
|
|
|
Client := model.NewAPIv4Client("https://your-mattermost-url.com")
|
|
|
|
Client.Login("email@domain.com", "Password1")
|
|
|
|
imports, response := Client.ListImports()
|
|
- lang: Curl
|
|
source: |
|
|
curl 'http://localhost:8065/api/v4/imports' \
|
|
-H 'Authorization: Bearer 9kg8nqrnxprd9jbykqeg4r51hw'
|