From d7462332d4877ceb155b8b54fd2d1e67a75ee72d Mon Sep 17 00:00:00 2001 From: buty4649 Date: Fri, 17 Apr 2026 12:56:26 +0900 Subject: [PATCH 1/5] Add xp schema command Print the OpenAPI operation object for an X-point endpoint, mirroring `gws schema`. The X-point OpenAPI 3.0.3 spec is embedded in the binary via go:embed. Supported aliases map to the CLI's existing commands: form.list GET /api/v1/forms approval.list GET /api/v1/approvals document.search POST /api/v1/search/documents Flags: --resolve-refs inline local $ref pointers into the output --jq apply a gojq filter to the schema Running `xp schema` without arguments lists the supported aliases. Co-Authored-By: Claude Opus 4.7 --- cmd/schema.go | 58 + cmd/schema_test.go | 66 + go.mod | 1 + go.sum | 3 + internal/xpoint/openapi.yaml | 9505 ++++++++++++++++++++++++++++++++ internal/xpoint/schema.go | 204 + internal/xpoint/schema_test.go | 89 + 7 files changed, 9926 insertions(+) create mode 100644 cmd/schema.go create mode 100644 cmd/schema_test.go create mode 100644 internal/xpoint/openapi.yaml create mode 100644 internal/xpoint/schema.go create mode 100644 internal/xpoint/schema_test.go diff --git a/cmd/schema.go b/cmd/schema.go new file mode 100644 index 0000000..44a1e84 --- /dev/null +++ b/cmd/schema.go @@ -0,0 +1,58 @@ +package cmd + +import ( + "encoding/json" + "fmt" + "os" + "strings" + + "github.com/pepabo/xpoint-cli/internal/xpoint" + "github.com/spf13/cobra" +) + +var ( + schemaResolveRefs bool + schemaJQ string +) + +var schemaCmd = &cobra.Command{ + Use: "schema [service.resource.method]", + Short: "Show the OpenAPI schema for an X-point operation", + Long: `Print the OpenAPI operation object for a given X-point endpoint. + +Supported aliases map to the CLI's commands: + form.list GET /api/v1/forms + approval.list GET /api/v1/approvals + document.search POST /api/v1/search/documents + +Run without arguments to list supported aliases.`, + Args: cobra.MaximumNArgs(1), + RunE: runSchema, +} + +func init() { + rootCmd.AddCommand(schemaCmd) + schemaCmd.Flags().BoolVar(&schemaResolveRefs, "resolve-refs", false, "inline $ref pointers into the output") + schemaCmd.Flags().StringVar(&schemaJQ, "jq", "", "apply a gojq filter to the schema") +} + +func runSchema(_ *cobra.Command, args []string) error { + if len(args) == 0 { + fmt.Fprintln(os.Stdout, "Supported aliases:") + for _, a := range xpoint.SchemaAliases() { + fmt.Fprintf(os.Stdout, " %s\n", a) + } + return nil + } + alias := strings.TrimSpace(args[0]) + op, err := xpoint.LookupOperation(alias, schemaResolveRefs) + if err != nil { + return err + } + if schemaJQ != "" { + return runJQ(op, schemaJQ) + } + enc := json.NewEncoder(os.Stdout) + enc.SetIndent("", " ") + return enc.Encode(op) +} diff --git a/cmd/schema_test.go b/cmd/schema_test.go new file mode 100644 index 0000000..f5ecbd1 --- /dev/null +++ b/cmd/schema_test.go @@ -0,0 +1,66 @@ +package cmd + +import ( + "encoding/json" + "strings" + "testing" +) + +func TestSchemaCmd_ListsAliases(t *testing.T) { + out, err := captureStdout(t, func() error { + return runSchema(schemaCmd, nil) + }) + if err != nil { + t.Fatalf("runSchema: %v", err) + } + for _, want := range []string{"form.list", "approval.list", "document.search"} { + if !strings.Contains(out, want) { + t.Errorf("output missing %q:\n%s", want, out) + } + } +} + +func TestSchemaCmd_EmitsJSON(t *testing.T) { + schemaResolveRefs = false + schemaJQ = "" + t.Cleanup(func() { schemaResolveRefs = false; schemaJQ = "" }) + + out, err := captureStdout(t, func() error { + return runSchema(schemaCmd, []string{"form.list"}) + }) + if err != nil { + t.Fatalf("runSchema: %v", err) + } + var decoded map[string]any + if err := json.Unmarshal([]byte(out), &decoded); err != nil { + t.Fatalf("output not JSON: %v (%s)", err, out) + } + if decoded["_method"] != "GET" || decoded["_path"] != "/api/v1/forms" { + t.Errorf("decoded = %v", decoded) + } +} + +func TestSchemaCmd_UnknownAlias(t *testing.T) { + schemaResolveRefs = false + schemaJQ = "" + err := runSchema(schemaCmd, []string{"nope"}) + if err == nil || !strings.Contains(err.Error(), "unknown schema alias") { + t.Errorf("err = %v", err) + } +} + +func TestSchemaCmd_JQFilter(t *testing.T) { + schemaResolveRefs = false + schemaJQ = ".operationId" + t.Cleanup(func() { schemaJQ = "" }) + + out, err := captureStdout(t, func() error { + return runSchema(schemaCmd, []string{"form.list"}) + }) + if err != nil { + t.Fatalf("runSchema: %v", err) + } + if strings.TrimSpace(out) != `"GetAvailableFormList"` { + t.Errorf("output = %q", out) + } +} diff --git a/go.mod b/go.mod index e50ec37..2cdf033 100644 --- a/go.mod +++ b/go.mod @@ -5,6 +5,7 @@ go 1.26.1 require ( github.com/itchyny/gojq v0.12.19 github.com/spf13/cobra v1.10.2 + gopkg.in/yaml.v3 v3.0.1 ) require ( diff --git a/go.sum b/go.sum index 3de9430..b91a035 100644 --- a/go.sum +++ b/go.sum @@ -12,4 +12,7 @@ github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk= github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/internal/xpoint/openapi.yaml b/internal/xpoint/openapi.yaml new file mode 100644 index 0000000..3df2887 --- /dev/null +++ b/internal/xpoint/openapi.yaml @@ -0,0 +1,9505 @@ +openapi: 3.0.3 +info: + title: X-point API + version: 1.0.0 + description: | + **[X-point REST API利用ガイド](./doc/manual.html)**

+ OpenAPI定義ファイル(openapi.yaml)はダウンロード後、APIを利用するためのツールに取り込むことができます。 +servers: + - url: https://{sub_domain}.atledcloud.jp/xpoint + variables: + sub_domain: + default: sub_domain + description: X-pointのサブドメイン +tags: + - name: 書類編集・承認操作API + - name: システムAPI + - name: ユーザー別API + - name: SCIM API + - name: その他API +paths: + /api/v1/documents: + post: + tags: + - 書類編集・承認操作API + summary: 書類作成 + description: | + REST API による書類の作成(申請・下書き)を行います。
+ 書類の作成にはフォームの特定に必要なフォームコードもしくはフォーム名称、承認ルートコードを指定する必要があります。
+ 書類作成後の応答には X-point 上で書類を一意に特定する為の書類 ID が含まれます。
+ 取得した書類 ID は、以後の書類操作に必須となるため、書類作成APIを使用したシステム側で保存する事が望ましい情報となります。 + + **APIトークンの必要権限** + * 追加権限 + + **注意事項** + * 通常の書類作成時に行える以下の事項は書類作成APIで行うことができません。 + * ファイルの添付、コメントの追加はできません。添付ファイル追加APIやコメント追加APIを利用してください。 + * 未定義ステップの承認者追加や、回覧ステップへの回覧者追加を行うことはできません。 + * 申請者が複数部署に所属していても申請部署を変更することはできません。 + * 各フィールドの初期値、初期取得値は登録されません。リクエスト内容の書類データに初期値、初期取得値を含める必要があります。 + * 各フィールドの入力値の書式チェックはできません。各フィールドの書式に合わせてリクエスト内容の書類データを指定する必要があります。 + * フォームに設定されたJavaScript、自動計算、マスタ検索、書類制御、ミラー項目は書類作成時に実行されません。 + * イメージアップロード・フィールドに画像をアップロードすることはできません。 + * 自動申請設定を使用する場合は自動申請と同様にリクエスト時のデータに含める事ができる表定義はフォーム内の1つのみになります。自動申請設定を利用しない場合は「表定義は1つのみ」の制約が無くなり、全ての表定義をリクエスト時のデータに含めることができます。 + * 管理者サイトの「フォーム管理>フィールド編集権限」で設定した編集禁止フィールド設定は効きません。 + * 電帳法対応オプションの添付型フォーム書類を申請する場合、添付ファイル(電子取引データ・取引関係書類)が添付されていない状態でも申請されます。 + + **補足** + * 申請ステップで添付ファイルが必須の承認ルートの書類を申請した場合はエラーレスポンスが返されます。
+ ファイルを添付して申請したい場合は、書類作成APIで下書き書類を作成し、作成した下書き書類に添付ファイルを追加してから下書き提出してください。 + operationId: CreateDocument + requestBody: + $ref: "#/components/requestBodies/PostDocumentRequest" + security: + - bearerAuth: [] + - APIKeyAuth: [] + responses: + "200": + $ref: "#/components/responses/PostDocumentResponses200" + "400": + $ref: "#/components/responses/ErrorResponses400" + "401": + $ref: "#/components/responses/ErrorResponses401" + "403": + $ref: "#/components/responses/ErrorResponses403" + "500": + $ref: "#/components/responses/ErrorResponses500" + + # -------------------------------------------------------------------------------------------------- + + /api/v1/documents/{docid}: + patch: + tags: + - 書類編集・承認操作API + summary: 書類のワークフロー操作・編集・更新 + description: | + 指定された ID の書類内容を、送信されたフィールド項目について更新します。 + + **APIトークンの必要権限** + * 更新権限 + + **注意事項**
+ * ワークフロー操作のみを行う場合は、リクエストボディ「datas」(書類データ)無しでリクエストしてください。 + * 書類データの更新のみを行う場合は、リクエストボディ「wf_type」(ワークフロー種別)無しでリクエストしてください。 + * 書類データの更新は、更新したいフィールドのみをリクエストボディ「datas」(書類データ)内に指定してリクエストします。 + * 通常の書類操作時に行える以下の事項は書類のワークフロー操作・編集・更新APIで行うことができません。 + * ファイルの添付、コメントの追加はできません。添付ファイル追加APIやコメント追加APIを利用してください。 + * 未定義ステップの承認者追加や、回覧ステップへの回覧者追加を行うことはできません。 + * 申請者が複数部署に所属していても申請部署を変更することはできません。 + * 各フィールドの初期値、初期取得値は登録されません。リクエスト内容の書類データに初期値、初期取得値を含める必要があります。 + * 各フィールドの入力値の書式チェックはできません。各フィールドの書式に合わせてリクエスト内容の書類データを指定する必要があります。 + * フォームに設定されたJavaScript、自動計算、マスタ検索、書類制御、ミラー項目は書類操作時に実行されません。 + * イメージアップロード・フィールドに画像をアップロードすることはできません。 + * 自動申請設定を使用する場合は自動申請と同様にリクエスト時のデータに含めることができる表定義はフォーム内の1つのみになります。自動申請設定を使用しない場合は「表定義は1つのみ」の制約が無くなり、全ての表定義をリクエスト時のデータに含めることができます。 + * 書類のワークフロー操作・編集・更新APIで承認操作を行う場合、「連続した承認ステップでの自動承認」は動作しますが、「下位役職承認のスキップ」は動作しません。 + * 管理者サイトの「フォーム管理>フィールド編集権限」で設定した編集禁止フィールド設定は効きません。 + * 電帳法対応オプションの添付型フォーム書類をワークフロー操作する場合、添付ファイル(電子取引データ・取引関係書類)が添付されていない状態でも警告が発生せずワークフロー処理が進みます。 + operationId: UpdateDocument + requestBody: + $ref: "#/components/requestBodies/PatchDocumentRequest" + security: + - bearerAuth: [] + - APIKeyAuth: [] + parameters: + - $ref: "#/components/parameters/path_docid_required" + responses: + "200": + $ref: "#/components/responses/PatchDocumentResponses200" + "400": + $ref: "#/components/responses/ErrorResponses400" + "401": + $ref: "#/components/responses/ErrorResponses401" + "403": + $ref: "#/components/responses/ErrorResponses403" + "500": + $ref: "#/components/responses/ErrorResponses500_noReasons" + + # -------------------------------------------------------------------------------------------------- + + get: + tags: + - 書類編集・承認操作API + summary: 書類内容取得 + description: | + 指定された ID の書類を取得し応答として返します。
+ 応答には、コメント情報、添付ファイル情報が含まれますが、添付ファイルは別途用意されている添付ファイル取得API(GetAttachments)を利用してダウンロードします。 + + **APIトークンの必要権限** + * 閲覧権限 + + **注意事項** + * OAuth2 認証で REST API を利用する場合、認証ユーザーが書類に対するアクセス権限を保持している必要があります。 + operationId: GetDocument + security: + - bearerAuth: [] + - APIKeyAuth: [] + parameters: + - $ref: "#/components/parameters/path_docid_required" + responses: + "200": + $ref: "#/components/responses/GetDocumentResponses200" + "400": + $ref: "#/components/responses/ErrorResponses400" + "403": + $ref: "#/components/responses/ErrorResponses403" + + # -------------------------------------------------------------------------------------------------- + + delete: + tags: + - 書類編集・承認操作API + summary: 書類削除 + description: | + 指定された ID の書類を削除します。 + + **APIトークンの必要権限** + * 削除権限 + operationId: DeleteDocument + security: + - bearerAuth: [] + - APIKeyAuth: [] + parameters: + - $ref: "#/components/parameters/path_docid_required" + responses: + "200": + $ref: "#/components/responses/DeleteDocumentResponses200" + "403": + $ref: "#/components/responses/ErrorResponses403" + "500": + $ref: "#/components/responses/ErrorResponses500_noReasons" + + # -------------------------------------------------------------------------------------------------- + + /api/v1/documents/{docid}/comments: + post: + tags: + - 書類編集・承認操作API + summary: コメント追加 + description: | + 指定された ID の書類にコメントを追加します。 + + **APIトークンの必要権限** + * 更新権限 + operationId: AddComment + requestBody: + $ref: "#/components/requestBodies/PostCommentsRequest" + security: + - bearerAuth: [] + - APIKeyAuth: [] + parameters: + - $ref: "#/components/parameters/path_docid_required" + responses: + "200": + $ref: "#/components/responses/PostCommentsResponses200" + "400": + $ref: "#/components/responses/ErrorResponses400" + "403": + $ref: "#/components/responses/ErrorResponses403" + "500": + $ref: "#/components/responses/ErrorResponses500_noReasons" + + # -------------------------------------------------------------------------------------------------- + + get: + tags: + - 書類編集・承認操作API + summary: コメント取得 + description: | + 指定された ID の書類に登録されているコメントを一括で取得します。 + + **APIトークンの必要権限** + * 閲覧権限 + operationId: GetComment + security: + - bearerAuth: [] + - APIKeyAuth: [] + parameters: + - $ref: "#/components/parameters/path_docid_required" + responses: + "200": + $ref: "#/components/responses/GetCommentsResponses200" + "400": + $ref: "#/components/responses/ErrorResponses400" + "403": + $ref: "#/components/responses/ErrorResponses403" + "500": + $ref: "#/components/responses/ErrorResponses500_noReasons" + + # -------------------------------------------------------------------------------------------------- + + /api/v1/documents/{docid}/comments/{seq}: + patch: + tags: + - 書類編集・承認操作API + summary: コメント更新 + description: | + 指定された ID の書類に登録されているコメントの内容を更新します。 + + **APIトークンの必要権限** + * 更新権限 + operationId: UpdateComment + requestBody: + $ref: "#/components/requestBodies/PatchCommentsRequest" + security: + - bearerAuth: [] + - APIKeyAuth: [] + parameters: + - $ref: "#/components/parameters/path_docid_required" + - $ref: "#/components/parameters/path_commentNo_required" + responses: + "200": + $ref: "#/components/responses/PatchCommentsResponses200" + "400": + $ref: "#/components/responses/ErrorResponses400" + "403": + $ref: "#/components/responses/ErrorResponses403" + "500": + $ref: "#/components/responses/ErrorResponses500_noReasons" + + # -------------------------------------------------------------------------------------------------- + + delete: + tags: + - 書類編集・承認操作API + summary: コメント削除 + description: | + 指定された ID の書類に登録されているコメントを削除します。 + + **APIトークンの必要権限** + * 削除権限 + operationId: DeleteComment + security: + - bearerAuth: [] + - APIKeyAuth: [] + parameters: + - $ref: "#/components/parameters/path_docid_required" + - $ref: "#/components/parameters/path_commentNo_required" + responses: + "200": + $ref: "#/components/responses/DeleteCommentsResponses200" + "400": + $ref: "#/components/responses/ErrorResponses400" + "403": + $ref: "#/components/responses/ErrorResponses403" + "500": + $ref: "#/components/responses/ErrorResponses500_noReasons" + + # -------------------------------------------------------------------------------------------------- + + /api/v1/documents/{docid}/pdf: + get: + tags: + - 書類編集・承認操作API + summary: PDFダウンロード + description: | + 指定された ID の書類の PDF がダウンロードできます。 + + **APIトークンの必要権限** + * 閲覧権限 + + **注意事項** + * OAuth2 認証で REST API を利用する場合、認証ユーザーが書類に対するアクセス権限を保持している必要があります。 + operationId: DownloadPdf + security: + - bearerAuth: [] + - APIKeyAuth: [] + parameters: + - $ref: "#/components/parameters/path_docid_required" + responses: + "200": + $ref: "#/components/responses/GetPDFDownloadResponses200" + "400": + $ref: "#/components/responses/ErrorResponses400" + "403": + $ref: "#/components/responses/ErrorResponses403" + "500": + $ref: "#/components/responses/ErrorResponses500_noReasons" + + # -------------------------------------------------------------------------------------------------- + + /api/v1/documents/{docid}/openview: + get: + tags: + - 書類編集・承認操作API + summary: 書類表示 + description: | + 指定された ID の書類を表示するための HTML(JavaScript 含む)一式がダウンロードされます。 + + 本APIで書類を表示した場合、閉じるナビボタンで書類を閉じることができません。 + 書類を閉じる場合はブラウザのウィンドウやタブの×ボタンから閉じてください。 + + **APIトークンの必要権限** + * 閲覧権限 + operationId: ViewDocument + security: + - bearerAuth: [] + - APIKeyAuth: [] + parameters: + - $ref: "#/components/parameters/path_docid_required" + - $ref: "#/components/parameters/query_proxyUser3" + responses: + "200": + $ref: "#/components/responses/GetDocumentViewResponses200" + "400": + $ref: "#/components/responses/ErrorResponses400" + "403": + $ref: "#/components/responses/ErrorResponses403" + "500": + $ref: "#/components/responses/ErrorResponses500_noReasons" + + # -------------------------------------------------------------------------------------------------- + + /api/v1/documents/docview: + get: + tags: + - 書類編集・承認操作API + summary: 新規書類・関連書類作成 + description: | + 書類の新規作成、関連書類の作成を行うための書類ビューHTML がダウンロードされます。 + + 本APIで書類を表示した場合、閉じるナビボタンで書類を閉じることができません。 + 書類を閉じる場合はブラウザのウィンドウやタブの×ボタンから閉じてください。 + + **APIトークンの必要権限** + * 閲覧権限 + operationId: ViewNewDocument + security: + - bearerAuth: [] + - APIKeyAuth: [] + parameters: + - $ref: "#/components/parameters/query_fcd" + - $ref: "#/components/parameters/query_formname" + - $ref: "#/components/parameters/query_routecd_required" + - $ref: "#/components/parameters/query_fromdocid" + - $ref: "#/components/parameters/query_proxyUser" + responses: + "200": + $ref: "#/components/responses/GetCreateDocumentResponses200" + "400": + $ref: "#/components/responses/ErrorResponses400" + "403": + $ref: "#/components/responses/ErrorResponses403" + + # -------------------------------------------------------------------------------------------------- + + /multiapi/v1/documents/docview: + post: + tags: + - 書類編集・承認操作API + summary: 新規書類・関連書類作成 + description: | + リクエスト時に、表示する書類ビューのフィールドに事前入力する値、事前添付するファイルが指定可能な新規書類・関連書類作成 API です。
+ GETメソッド版同様、書類の新規作成、関連書類の作成を行うための書類ビューHTML がダウンロードされます。 + + 本APIで書類を表示した場合、閉じるナビボタンで書類を閉じることができません。 + 書類を閉じる場合はブラウザのウィンドウやタブの×ボタンから閉じてください。 + + **APIトークンの必要権限** + * 閲覧権限 + + **注意事項** + * Content-Type に multipart/form-data を指定すると、アプリケーション側でリクエストに境界情報が付与できずエラーになる場合があります。
+ エラーになる場合は Content-Type を指定せずに実行してください。 + operationId: ViewNewDocumentMultipart + requestBody: + $ref: "#/components/requestBodies/PostCreateDocumentsRequest" + security: + - bearerAuth: [] + - APIKeyAuth: [] + responses: + "200": + $ref: "#/components/responses/PostCreateDocumentResponses200" + "400": + $ref: "#/components/responses/ErrorResponses400" + "403": + $ref: "#/components/responses/ErrorResponses403" + + # -------------------------------------------------------------------------------------------------- + + /api/v1/documents/{docid}/status: + get: + tags: + - 書類編集・承認操作API + summary: 書類承認状況取得 + description: | + 指定された書類 ID の最新版の承認状況を取得します。 + + **APIトークンの必要権限** + * 閲覧権限 + operationId: GetDocumentStatus + security: + - bearerAuth: [] + - APIKeyAuth: [] + parameters: + - $ref: "#/components/parameters/path_docid_required" + - $ref: "#/components/parameters/query_history" + responses: + "200": + $ref: "#/components/responses/GetStatusResponses200" + "400": + $ref: "#/components/responses/ErrorResponses400" + "403": + $ref: "#/components/responses/ErrorResponses403" + "500": + $ref: "#/components/responses/ErrorResponses500_noReasons" + + # -------------------------------------------------------------------------------------------------- + + /api/v1/documents/{docid}/statusview: + get: + tags: + - 書類編集・承認操作API + summary: 承認進捗状況表示 + description: | + 指定された ID の書類の承認進捗状況を表示するための HTML 一式がダウンロードされます。
+ 取得した HTML は X-point の承認状況を表す画面とほぼ同じ内容で、Webkit 等に表示する際に利用します。 + + **APIトークンの必要権限** + * 閲覧権限 + operationId: ViewDocumentStatus + security: + - bearerAuth: [] + - APIKeyAuth: [] + parameters: + - $ref: "#/components/parameters/path_docid_required" + responses: + "200": + $ref: "#/components/responses/GetStatusviewResponses200" + "400": + $ref: "#/components/responses/ErrorResponses400" + "403": + $ref: "#/components/responses/ErrorResponses403" + "500": + $ref: "#/components/responses/ErrorResponses500_noReasons" + + # -------------------------------------------------------------------------------------------------- + + /multiapi/v1/attachments/{docid}: + post: + tags: + - 書類編集・承認操作API + summary: 添付ファイル追加 + description: | + 指定された ID の書類に添付ファイルのアップロード追加を行います。 + + **APIトークンの必要権限** + * 更新権限 + + **注意事項** + * Content-Type に multipart/form-data を指定すると、アプリケーション側でリクエストに境界情報が付与できずエラーになる場合があります。
+ エラーになる場合は Content-Type を指定せずに実行してください。 + operationId: AddAttachment + requestBody: + $ref: "#/components/requestBodies/PostAddAttachmentsRequest" + security: + - bearerAuth: [] + - APIKeyAuth: [] + parameters: + - $ref: "#/components/parameters/path_docid_required" + responses: + "200": + $ref: "#/components/responses/PostAttachmentsResponses200" + "400": + $ref: "#/components/responses/ErrorResponses400" + "403": + $ref: "#/components/responses/ErrorResponses403" + + # -------------------------------------------------------------------------------------------------- + + /multiapi/v1/attachments/{docid}/{attach_seq}: + patch: + tags: + - 書類編集・承認操作API + summary: 添付ファイル更新/削除 + description: | + 指定された ID の書類に添付されている指定されたファイルを更新または削除します。 + + **APIトークンの必要権限** + * 更新権限 + + **注意事項** + * Content-Type に multipart/form-data を指定すると、アプリケーション側でリクエストに境界情報が付与できずエラーになる場合があります。
+ エラーになる場合は Content-Type を指定せずに実行してください。 + operationId: UpdateAttachment + requestBody: + $ref: "#/components/requestBodies/PatchUpdateAttachmentsRequest" + security: + - bearerAuth: [] + - APIKeyAuth: [] + parameters: + - $ref: "#/components/parameters/path_docid_required" + - $ref: "#/components/parameters/path_attachSeq_required" + responses: + "200": + $ref: "#/components/responses/PatchAttachmentsResponses200" + "400": + $ref: "#/components/responses/ErrorResponses400" + "403": + $ref: "#/components/responses/ErrorResponses403" + "500": + $ref: "#/components/responses/ErrorResponses500_noReasons" + + # -------------------------------------------------------------------------------------------------- + + /api/v1/attachments/{docid}: + get: + tags: + - 書類編集・承認操作API + summary: 添付ファイル一覧取得 + description: | + 指定された ID の書類に添付されている添付ファイルの一覧を取得します。 + + **APIトークンの必要権限** + * 閲覧権限 + operationId: GetAttachmentList + security: + - bearerAuth: [] + - APIKeyAuth: [] + parameters: + - $ref: "#/components/parameters/path_docid_required" + responses: + "200": + $ref: "#/components/responses/GetAttachmentsListResponses200" + "400": + $ref: "#/components/responses/ErrorResponses400" + "403": + $ref: "#/components/responses/ErrorResponses403" + "500": + $ref: "#/components/responses/ErrorResponses500_noReasons" + + # -------------------------------------------------------------------------------------------------- + + /api/v1/attachments/{docid}/{attach_seq}: + get: + tags: + - 書類編集・承認操作API + summary: 添付ファイル取得 + description: | + 指定された ID の書類に添付されている添付ファイルをダウンロードします。 + + **APIトークンの必要権限** + * 閲覧権限 + operationId: GetAttachment + security: + - bearerAuth: [] + - APIKeyAuth: [] + parameters: + - $ref: "#/components/parameters/path_docid_required" + - $ref: "#/components/parameters/path_attachSeq_required" + responses: + "200": + $ref: "#/components/responses/GetAttachmentsResponses200" + "400": + $ref: "#/components/responses/ErrorResponses400" + "403": + $ref: "#/components/responses/ErrorResponses403" + "500": + $ref: "#/components/responses/ErrorResponses500_noReasons" + + # -------------------------------------------------------------------------------------------------- + + /api/v1/system/lumpapply: + get: + tags: + - システムAPI + summary: 自動申請登録の一覧取得 + description: 認証ドメインの管理サイトに登録されている自動申請の一覧を取得します。 + operationId: GetLumpapplyList + security: + - bearerAuth: [] + responses: + "200": + $ref: "#/components/responses/GetLumpapplyListResponses200" + + # -------------------------------------------------------------------------------------------------- + + /api/v1/system/lumpapply/{lumpapplyid}: + get: + tags: + - システムAPI + summary: 自動申請の定義情報取得 + description: | + 指定された自動申請登録 ID に従い、登録されている自動申請の詳細設定を取得します。 + + **注意事項** + * 管理者権限を持つユーザで認証した場合のみ自動申請の定義情報が取得できます。
+ 一般ユーザーの場合は権限エラーが返されます。 + operationId: GetLumpapplyDefinition + security: + - bearerAuth: [] + parameters: + - $ref: "#/components/parameters/path_lumpapplyid_required" + responses: + "200": + $ref: "#/components/responses/GetLumpapplyResponses200" + "400": + $ref: "#/components/responses/ErrorResponses400" + "403": + $ref: "#/components/responses/ErrorResponses403" + "500": + $ref: "#/components/responses/ErrorResponses500_noReasons" + + # -------------------------------------------------------------------------------------------------- + + /api/v1/system/forms/{fid}: + get: + tags: + - システムAPI + summary: フォーム定義情報取得 + description: | + フォームを構成するフィールドの詳細情報を取得します。 + + **注意事項** + * 本APIは管理者ユーザで認証した場合のみフォーム定義が取得できます。 + * 一般ユーザでフォーム定義を取得したい場合は「/api/v1/forms/{フォームID}」をリクエストしてください。 + operationId: GetFormDefinitionByAdmin + security: + - bearerAuth: [] + parameters: + - $ref: "#/components/parameters/path_fid_required" + responses: + "200": + $ref: "#/components/responses/GetFormsResponses200" + "400": + $ref: "#/components/responses/ErrorResponses400" + "500": + $ref: "#/components/responses/ErrorResponses500_noReasons" + + # -------------------------------------------------------------------------------------------------- + + /api/v1/system/forms: + get: + tags: + - システムAPI + summary: 登録フォーム一覧取得 + description: | + 管理者サイトの「フォーム管理」で表示される一覧相当のリストが取得できます。 + + **注意事項** + * 管理者権限を持つユーザーで認証した場合のみ登録フォーム一覧情報が取得できます。
+ 一般ユーザーの場合は権限エラーが返されます。 + operationId: GetRegistrationFormList + security: + - bearerAuth: [] + responses: + "200": + $ref: "#/components/responses/GetFormsListResponses200" + + # -------------------------------------------------------------------------------------------------- + + /api/v1/system/master: + get: + tags: + - システムAPI + summary: マスタ一覧取得 + description: 管理者サイトの「マスタ管理」で表示されるマスタ一覧相当のリストが取得できます。 + operationId: GetMasterList + security: + - bearerAuth: [] + responses: + "200": + $ref: "#/components/responses/GetMasterListResponses200" + "403": + $ref: "#/components/responses/ErrorResponses403" + + # -------------------------------------------------------------------------------------------------- + + /api/v1/system/master/{master_table_name}: + get: + tags: + - システムAPI + summary: ユーザ固有マスタ情報取得 + description: 管理者サイトの「マスタ管理>ユーザ固有マスタ>取込>ユーザ固有マスタプロパティ」で表示される情報相当が取得できます。 + operationId: GetUserSpecificMasterInfo + security: + - bearerAuth: [] + parameters: + - $ref: "#/components/parameters/path_masterTableName_required" + responses: + "200": + $ref: "#/components/responses/GetUserMasterListResponses200" + "403": + $ref: "#/components/responses/ErrorResponses403" + "404": + $ref: "#/components/responses/ErrorResponses404" + + # -------------------------------------------------------------------------------------------------- + + /api/v1/system/master/{master_code}/data: + get: + tags: + - システムAPI + summary: マスタデータ取得 + description: | + 管理者サイトの「マスタ管理>マスタ一覧>エクスポート」相当の機能の API です。
+ 簡易マスタ、ユーザ固有マスタのデータを JSON 形式もしくは CSV 形式で取得できます。 + + **URL**
+ エンドポイントの「data」を「data.json」とするとJSON形式で、「data.csv」とするとCSV形式でマスタデータが取得できます。 + * 【JSON 形式で取得する場合】
+  /api/v1/system/master/{マスタ識別情報}/data
+  /api/v1/system/master/{マスタ識別情報}/data.json +

+ * 【CSV 形式で取得する場合】
+  /api/v1/system/master/{マスタ識別情報}/data.csv + operationId: GetMasterData + security: + - bearerAuth: [] + parameters: + - $ref: "#/components/parameters/path_masterCode_required" + - $ref: "#/components/parameters/query_masterType_required" + - $ref: "#/components/parameters/query_rows" + - $ref: "#/components/parameters/query_offset" + - $ref: "#/components/parameters/query_fileName" + - $ref: "#/components/parameters/query_delimiter" + - $ref: "#/components/parameters/query_title" + - $ref: "#/components/parameters/query_fields" + responses: + "200": + $ref: "#/components/responses/GetMasterDataResponses200" + "400": + $ref: "#/components/responses/ErrorResponses400" + "403": + $ref: "#/components/responses/ErrorResponses403" + "404": + $ref: "#/components/responses/ErrorResponses404" + + # -------------------------------------------------------------------------------------------------- + + put: + tags: + - システムAPI + summary: 簡易マスタデータインポート + description: | + 管理者サイトの「マスタ管理>マスタ一覧>インポート」相当の機能の API です。
+ JSON 形式のマスタデータを簡易マスタにインポートすることが可能です。 + operationId: ImportSimpleMasterData + requestBody: + $ref: "#/components/requestBodies/PutMasterDataRequest" + security: + - bearerAuth: [] + parameters: + - $ref: "#/components/parameters/path_simpleMasterCode_required" + responses: + "200": + $ref: "#/components/responses/PutMasterDataResponses200" + "403": + $ref: "#/components/responses/ErrorResponses403" + "404": + $ref: "#/components/responses/ErrorResponses404" + + # -------------------------------------------------------------------------------------------------- + + /multiapi/v1/system/master/{master_table_name}/data: + post: + tags: + - システムAPI + summary: ユーザ固有マスタデータアップロード + description: | + リモート入出力機能のマスタリモート入力機能相当の API です。
+ ユーザ固有マスタのインポートに利用する CSV ファイルを X-point へアップロードすることが可能です。 + + **注意事項** + * ユーザ固有マスタデータアップロード API でインポートに利用する CSV ファイルをアップロードするには、対象のユーザ固有マスタの「ユーザ固有マスタインポートバッチ」を事前に登録しておく必要があります。 + * ユーザ固有マスタデータアップロード API はマスタデータのインポート実行までは行いません。
+ インポートの実行は管理者サイトのタスク管理画面から手動で実行するか、スケジュールを設定して実行する必要があります。 + * Content-Type に multipart/form-data を指定すると、アプリケーション側でリクエストに境界情報が付与できずエラーになる場合があります。
+ エラーになる場合は Content-Type を指定せずにリクエストしてください。 + operationId: UploadUserSpecificMasterData + requestBody: + $ref: "#/components/requestBodies/PostUserMasterUpdateRequest" + security: + - bearerAuth: [] + parameters: + - $ref: "#/components/parameters/path_masterTableName_required" + responses: + "200": + $ref: "#/components/responses/PostUserMasterUploadResponses200" + "400": + $ref: "#/components/responses/ErrorResponses400" + "403": + $ref: "#/components/responses/ErrorResponses403" + "404": + $ref: "#/components/responses/ErrorResponses404" + "500": + $ref: "#/components/responses/ErrorResponses500_noReasons" + + # -------------------------------------------------------------------------------------------------- + + /api/v1/system/webhooklog: + get: + tags: + - システムAPI + summary: Webhookログ取得 + description: Webhook の送信日時等を指定して Webhook 送信ログを検索/取得します。 + operationId: GetWebhookLog + security: + - bearerAuth: [] + parameters: + - $ref: "#/components/parameters/query_from" + - $ref: "#/components/parameters/query_to" + - $ref: "#/components/parameters/query_docid" + - $ref: "#/components/parameters/query_formCode" + - $ref: "#/components/parameters/query_routeCode" + - $ref: "#/components/parameters/query_status" + - $ref: "#/components/parameters/query_url" + - $ref: "#/components/parameters/query_limit" + - $ref: "#/components/parameters/query_offset_position" + responses: + "200": + $ref: "#/components/responses/GetWebhooklogResponses200" + + # -------------------------------------------------------------------------------------------------- + + /api/v1/system/webhooklog/{uuid}: + get: + tags: + - システムAPI + summary: Webhook詳細ログ取得 + description: Webhook 送信ログの詳細情報であるリクエスト情報、レスポンス情報を取得できます。 + operationId: GetWebhookLogDetail + security: + - bearerAuth: [] + parameters: + - $ref: "#/components/parameters/path_uuid_required" + responses: + "200": + $ref: "#/components/responses/GetWebhooklogDetailsResponses200" + "400": + $ref: "#/components/responses/ErrorResponses400" + + # -------------------------------------------------------------------------------------------------- + + /api/v1/system/{fid}/webhooks: + get: + tags: + - システムAPI + summary: Webhook設定取得 + description: | + 指定したフォームの Webhook 設定情報を取得します。
+ リクエストには FQDN に指定が必要で、指定した FQDN と Webhook 送信先 URL の FQDN が完全一致する Webhook 設定のみ取得できます。 + operationId: GetWebhookConfig + security: + - bearerAuth: [] + parameters: + - $ref: "#/components/parameters/path_fid_required" + - $ref: "#/components/parameters/query_fqdn_required" + responses: + "200": + $ref: "#/components/responses/GetWebhookConfigResponses200" + "400": + $ref: "#/components/responses/ErrorResponses400" + "404": + $ref: "#/components/responses/ErrorResponses404" + + # -------------------------------------------------------------------------------------------------- + + post: + tags: + - システムAPI + summary: Webhook設定登録 + description: 指定したフォームに Webhook 設定を登録します。 + operationId: RegistWebhookConfig + requestBody: + $ref: "#/components/requestBodies/PostWebhookInsertRequest" + security: + - bearerAuth: [] + parameters: + - $ref: "#/components/parameters/path_fid_required" + responses: + "200": + $ref: "#/components/responses/PostWebhookInsertResponses200" + "400": + $ref: "#/components/responses/ErrorResponses400" + "404": + $ref: "#/components/responses/ErrorResponses404" + + # -------------------------------------------------------------------------------------------------- + + /api/v1/system/{fid}/webhooks/{webhookId}: + patch: + tags: + - システムAPI + summary: Webhook設定更新 + description: | + 指定したフォームの指定した Webhook 設定を更新します。
+ リクエストには FQDN に指定が必要で、指定した FQDN と Webhook 送信先 URL の FQDN が完全一致する場合のみ Webhook 設定が更新可能です。 + operationId: UpdateWebhookConfig + requestBody: + $ref: "#/components/requestBodies/PatchWebhookUpdateRequest" + security: + - bearerAuth: [] + parameters: + - $ref: "#/components/parameters/path_fid_required" + - $ref: "#/components/parameters/path_webhookId_required" + responses: + "200": + $ref: "#/components/responses/PatchWebhookUpdateResponses200" + "400": + $ref: "#/components/responses/ErrorResponses400" + "404": + $ref: "#/components/responses/ErrorResponses404" + + # -------------------------------------------------------------------------------------------------- + + delete: + tags: + - システムAPI + summary: Webhook設定削除 + description: | + 指定したフォームの指定した Webhook 設定を削除します。
+ リクエストには FQDN に指定が必要で、指定した FQDN と Webhook 送信先 URL の FQDN が完全一致する場合のみ Webhook 設定の削除が可能です。 + operationId: DeleteWebhookConfig + security: + - bearerAuth: [] + parameters: + - $ref: "#/components/parameters/path_fid_required" + - $ref: "#/components/parameters/path_webhookId_required" + - $ref: "#/components/parameters/query_fqdn_required2" + responses: + "200": + $ref: "#/components/responses/DeleteWebhookConfigResponses200" + "400": + $ref: "#/components/responses/ErrorResponses400" + "404": + $ref: "#/components/responses/ErrorResponses404" + + # -------------------------------------------------------------------------------------------------- + + /api/v1/forms/{fid}: + get: + tags: + - ユーザー別API + summary: フォーム定義情報取得 + description: フォームを構成するフィールドの詳細情報を取得します。 + operationId: GetFormDefinition + security: + - bearerAuth: [] + parameters: + - $ref: "#/components/parameters/path_fid_required" + responses: + "200": + $ref: "#/components/responses/GetFormsResponses200" + "400": + $ref: "#/components/responses/ErrorResponses400" + "500": + $ref: "#/components/responses/ErrorResponses500_noReasons" + + # -------------------------------------------------------------------------------------------------- + + /api/v1/forms: + get: + tags: + - ユーザー別API + summary: 利用可能フォーム一覧取得 + description: | + 認証ユーザーが利用できるフォームのフォームID、名称を所属グループ(グループID、グループ名)とセットで取得します。
+ 代理申請者のユーザーコードを指定することで、代理申請可能なフォーム情報が取得できます。 + operationId: GetAvailableFormList + security: + - bearerAuth: [] + parameters: + - $ref: "#/components/parameters/query_fgid" + - $ref: "#/components/parameters/query_formname_flg" + - $ref: "#/components/parameters/query_proxyUser2" + - $ref: "#/components/parameters/query_keyword" + - $ref: "#/components/parameters/query_order" + responses: + "200": + $ref: "#/components/responses/GetUseFormsListResponses200" + "400": + $ref: "#/components/responses/ErrorResponses400" + + # -------------------------------------------------------------------------------------------------- + + /api/v1/proxy: + get: + tags: + - ユーザー別API + summary: 代理権限情報取得 + description: | + 認証ユーザ―が代理を許可されている、ユーザ―、ワークフロー操作(申請、承認)、フォーム・ステップに関わる応報を取得します。
+ 代理ユーザ―情報を REST API 呼び出し際に指定することで、許可された範囲で代理者として情報を取得・操作する事ができます。 + operationId: GetProxyInfo + security: + - bearerAuth: [] + responses: + "200": + $ref: "#/components/responses/GetProxyInfoResponses200" + + # -------------------------------------------------------------------------------------------------- + + /api/v1/approvals: + get: + tags: + - ユーザー別API + summary: 承認待ち一覧取得 + description: | + ユーザ―サイトの「承認」で表示される一覧相当のリストを取得できます。
+ 代理ユーザーのユーザーコードを指定することで、代理ユーザーの承認待ち一覧が取得できます。 + operationId: GetApprovalList + security: + - bearerAuth: [] + parameters: + - $ref: "#/components/parameters/query_stat" + - $ref: "#/components/parameters/query_fgid2" + - $ref: "#/components/parameters/query_fid" + - $ref: "#/components/parameters/query_step" + - $ref: "#/components/parameters/query_recordNo" + - $ref: "#/components/parameters/query_getLine" + - $ref: "#/components/parameters/query_proxyUser2" + - $ref: "#/components/parameters/query_filter" + - $ref: "#/components/parameters/query_showHiddenDoc" + responses: + "200": + $ref: "#/components/responses/GetApprovalsListResponses200" + "400": + $ref: "#/components/responses/ErrorResponses400" + "500": + $ref: "#/components/responses/ErrorResponses500_noReasons" + + # -------------------------------------------------------------------------------------------------- + + /api/v1/approvals/wait: + get: + tags: + - ユーザー別API + summary: 承認待ち件数取得 + description: | + PCブラウザを利用しユーザートップを表示した際に「承認」ガジェットに表示される内容を取得します。
+ 認証ユーザー、もしくは指定されたユーザーの、承認待ち、差し戻され、却下、回覧、下書き、保留、承認中(申請)、承認中(承認)、差し戻し、承認完了(申請)、承認完了(承認)の11種類の件数、及び最新の承認待ち書類5件について、件名、フォーム名、提出者、最終更新日時を取得します。 + operationId: GetApprovalCount + security: + - bearerAuth: [] + parameters: + - $ref: "#/components/parameters/query_fgid2" + - $ref: "#/components/parameters/query_fid" + - $ref: "#/components/parameters/query_step" + responses: + "200": + $ref: "#/components/responses/GetApprovalsWaitResponses200" + "400": + $ref: "#/components/responses/ErrorResponses400" + "500": + $ref: "#/components/responses/ErrorResponses500_noReasons" + + # -------------------------------------------------------------------------------------------------- + + /api/v1/approvals/hidden: + put: + tags: + - ユーザー別API + summary: 承認完了書類非表示設定 + description: | + ユーザサイトの承認画面で設定できる承認完了書類の非表示/表示設定相当の設定を行う API です。
+ 承認待ち一覧取得 API で取得した承認完了書類の書類 ID をまとめて指定して、非表示/表示設定を切り替えます。 + operationId: SetCompDocumentDisplaySetting + requestBody: + $ref: "#/components/requestBodies/PutApprovalsHiddenRequest" + security: + - bearerAuth: [] + responses: + "200": + $ref: "#/components/responses/PutApprovalsHiddenResponses200" + "400": + $ref: "#/components/responses/ErrorResponses400" + + # -------------------------------------------------------------------------------------------------- + + /api/v1/search/documents: + post: + tags: + - ユーザー別API + summary: 書類検索 + description: 指定された検索条件で検索を行い、検索結果を取得します。 + operationId: SearchDocument + requestBody: + $ref: "#/components/requestBodies/PostSearchDocumentsRequest" + security: + - bearerAuth: [] + parameters: + - $ref: "#/components/parameters/query_size" + - $ref: "#/components/parameters/query_offset2" + - $ref: "#/components/parameters/query_page" + responses: + "200": + $ref: "#/components/responses/PostSearchDocumentsResponses200" + "400": + $ref: "#/components/responses/ErrorResponses400" + + # -------------------------------------------------------------------------------------------------- + + /api/v1/query/: + get: + tags: + - ユーザー別API + summary: 利用可能クエリ一覧取得 + description: 認証ユーザーが利用できるクエリ情報の一覧を取得します。 + operationId: GetAvailableQueryList + security: + - bearerAuth: [] + responses: + "200": + $ref: "#/components/responses/GetQueryListResponses200" + "401": + $ref: "#/components/responses/ErrorResponses401" + + # -------------------------------------------------------------------------------------------------- + + /api/v1/query/{query_code}: + get: + tags: + - ユーザー別API + summary: クエリ取得 + description: | + 認証ユーザーが閲覧できるクエリをひとつ選択し、その設定情報を取得します。
+ 更に、実行結果取得フラグのパラメータが true に指定されているとき、クエリの実行結果を取得します。
+ また、出力行数とオフセット値のパラメータによりページングを行うことが可能です。

+ クエリの実行結果は、X-point のクエリ管理より設定したフォーマット設定、カンマ区切り等の書式が反映されます。
+ 抽出条件設定を行っていた場合は、抽出条件設定にしたがって絞り込まれた状態で実行結果が出力されます。

+ なお、クエリの検索項目設定については本 API での取得には反映されず、
+ 本 API によるクエリの実行時に絞り込み条件を付与することはできません。 + operationId: GetQuery + security: + - bearerAuth: [] + parameters: + - $ref: "#/components/parameters/path_queryCode_required" + - $ref: "#/components/parameters/query_execFlg" + - $ref: "#/components/parameters/query_rows2" + - $ref: "#/components/parameters/query_offset3" + responses: + "200": + $ref: "#/components/responses/GetQueryResponses200" + "400": + $ref: "#/components/responses/ErrorResponses400" + + # -------------------------------------------------------------------------------------------------- + + /api/v1/query/graph/{query_code}: + get: + tags: + - ユーザー別API + summary: クエリグラフ表示 + description: | + 認証ユーザーが閲覧できるクエリをひとつ選択し、そのクエリに設定されているグラフを取得します。
+ グラフは PNG 形式か JPEG 形式かを任意で選択することができます。(デフォルトは PNG) + operationId: GetQueryGraph + security: + - bearerAuth: [] + parameters: + - $ref: "#/components/parameters/path_queryCode_required" + - $ref: "#/components/parameters/query_outFormat" + responses: + "200": + $ref: "#/components/responses/GetQueryGraphResponses200" + "404": + $ref: "#/components/responses/ErrorResponses404" + + # -------------------------------------------------------------------------------------------------- + + /api/v1/adminrole: + get: + tags: + - ユーザー別API + summary: ユーザ権限情報取得 + description: | + 認証ユーザが持つ管理者権限の一覧を取得します。 + operationId: GetAdminRole + security: + - bearerAuth: [] + responses: + "200": + $ref: "#/components/responses/GetAdminroleResponses200" + + # -------------------------------------------------------------------------------------------------- + + /x/v1/service: + get: + tags: + - その他API + summary: X-point情報取得 + description: | + X-point のバージョンや利用できる機能、作成されたドメインが 1 つのみかの情報を取得します。
+ OAuth2 認証のアクセストークン取得時に、ドメインコードが省略可能か否かを判断する際に使用します。
+ ユーザー認証無しで利用可能です。 + operationId: GetXpointInfo + responses: + "200": + $ref: "#/components/responses/GetXpointInfoResponses200" + + # -------------------------------------------------------------------------------------------------- + + /scim/v2/{domain_code}/Users: + get: + tags: + - SCIM API + summary: ユーザ情報取得 + description: 指定された条件を元にユーザ情報を取得します。 + operationId: GetUsers + security: + - bearerAuth: [] + parameters: + - $ref: "#/components/parameters/path_domainCode_required" + - $ref: "#/components/parameters/query_filter2" + - $ref: "#/components/parameters/query_startIndex" + - $ref: "#/components/parameters/query_count" + responses: + "200": + $ref: "#/components/responses/ScimUserResponse" + "401": + $ref: "#/components/responses/ScimErrorResponse401" + + # -------------------------------------------------------------------------------------------------- + + post: + tags: + - SCIM API + summary: ユーザ情報作成 + description: リクエストボディに指定したデータを元にユーザ情報を作成します。 + operationId: CreateUser + requestBody: + $ref: "#/components/requestBodies/ScimUserRequest" + security: + - bearerAuth: [] + parameters: + - $ref: "#/components/parameters/path_domainCode_required" + responses: + "201": + $ref: "#/components/responses/ScimUserResponse" + "400": + $ref: "#/components/responses/ScimErrorResponse400" + "401": + $ref: "#/components/responses/ScimErrorResponse401" + "404": + $ref: "#/components/responses/ScimErrorResponse404" + + # -------------------------------------------------------------------------------------------------- + + /scim/v2/{domain_code}/Users/{userId}: + get: + tags: + - SCIM API + summary: 指定ユーザ情報取得 + description: パスに指定したユーザ ID に紐づくユーザの情報を取得します。 + operationId: GetUser + security: + - bearerAuth: [] + parameters: + - $ref: "#/components/parameters/path_domainCode_required" + - $ref: "#/components/parameters/path_userId_required" + responses: + "200": + $ref: "#/components/responses/ScimUserResponse" + "401": + $ref: "#/components/responses/ScimErrorResponse401" + + # -------------------------------------------------------------------------------------------------- + + put: + tags: + - SCIM API + summary: ユーザ情報更新 + description: | + パスに指定したユーザ ID に紐づくユーザの情報を全て更新します。
+
+ **注意事項**
+ * リクエストボディで指定しなかった項目は削除、もしくは初期値に更新されますのでご注意ください。 + operationId: UpdateUser + requestBody: + $ref: "#/components/requestBodies/ScimUserRequest" + security: + - bearerAuth: [] + parameters: + - $ref: "#/components/parameters/path_domainCode_required" + - $ref: "#/components/parameters/path_userId_required" + responses: + "200": + $ref: "#/components/responses/ScimUserResponse" + "400": + $ref: "#/components/responses/ScimErrorResponse400" + "401": + $ref: "#/components/responses/ScimErrorResponse401" + "404": + $ref: "#/components/responses/ScimErrorResponse404" + + # -------------------------------------------------------------------------------------------------- + + patch: + tags: + - SCIM API + summary: ユーザ情報一部更新 + description: パスに指定したユーザ ID に紐づくユーザ情報の指定項目のみを更新します。 + operationId: PatchUser + requestBody: + $ref: "#/components/requestBodies/PatchUpdateUserRequest" + security: + - bearerAuth: [] + parameters: + - $ref: "#/components/parameters/path_domainCode_required" + - $ref: "#/components/parameters/path_userId_required" + responses: + "200": + $ref: "#/components/responses/ScimUserResponse" + "400": + $ref: "#/components/responses/ScimErrorResponse400" + "401": + $ref: "#/components/responses/ScimErrorResponse401" + "404": + $ref: "#/components/responses/ScimErrorResponse404" + + # -------------------------------------------------------------------------------------------------- + + delete: + tags: + - SCIM API + summary: ユーザ情報削除 + description: パスに指定したユーザ ID に紐づくユーザ情報を削除します。 + operationId: DeleteUser + security: + - bearerAuth: [] + parameters: + - $ref: "#/components/parameters/path_domainCode_required" + - $ref: "#/components/parameters/path_userId_required" + responses: + "204": + $ref: "#/components/responses/DeleteScimInfoResponses204" + "400": + $ref: "#/components/responses/ScimErrorResponse400" + "401": + $ref: "#/components/responses/ScimErrorResponse401" + "404": + $ref: "#/components/responses/ScimErrorResponse404" + + # -------------------------------------------------------------------------------------------------- + + /scim/v2/{domain_code}/Groups: + get: + tags: + - SCIM API + summary: ユーザグループ情報取得 + description: 指定された条件を元にユーザグループ情報を取得します。 + operationId: GetGroups + security: + - bearerAuth: [] + parameters: + - $ref: "#/components/parameters/path_domainCode_required" + - $ref: "#/components/parameters/query_filter3" + - $ref: "#/components/parameters/query_startIndex" + - $ref: "#/components/parameters/query_count" + responses: + "200": + $ref: "#/components/responses/ScimGroupResponse" + "401": + $ref: "#/components/responses/ScimErrorResponse401" + + # -------------------------------------------------------------------------------------------------- + + post: + tags: + - SCIM API + summary: ユーザグループ情報作成 + description: リクエストボディに指定したデータを元にユーザグループ情報を作成します。 + operationId: CreateGroup + requestBody: + $ref: "#/components/requestBodies/ScimGroupRequest" + security: + - bearerAuth: [] + parameters: + - $ref: "#/components/parameters/path_domainCode_required" + responses: + "200": + $ref: "#/components/responses/ScimGroupResponse" + "400": + $ref: "#/components/responses/ScimErrorResponse400" + "401": + $ref: "#/components/responses/ScimErrorResponse401" + "404": + $ref: "#/components/responses/ScimErrorResponse404" + + # -------------------------------------------------------------------------------------------------- + + /scim/v2/{domain_code}/Groups/{groupId}: + get: + tags: + - SCIM API + summary: 指定ユーザグループ情報取得 + description: パスに指定したグループ ID に紐づくユーザグループの情報を取得します。 + operationId: GetGroup + security: + - bearerAuth: [] + parameters: + - $ref: "#/components/parameters/path_domainCode_required" + - $ref: "#/components/parameters/path_groupId_required" + responses: + "200": + $ref: "#/components/responses/ScimGroupResponse" + "401": + $ref: "#/components/responses/ScimErrorResponse401" + + # -------------------------------------------------------------------------------------------------- + + put: + tags: + - SCIM API + summary: ユーザグループ情報更新 + description: | + パスに指定したグループ ID に紐づくユーザグループの情報を全て更新します。
+
+ **注意事項**
+ * リクエストボディで指定しなかった項目は削除、もしくは初期値に更新されますのでご注意ください。 + operationId: UpdateGroup + requestBody: + $ref: "#/components/requestBodies/ScimGroupRequest" + security: + - bearerAuth: [] + parameters: + - $ref: "#/components/parameters/path_domainCode_required" + - $ref: "#/components/parameters/path_groupId_required" + responses: + "200": + $ref: "#/components/responses/ScimGroupResponse" + "400": + $ref: "#/components/responses/ScimErrorResponse400" + "401": + $ref: "#/components/responses/ScimErrorResponse401" + "404": + $ref: "#/components/responses/ScimErrorResponse404" + + # -------------------------------------------------------------------------------------------------- + + patch: + tags: + - SCIM API + summary: ユーザグループ情報一部更新 + description: パスに指定したグループ ID に紐づくユーザグループ情報の指定項目のみを更新します。 + operationId: PatchGroup + requestBody: + $ref: "#/components/requestBodies/PatchUpdateUserGroupInfoRequest" + security: + - bearerAuth: [] + parameters: + - $ref: "#/components/parameters/path_domainCode_required" + - $ref: "#/components/parameters/path_groupId_required" + responses: + "200": + $ref: "#/components/responses/ScimGroupResponse" + "400": + $ref: "#/components/responses/ScimErrorResponse400" + "401": + $ref: "#/components/responses/ScimErrorResponse401" + "404": + $ref: "#/components/responses/ScimErrorResponse404" + + # -------------------------------------------------------------------------------------------------- + + delete: + tags: + - SCIM API + summary: ユーザグループ情報削除 + description: パスに指定したグループ ID に紐づくユーザグループ情報を削除します。 + operationId: DeleteGroup + security: + - bearerAuth: [] + parameters: + - $ref: "#/components/parameters/path_domainCode_required" + - $ref: "#/components/parameters/path_groupId_required" + responses: + "204": + $ref: "#/components/responses/DeleteScimInfoResponses204" + "401": + $ref: "#/components/responses/ScimErrorResponse401" + "404": + $ref: "#/components/responses/ScimErrorResponse404" + + # -------------------------------------------------------------------------------------------------- + + /scim/v2/{domain_code}/Parts: + get: + tags: + - SCIM API + summary: 役職情報取得 + description: 指定された条件を元に役職情報を取得します。 + operationId: GetParts + security: + - bearerAuth: [] + parameters: + - $ref: "#/components/parameters/path_domainCode_required" + - $ref: "#/components/parameters/query_filter4" + - $ref: "#/components/parameters/query_startIndex" + - $ref: "#/components/parameters/query_count" + responses: + "200": + $ref: "#/components/responses/ScimPartResponse" + "401": + $ref: "#/components/responses/ScimErrorResponse401" + + # -------------------------------------------------------------------------------------------------- + + post: + tags: + - SCIM API + summary: 役職情報作成 + description: リクエストボディに指定したデータを元に役職情報を作成します。 + operationId: CreatePart + requestBody: + $ref: "#/components/requestBodies/ScimPartRequest" + security: + - bearerAuth: [] + parameters: + - $ref: "#/components/parameters/path_domainCode_required" + responses: + "200": + $ref: "#/components/responses/ScimPartResponse" + "400": + $ref: "#/components/responses/ScimErrorResponse400" + "401": + $ref: "#/components/responses/ScimErrorResponse401" + + # -------------------------------------------------------------------------------------------------- + + /scim/v2/{domain_code}/Parts/{partId}: + get: + tags: + - SCIM API + summary: 指定役職情報取得 + description: パスに指定した役職 ID に紐づく役職の情報を取得します。 + operationId: GetPart + security: + - bearerAuth: [] + parameters: + - $ref: "#/components/parameters/path_domainCode_required" + - $ref: "#/components/parameters/path_partId_required" + responses: + "200": + $ref: "#/components/responses/ScimPartResponse" + "401": + $ref: "#/components/responses/ScimErrorResponse401" + + # -------------------------------------------------------------------------------------------------- + + put: + tags: + - SCIM API + summary: 役職情報更新 + description: | + パスに指定した役職 ID に紐づく役職の情報を全て更新します。 + + **注意事項** + * リクエストボディで指定しなかった項目は削除、もしくは初期値に更新されますのでご注意ください。 + operationId: UpdatePart + requestBody: + $ref: "#/components/requestBodies/ScimPartRequest" + security: + - bearerAuth: [] + parameters: + - $ref: "#/components/parameters/path_domainCode_required" + - $ref: "#/components/parameters/path_partId_required" + responses: + "200": + $ref: "#/components/responses/ScimPartResponse" + "400": + $ref: "#/components/responses/ScimErrorResponse400" + "401": + $ref: "#/components/responses/ScimErrorResponse401" + "404": + $ref: "#/components/responses/ScimErrorResponse404" + + # -------------------------------------------------------------------------------------------------- + + patch: + tags: + - SCIM API + summary: 役職情報一部更新 + description: パスに指定した役職 ID に紐づく役職情報の指定項目のみを更新します。 + operationId: PatchPart + requestBody: + $ref: "#/components/requestBodies/PatchUpdatePartInfoRequest" + security: + - bearerAuth: [] + parameters: + - $ref: "#/components/parameters/path_domainCode_required" + - $ref: "#/components/parameters/path_partId_required" + responses: + "200": + $ref: "#/components/responses/ScimPartResponse" + "400": + $ref: "#/components/responses/ScimErrorResponse400" + "401": + $ref: "#/components/responses/ScimErrorResponse401" + "404": + $ref: "#/components/responses/ScimErrorResponse404" + + # -------------------------------------------------------------------------------------------------- + + delete: + tags: + - SCIM API + summary: 役職情報削除 + description: パスに指定した役職 ID に紐づく役職情報を削除します。 + operationId: DeletePart + security: + - bearerAuth: [] + parameters: + - $ref: "#/components/parameters/path_domainCode_required" + - $ref: "#/components/parameters/path_partId_required" + responses: + "204": + $ref: "#/components/responses/DeleteScimInfoResponses204" + "401": + $ref: "#/components/responses/ScimErrorResponse401" + "404": + $ref: "#/components/responses/ScimErrorResponse404" + + # -------------------------------------------------------------------------------------------------- + + /scim/v2/{domain_code}/Me: + get: + tags: + - SCIM API + summary: 認証ユーザ情報取得 + description: OAuth2 認証で認証したユーザの情報を返します。 + operationId: GetSelfInfo + security: + - bearerAuth: [] + parameters: + - $ref: "#/components/parameters/path_domainCode_required" + responses: + "200": + $ref: "#/components/responses/GetAuthorizeUserInfoResponses200" + "401": + $ref: "#/components/responses/ScimErrorResponse401" + +# ----------------------------------------------- +# コンポーネントの定義 +# ----------------------------------------------- + +components: + # ----------------------------------------------- + # セキュリティスキーマ components/securitySchemes + # ----------------------------------------------- + + securitySchemes: + bearerAuth: + type: http + scheme: bearer + description: OAuth2 認証情報 + APIKeyAuth: + type: apiKey + in: header + name: X-ATLED-Generic-API-Token + description: トークン情報 + + # ----------------------------------------------- + # パラメータ components/parameters + # ----------------------------------------------- + + parameters: + # ----------------------------------------------- + # パスパラメータ + # ----------------------------------------------- + + path_docid_required: + description: 書類ID + name: docid + in: path + schema: + type: integer + example: 999 + required: true + + path_commentNo_required: + description: コメント番号 + name: seq + in: path + schema: + type: string + example: 1 + required: true + + path_attachSeq_required: + description: | + 添付番号
+ 添付番号には書類内容取得(Documents)、添付ファイル一覧取得(Attachments)で取得した添付ファイル情報の “seq” 項目に設定された番号を指定します。 + name: attach_seq + in: path + schema: + type: integer + example: 1 + required: true + + path_lumpapplyid_required: + description: | + 自動申請ID
+ 自動申請IDには自動申請登録の一覧取得(Lumpapply)で取得したIDを指定します。 + name: lumpapplyid + in: path + schema: + type: integer + example: 999 + required: true + + path_fid_required: + description: フォームID + name: fid + in: path + schema: + type: integer + example: 999 + required: true + + path_masterTableName_required: + description: テーブル名 + name: master_table_name + in: path + schema: + type: string + example: user_table + required: true + + path_masterCode_required: + description: | + マスタ識別情報
+ データ取得対象のマスタが特定可能な情報を指定します。
+ 簡易マスタであれば「マスタコード」、ユーザ固有マスタであれば「テーブル名」を指定します。 + name: master_code + in: path + schema: + type: string + example: master01 + required: true + + path_simpleMasterCode_required: + description: 簡易マスタの「マスタコード」 + name: master_code + in: path + schema: + type: string + example: master01 + required: true + + path_uuid_required: + description: 「Webhookログ取得API」で取得した UUID を指定します。 + name: uuid + in: path + schema: + type: string + example: xxxxxxxx-0017-4c74-b48a-91a9e9b629a8 + required: true + + path_webhookId_required: + description: 「Webhook設定取得API」で取得した Webhook ID を指定する。 + name: webhookId + in: path + schema: + type: string + example: 999 + required: true + + path_queryCode_required: + description: クエリコード + name: query_code + in: path + schema: + type: string + example: query01 + required: true + + path_domainCode_required: + description: ドメインコード + name: domain_code + in: path + schema: + type: string + example: domain01 + required: true + + path_userId_required: + description: ユーザID + name: userId + in: path + schema: + type: integer + example: 100 + required: true + + path_groupId_required: + description: グループID + name: groupId + in: path + schema: + type: integer + example: 100 + required: true + + path_partId_required: + description: 役職ID + name: partId + in: path + schema: + type: integer + example: 100 + required: true + + # ----------------------------------------------- + # クエリパラメータ + # ----------------------------------------------- + + query_proxyUser: + description: | + 代理ユーザコード
+ 代理申請時に使用します。 + name: proxy_user + in: query + schema: + type: string + example: u001 + + query_proxyUser2: + description: | + 代理ユーザコード
+ 代理申請者のユーザコードを指定する。 + name: proxy_user + in: query + schema: + type: string + example: u001 + + query_proxyUser3: + description: | + 代理ユーザコード
+ 代理モードで書類を表示する際に使用します。 + name: proxy_user + in: query + schema: + type: string + example: u001 + + query_fcd: + description: | + フォームコード
+ フォームコードかフォーム名称何れか一方をクエリパラメータに指定します。
+ どちらも指定されている場合はフォーム名称と一致するフォームで REST API が実行されます。
+
+ **注意事項**
+ * 同一フォームコードを持つフォームがある場合は、フォームコードでフォームを特定できず期待する動作になりません。
+ その場合はフォームコードではなくフォーム名称をクエリパラメータに指定してください。 + name: fcd + in: query + schema: + type: integer + example: 999 + + query_formname: + description: フォーム名称 + name: formname + in: query + schema: + type: string + example: 経費申請書 + + query_routecd_required: + description: | + 承認ルートコード
+ * ワークフローフォーム(ユーザ選択ルート)
+ 承認ルートコードを指定します。
+ * ワークフローフォーム(自動選択ルート)
+ 空文字もしくは「--condroute」という自動選択ルートを表す文字列を指定します。
+ (大文字、小文字は区別しません。)
+ * 標準フォーム
+ 空文字を指定します。 + name: routecd + in: query + schema: + type: integer + example: 999 + required: true + + query_fromdocid: + description: | + 関連元書類の書類 ID
+ 関連書類の作成時に使用します。 + name: fromdocid + in: query + schema: + type: integer + example: 999 + + query_masterType_required: + description: | + マスタタイプ
+ 簡易マスタもしくはユーザ固有マスタのマスタタイプを数値で指定します。
+ 0:簡易マスタ
+ 1:ユーザ固有マスタ + name: master_type + in: query + schema: + type: integer + example: 0 + required: true + + query_rows: + description: | + 取得行数
+ デフォルトは 100 行です。
+ 最大 1000 行まで指定可能です。 + name: rows + in: query + schema: + type: integer + example: 100 + + query_rows2: + description: | + 出力行数
+ ※デフォルトは 500
+ ※1~10000 の間で指定可能 + name: rows + in: query + schema: + type: integer + example: 100 + + query_offset: + description: | + オフセット値
+ デフォルトは 0 です。 + name: offset + in: query + schema: + type: integer + example: 0 + + query_offset2: + description: | + 取得項目のオフセット
+ offset と page の両方を指定した場合はoffset が優先されます。 + name: offset + in: query + schema: + type: integer + example: 0 + + query_offset3: + description: | + オフセット値
+ 一覧クエリのみ有効。
+ ※デフォルトは 0
+ ※0 以上で指定可能 + name: offset + in: query + schema: + type: integer + example: 0 + + query_offset_position: + description: | + 取得開始位置
+ 何件目から取得するかを指定します。
+ デフォルトは 0 です。 + name: offset + in: query + schema: + type: integer + example: 0 + + query_fileName: + description: | + CSVファイル名
+ CSV 形式でマスタデータを取得する場合に指定可能です。
+ デフォルトのファイル名は「{マスタコード}.csv」、または「{テーブル名}.csv」です。 + name: file_name + in: query + schema: + type: string + example: test.csv + + query_delimiter: + description: | + 区切り文字
+ CSV 形式でマスタデータを取得する場合に指定可能です。
+ 「comma」を指定した場合はカンマ区切り、「tab」を指定した場合はタブ区切りでデータを取得します。
+ デフォルトはカンマ区切りです。 + name: delimiter + in: query + schema: + type: string + example: comma + + query_title: + description: | + タイトル有無
+ CSV 形式かつユーザ固有マスタのデータを取得する場合に指定可能です。
+ true:先頭行にフィールド名を出力する。
+ false:先頭行にフィールド名を出力しない。
+ デフォルトは true です。 + name: title + in: query + schema: + type: boolean + example: true + + query_fields: + description: | + 出力項目
+ CSV 形式かつ簡易マスタのデータを取得する場合に指定可能です。
+ 取得したい項目をカンマ区切りで指定します。
+ デフォルトは項目コードと項目値が出力されます。 + name: fields + in: query + schema: + type: string + example: id,name + + query_from: + description: | + 送信日時 From
+ Webhook の送信日時を範囲指定します。 + name: from + in: query + schema: + type: string + example: 2022/10/01 + + query_to: + description: | + 送信日時 To
+ Webhook の送信日時を範囲指定します。 + name: to + in: query + schema: + type: string + example: 2022/12/01 + + query_docid: + description: 書類ID + name: docid + in: query + schema: + type: integer + example: "33341" + + query_formCode: + description: フォームコード + name: form_code + in: query + schema: + type: string + example: DEMO_S01 + + query_routeCode: + description: 承認ルートコード + name: route_code + in: query + schema: + type: string + example: condRouteA + + query_status: + description: | + ステータス
+ 全て取得    :all を指定
+ 送信成功のみ取得:success を指定
+ 送信失敗のみ取得:failed を指定 + name: status + in: query + schema: + type: string + example: success + + query_url: + description: | + 送信先URL
+ 送信先 URL を部分一致検索します。 + name: url + in: query + schema: + type: string + example: google + + query_limit: + description: | + 取得件数
+ 何件取得するかを指定します。
+ デフォルトは 50 です。
+ 推奨値は1000件以下の値です。 + name: limit + in: query + schema: + type: integer + example: "10" + minimum: 0 + maximum: 1000 + + query_fqdn_required: + description: | + 取得したい Webhook 設定の Webhook 送信先 FQDN を指定します。
+ FQDN 例:example.com + name: fqdn + in: query + schema: + type: string + example: www.example.com + required: true + + query_fqdn_required2: + description: | + 削除したい Webhook 設定の Webhook 送信先 FQDN を指定します。
+ FQDN 例:example.com + name: fqdn + in: query + schema: + type: string + example: www.example.com + required: true + + query_fgid: + description: | + フォームグループID
+ 指定なしの場合は全てのフォームグループを取得 + name: fgid + in: query + schema: + type: integer + example: 1 + + query_fgid2: + description: フォームグループID + name: fgid + in: query + schema: + type: integer + example: 1 + + query_formname_flg: + description: | + フォームグループフラグ
+ true:フォームグループのみ取得
+ false:フォームグループに加えて所属フォームも取得
+ ※指定なしの場合は「false」が指定されたと見做されます + name: formname + in: query + schema: + type: boolean + example: "false" + + query_keyword: + description: | + 検索条件
+ 以下の【対象項目】に対して指定したキーワードで検索を行います。 + |対象項目|説明| + |----|----| + |formgroup_name|フォームグループ名称| + |form_name|フォーム名称| + |form_code|フォームコード| + |route_name|承認ルート名称| + |route_code|承認ルートコード| + キーワードの指定方法についてはマニュアル[「2.9.1 絞り込み条件」](./doc/manual.html#291-絞り込み条件)をご参照ください。 + name: keyword + in: query + schema: + type: string + example: form_name eq "フォーム01" + + query_order: + description: | + 並び替え条件
+ 以下の【対象項目】を指定してレスポンスの並び替えを行います。
+ 項目の先頭に「-」を指定した場合は降順に、項目のみ指定した場合は昇順に並び替えます。
+ 並び替え条件を指定しない場合 X-point提出画面で表示されるフォーム一覧と同じ並び順です。 + |対象項目|説明| + |----|----| + |formgroup_name|フォームグループ名称| + |form_name|フォーム名称| + |form_code|フォームコード| + |route_name|承認ルート名称| + |route_code|承認ルートコード| + 並び替え条件の指定方法についてはマニュアル[「2.9.2 並び替え」](./doc/manual.html#292-並び替え)をご参照ください。 + name: order + in: query + schema: + type: string + example: "-form_name" + + query_stat: + description: | + 承認状況タイプ
+ |設定値|承認待ち|分類| + |----|----|----| + |10|承認待ち|大分類| + |11|承認待ち|小分類| + |12|差し戻され|小分類| + |20|通知|大分類| + |21|却下|小分類| + |22|回覧|小分類| + |30|保留|小分類| + |31|下書き|小分類| + |32|保留|小分類| + |40|状況確認|大分類| + |41|承認中(申請)|小分類| + |42|承認中(承認)|小分類| + |43|差し戻し|小分類| + |50|承認完了|大分類| + |51|承認完了(申請)|小分類| + |52|承認完了(承認)|小分類| + name: stat + in: query + schema: + type: integer + example: "10" + required: true + + query_fid: + description: | + フォームID
+ フォームグループ ID が指定されている場合のみ有効。 + name: fid + in: query + schema: + type: integer + example: "1" + + query_step: + description: | + ステップ数
+ 正の整数値のみ有効。
+ フォームグループ ID、フォーム IDが指定されている場合のみ有効。 + name: step + in: query + schema: + type: integer + example: "1" + + query_recordNo: + description: | + 開始レコード番号
+ 省略時は「0」で動作する。 + name: record_no + in: query + schema: + type: integer + example: "0" + + query_getLine: + description: | + 取得行数
+ 省略時は「50」で動作する。
+ 推奨値は1000件以下の値です。 + name: get_line + in: query + schema: + type: integer + example: "50" + minimum: 0 + maximum: 1000 + + query_filter: + description: | + フィルター
+ 日付の範囲条件で承認待ち一覧を絞り込む際に指定します。
+ 日付範囲の指定方法についてはマニュアル[「2.9.3. 日付範囲」](./doc/manual.html#293-日付範囲)をご参照ください。 + name: filter + in: query + schema: + type: string + example: cr_dt between "2023-01-01" and "2023-12-31" + + query_filter2: + description: | + フィルター
+ ログイン ID またはユーザ CDでユーザを絞り込む時に指定します。
+
+ クエリパラメータの「filter」にログイン ID またはユーザ CD を指定する事でユーザ情報の絞り込みができます。
+
+ 【フィルター指定形式】
+ フィルターでログイン ID またはユーザ CD を指定する場合は以下のフォーマットで指定します。 + * ログイン ID
+ userName eq "{ログイン ID}" + * ユーザ CD
+ userCode eq "{ユーザ CD}" +

+ + 【フィルター指定例】
+ * ログイン ID で絞り込みを行う場合
+ /scim/v2/{ドメイン CD}/Users?filter=userName eq "u001" + * ユーザ CD で絞り込みを行う場合
+ /scim/v2/{ドメイン CD}/Users?filter=userCode eq "u001" + name: filter + in: query + schema: + type: string + example: userCode eq "u001" + + query_filter3: + description: | + フィルター
+ グループ CD でユーザグループを絞り込む時に指定します。
+ クエリパラメータの「filter」にグループ CD を指定する事でユーザグループ情報の絞り込みができます。
+
+ 【フィルター指定形式】
+ フィルターでグループ CD を指定する場合は以下のフォーマットで指定します。
+ groupCode eq "{グループ CD}"
+
+ 【フィルター指定例】
+ /scim/v2/{ドメイン CD}/Groups?filter=groupCode eq "g001" + name: filter + in: query + schema: + type: string + example: groupCode eq "g001" + + query_filter4: + description: | + フィルター
+ 役職 CD で役職情報を絞り込む時に指定します。
+ クエリパラメータの「filter」に役職 CD を指定する事で役職情報の絞り込みができます。
+
+ 【フィルター指定形式】
+ フィルターで役職 CD を指定する場合は以下のフォーマットで指定します。
+ partCode eq "{役職 CD}"
+
+ 【フィルター指定例】
+ /scim/v2/{ドメイン CD}/Parts?filter=partCode eq "p001" + name: filter + in: query + schema: + type: string + example: partCode eq "p001" + + query_showHiddenDoc: + description: | + 非表示書類の取得フラグ
+ true :非表示書類も取得する
+ false:非表示書類は取得しない
+ 承認画面や承認完了書類非表示設定で非表示に設定した承認完了書類を一覧に含めるか指定します。
+ デフォルトは false です。
+ クエリパラメータの承認状況タイプで、承認完了/承認完了(申請)/承認完了(承認)のいずれかを指定した場合のみ有効です。 + name: show_hidden_doc + in: query + schema: + type: boolean + example: false + + query_size: + description: | + 1 ページあたりの取得件数
+ 省略時は 1 ページあたり 50 件の書類を取得します。
+ 推奨値は1000件以下の値です。 + name: size + in: query + schema: + type: integer + example: "2" + minimum: 0 + maximum: 1000 + + query_page: + description: 取得ページ + name: page + in: query + schema: + type: integer + example: "2" + + query_execFlg: + description: | + 実行結果取得フラグ
+ true(クエリ実行する) + / false(定義のみ取得)
+ ※デフォルトは false
+ name: exec_flg + in: query + schema: + type: boolean + example: false + + query_outFormat: + description: | + フォーマット
+ "png"(PNG 画像) / "jpeg"(JPEG 画像)
+ ※デフォルトは PNG 画像 + name: outFormat + in: query + schema: + type: string + example: png + + query_startIndex: + description: | + 取得開始レコード番号
+ 1 以上の整数値のみ有効。
+ name: startIndex + in: query + schema: + type: integer + example: 3 + + query_count: + description: | + 取得レコード数
+ 正の整数値のみ有効。
+ name: count + in: query + schema: + type: integer + example: 10 + + query_history: + description: | + 承認履歴情報取得フラグ
+ true:承認履歴情報を取得する。
+ false:承認履歴情報を取得しない。
+ デフォルトは false です。 + name: history + in: query + schema: + type: boolean + example: true + + # ----------------------------------------------- + # リクエスト components/requestBodies + # ----------------------------------------------- + + requestBodies: + PostDocumentRequest: + content: + application/json: + schema: + required: + - route_code + - datas + allOf: + - $ref: "#/components/schemas/PostDocumentRequest" + examples: + 下書き書類作成: + value: + draft: true + form_code: form01 + route_code: route01 + datas: + - page_no: 1 + fields: + field1: "件名" + field2: "12345" + group1: + - g_field1: 名前 + g_field2: 個数 + g_field3: 価格 + lumpapply: true + 書類申請: + value: + draft: false + form_name: フォーム01 + route_code: route01 + datas: + - page_no: 1 + fields: + field1: "件名" + field2: "12345" + group1: + - g_field1: 名前 + g_field2: 個数 + g_field3: 価格 + lumpapply: false + + # -------------------------------------------------------------------------------------------------- + + PatchDocumentRequest: + content: + application/json: + schema: + required: + - route_code + allOf: + - $ref: "#/components/schemas/PatchDocumentRequest" + examples: + 書類データを更新し承認: + value: + wf_type: 1 + form_code: form01 + route_code: route01 + datas: + - page_no: 1 + fields: + field1: 件名 + field2: "12345" + group1: + - g_field1: "100" + g_field2: "200" + g_field3: "300" + - g_field1: "100" + g_field2: "200" + g_field3: "300" + lumpapply: true + 書類の差し戻し: + value: + wf_type: 3 + wf_comment: 記載内容不備 + wf_backstep: 1 + form_name: フォーム01 + route_code: route01 + lumpapply: true + 電帳法対対象の承認完了書類更新: + value: + form_code: form01 + route_code: route01 + datas: + - page_no: 1 + fields: + field1: 件名 + field2: "12345" + group1: + - g_field1: "100" + g_field2: "200" + g_field3: "300" + - g_field1: "100" + g_field2: "200" + g_field3: "300" + lumpapply: true + reason: 記載内容修正 + + # -------------------------------------------------------------------------------------------------- + + PostCommentsRequest: + content: + application/json: + schema: + required: + - content + - attentionflg + type: object + properties: + content: + description: コメント内容 + type: string + example: コメントを追加します。 + attentionflg: + description: | + 重要コメントフラグ + * 0:通常コメント + * 1:重要コメント + type: integer + example: 1 + + # -------------------------------------------------------------------------------------------------- + + PatchCommentsRequest: + content: + application/json: + schema: + type: object + properties: + content: + description: | + コメント内容 + type: string + example: 更新コメント + attentionflg: + description: | + 重要コメントフラグ + * 0:通常コメント + * 1:重要コメント + type: integer + example: 1 + + # -------------------------------------------------------------------------------------------------- + + PutMasterDataRequest: + content: + application/json: + schema: + required: + - data + type: object + properties: + overwrite: + description: | + 上書きフラグ
+ 簡易マスタデータをインポートデータに置き換えるかを指定します。
+ true:インポートデータに置き換える。
+ false:置き換えずにインポートデータを追加する。
+ デフォルトは false です。 + type: boolean + example: true + data: + description: | + インポートデータ
+ インポートするデータを code(itemcd)、value(itemval)で指定します。 + allOf: + - $ref: "#/components/schemas/simplemaster_data" + - example: + - code: name + value: 田中 + - code: age + value: 25 + - code: height + value: 170.31 + + # -------------------------------------------------------------------------------------------------- + + PostWebhookInsertRequest: + content: + application/json: + schema: + required: + - url + type: object + properties: + url: + description: | + 送信先URL
+ Webhook 送信先の URL を指定する。
+ 無効な URL が指定された場合はエラーが返される。 + type: string + example: https://example.com/webhook/post + remarks: + description: 備考 + type: string + example: Webhook 設定登録 + + # -------------------------------------------------------------------------------------------------- + + PatchWebhookUpdateRequest: + content: + application/json: + schema: + required: + - fqdn + type: object + properties: + fqdn: + description: | + FQDN
+ 更新したい Webhook 設定の Webhook 送信先 FQDN を指定します。
+ FQDN 例:example.com + type: string + example: example.com + url: + description: | + 送信先URL
+ Webhook 送信先の URL を指定する。
+ 無効な URL が指定された場合はエラーが返される。 + type: string + example: https://example.com/webhook/post + remarks: + description: 備考 + type: string + example: Webhook 設定登録 + + # -------------------------------------------------------------------------------------------------- + + PutApprovalsHiddenRequest: + content: + application/json: + schema: + required: + - hidden + - docid + type: object + properties: + hidden: + description: | + 非表示設定フラグ
+ true :指定した承認完了書類を非表示状態に設定
+ false:指定した承認完了書類を表示状態に設定 + type: boolean + example: true + docid: + description: | + 書類ID配列
+ 非表示/表示に設定する承認完了書類の書類 ID を指定する。
+
+ **注意事項**
+ * docid 配列に承認状況が承認完了以外の書類 ID を指定した場合はエラー応答が返されます。 + example: + - 100 + - 101 + - 102 + - 103 + proxy_user: + description: | + 代理承認者ユーザCD
+ 代理承認した承認完了書類を非表示/表示設定する場合に指定する。 + type: string + example: u001 + + # -------------------------------------------------------------------------------------------------- + + PostSearchDocumentsRequest: + description: | + リクエストボディに検索条件を指定します。
+ リクエストボディを指定しない場合や、空オブジェクトを指定した場合は全書類がヒットします。 + content: + application/json: + schema: + allOf: + - $ref: "#/components/schemas/PostSearchDocumentsRequest" + examples: + 件名指定: + description: 件名1、件名2に「経費申請」が含まれる書類を検索 + value: + title: 経費申請 + フォーム指定: + description: フォーム名に「経費申請書」が含まれる書類を検索 + value: + form_name: 経費申請書 + 申請者指定: + description: | + 申請者のユーザCDが「u001」な書類を検索
+ type には「user」(ユーザ)または「group」(ユーザグループ)を指定します。
+ code にはユーザコードまたはユーザグループコードを指定します。 + value: + writer_list: + - type: user + code: u001 + 過去期間指定: + description: | + 書類の申請日が現在から20日前以内の書類を検索 + * date_type (日付条件)
+ 「cr_dt」(新規更新日)または「up_dt」(最終更新日)を指定します。 + * dt_cond_type (日付複合条件)
+ 「0」(過去期間指定)または「1」(日付直接指定)を指定します。 + * date_span (過去期間)
+ dt_cond_typeが0(過去期間指定)の時に過去期間を指定します。 + * span_type (過去期間種別)
+ dt_cond_typeが0(過去期間指定)の時に指定します。
+ 「0」(N日前)または「1」(Nか月前)を指定します。 + value: + date_type: cr_dt + dt_cond_type: 0 + date_span: 20 + span_type: 0 + 日付直接指定: + description: | + 書類の申請日が「2022/01/01」から「2023/12/31」の書類を検索 + * date_type (日付条件)
+ 「cr_dt」(新規更新日)または「up_dt」(最終更新日)を指定します。 + * dt_cond_type (日付複合条件)
+ 「0」(過去期間指定)または「1」(日付直接指定)を指定します。 + * lower_year (開始年) + * lower_month (開始月) + * lower_day (開始日)
+ dt_cond_typeが1(日付直接指定)の場合に開始年・月・日を指定します。 + * upper_year (終了年) + * upper_month (終了月) + * upper_day (終了日)
+ dt_cond_typeが1(日付直接指定)の場合に終了年・月・日を指定します。 + value: + date_type: cr_dt + dt_cond_type: 1 + lower_year: 2022 + lower_month: 1 + lower_day: 1 + upper_year: 2023 + upper_month: 12 + upper_day: 31 + 数値条件指定: + description: | + 書類の金額フィールドの値が1000以上 5000以下の書類を検索 + * fgid (フォームグループID)
+ 検索対象フィールドのフォームが所属するフォームグループのIDを指定します。
+ 数値条件、文字列条件を指定する場合は必須です。 + * fid (フォームID)
+ 検索対象フィールドが存在するフォームのIDを指定します。
+ 数値条件、文字列条件を指定する場合は必須です。 + * int_col_name1 (数値条件列1) + * int_col_name2 (数値条件列2) + * int_col_name3 (数値条件列3)
+ col_name (対象列名) に検索対象のフィールドIDを指定します。
+ page_no (ページ番号) は検索対象のフィールドが複数枚フォームの2ページ目以降に存在する場合にページ番号を指定します。
+ 単数枚フォームや複数枚フォームの1ページ目に存在するフィールドIDを指定する場合は省略可能です。 + * int_and_or1 (数値条件区分1) + * int_and_or2 (数値条件区分2)
+ 複数の数値条件を指定する場合に「and」もしくは「or」を指定します。 + * int_data1 (数値条件1) + * int_data2 (数値条件2) + * int_data3 (数値条件3)
+ 条件とする数値を指定します。 + * compare_type1 (比較区分1) + * compare_type2 (比較区分2) + * compare_type3 (比較区分3)
+ 数値条件の比較区分を指定します。 + * 1:と等しい + * 2:より大きい + * 3:と同じか大きい + * 4:より小さい + * 5:と同じか小さい + value: + fgid: 1 + fid: 1 + int_col_name1: + page_no: 1 + col_name: money + int_col_name2: + page_no: 1 + col_name: money + int_and_or1: and + int_data1: 1000 + int_data2: 5000 + compare_type1: 3 + compaer_type2: 5 + 文字列条件指定: + description: | + 書類の商品コードフィールドの値が「A0001」または「B0001」の書類を検索 + * fgid (フォームグループID)
+ 検索対象フィールドのフォームが所属するフォームグループのIDを指定します。
+ 数値条件、文字列条件を指定する場合は必須です。 + * fid (フォームID)
+ 検索対象フィールドが存在するフォームのIDを指定します。
+ 数値条件、文字列条件を指定する場合は必須です。 + * char_col_name1 (文字列条件列1) + * char_col_name2 (文字列条件列2) + * char_col_name3 (文字列条件列3)
+ col_name (対象列名) に検索対象のフィールドIDを指定します。
+ page_no (ページ番号) は検索対象のフィールドが複数枚フォームの2ページ目以降に存在する場合にページ番号を指定します。
+ 単数枚フォームや複数枚フォームの1ページ目に存在するフィールドIDを指定する場合は省略可能です。 + * char_and_or1 (文字列条件区分1) + * char_and_or2 (文字列条件区分2)
+ 複数の文字列条件を指定する場合に「and」もしくは「or」を指定します。 + * char_data1 (文字列条件1) + * char_data2 (文字列条件2) + * char_data3 (文字列条件3)
+ 条件とする文字列を指定します。 + value: + fgid: 1 + fid: 1 + char_col_name1: + page_no: 1 + col_name: product_code + char_col_name2: + page_no: 1 + col_name: product_code + char_and_or1: or + char_data1: A0001 + char_data2: B0001 + コメント指定: + description: | + 勝 太郎(ユーザコード:u001)が発言した重要コメントの内、コメント内容に「修正」が含まれる書類を検索 + * comment_flg (コメントフラグ) + * 0:条件なし + * 1:コメントあり + * 2:コメントなし + * comment_content (コメント内容)
+ コメントの文字列を指定します。(部分一致) + * comment_writercd (発言者CD)
+ コメントを発言したユーザのユーザコードを指定します。 + * comment_attentionflg (重要コメントフラグ)
+ * 0:すべてのコメント + * 1:重要コメントのみ + value: + comment_flg: 1 + comment_content: 修正 + comment_writercd: u001 + comment_attentionflg: 1 + 添付ファイル指定: + description: | + 添付ファイル名または添付ファイルの備考に「test.txt」が含まれる書類を検索 + * attach_flg (添付ファイルフラグ) + * 0:条件なし + * 1:添付あり + * 2:添付なし + * attach_name (コメント内容)
+ 添付ファイル名、備考の文字列を指定します。(部分一致) + value: + attach_flg: 1 + attach_name: test.txt + 並び替え指定: + description: | + 検索結果を件名1の降順に並び替え + * order (並び替え条件)
+ 指定した以下の項目で並び替えを行います。
+ 項目の先頭に「-」を指定した場合は降順に、項目のみ指定した場合は昇順に並び替えます。
+ 並び替え条件を指定しない場合は更新日時の降順で並び替えます。
+ 並び替え条件の指定方法についてはマニュアル[「2.9.2 並び替え」](./doc/manual.html#292-並び替え)をご参照ください。 + * docid:書類ID + * title1:件名1 + * title2:件名2 + * form_code:フォームコード + * form_name:フォーム名称 + * route_code:承認ルートコード + * route_name:承認ルート名称 + * stat:承認状況 + * step:ステップ番号 + * update_datetime:更新日時 + * write_datetime:申請日時 + * writer:申請者 + value: + order: -title1 + 複数項目指定: + value: + docid: + min: 1 + max: 1 + title: 経費申請 + form_group: + name: 営業部 + form_name: 経費申請書 + stats: + - 1 + current_step: + stepno: 1 + writer_list: + - type: user + code: u001 + date_type: up_dt + dt_cond_type: 1 + lower_year: 2022 + lower_month: 1 + lower_day: 1 + upper_year: 2023 + upper_month: 12 + upper_day: 31 + fgid: 100 + fid: 100 + int_col_name1: + page_no: 1 + col_name: id + int_col_name2: + page_no: 1 + col_name: day + int_col_name3: + page_no: 1 + col_name: money + int_and_or1: or + int_and_or2: or + int_data1: 100 + int_data2: 15 + int_data3: 0 + compare_type1: 1 + compare_type2: 1 + compare_type3: 2 + char_col_name1: + page_no: 1 + col_name: name + char_col_name2: + page_no: 1 + col_name: code + char_col_name3: + page_no: 1 + col_name: text + char_and_or1: or + char_and_or2: or + char_data1: 田中 + char_data2: code01 + char_data3: 営業 + comment_flg: 1 + comment_content: 添付あり + comment_writercd: u002 + comment_attentionflg: 0 + attach_flg: 1 + attach_name: 領収書 + order: -docid + + # -------------------------------------------------------------------------------------------------- + + PostCreateDocumentsRequest: + description: | + **注意事項** + * 表示する書類ビューに事前添付できるファイルは 1 つまでになります。 + * file_name に設定するファイル名が日本語を含む場合は、UTF-8 でエンコードした内容を設定する必要があります。 + * 「detail_no」「evidence_type」は、電帳法対応オプションで添付型を設定したフォームにファイルを事前添付する時に指定する項目です。 + 電帳法対応オプションでデータ保存を設定していないフォームや電帳法対応オプションで X-point 内作成型を設定したフォームの場合は指定する必要はありません。 + content: + multipart/form-data: + schema: + required: + - routecd + type: object + properties: + fcd: + description: | + フォームコード
+ フォームコードかフォーム名称の何れかをクエリパラメータに指定します。
+ どちらも指定されている場合はフォーム名称と一致するフォームで REST API が実行されます。 + type: string + example: form01 + formname: + description: フォーム名称 + type: string + example: フォーム01 + routecd: + allOf: + - $ref: "#/components/schemas/route_code" + type: string + example: route01 + fromdocid: + description: 関連元書類ID + type: integer + example: "1" + proxy_user: + description: 代理申請者ユーザCD + type: string + example: u001 + datas: + description: | + 書類データ
+ 書類ビュー表示時にフィールドに事前入力する場合は指定。
+ フォームの構成によって異なります。 + type: string + file: + description: | + アップロードファイル情報
+ 書類ビュー表示時に事前に添付ファイルを登録したい場合は指定。
+ アップロードファイル名は拡張子を含めて指定する。 + type: string + format: binary + file_name: + description: | + アップロードファイル名
+ 書類ビュー表示時に事前に添付ファイルを登録したい場合は指定。
+ アップロードファイル名は拡張子を含めて指定する。 + type: string + example: sample.txt + remarks: + description: | + アップロードファイル備考
+ 書類ビュー表示時に事前に添付ファイルを登録したい場合は指定。
+ アップロードファイル名は拡張子を含めて指定する。 + type: string + example: test + detail_no: + description: | + アップロードファイル対応明細行No
+ 電帳法対応オプションの添付型フォームかつフォームに明細行が存在する場合に、アップロードファイルに対応する明細行を指定します。
+ 電帳法書類区分で「1:電子取引」を指定した場合は 1 以上の整数の指定が必須です。
+ デフォルトは 0 です。 + type: integer + example: "1" + evidence_type: + description: | + アップロードファイル対応明細行No
+ 電帳法対応オプションの添付型フォームの場合に、アップロードファイルの電帳法書類区分を指定します。
+ 以下いずれかの整数が指定可能で、デフォルトは「1:電子取引」です。
+ 0:その他
+ 1:電子取引 + type: integer + example: "1" + + # -------------------------------------------------------------------------------------------------- + + PostAddAttachmentsRequest: + description: | + **注意事項** + * 一度に追加できるファイルは 1 つまでになります。 + * 添付ファイルのファイルサイズ制限は設けていませんが、ファイルサイズが大きいファイルを追加する場合はX-pointの応答速度に影響を与える可能性があります。 + * 「detail_no」「evidence_type」は、電帳法対応オプションで添付型を設定したフォームの書類にファイルを添付する時に指定する項目です。
+ 電帳法対応オプションでデータ保存を設定していないフォームや電帳法対応オプションで X-point 内作成型を設定したフォームの場合は指定する必要はありません。 + content: + multipart/form-data: + schema: + required: + - user_code + - file + - file_name + type: object + properties: + user_code: + description: | + ユーザコード
+ X-point に登録されていないユーザのユーザコードを指定した場合は、認証したユーザで添付ファイルが追加されます。 + type: string + example: u001 + file: + description: アップロードファイル情報 + type: string + format: binary + file_name: + description: | + アップロードファイル名
+ 拡張子を含んだファイル名を指定 + type: string + example: サンプル.txt + remarks: + description: 備考 + type: string + example: テスト + overwrite: + description: | + 上書きフラグ
+ 既に添付されているファイルと同じファイル名称のファイルを添付する場合に、新しい添付ファイルに上書きするか否かを指定します。デフォルトは true です。
+ true:同名ファイルを上書きして添付する。
+ false:同名ファイルを別ファイルとして添付する。
+ type: boolean + example: "true" + reason: + description: | + 更新理由
+ 新しい添付ファイルに上書きする場合に、上書きする理由を指定します。
+ 電帳法対応オプションのデータ保存対象フォームで添付ファイルを上書きする場合は指定必須です。 + type: string + example: テスト + detail_no: + description: | + 対応明細行No
+ 電帳法対応オプションの添付型フォームの書類かつフォームに明細行が存在する場合に、追加するファイルに対応する明細行を指定します。
+ 電帳法書類区分で「1:電子取引」を指定した場合は 1 以上の整数の指定が必須です。
+ デフォルトは 0 です。 + type: integer + example: "1" + evidence_type: + description: | + 電帳法書類区分
+ 電帳法対応オプションの添付型フォームの書類の場合に、追加するファイルの電帳法書類区分を指定します。
+ 以下いずれかの整数が指定可能で、デフォルトは「1:電子取引」です。
+ 0:その他
+ 1:電子取引 + type: integer + example: "1" + + # -------------------------------------------------------------------------------------------------- + + PatchUpdateAttachmentsRequest: + description: | + **注意事項** + * 一度に更新できるファイルは 1 つまでになります。 + * 添付ファイルのファイルサイズ制限は設けていませんが、ファイルサイズが大きいファイルを追加する場合はX-pointの応答速度に影響を与える可能性があります。 + * 「detail_no」「evidence_type」は、電帳法対応オプションで添付型を設定したフォームの添付ファイルを更新する時に指定できる項目です。
+ 電帳法対応オプションでデータ保存を設定していないフォームや電帳法対応オプションで X-point 内作成型を設定したフォームの場合は指定する必要はありません。 + content: + multipart/form-data: + schema: + required: + - user_code + type: object + properties: + delete: + description: | + 削除フラグ
+ 添付ファイルの更新/削除を指定します。
+ デフォルトは false(更新)です。
+ true:添付ファイル削除
+ false:添付ファイル更新 + type: boolean + example: "false" + user_code: + description: | + ユーザコード
+ X-point に登録されていないユーザのユーザコードを指定した場合は、認証したユーザで添付ファイルが追加されます。 + type: string + example: u001 + file: + description: | + アップロードファイル情報
+ ファイルを更新せず備考のみ更新したい場合は指定なし。 + type: string + format: binary + file_name: + description: | + アップロードファイル名
+ 拡張子を含んだファイル名を指定する。
+ アップロードファイル情報を指定する場合は必須です。 + type: string + example: sample.pdf + remarks: + description: 備考 + type: string + example: テスト + reason: + description: | + 更新理由
+ 更新/削除する理由を指定します。
+ 電帳法対応オプションのデータ保存対象フォームの場合は指定必須です。 + type: string + example: テスト + detail_no: + description: | + 対応明細行No
+ 電帳法対応オプションの添付型フォームの書類かつフォームに明細行が存在する場合に、ファイルに対応する明細行を指定します。 + type: integer + example: "1" + evidence_type: + description: | + 電帳法書類区分
+ 電帳法対応オプションの添付型フォームの書類の場合に、ファイルの電帳法書類区分を指定します。
+ 以下いずれかの整数が指定可能です。
+ 0:その他
+ 1:電子取引
+ type: integer + example: "1" + + # -------------------------------------------------------------------------------------------------- + + PostUserMasterUpdateRequest: + content: + multipart/form-data: + schema: + required: + - file + type: object + properties: + file: + description: | + アップロードファイル
+ ユーザ固有マスタのインポートに利用する CSV ファイルを指定します。 + type: string + format: binary + overwrite: + description: | + 上書きフラグ
+ インポートに利用する CSV ファイルが既にアップロードされている場合に、ファイルを上書きするか指定します。
+ true:上書きする
+ false:上書きしない
+ デフォルトは false です。
+ type: boolean + example: "false" + + # -------------------------------------------------------------------------------------------------- + + ScimUserRequest: + content: + application/scim+json: + schema: + required: + - userName + - displayName + - password + - urn:atled:scim:schemas:1.0:User + type: object + properties: + userName: + description: ログインID + type: string + example: u001 + displayName: + description: 氏名 + type: string + example: 田中 + name: + description: 氏名情報 + type: object + properties: + formatted: + description: 氏名 + type: string + example: 田中 + active: + description: | + ログイン拒否
+ true:ログイン拒否する。
+ false:ログイン拒否しない。
+ デフォルトは false です。 + type: boolean + example: false + password: + description: パスワード + type: string + example: tanaka001 + emails: + description: メールアドレス情報 + type: array + items: + type: object + properties: + value: + description: メールアドレス + type: string + example: scim@example.com + type: + description: | + メールタイプ
+ 未使用項目のため指定する必要はありません。 + type: string + example: "" + primary: + description: | + 優先フラグ
+ 未使用項目のため指定する必要はありません。 + type: boolean + example: true + urn:atled:scim:schemas:1.0:User: + description: X-point 拡張属性 + type: object + required: + - userCode + properties: + userCode: + description: ユーザCD + type: string + example: u001 + kana: + description: 氏名カナ + type: string + example: タナカ + groups: + description: 所属グループ情報 + type: array + items: + type: object + properties: + value: + description: | + ユーザグループ ID
+ ユーザグループ ID またはユーザグループ CDのいずれか指定必須。
+ どちらも指定されている場合はユーザグループ ID が優先されます。 + type: string + example: 100 + groupCode: + description: ユーザグループCD + type: string + example: group01 + primary: + description: 優先フラグ + type: boolean + example: true + partCode: + description: | + 役職CD
+ partCode と part.partCode のどちらも指定されている場合は partCode が優先されます。 + type: string + example: part01 + part: + description: 役職情報 + type: object + properties: + partCode: + description: 役職CD + type: string + example: part01 + itemValues: + description: 予備項目情報 + type: array + items: + required: + - no + type: object + properties: + no: + description: 予備項目番号 + type: integer + example: 1 + value: + description: 予備項目内容 + type: string + example: 予備1 + remark: + description: 備考 + type: string + example: 備考 + + # -------------------------------------------------------------------------------------------------- + + PatchUpdateUserRequest: + content: + application/scim+json: + schema: + allOf: + - $ref: "#/components/schemas/PatchUpdateUserRequest" + examples: + 置換(replace): + description: ログイン ID と予備項目5を指定した値に置換する + value: + schemas: + - urn:ietf:params:scim:api:messages:2.0:PatchOp + Operations: + - path: "" + op: replace + value: + userName: u001 + - path: urn:atled:scim:schemas:1.0:User.itemValues[no eq 5] + op: replace + value: + no: 5 + value: 99999 + 追加(add): + description: | + 指定した所属ユーザグループと予備項目を追加する
+
+ **注意事項**
+ * 追加(add)の操作はリソース内の配列の項目にのみ行うことができます。
+ 配列以外の項目に追加(add)の操作を行った場合はエラーレスポンスが返されます。 + value: + schemas: + - urn:ietf:params:scim:api:messages:2.0:PatchOp + Operations: + - path: urn:atled:scim:schemas:1.0:User.groups + op: add + value: + groupCode: group01 + primary: true + partCode: part01 + - path: urn:atled:scim:schemas:1.0:User.itemValues + op: add + value: + no: 10 + value: 99999 + 削除(remove): + description: | + メールアドレスと予備項目10を削除する
+
+ **注意事項**
+ * 削除(remove)の操作はリソースの必須項目(userName や displayName)に対して行うことはできません。
+ 必須指定の項目に削除(remove)の操作を行った場合はエラーレスポンスが返されます。 + value: + schemas: + - urn:ietf:params:scim:api:messages:2.0:PatchOp + Operations: + - path: emails + op: remove + - path: urn:atled:scim:schemas:1.0:User.itemValues[no eq 10] + op: remove + 指定した値に置き換える: + description: ユーザCDを置き換える + value: + userName: u001 + urn:atled:scim:schemas:1.0:User: + userCode: u001 + + # -------------------------------------------------------------------------------------------------- + + ScimGroupRequest: + content: + application/scim+json: + schema: + required: + - displayName + - urn:atled:scim:schemas:1.0:Group + type: object + properties: + displayName: + description: ユーザグループ名称 + type: string + example: 営業部 + members: + description: 所属ユーザ情報 + allOf: + - $ref: "#/components/schemas/members_iteme" + - example: + - value: "100" + urn:atled:scim:schemas:1.0:GroupMember: + usercode: u001 + partCode: part01 + part: + partCode: part01 + - value: "101" + urn:atled:scim:schemas:1.0:GroupMember: + usercode: u002 + partCode: part02 + part: + partCode: part02 + urn:atled:scim:schemas:1.0:Group: + description: X-point 拡張属性(ユーザグループ) + required: + - groupCode + type: object + properties: + groupCode: + description: グループCD + type: string + example: group01 + displayKana: + description: ユーザグループ名称カナ + type: string + example: エイギョウブ + parentGroup: + description: 親グループ情報 + type: object + properties: + value: + description: | + 親グループID
+ value と groupCode のどちらも指定されている場合は value が優先されます。 + type: string + example: 105 + groupCode: + description: 親グループCD + type: string + example: group02 + + # -------------------------------------------------------------------------------------------------- + + PutUpdateUserGroupInfoRequest: + content: + application/scim+json: + schema: + required: + - displayName + - urn:atled:scim:schemas:1.0:Group + type: object + properties: + displayName: + description: ユーザグループ名称 + type: string + example: 開発部 + members: + description: 所属ユーザ情報 + allOf: + - $ref: "#/components/schemas/members_iteme" + - example: + - value: 100 + urn:atled:scim:schemas:1.0:GroupMember: + usercode: u001 + partCode: part01 + part: + partCode: part01 + - value: 101 + urn:atled:scim:schemas:1.0:GroupMember: + usercode: u002 + partCode: part02 + part: + partCode: part02 + urn:atled:scim:schemas:1.0:Group: + description: X-point 拡張属性(ユーザグループ) + required: + - groupCode + type: object + properties: + groupCode: + description: グループCD + type: string + example: group01 + displayKana: + description: ユーザグループ名称カナ + type: string + example: カイハツブ + parentGroup: + description: 親グループ情報 + type: object + properties: + value: + description: | + 親グループID
+ value と groupCode のどちらも指定されている場合は value が優先されます。 + type: string + example: 102 + groupCode: + description: 親グループCD + type: string + example: group02 + + # -------------------------------------------------------------------------------------------------- + + PatchUpdateUserGroupInfoRequest: + content: + application/scim+json: + schema: + required: + - schemas + allOf: + - $ref: "#/components/schemas/PatchUpdateUserGroupInfoRequest" + examples: + 置換(replace): + description: | + ユーザグループ名称を指定した値に置換する
+ 所属ユーザ(ユーザ ID:1000)を指定したユーザ(ユーザ ID:1001)に置換する + value: + schemas: + - urn:ietf:params:scim:api:messages:2.0:PatchOp + Operations: + - path: "" + op: replace + value: + displayName: 営業部 + - path: members[value eq 1000] + op: replace + value: + value: 1001 + urn:atled:scim:schemas:1.0:GroupMember: + part: + partCode: part01 + 追加(add): + description: | + ユーザ CD:u003 のユーザを所属ユーザに追加する
+
+ **注意事項**
+ * 追加(add)の操作はリソース内の配列の項目にのみ行うことができます。
+ 配列以外の項目に追加(add)の操作を行った場合はエラーレスポンスが返されます。 + value: + schemas: + - urn:ietf:params:scim:api:messages:2.0:PatchOp + Operations: + - path: members + op: add + value: + urn:atled:scim:schemas:1.0:GroupMember: + userCode: u003 + part: + partCode: part01 + 削除(remove): + description: | + 親グループ設定と所属ユーザからユーザ ID:1003 のユーザを削除する
+
+ ※ 削除(remove)の操作はリソースの必須項目(displayName や groupCode)に対して行うことはできません。
+   必須指定の項目に削除(remove)の操作を行った場合はエラーレスポンスが返されます。 + value: + schemas: + - urn:ietf:params:scim:api:messages:2.0:PatchOp + Operations: + - path: urn:atled:scim:schemas:1.0:Group.parentGroup + op: remove + - path: members[value eq 1003] + op: remove + 指定した値に置き換える: + description: グループCDと表示名称カナを置き換える + value: + urn:atled:scim:schemas:1.0:Group: + groupCode: group02 + displayKana: エイギョウブ + + # -------------------------------------------------------------------------------------------------- + + ScimPartRequest: + content: + application/scim+json: + schema: + required: + - displayName + - partCode + type: object + properties: + displayName: + description: 役職名称 + type: string + example: 一般 + displayKana: + description: 役職名称カナ + type: string + example: イッパン + partCode: + description: 役職CD + type: string + example: part01 + orderNo: + description: 並び順 + type: integer + example: 1 + + # -------------------------------------------------------------------------------------------------- + + PatchUpdatePartInfoRequest: + description: | + **注意事項**
+ * 役職リソースは配列項目が存在しない為、追加(add)の更新操作はできません。 + content: + application/scim+json: + schema: + allOf: + - $ref: "#/components/schemas/PatchUpdatePartInfoRequest" + examples: + 置換(replace): + description: 役職名称と役職 CD を指定した値に置換する + value: + schemas: + - urn:ietf:params:scim:api:messages:2.0:PatchOp + Operations: + - path: "" + op: replace + value: + displayName: 代表取締役 + partCode: p001 + 削除(remove): + description: 役職情報カナを削除する + value: + schemas: + - urn:ietf:params:scim:api:messages:2.0:PatchOp + Operations: + - path: displayKana + op: remove + 指定した値に置き換える: + description: 表示名称と役職CDを置き換える + value: + displayKana: ダイヒョウトリシマリヤク + partCode: p001 + + # ----------------------------------------------- + # レスポンス components/responses + # ----------------------------------------------- + + responses: + ErrorResponses400: + description: "Error response" + content: + application/json: + schema: + allOf: + - $ref: "#/components/schemas/ErrorResponse" + - type: object + properties: + error_code: + example: 400 + + ErrorResponses401: + description: "Error response" + content: + application/json: + schema: + allOf: + - $ref: "#/components/schemas/ErrorResponse" + - type: object + properties: + error_code: + example: 401 + + ErrorResponses403: + description: "Error response" + content: + application/json: + schema: + allOf: + - $ref: "#/components/schemas/ErrorResponse" + - type: object + properties: + error_code: + example: 403 + + ErrorResponses404: + description: "Error response" + content: + application/json: + schema: + allOf: + - $ref: "#/components/schemas/ErrorResponse" + - type: object + properties: + error_code: + example: 404 + + ErrorResponses500: + description: "Error response" + content: + application/json: + schema: + type: object + properties: + error_code: + type: integer + example: 500 + error_message: + type: string + example: "{エラーメッセージ}" + reasons: + type: string + example: ["{エラーメッセージ}"] + + ErrorResponses500_noReasons: + description: "Error response" + content: + application/json: + schema: + allOf: + - $ref: "#/components/schemas/ErrorResponse" + - type: object + properties: + error_code: + example: 500 + + ScimErrorResponse400: + description: "Error response" + content: + application/scim+json: + schema: + allOf: + - $ref: "#/components/schemas/ScimErrorResponse" + - type: object + properties: + status: + example: 400 + + ScimErrorResponse401: + description: "Error response" + content: + application/scim+json: + schema: + allOf: + - $ref: "#/components/schemas/ScimErrorResponse" + - type: object + properties: + status: + example: 401 + + ScimErrorResponse404: + description: "Error response" + content: + application/scim+json: + schema: + allOf: + - $ref: "#/components/schemas/ScimErrorResponse" + - type: object + properties: + status: + example: 404 + + # -------------------------------------------------------------------------------------------------- + + PostDocumentResponses200: + description: Successful response + content: + application/json: + schema: + type: object + properties: + docid: + description: 書類ID + type: integer + example: 999 + message_type: + description: メッセージタイプ(3:INFO 固定) + type: integer + example: 3 + message: + description: メッセージ内容 + type: string + example: 書類が提出されました (ID = 999) + + # -------------------------------------------------------------------------------------------------- + + PatchDocumentResponses200: + description: Successful response + content: + application/json: + schema: + type: object + properties: + docid: + description: 書類ID + type: integer + example: 999 + message_type: + description: メッセージタイプ(3:INFO 固定) + type: integer + example: 3 + message: + description: メッセージ内容 + type: string + example: 書類が承認されました (ID = 999) + + # -------------------------------------------------------------------------------------------------- + + GetDocumentResponses200: + description: Successful response + content: + application/json: + schema: + type: object + properties: + document: + type: object + properties: + docid: + description: 書類ID + type: integer + example: 999 + title1: + description: 件名1 + type: string + example: 件名 + title2: + description: 件名2 + type: string + example: 件名2 + form: + allOf: + - $ref: "#/components/schemas/doc_form" + route: + description: | + 承認ルート情報
+ 通常フォームの場合は応答に承認ルートコードと承認ルート名称は含まれません。 + type: object + properties: + code: + description: 承認ルートコード + type: string + example: route01 + name: + description: 承認ルート名称 + type: string + example: 営業部ルート + writer: + description: 申請情報 + type: object + properties: + user: + description: 申請者情報 + type: object + properties: + code: + description: 申請者ユーザコード + type: string + example: u001 + name: + description: 申請者ユーザ名 + type: string + example: 田中 + stampname: + description: 申請者印影名 + type: string + example: 田 + group: + description: 申請ユーザグループ情報 + type: object + properties: + code: + description: 申請ユーザグループコード + type: string + example: group01 + name: + description: 申請ユーザグループ名称 + type: string + example: 営業部 + proxy: + description: | + 代理申請者情報 + 代理申請していない書類の場合は、応答に代理申請者のユーザコードとユーザ名は含まれません。 + type: object + properties: + code: + description: 代理申請者ユーザコード + type: string + example: u002 + name: + description: 代理申請者ユーザ名 + type: string + example: 佐藤 + datetime: + description: 申請日時 + type: string + example: 2023/01/01 12:00:00 + lastaprv: + description: 最終承認者情報 + type: object + properties: + user: + description: 承認者情報 + type: object + properties: + code: + description: 最終承認者ユーザコード + type: string + example: u003 + name: + description: 最終承認者ユーザ名 + type: string + example: 加藤 + stampname: + description: 最終承認者印影名 + type: string + example: 加 + datetime: + description: ワークフロー操作日時 + type: string + example: 2023/01/01 12:00:00 + step: + allOf: + - $ref: "#/components/schemas/step" + version: + description: 版数 + type: integer + example: 3 + status: + allOf: + - $ref: "#/components/schemas/status" + pages: + type: array + items: + type: object + properties: + page_no: + description: ページ番号 + type: integer + example: 1 + fields: + description: | + 書類データ
+ fields内のキーはフィールドIDを指定するため、フォーム毎に異なります。 + type: object + properties: + field1: + type: string + example: 件名 + field2: + type: string + example: "12345" + group1: + type: array + items: + type: object + properties: + g_field1: + type: integer + example: 100 + g_field2: + type: string + example: テキスト + g_field3: + type: string + example: テキスト + attachments: + allOf: + - $ref: "#/components/schemas/attachments" + - example: + - content_type: text/csv + seq: 1234 + name: filename.csv + size: 684 + remarks: CSV data1 + - content_type: text/csv + seq: 1235 + name: filename2.csv + size: 12345 + remarks: CSV data2 + comments: + type: array + items: + type: object + properties: + writer: + description: コメント登録者情報 + type: object + properties: + code: + description: コメント登録者ユーザコード + type: string + example: u001 + name: + description: コメント登録者ユーザ名 + type: string + example: 田中 + date: + description: コメント登録日時 + type: string + example: 2023/01/01 12:00:00 + update: + description: コメント更新者情報 + type: object + properties: + code: + description: コメント更新者ユーザコード + type: string + example: u002 + name: + description: コメント更新者ユーザ名 + type: string + example: 佐藤 + date: + description: コメント更新日時 + type: string + example: 2023/01/01 12:00:00 + content: + description: コメント内容 + type: string + example: コメント本文 + flags: + description: | + コメントタイプ + * back:差し戻しコメントまたは却下コメント + * attention:重要コメント + type: array + items: + type: string + example: back + relations: + allOf: + - $ref: "#/components/schemas/relations" + - example: + - docid: 999 + title1: 件名 + title2: 件名2 + form_name: 経費申請書 + - docid: 999 + title1: 件名 + title2: 件名2 + form_name: 経費申請書 + + # -------------------------------------------------------------------------------------------------- + + DeleteDocumentResponses200: + description: Successful response + content: + application/json: + schema: + type: object + properties: + docid: + type: integer + example: 999 + message_type: + description: メッセージタイプ(3:INFO 固定) + type: integer + example: 3 + message: + type: string + example: 書類が削除されました (ID = 999) + + # -------------------------------------------------------------------------------------------------- + + PostCommentsResponses200: + description: Successful response + content: + application/json: + schema: + type: object + properties: + docid: + description: 書類ID + type: integer + example: 999 + seq: + description: コメント番号 + type: integer + example: 1 + message_type: + description: メッセージタイプ(3:INFO 固定) + type: integer + example: 3 + message: + description: メッセージ内容 + type: string + example: コメントが追加されました (ID = 999 / seq = 1) + + # -------------------------------------------------------------------------------------------------- + + GetCommentsResponses200: + description: Successful response + content: + application/json: + schema: + allOf: + - $ref: "#/components/schemas/GetCommentsResponses200" + examples: + コメントあり: + value: + docid: 999 + comment_list: + - seqno: 1 + attentionflg: true + content: 重要コメントです + writername: 田中 + writedata: 2023/01/01 12:00:00 + - seqno: 2 + attentionflg: false + content: 通常コメントです + writername: 佐藤 + writedata: 2023/01/01 12:00:00 + コメントなし: + value: + docid: 999 + comment_list: [] + + # -------------------------------------------------------------------------------------------------- + + PatchCommentsResponses200: + description: Successful response + content: + application/json: + schema: + type: object + properties: + docid: + description: 書類ID + type: integer + example: 999 + seq: + description: コメント番号 + type: integer + example: 1 + message_type: + description: メッセージタイプ(3:INFO 固定) + type: integer + example: 3 + message: + description: メッセージ内容 + type: string + example: コメントが更新されました (ID = 999 / seq = 1) + + # -------------------------------------------------------------------------------------------------- + + DeleteCommentsResponses200: + description: Successful response + content: + application/json: + schema: + type: object + properties: + docid: + description: 書類ID + type: integer + example: 999 + seq: + description: コメント番号 + type: integer + example: 1 + message_type: + description: メッセージタイプ(3:INFO 固定) + type: integer + example: 3 + message: + description: メッセージ内容 + type: string + example: コメントが削除されました (ID = 999 / seq = 1) + + # -------------------------------------------------------------------------------------------------- + + GetStatusResponses200: + description: Successful response + content: + application/json: + schema: + allOf: + - $ref: "#/components/schemas/GetStatusResponses200" + examples: + ワークフローフォーム: + value: + document: + docid: 999 + title1: 件名1 + title2: 件名2 + form: + id: 99 + code: form01 + name: 経費申請書 + route: + code: route01 + name: 営業部ルート + type: workflow + status: + code: 1 + name: 承認中 + step: + max: 3 + current: 2 + current_version: 3 + writer: + usercode: u001 + username: 田中 + stampname: 田 + datetime: 2023-01-01 12:00:00 + lastaprv: + usercode: u002 + username: 佐藤 + stampname: 佐 + datetime: 2023-01-01 12:00:00 + flow_versions: + - flow_results: + - stepno: 0 + steptitle: 申請 + aprvusers: + - aprv: + usercode: u001 + username: 田中 + stampname: 田 + datetime: 2023-01-01 12:00:00 + groupcd: group01 + groupname: 営業部 + partcd: part01 + partname: 一般 + statuscode: 0 + status: 申請 + - stepno: 1 + steptitle: 承認 + aprvusers: + - aprv: + usercode: u002 + username: 佐藤 + stampname: 佐 + datetime: 2023-01-01 12:00:00 + groupcd: group01 + groupname: 営業部 + partcd: part02 + partname: 課長 + statuscode: 1 + status: 承認 + cond: AND + cond_num: 1 + adminskip: 0 + skip: 0 + backstepno: 0 + - stepno: 2 + steptitle: 承認 + aprvusers: + - aprv: + usercode: u003 + username: 加藤 + stampname: 加 + datetime: 2023-01-01 12:00:00 + groupcd: group01 + groupname: 営業部 + partcd: part03 + partname: 次長 + statuscode: 0 + status: 未処理 + cond: AND + cond_num: 1 + adminskip: 0 + skip: 0 + backstepno: 0 + - stepno: 3 + steptitle: 承認 + aprvusers: + - aprv: + usercode: u004 + username: 後藤 + stampname: 後 + datetime: 2023-01-01 12:00:00 + groupcd: group02 + groupname: 営業部 + partcd: part04 + partname: 部長 + statuscode: 0 + status: 未処理 + cond: AND + cond_num: 1 + adminskip: 0 + skip: 0 + backstepno: 0 + - stepno: 4 + steptitle: 回覧 + aprvusers: + - aprv: + usercode: u001 + username: 田中 + stampname: 田 + datetime: 2023-01-01 12:00:00 + groupcd: group01 + groupname: 営業部 + partcd: part01 + partname: 一般 + statuscode: 1 + status: 既読 + - aprv: + usercode: u022 + username: 青木 + stampname: 青 + datetime: "" + groupcd: group03 + groupname: 店舗 + partcd: part01 + partname: 一般 + statuscode: 0 + status: 未読 + histories: + [{ + version: 3, + flow_results: + [ + { + stepno: 0, + steptitle: 申請, + aprvusers: + [ + { + aprv: + [{ + usercode: u001, + username: 田中圭太, + stampname: 田中, + datetime: 2023-01-01 12:00:00, + groupcd: group01, + groupname: 営業部, + partcd: part01, + partname: 一般, + }], + statuscode: 0, + status: 申請, + }, + ], + }, + { + stepno: 1, + steptitle: 承認, + aprvusers: + [ + { + aprv: + [{ + usercode: u002, + username: 佐藤哲郎, + stampname: 佐藤, + datetime: 2023-01-01 12:00:00, + groupcd: group01, + groupname: 営業部, + partcd: part02, + partname: 課長, + }], + statuscode: 1, + status: 承認, + }, + ], + cond: AND, + cond_num: 1, + adminskip: 0, + skip: 0, + backstepno: 0, + }, + { + stepno: 4, + steptitle: 総務承認, + aprvusers: + [ + { + aprv: + [{ + usercode: u004, + username: 濱崎貴子, + stampname: 濱崎, + datetime: "", + groupcd: group02, + groupname: 総務課, + partcd: part01, + partname: 一般, + }], + statuscode: 0, + status: 未処理, + }, + { + aprv: + [{ + usercode: u006, + username: 芥川幸三, + stampname: 芥川, + datetime: "", + groupcd: group02, + groupname: 総務課, + partcd: part03, + partname: 部長, + }], + statuscode: 0, + status: 未処理, + }, + ], + cond: AND, + cond_num: 0, + adminskip: 0, + skip: 0, + backstepno: 0, + } + ], + }, + { + version: 2, + flow_results: + [ + { + stepno: 0, + steptitle: 申請, + aprvusers: + [ + { + aprv: + [{ + usercode: u001, + username: 田中圭太, + stampname: 田中, + datetime: 2023-01-01 12:00:00, + groupcd: group01, + groupname: 営業部, + partcd: part01, + partname: 一般, + }], + statuscode: 0, + status: 申請, + }, + ], + }, + { + stepno: 1, + steptitle: 承認, + aprvusers: + [ + { + aprv: + [{ + usercode: u002, + username: 佐藤哲郎, + stampname: 佐藤, + datetime: 2023-01-01 12:00:00, + groupcd: group01, + groupname: 営業部, + partcd: part02, + partname: 課長, + }], + statuscode: 3, + status: 差し戻し, + }, + ], + cond: AND, + cond_num: 1, + adminskip: 0, + skip: 0, + backstepno: 0, + }, + { + stepno: 4, + steptitle: 総務承認, + aprvusers: + [ + { + aprv: + [{ + usercode: u004, + username: 濱崎貴子, + stampname: 濱崎, + datetime: "", + groupcd: group02, + groupname: 総務課, + partcd: part01, + partname: 一般, + }], + statuscode: 0, + status: 未処理, + }, + { + aprv: + [{ + usercode: u006, + username: 芥川幸三, + stampname: 芥川, + datetime: "", + groupcd: group02, + groupname: 総務課, + partcd: part03, + partname: 部長, + }], + statuscode: 0, + status: 未処理, + }, + ], + cond: AND, + cond_num: 0, + adminskip: 0, + skip: 0, + backstepno: 0, + } + ], + }, + { + version: 1, + flow_results: + [ + { + stepno: 0, + steptitle: 申請, + aprvusers: + [ + { + aprv: + [{ + usercode: u001, + username: 田中圭太, + stampname: 田中, + datetime: 2023-01-01 12:00:00, + groupcd: group01, + groupname: 営業部, + partcd: part01, + partname: 一般, + }], + statuscode: 0, + status: 申請, + }, + ], + }, + { + stepno: 1, + steptitle: 承認, + aprvusers: + [ + { + aprv: + [{ + usercode: u002, + username: 佐藤哲郎, + stampname: 佐藤, + datetime: 2023-01-01 12:00:00, + groupcd: group01, + groupname: 営業部, + partcd: part02, + partname: 課長, + }], + statuscode: 3, + status: 差し戻し, + }, + ], + cond: AND, + cond_num: 1, + adminskip: 0, + skip: 0, + backstepno: 0, + }, + { + stepno: 4, + steptitle: 総務承認, + aprvusers: + [ + { + aprv: + [{ + usercode: u004, + username: 濱崎貴子, + stampname: 濱崎, + datetime: "", + groupcd: group02, + groupname: 総務課, + partcd: part01, + partname: 一般, + }], + statuscode: 0, + status: 未処理, + }, + { + aprv: + [{ + usercode: u006, + username: 芥川幸三, + stampname: 芥川, + datetime: "", + groupcd: group02, + groupname: 総務課, + partcd: part03, + partname: 部長, + }], + statuscode: 0, + status: 未処理, + }, + ], + cond: AND, + cond_num: 0, + adminskip: 0, + skip: 0, + backstepno: 0, + } + ], + } + ] + 通常フォーム: + value: + document: + docid: 999 + title1: 件名1 + title2: 件名2 + form: + id: 99 + code: form01 + name: 経費申請書 + route: + code: "" + name: "" + type: standard + status: + code: 0 + name: 下書き + step: + max: 0 + current: 0 + current_version: 1 + writer: + usercode: u001 + username: 田中 + stampname: 田 + datetime: 2023-01-01T12:00:00.000Z + lastaprv: + usercode: "" + username: "" + stampname: "" + datetime: "" + flow_versions: [] + histories: [] + + # -------------------------------------------------------------------------------------------------- + + PostAttachmentsResponses200: + description: Successful response + content: + application/json: + schema: + allOf: + - $ref: "#/components/schemas/PostAttachmentsResponses200" + examples: + X-point に登録されているユーザを指定: + value: + docid: 999 + seq: 1 + message_type: 0 + message: 添付ファイルが追加されました(ID = 999 / Seq = 1) + X-point に登録されていないユーザを指定: + value: + docid: 999 + seq: 1 + message_type: 0 + message: 添付ファイルが追加されました(ID = 999 / Seq = 1) + detail: 指定されたユーザ CD と一致するユーザは登録されていない為、認証ユーザで添付ファイルを追加しました。 + + # -------------------------------------------------------------------------------------------------- + + PatchAttachmentsResponses200: + description: Successful response + content: + application/json: + schema: + allOf: + - $ref: "#/components/schemas/PatchAttachmentsResponses200" + examples: + 添付ファイル更新: + value: + docid: 999 + seq: 1 + message_type: 0 + message: 添付ファイルが更新されました(ID = 999 / Seq = 1) + 添付ファイル削除: + value: + docid: 999 + seq: 1 + message_type: 0 + message: 添付ファイルが削除されました(ID = 999 / Seq = 1) + X-point に登録されていないユーザを指定: + value: + docid: 999 + seq: 1 + message_type: 0 + message: 添付ファイルが更新されました(ID = 999 / Seq = 1) + detail: 指定されたユーザ CD と一致するユーザは登録されていない為、認証ユーザで添付ファイルを追加しました。 + + # -------------------------------------------------------------------------------------------------- + + GetAttachmentsListResponses200: + description: Successful response + content: + application/json: + schema: + allOf: + - $ref: "#/components/schemas/GetAttachmentsListResponses200" + examples: + 添付ファイルあり: + value: + attachments: + - content_type: text/csv + seq: 1 + name: filename.csv + size: 684 + remarks: CSV data1 + - content_type: text/csv + seq: 2 + name: filename2.csv + size: 684 + remarks: CSV data2 + 添付ファイル無し: + value: + attachments: [] + 電帳法対応オプションの添付型フォーム: + value: + attachments: + - content_type: text/csv + seq: 1 + name: filename.csv + size: 684 + remarks: CSV data1 + detail_no: 1 + evidence_type: 1 + evidence_type_label: 電子取引 + - content_type: text/csv + seq: 2 + name: filename2.csv + size: 684 + remarks: CSV data2 + detail_no: 1 + evidence_type: 0 + evidence_type_label: その他 + + # -------------------------------------------------------------------------------------------------- + + GetLumpapplyListResponses200: + description: Successful response + content: + application/json: + schema: + allOf: + - $ref: "#/components/schemas/GetLumpapplyListResponses200" + examples: + 自動申請設定あり: + value: + lumpapply: + - id: 100 + name: 営業部経費申請書作成 + form_id: 100 + form_cd: form01 + form_name: 経費申請書 + route_id: 100 + route_cd: route01 + route_name: 営業部ルート + - id: 101 + name: 人事部経費申請書作成 + form_id: 100 + form_cd: form01 + form_name: 経費申請書 + route_id: 100 + route_cd: route02 + route_name: 人事部ルート + 自動申請設定なし: + value: + lumpapply: [] + + # -------------------------------------------------------------------------------------------------- + + GetLumpapplyResponses200: + description: Successful response + content: + application/json: + schema: + type: object + properties: + lumpapply: + description: 自動申請情報 + type: object + properties: + name: + description: 自動申請登録名称 + type: string + example: 営業部の経費申請書作成 + form: + description: フォーム情報 + type: object + properties: + name: + description: フォーム名称 + type: string + example: 経費申請書 + code: + description: フォームコード + type: string + example: form01 + route: + description: 承認ルート情報 + type: object + properties: + name: + description: ルート名称 + type: string + example: 営業部ルート + code: + description: ルートコード + type: string + example: route01 + import_file: + description: 取込ファイル情報 + type: object + properties: + name: + description: 取込ファイル名称 + type: string + example: input.csv + success: + description: 取込ファイル成功時処理(数値) + type: integer + example: 0 + success_str: + description: 取込ファイル成功時処理(文字列) + type: string + example: 何もしない + failed: + description: 取込ファイル失敗時処理(数値) + type: integer + example: 0 + failed_str: + description: 取込ファイル失敗時処理(文字列) + type: string + example: 何もしない + first_row: + description: 取込ファイル1行目の処理(数値) + type: integer + example: 1 + first_row_str: + description: 取込ファイル1行目の処理(文字列) + type: string + example: 項目行として無視する + first_colum: + description: 申請書類の切り替え判定項目(数値) + type: integer + example: 1 + first_colum_str: + description: 申請書類の切り替え判定項目(文字列) + type: string + example: 先頭列を書類切換えに利用(先頭行文字「*」 継続行文字「」) + remarks: + description: 備考 + type: string + example: 営業部用 + apply: + description: 申請者情報 + type: object + properties: + usertype: + description: 申請者種別 + type: string + example: ユーザ指定 + usercode: + description: 申請者コード + type: string + example: domain_admin + username: + description: 申請者氏名 + type: string + example: 管理者 + create: + description: 作成者情報 + type: object + properties: + username: + description: 作成者氏名 + type: string + example: 管理者 + datetime: + description: 作成日 + type: string + example: 2023/01/01 12:00 + lastaprv: + description: 最終更新者情報 + type: object + properties: + username: + description: 最終更新者氏名 + type: string + example: 管理者 + datetime: + description: 更新日 + type: string + example: 2023/01/01 12:00 + csv_format: + description: CSVフォーマット情報 + type: array + items: + type: object + properties: + seq: + description: シーケンス番号 + type: integer + example: 1 + field_id: + description: フィールドID + type: string + example: usercode + field_name: + description: フィールド名称 + type: string + example: ユーザコード + page_no: + description: ページ番号 + type: integer + example: 1 + apply_user: + description: | + 申請ユーザー使用判定
+ true:申請ユーザー
+ false:申請ユーザーではない + type: boolean + example: true + group_key: + description: | + グループキー使用判定
+ true:グループキー
+ false:グループキーではない + type: boolean + example: false + + # -------------------------------------------------------------------------------------------------- + + GetFormsResponses200: + description: Successful response + content: + application/json: + schema: + allOf: + - $ref: "#/components/schemas/GetFormsResponses200" + examples: + ワークフローフォーム: + value: + form: + code: form01 + name: 経費申請書 + max_step: 4 + route: + - code: route01 + name: 営業部ルート + condroute: false + pages: + - page_no: 1 + fields: + - seq: 1 + fieldid: usercode + fieldtype: 9 + maxlength: 100 + label: ユーザコード + groupname: "" + arraysize: 0 + required: true + unique: true + - seq: 2 + fieldid: username + fieldtype: 9 + maxlength: 100 + label: ユーザ名 + groupname: "" + arraysize: 0 + required: true + unique: false + - seq: 3 + fieldid: purpose + fieldtype: 9 + maxlength: 100 + label: 概要 + groupname: "" + arraysize: 0 + required: true + unique: false + - seq: 4 + fieldid: money + fieldtype: 10 + maxlength: 100 + label: 金額 + groupname: "" + arraysize: 0 + required: true + unique: false + 通常フォーム: + value: + form: + code: form01 + name: 経費申請書 + max_step: 0 + route: [] + pages: + - page_no: 1 + fields: + - seq: 1 + fieldid: usercode + fieldtype: 9 + maxlength: 100 + label: ユーザコード + groupname: "" + arraysize: 0 + required: true + unique: true + - seq: 2 + fieldid: username + fieldtype: 9 + maxlength: 100 + label: ユーザ名 + groupname: "" + arraysize: 0 + required: true + unique: false + - seq: 3 + fieldid: purpose + fieldtype: 9 + maxlength: 100 + label: 概要 + groupname: "" + arraysize: 0 + required: true + unique: false + - seq: 4 + fieldid: money + fieldtype: 10 + maxlength: 100 + label: 金額 + groupname: "" + arraysize: 0 + required: true + unique: false + 複数枚フォーム: + value: + form: + code: form01 + name: 経費申請書 + max_step: 4 + route: + - code: route01 + name: 営業部ルート + condroute: true + pages: + - page_no: 1 + form_code: form01 + form_name: 経費申請書 + fields: + - seq: 1 + fieldid: usercode + fieldtype: 9 + maxlength: 100 + label: ユーザコード + groupname: "" + arraysize: 0 + required: true + unique: true + - seq: 2 + fieldid: username + fieldtype: 9 + maxlength: 100 + label: ユーザ名 + groupname: "" + arraysize: 0 + required: true + unique: false + - seq: 3 + fieldid: purpose + fieldtype: 9 + maxlength: 100 + label: 概要 + groupname: "" + arraysize: 0 + required: true + unique: false + - seq: 4 + fieldid: money + fieldtype: 10 + maxlength: 100 + label: 金額 + groupname: "" + arraysize: 0 + required: true + unique: false + - page_no: 2 + form_code: form02 + form_name: 交通費申請書 + fields: + - seq: 1 + fieldid: usercode + fieldtype: 9 + maxlength: 100 + label: ユーザコード + groupname: "" + arraysize: 0 + required: true + unique: true + - seq: 2 + fieldid: username + fieldtype: 9 + maxlength: 100 + label: ユーザ名 + groupname: "" + arraysize: 0 + required: true + unique: false + - seq: 3 + fieldid: purpose + fieldtype: 9 + maxlength: 100 + label: 概要 + groupname: "" + arraysize: 0 + required: true + unique: false + - seq: 4 + fieldid: money + fieldtype: 10 + maxlength: 100 + label: 金額 + groupname: "" + arraysize: 0 + required: true + unique: false + + # -------------------------------------------------------------------------------------------------- + + GetFormsListResponses200: + description: Successful response + content: + application/json: + schema: + type: object + properties: + form_group: + description: | + フォームグループ情報
+ フォームグループが存在しない場合は空配列が返される。 + type: array + items: + type: object + properties: + id: + description: フォームグループID + type: string + example: group01 + name: + description: フォームグループ名称 + type: string + example: 営業部 + form_count: + description: 所属フォーム数 + type: integer + example: 2 + form: + description: | + 所属フォーム情報
+ 所属フォームが存在しない場合は空配列が返される。 + allOf: + - $ref: "#/components/schemas/form" + - example: + - id: 1 + name: 経費申請書 + code: form01 + page_count: 1 + table_name: table01 + tsffile_name: form01.tsf + - id: 2 + name: 休暇届 + code: form02 + page_count: 1 + table_name: table02 + tsffile_name: form02.tsf + + # -------------------------------------------------------------------------------------------------- + + GetMasterListResponses200: + description: Successful response + content: + application/json: + schema: + allOf: + - $ref: "#/components/schemas/GetMasterListResponses200" + examples: + マスタが存在する: + value: + master: + - type: 1 + type_name: ユーザ固有マスタ + name: 社員マスタ + code: master01 + table_name: 社員マスタテーブル + item_count: 100 + remarks: 社員情報 + - type: 0 + type_name: 簡易マスタ + name: 簡易顧客マスタ + code: master02 + table_name: 簡易顧客マスタテーブル + item_count: 50 + remarks: 顧客情報 + マスタが存在しない: + value: + master: [] + + # -------------------------------------------------------------------------------------------------- + + GetUserMasterListResponses200: + description: Successful response + content: + application/json: + schema: + type: object + properties: + table_name: + description: マスタテーブル名 + type: string + example: user_table + fields: + allOf: + - $ref: "#/components/schemas/master_fields" + - example: + - id: id + type: varchar + length: 10 + primary_key: true + index: true + - id: name + type: varchar + length: 50 + primary_key: false + index: true + - id: weight + type: numeric + length: 10.2 + primary_key: false + index: false + + # -------------------------------------------------------------------------------------------------- + + GetMasterDataResponses200: + description: Successful response + headers: + Content-Disposition: + description: 「filename*」はファイル名がRFC5987に従いエンコーディングされているため、受信時にデコードが必要になります。受信環境が自動的にデコードを行う場合はデコード不要になります。 + schema: + type: string + example: attachment; filename="{ファイル名}"; filename*=UTF-8''{URLエンコードされたファイル名} + content: + application/json: + schema: + allOf: + - $ref: "#/components/schemas/GetMasterDataResponses200" + examples: + 簡易マスタ: + value: + master: + type: 0 + type_name: 簡易マスタ + name: 契約区分マスタ + code: keiyaku_master + table_name: "" + total_count: 2 + data: + - id: 1 + code: item1 + value: アイテム1 + - id: 2 + code: item2 + value: アイテム2 + ユーザ固有マスタ: + value: + master: + type: 1 + type_name: ユーザ固有マスタ + name: 顧客マスタ + code: "" + table_name: "m_customer" + total_count: 2 + data: + - code: 1 + name: 株式会社えいとれっど商事 + kana: カブシキガイシャエイトレッドショウジ + bank_name: えいとれっど銀行 + - code: 2 + name: 株式会社えいとれっど商社 + kana: カブシキガイシャエイトレッドショウシャ + bank_name: えいとれっど銀行 + text/csv: + examples: + 簡易マスタ: + value: "\"itemcd\",\"itemval\"\n\"item1\",\"アイテム1\"\n\"item2\",\"アイテム2\"" + ユーザ固有マスタ: + value: "\"code\",\"name\",\"kana\",\"bank_name\"\n\"1\",\"株式会社えいとれっど商事\",\"カブシキガイシャエイトレッドショウジ\",\"えいとれっど銀行\"\n\"2\",\"株式会社えいとれっど商社\",\"カブシキガイシャエイトレッドショウシャ\",\"えいとれっど銀行\"" + + # -------------------------------------------------------------------------------------------------- + + PutMasterDataResponses200: + description: Successful response + content: + application/json: + schema: + type: object + properties: + master: + description: マスタ情報 + type: object + properties: + type: + description: | + マスタタイプ
+ 「0」固定。 + type: integer + example: 0 + type_name: + description: | + マスタタイプ名称
+ 「簡易マスタ」固定。 + type: string + example: 簡易マスタ + name: + description: マスタ名 + type: string + example: ユーザマスタ + code: + description: マスタコード + type: string + example: user_master + table_name: + description: | + テーブル名
+ 空文字固定。 + type: string + example: "" + all_count: + description: 全インポート件数 + type: integer + example: 3 + success_count: + description: インポート成功件数 + type: integer + example: 3 + error_count: + description: インポート失敗件数 + type: integer + example: 0 + result: + description: インポート結果情報 + allOf: + - $ref: "#/components/schemas/simplemaster_result" + - example: + - status: SUCCESS + data: + code: name + value: 田中 + message: 新規登録が行われました。 + - status: SUCCESS + data: + code: age + value: 25 + message: 新規登録が行われました。 + - status: SUCCESS + data: + code: height + value: 170.31 + message: 新規登録が行われました。 + + # -------------------------------------------------------------------------------------------------- + + PostUserMasterUploadResponses200: + description: Successful response + content: + application/json: + schema: + type: object + properties: + master: + description: マスタ情報 + type: object + properties: + type: + description: | + マスタタイプ
+ 「1」固定。 + type: integer + example: 1 + type_name: + description: | + マスタタイプ名称
+ 「ユーザ固有マスタ」固定。 + type: string + example: ユーザ固有マスタ + name: + description: マスタ名 + type: string + example: ユーザマスタ + code: + description: | + マスタコード
+ 空文字固定。 + type: string + example: "" + table_name: + description: テーブル名
+ type: string + example: user_table + message_type: + description: メッセージタイプ(3:INFO 固定) + type: integer + example: 3 + message: + description: メッセージ内容 + type: string + example: ユーザ固有マスタにインポートする CSV ファイルのアップロードが完了しました。 + + # -------------------------------------------------------------------------------------------------- + + GetWebhooklogResponses200: + description: Successful response + content: + application/json: + schema: + allOf: + - $ref: "#/components/schemas/GetWebhooklogResponses200" + examples: + ログが存在する: + value: + data: + - domain_code: domain01 + docid: doc01 + form_code: form01 + route_code: route01 + title1: 件名 + url: https://script.xxx.com/macros/s/sample/exec + status_code: 200 + send_date: 2023/01/01 12:00:00 + uuid: xxxxxxxx-0017-4c74-b48a-91a9e9b629a8 + - domain_code: domain01 + docid: doc01 + form_code: form01 + route_code: route02 + title1: 件名 + url: https://script.xxx.com/macros/s/sample/exec + status_code: 200 + send_date: 2023/01/01 12:00:00 + uuid: xxxxxxxx-0018-4c74-b48a-91a9e9b629a8 + ログが存在しない: + value: + data: [] + + # -------------------------------------------------------------------------------------------------- + + GetWebhooklogDetailsResponses200: + description: | + Successful response
+
+ **注意事項**
+ * 応答内容の「response.body」は Webhook 送信先の応答データ形式により、JSON ではなく文字列型等になる可能性があります。 + content: + application/json: + schema: + type: object + properties: + domain_code: + description: ドメインコード + type: string + example: domain01 + docid: + description: 書類ID + type: string + example: doc01 + url: + description: 送信先URL + type: string + example: https://script.xxx.com/macros/s/sample/exec + status_code: + description: ステータスコード + type: string + example: 200 + uuid: + description: UUID + type: string + example: xxxxxxxx-0017-4c74-b48a-91a9e9b629a8 + request: + description: | + リクエスト情報
+ Webhook 送信時の送信データ情報。 + type: object + properties: + header: + description: リクエストヘッダ + type: object + properties: + X-point-API-Sender: + type: array + items: + type: string + example: X-point [apitest] + Accept: + type: array + items: + type: string + example: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 + Cache-Control: + type: array + items: + type: string + example: no-cache + Connection: + type: array + items: + type: string + example: keep-alive + User-Agent: + type: array + items: + type: string + example: Java/11.0.4 + Host: + type: array + items: + type: string + example: script.google.com + Pragma: + type: array + items: + type: string + example: no-cache + Content-Length: + type: array + items: + type: string + example: 5222 + Content-Type: + type: array + items: + type: string + example: application/json; charset=UTF-8 + body: + description: リクエストボディ + type: object + properties: + document: + type: object + properties: + docid: + type: integer + example: 999 + title: + type: string + example: 件名 + title2: + type: string + example: 件名2 + form: + type: object + properties: + code: + type: string + example: form01 + name: + type: string + example: 経費申請書 + route: + type: object + properties: + code: + type: string + example: route01 + name: + type: string + example: 営業部ルート + status: + type: object + properties: + code: + type: string + example: 1 + name: + type: string + example: 承認中 + type: + type: string + example: workflow + step: + type: object + properties: + max: + type: integer + example: 4 + current: + type: integer + example: 1 + version: + type: integer + example: 1 + writer: + type: object + properties: + user: + type: object + properties: + code: + type: string + example: u001 + name: + type: string + example: 田中 + stampName: + type: string + example: 田 + date: + type: string + example: 2023/01/01 12:00:00 + lastaprv: + type: object + properties: + user: + type: object + properties: + code: + type: string + example: u001 + name: + type: string + example: 田中 + date: + type: string + example: 2023/01/01 12:00:00 + docdata: + type: object + properties: + obj_set: + type: object + properties: {} + data_set: + type: object + properties: + stat: + type: integer + example: 1 + send_date: + type: string + example: 2023/01/01 12:00:00 + domcd: + type: string + example: dom01 + docid: + type: string + example: doc01 + domid: + type: integer + example: 50 + formname: + type: string + example: 経費申請書 + title1: + type: string + example: 件名 + title2: + type: string + example: 件名2 + formcd: + type: string + example: form01 + routename: + type: string + example: 営業部ルート + routecd: + type: string + example: route01 + uuid: + type: string + example: xxxxxxxx-0017-4c74-b48a-91a9e9b629a8 + pages: + type: array + items: + type: object + properties: + pageno: + type: integer + example: 1 + fields: + type: object + properties: + title: + type: string + example: 件名 + name: + type: string + example: 氏名 + journals: + type: object + properties: + current: + type: object + properties: + steps: + allOf: + - $ref: "#/components/schemas/steps_status0" + - example: + - step: + no: 0 + name: 申請 + aprvusers: + - user: + code: u001 + name: 田中 + stampName: 田 + group: + code: group01 + name: 営業部 + part: + code: part01 + name: 一般 + aprvdate: 2023/01/01 12:00:00 + status: + code: 0 + name: 申請 + - $ref: "#/components/schemas/steps" + - example: + - step: + no: 1 + name: 承認 + condition: + type: AND + aprvusers: + - user: + code: u002 + name: 佐藤 + stampName: 佐 + group: + code: group01 + name: 営業部 + part: + code: part02 + name: 課長 + aprvdate: 2023/01/01 12:00:00 + status: + code: 0 + name: 未処理 + - step: + no: 2 + name: 承認 + condition: + type: AND + aprvusers: + - user: + code: u003 + name: 加藤 + stampName: 加 + group: + code: group01 + name: 営業部 + part: + code: part03 + name: 部長 + aprvdate: 2023/01/01 12:00:00 + status: + code: 0 + name: 未処理 + - step: + no: 3 + name: 承認 + condition: + type: OR + aprvusers: + - user: + code: u004 + name: 山田 + stampName: 山 + group: + code: group01 + name: 営業部 + part: + code: part03 + name: 部長 + aprvdate: 2023/01/01 12:00:00 + status: + code: 0 + name: 未処理 + - user: + code: u005 + name: 後藤 + stampName: 後 + group: + code: group01 + name: 営業部 + part: + code: part03 + name: 部長 + aprvdate: 2023/01/01 12:00:00 + status: + code: 0 + name: 未処理 + response: + type: object + properties: + header: + type: object + properties: + Transfer-Encoding: + type: array + items: + example: chunked + x-empty-key: + description: 実際のキーは空文字列になります。✕:"x-empty-key" ◯:"" + type: array + items: + example: HTTP/1.1 200 OK + Alt-Svc: + type: array + items: + example: h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000 + Server: + type: array + items: + example: GSE + X-Content-Type-Options: + type: array + items: + example: nosniff + Pragma: + type: array + items: + example: no-cache + Date: + type: array + items: + example: Mon, 09 Oct 2023 19:00:14 GMT + Accept-Ranges: + type: array + items: + example: none + Referrer-Policy: + type: array + items: + example: origin + Cache-Control: + type: array + items: + example: no-cache, no-store, max-age=0, must-revalidate + Vary: + type: array + items: + example: Accept-Encoding + Expires: + type: array + items: + example: Mon, 01 Jan 1990 00:00:00 GMT + X-XSS-Protection: + type: array + items: + example: 1; mode=block + Content-Type: + type: array + items: + example: text/html; charset=utf-8 + body: + type: string + example: OK + + # -------------------------------------------------------------------------------------------------- + + GetWebhookConfigResponses200: + description: Successful response + content: + application/json: + schema: + allOf: + - $ref: "#/components/schemas/GetWebhookConfigResponses200" + examples: + Webhook設定あり: + value: + form_name: 稟議書 + form_type: workflow + webhooks: + - id: 1 + url: https://example.com/webhook + remarks: 設定1 + - id: 2 + url: https://example.com/webhook/test + remarks: 設定2 + Webhook設定なし: + value: + form_name: 稟議書 + form_type: workflow + webhooks: [] + + # -------------------------------------------------------------------------------------------------- + + PostWebhookInsertResponses200: + description: Successful response + content: + application/json: + schema: + allOf: + - $ref: "#/components/schemas/webhooks_config" + - example: + id: 1 + url: https://example.com/webhook + remarks: 設定1 + + # -------------------------------------------------------------------------------------------------- + + PatchWebhookUpdateResponses200: + description: Successful response + content: + application/json: + schema: + allOf: + - $ref: "#/components/schemas/webhooks_config" + - example: + id: 1 + url: https://example.com/webhook + remarks: Webhook設定更新 + + # -------------------------------------------------------------------------------------------------- + + DeleteWebhookConfigResponses200: + description: Successful response + content: + application/json: + schema: + type: object + properties: + id: + description: | + Webhook ID
+ 削除した Webhook 設定のWebhookID が返される。 + type: integer + example: 1 + + # -------------------------------------------------------------------------------------------------- + + GetUseFormsListResponses200: + description: Successful response + content: + application/json: + schema: + type: object + properties: + form_group: + description: | + フォームグループ情報
+ フォームグループが存在しない場合は空配列が返される。 + type: array + items: + type: object + properties: + id: + description: フォームグループID + type: integer + example: 10 + name: + description: フォームグループ名称 + type: string + example: 営業部 + form: + description: | + 所属フォーム情報
+ 所属フォームが存在しない場合は空配列が返される。 + allOf: + - $ref: "#/components/schemas/use_form" + - example: + - id: 1 + name: 経費申請書 + code: form01 + route: + - id: -1 + name: (自動選択ルート) + - id: 999 + code: route01 + name: 営業部ルート + - id: 2 + name: 交通費清算書 + code: form02 + route: + - id: -1 + name: (自動選択ルート) + - id: 1000 + code: route02 + name: 営業部ルート + - id: 3 + name: 顧客カード + code: form03 + route: + - id: -1 + name: "" + + # -------------------------------------------------------------------------------------------------- + + GetProxyInfoResponses200: + description: Successful response + content: + application/json: + schema: + allOf: + - $ref: "#/components/schemas/GetProxyInfoResponses200" + examples: + 代理権限設定あり: + value: + proxy: + - user: + code: u001 + name: 田中 + apply: true + aprv: true + - user: + code: u002 + name: 加藤 + apply: true + aprv: true + 代理権限設定なし: + value: + proxy: [] + + # -------------------------------------------------------------------------------------------------- + + GetApprovalsListResponses200: + description: Successful response + content: + application/json: + schema: + type: object + properties: + total_count: + description: 承認状況の総数 + type: integer + example: 2 + approval_list: + description: | + 承認状況情報
+ 該当する書類が存在しない場合は空配列が返される。 + allOf: + - $ref: "#/components/schemas/approval_list" + - example: + - docid: 100 + hidden: true + attachment: true + comment: false + title1: 1月分経費 + title2: 営業部 + form_name: 経費申請書 + status: 承認中 + display_status: 承認中 + apply_datetime: 2023/01/01 12:00:00 + apply_user: 佐藤 + approval_user: + - 加藤 + lastaprv_datetime: 2023/01/01 12:00:00 + - docid: 101 + hidden: true + attachment: true + comment: false + title1: 2月分経費 + title2: 営業部 + form_name: 経費申請書 + status: 承認中 + display_status: 承認中 + apply_datetime: 2023/01/01 12:00:00 + apply_user: 佐藤 + approval_user: + - 加藤 + lastaprv_datetime: 2023/01/01 12:00:00 + + # -------------------------------------------------------------------------------------------------- + + GetApprovalsWaitResponses200: + description: Successful response + content: + application/json: + schema: + type: object + properties: + status_list: + description: 承認状況リスト + allOf: + - $ref: "#/components/schemas/status_list" + - example: + - type: 0 + name: 承認待ち + count: 0 + - type: 1 + name: 差し戻され + count: 5 + - type: 2 + name: 下書き + count: 1 + - type: 3 + name: 保留 + count: 1 + - type: 4 + name: 承認中(申請) + count: 10 + - type: 5 + name: 差し戻し + count: 0 + - type: 6 + name: 承認完了(申請) + count: 100 + - type: 7 + name: 却下 + count: 0 + - type: 8 + name: 回覧 + count: 6 + - type: 9 + name: 承認中(承認) + count: 0 + - type: 10 + name: 承認完了(承認) + count: 0 + wait_list: + description: 承認待ち書類リスト + allOf: + - $ref: "#/components/schemas/wait_list" + - example: + - docid: 100 + name: 経費申請書 + title: 1月分経費 + writername: 佐藤 + writedate: 2023/01/01 12:00:00 + - docid: 100 + name: 経費申請書 + title: 1月分経費 + writername: 加藤 + writedate: 2023/01/01 12:00:00 + - docid: 100 + name: 経費申請書 + title: 1月分経費 + writername: 田中 + writedate: 2023/01/01 12:00:00 + + # -------------------------------------------------------------------------------------------------- + + PutApprovalsHiddenResponses200: + description: Successful response + content: + application/json: + schema: + type: object + properties: + docid: + description: | + 書類ID配列
+ 非表示/表示設定した書類 ID + example: + - 100 + - 101 + - 102 + - 103 + message_type: + description: メッセージタイプ(3:INFO 固定) + type: integer + example: 3 + message: + description: メッセージ内容 + type: string + example: 対象の承認完了書類を非表示に設定しました。 + + # -------------------------------------------------------------------------------------------------- + + PostSearchDocumentsResponses200: + description: Successful response + content: + application/json: + schema: + type: object + properties: + total_count: + description: 検索結果の総件数 + type: integer + example: 3 + items: + description: | + 検索結果の書類情報
+ クエリパラメータで指定した「size」分の書類情報が返されます。
+ (size を指定していない場合は 50 件) + allOf: + - $ref: "#/components/schemas/search_items" + - example: + - docid: 1000 + has_attachments: true + has_comments: true + title1: 1月分経費 + title2: 営業部 + form: + id: 100 + code: form01 + name: 経費申請書 + route: + code: route01 + name: 営業部ルート + step: 4 + stat: 1 + write_datetime: 2023/01/01 12:00:00 + update_datetime: 2023/01/01 12:00:00 + writer: 田中 + current_approvers: + - 佐藤 + url: https://xxxxx.atledcloud.jp/xpoint/form.do?act=view&fid=100&docid=1000 + - docid: 1001 + has_attachments: true + has_comments: true + title1: 1月分経費 + title2: 営業部 + form: + id: 100 + code: form01 + name: 経費申請書 + route: + code: route01 + name: 営業部ルート + step: 4 + stat: 1 + write_datetime: 2023/01/01 12:00:00 + update_datetime: 2023/01/01 12:00:00 + writer: 加藤 + current_approvers: + - 佐藤 + url: https://xxxxx.atledcloud.jp/xpoint/form.do?act=view&fid=100&docid=1001 + + # -------------------------------------------------------------------------------------------------- + + GetQueryListResponses200: + description: Successful response + content: + application/json: + schema: + allOf: + - $ref: "#/components/schemas/GetQueryListResponses200" + examples: + クエリグループ情報あり: + value: + query_groups: + - query_group_id: 1 + query_group_name: 営業部クエリ + queries: + - query_id: 100 + query_code: query01 + query_name: 営業部経費クエリ(クロス) + query_type: cross + query_type_name: クロス集計 + remarks: "" + form_count: 1 + fid: 200 + form_name: 経費申請書 + - query_id: 101 + query_code: query02 + query_name: 営業部経費クエリ(一覧) + query_type: list + query_type_name: 一覧 + remarks: "" + form_count: 1 + fid: 200 + form_name: 経費申請書 + - query_group_id: 2 + query_group_name: 営業部クエリ + queries: + - query_id: 102 + query_code: query03 + query_name: 経費申請クエリ + query_type: list + query_type_name: 一覧 + remarks: "" + form_count: 3 + forms: + - fid: 201 + form_name: 経費申請書(1月) + - fid: 202 + form_name: 経費申請書(2月) + - fid: 203 + form_name: 経費申請書(3月) + - query_group_id: 0 + query_group_name: マイクエリ + queries: + - query_id: 103 + query_code: query04 + query_name: マイクエリ + query_type: cross + query_type_name: クロス集計 + remarks: "" + form_count: 1 + fid: 200 + form_name: 経費申請書 + クエリグループ情報なし: + value: + query_groups: [] + + # -------------------------------------------------------------------------------------------------- + + GetQueryResponses200: + description: Successful response + content: + application/json: + schema: + allOf: + - $ref: "#/components/schemas/GetQueryResponses200" + oneOf: + - $ref: "#/components/schemas/list_queries_data" + - $ref: "#/components/schemas/summary_queries_data" + - $ref: "#/components/schemas/cross_queries_data" + examples: + 一覧クエリ(クエリ実行ON): + value: + query: + query_id: 100 + query_code: query01 + query_name: 営業部経費一覧クエリ + query_type: list + form_count: 1 + fid: 200 + form_name: 経費申請書 + subtbl: "" + toprowmark: "*" + secondmark: "" + csv_filename: 営業部.csv + csv_header_flg: true + csvexport_manage_type: auto + remarks: "" + cr_dt: 2023/01/01 12:00:00 + up_dt: 2023/01/01 12:00:00 + exec_result: + data: + - docid: 100 + record: + "件名1": 客先訪問 + "件名2": 営業部 + "書類No": 100 + "訪問先": 株式会社xxx + "訪問要件": 商談 + "交通費": 1500 + - docid: 200 + record: + "件名1": 客先訪問 + "件名2": 営業部 + "書類No": 200 + "訪問先": 株式会社yyy + "訪問要件": 商談 + "交通費": 1800 + 一覧クエリ(クエリ実行OFF): + value: + query: + query_id: 100 + query_code: query01 + query_name: 営業部経費一覧クエリ + query_type: list + form_count: 1 + fid: 200 + form_name: 経費申請書 + subtbl: "" + toprowmark: "*" + secondmark: "" + csv_filename: 営業部.csv + csv_header_flg: true + csvexport_manage_type: auto + remarks: "" + cr_dt: 2023/01/01 12:00:00 + up_dt: 2023/01/01 12:00:00 + 一覧クエリ(連結クエリ): + value: + query: + query_id: 101 + query_code: query02 + query_name: 営業部経費一覧連結クエリ + query_type: list + form_count: 1 + forms: + - fid: 200 + form_name: 経費申請書(20年度) + subtbl: "表定義グループ(group2)" + - fid: 201 + form_name: 経費申請書(21年度) + subtbl: "表定義グループ(group2)" + - fid: 202 + form_name: 経費申請書(22年度) + subtbl: "表定義グループ(group2)" + subtbl: "" + toprowmark: "*" + secondmark: "" + csv_filename: 営業部.csv + csv_header_flg: true + csvexport_manage_type: auto + remarks: "" + cr_dt: 2023/01/01 12:00:00 + up_dt: 2023/01/01 12:00:00 + exec_result: + data: + - docid: 100 + record: + "件名1": 客先訪問 + "件名2": 営業部 + "書類No": 100 + "訪問先": 株式会社xxx + "訪問要件": 商談 + "交通費": 1500 + - docid: 200 + record: + "件名1": 客先訪問 + "件名2": 営業部 + "書類No": 200 + "訪問先": 株式会社yyy + "訪問要件": 商談 + "交通費": 1800 + サマリクエリ: + value: + query: + query_id: 102 + query_code: query03 + query_name: 営業部月別交通費合計金額 + query_type: summary + form_count: 1 + fid: 203 + form_name: 交通費精算書 + subtbl: "" + toprowmark: "*" + secondmark: "" + csv_filename: 営業部.csv + csv_header_flg: true + csvexport_manage_type: auto + graph: + graph_active_flg: true + graph_type: bar + graph3d: false + graph_alpha: false + graph_stack: false + graph_direction: vertical + graph_reverse: column + graph_label_title: "" + graph_label_category: "" + graph_label_value: "" + height: 300 + width: 400 + graph_category_angle: 0 + remarks: "" + cr_dt: 2023/01/01 12:00:00 + up_dt: 2023/01/01 12:00:00 + exec_result: + data: + - "年月": 2023/01 + "合計金額": 100000 + - "年月": 2023/02 + "合計金額": 50000 + calc_type: sum + クロス集計クエリ: + value: + query: + query_id: 103 + query_code: query04 + query_name: 営業部月別残業時間集計 + query_type: cross + form_count: 1 + fid: 204 + form_name: 残業報告書 + subtbl: "" + toprowmark: "*" + secondmark: "" + csv_filename: 営業部.csv + csv_header_flg: true + csvexport_manage_type: auto + graph: + graph_active_flg: true + graph_type: bar + graph3d: true + graph_alpha: true + graph_stack: false + graph_direction: vertical + graph_reverse: column + graph_label_title: "" + graph_label_category: "" + graph_label_value: "" + height: 300 + width: 400 + graph_category_angle: 45 + remarks: "" + cr_dt: 2023/01/01 12:00:00 + up_dt: 2023/01/01 12:00:00 + exec_result: + data: + "2023/01": + "勝 太郎": 5.5 + "木戸 武史": 3 + "2023/02": + "勝 太郎": 8.8 + "木戸 武史": 0 + calc_type: sum + + # -------------------------------------------------------------------------------------------------- + + GetXpointInfoResponses200: + description: Successful response + content: + application/json: + schema: + type: object + properties: + version: + description: X-point バージョン + type: string + example: 3.7.00 + api_level: + description: | + API レベル
+ バージョン 3.1 時点では「1」 + type: integer + example: 1 + single_domain: + description: | + シングルドメインフラグ
+ true:作成されたドメインが 1 つ
+ false:作成されたドメインが 2 つ以上
+ OAuth2 認証のアクセストークン取得時にドメイン指定が省略可能か判断できる。 + type: boolean + example: false + features: + description: | + 利用可能機能リスト
+ サポートされている機能であってもライセンスや設定で無効化されている場合は出力されない。 + example: + - oauth2_base + - rest_base + + # -------------------------------------------------------------------------------------------------- + + GetPDFDownloadResponses200: + description: Successful response + content: + application/pdf: {} + headers: + Content-Disposition: + description: 「filename*」はファイル名がRFC5987に従いエンコーディングされているため、受信時にデコードが必要になります。受信環境が自動的にデコードを行う場合はデコード不要になります。 + schema: + type: string + example: attachment; filename="{ファイル名}"; filename*=UTF-8''{URLエンコードされたファイル名} + + # -------------------------------------------------------------------------------------------------- + + GetDocumentViewResponses200: + description: Successful response + content: + text/html: {} + + # -------------------------------------------------------------------------------------------------- + + GetCreateDocumentResponses200: + description: Successful response + content: + text/html: {} + + # -------------------------------------------------------------------------------------------------- + + PostCreateDocumentResponses200: + description: Successful response + content: + text/html: {} + + # -------------------------------------------------------------------------------------------------- + + GetStatusviewResponses200: + description: Successful response + content: + text/html: {} + + # -------------------------------------------------------------------------------------------------- + + GetAttachmentsResponses200: + description: Successful response + content: + text/plain: {} + image/png: {} + application/pdf: {} + headers: + Content-Type: + description: Content-Typeは取得するファイルによって異なります。 + schema: + type: string + Content-Disposition: + description: 「filename*」はファイル名がRFC5987に従いエンコーディングされているため、受信時にデコードが必要になります。受信環境が自動的にデコードを行う場合はデコード不要になります。 + schema: + type: string + example: attachment; filename="{ファイル名}"; filename*=UTF-8''{URLエンコードされたファイル名} + + # -------------------------------------------------------------------------------------------------- + + GetQueryGraphResponses200: + description: Successful response + content: + image/png: {} + image/jpeg: {} + headers: + Content-Disposition: + description: 「filename*」はファイル名がRFC5987に従いエンコーディングされているため、受信時にデコードが必要になります。受信環境が自動的にデコードを行う場合はデコード不要になります。 + schema: + type: string + example: attachment; filename="{query_cd}.png"; filename*=UTF-8''{query_cd}.png + + # -------------------------------------------------------------------------------------------------- + + GetAdminroleResponses200: + description: Successful response + content: + application/json: + schema: + type: object + properties: + role: + example: + - "domain" + - "form" + - "user" + - "master" + - "query" + - "wkfl" + description: | + 権限情報リスト。
+ いずれの権限も持たない一般ユーザの場合は空配列が返却されます。 + - "domain": ドメイン管理権限 + - "form": フォーム管理権限 + - "user": ユーザ管理権限 + - "master": マスタ管理権限 + - "query": クエリ管理権限 + - "wkfl": ワークフロー管理権限 + + # -------------------------------------------------------------------------------------------------- + + ScimUserResponse: + description: Successful response + content: + application/scim+json: + schema: + type: object + properties: + schemas: + description: スキーマ + type: array + items: + example: urn:ietf:params:scim:api:messages:2.0:ListResponse + totalResults: + description: 検索結果件数 + type: integer + example: 1 + startIndex: + description: | + 取得開始番号
+ クエリパラメータの「startIndex」を指定してリクエストした場合のみ応答に含まれる。 + type: integer + example: 1 + itemsPerPage: + description: | + 1 ページあたりの件数
+ クエリパラメータの「count」を指定してリクエストした場合のみ応答に含まれる。 + example: 10 + Resources: + description: ユーザ情報 + allOf: + - $ref: "#/components/schemas/resources_item" + - example: + - id: 100 + externalId: "" + meta: + resourceType: User + created: 2023-01-01T12:00:00.000Z + lastModified: 2023-01-01T12:00:00.000Z + location: /xpoint/scim/v2/apitest/Users/xxx + schemas: + - urn:ietf:params:scim:schemas:core:2.0:User + userName: u001 + name: + formatted: 田中 + displayName: 田中 + active: true + password: "*" + emails: + - value: domain_admin@example.com + type: work + primary: true + urn:atled:scim:schemas:1.0:User: + userCode: u001 + kana: タナカ + groups: + - value: 100 + display: 営業部 + $ref: /xpoint/scim/v2/apitest/Groups/xxx + groupCode: group01 + primary: true + part: + displayName: 一般 + partCode: part01 + itemValues: + - no: 1 + value: 予備1 + remark: 備考 + + # -------------------------------------------------------------------------------------------------- + + ScimGroupResponse: + description: Successful response + content: + application/scim+json: + schema: + type: object + properties: + schemas: + description: スキーマ + type: array + items: + example: urn:ietf:params:scim:api:messages:2.0:ListResponse + totalResults: + description: 検索結果件数 + type: integer + example: 1 + startIndex: + description: | + 取得開始番号
+ クエリパラメータの「startIndex」を指定してリクエストした場合のみ応答に含まれる。 + type: integer + example: 1 + itemsPerPage: + description: | + 1 ページあたりの件数
+ クエリパラメータの「count」を指定してリクエストした場合のみ応答に含まれる。 + example: 10 + Resources: + description: ユーザグループ情報 + allOf: + - $ref: "#/components/schemas/resources_group_item" + - example: + - id: 100 + externalId: "" + meta: + resourceType: Group + created: 2023-01-01T12:00:00.000Z + lastModified: 2023-01-01T12:00:00.000Z + location: /xpoint/scim/v2/apitest/Groups/xxx + schemas: + - urn:ietf:params:scim:schemas:core:2.0:Group + displayName: 営業部 + members: + - $ref: /xpoint/scim/v2/apitest/Users/xxx + value: 100 + display: 田中 + type: User + urn:atled:scim:schemas:1.0:GroupMember: + userCode: u001 + userName: u001 + part: + displayName: 一般 + displayKana: イッパン + partCode: part01 + - $ref: /xpoint/scim/v2/apitest/Users/xxx + value: 101 + display: 佐藤 + type: User + urn:atled:scim:schemas:1.0:GroupMember: + userCode: u002 + userName: u002 + part: + displayName: 課長 + displayKana: カチョウ + partCode: part02 + urn:atled:scim:schemas:1.0:Group: + groupCode: group01 + displayKana: エイギョウブ + parentGroup: + value: 105 + orderNo: 1 + + # -------------------------------------------------------------------------------------------------- + + ScimPartResponse: + description: Successful response + content: + application/scim+json: + schema: + type: object + properties: + schemas: + description: スキーマ + type: array + items: + example: urn:ietf:params:scim:api:messages:2.0:ListResponse + totalResults: + description: 検索結果件数 + type: integer + example: 1 + startIndex: + description: | + 取得開始番号
+ クエリパラメータの「startIndex」を指定してリクエストした場合のみ応答に含まれる。 + type: integer + example: 1 + itemsPerPage: + description: | + 1 ページあたりの件数
+ クエリパラメータの「count」を指定してリクエストした場合のみ応答に含まれる。 + example: 10 + Resources: + description: 役職情報 + allOf: + - $ref: "#/components/schemas/resources_part_item" + - example: + - id: 100 + externalId: "" + meta: + resourceType: Part + created: 2023-01-01T12:00:00.000Z + lastModified: 2023-01-01T12:00:00.000Z + location: /xpoint/scim/v2/apitest/Parts/xxx + schemas: + - urn:ietf:params:scim:schemas:core:2.0:Group + displayName: 一般 + displayKana: イッパン + partCode: part01 + orderNo: 1 + + # -------------------------------------------------------------------------------------------------- + + DeleteScimInfoResponses204: + description: Successful response + content: + application/scim+json: {} + + # -------------------------------------------------------------------------------------------------- + + GetAuthorizeUserInfoResponses200: + description: Successful response + content: + application/scim+json: + schema: + type: object + properties: + id: + description: ユーザID + type: string + example: 100 + meta: + description: メタデータ + type: object + properties: + resourceType: + description: | + リソースタイプ
+ "User"固定。 + type: string + example: User + created: + description: | + ユーザ作成日
+ UTC で返される。 + type: string + example: 2023-01-01T12:00:00.000Z + lastModified: + description: | + ユーザ最終更新日
+ UTC で返される。 + type: string + example: 2023-01-01T12:00:00.000Z + schemas: + description: スキーマ + type: array + items: + example: urn:ietf:params:scim:schemas:core:2.0:User + userName: + description: ログインID + type: string + example: u001 + displayName: + description: | + 表示氏名
+ 氏名(name.formatted)と同じ。 + type: string + example: 田中 + emails: + description: メール情報 + type: array + items: + type: object + properties: + value: + description: メールアドレス + type: string + example: u001@example.com + type: + description: | + メールタイプ
+ "work"固定。 + type: string + example: work + primary: + description: | + 優先フラグ
+ true 固定。 + type: boolean + example: true + urn:atled:scim:schemas:1.0:User: + description: X-point 拡張属性 + type: object + properties: + userCode: + description: ユーザCD + type: string + example: u001 + kana: + description: 氏名カナ + type: string + example: タナカ + itemValues: + description: 予備項目情報 + type: array + items: + type: object + properties: + no: + description: 予備項目番号 + type: integer + example: 1 + value: + description: 予備項目内容 + type: string + example: 予備項目 + remark: + description: 備考 + type: string + example: 備考 + + # ----------------------------------------------- + # スキーマ components/schemas + # ----------------------------------------------- + + schemas: + ErrorResponse: + description: "Error response" + type: object + properties: + error_code: + type: integer + example: 400 + error_message: + type: string + example: "{エラーメッセージ}" + + ScimErrorResponse: + description: "Error response" + type: object + properties: + schemas: + type: array + items: + type: string + example: urn:ietf:params:scim:api:messages:2.0:Error + scimType: + type: string + example: "{エラー内容}" + detail: + type: string + example: "{エラー詳細}" + status: + type: string + example: 400 + + doc_form: + description: フォーム情報 + type: object + properties: + id: + description: フォームID + type: integer + example: 99 + code: + description: フォームコード + type: string + example: form01 + name: + description: フォーム名称 + type: string + example: 経費申請書 + + step: + description: ステップ情報 + type: object + properties: + max: + description: 最大ステップ数 + type: integer + example: 5 + current: + description: 現在ステップ番号 + type: integer + example: 3 + + status: + description: 書類状態 + type: object + properties: + code: + description: | + 書類状態コード + |コード|名称| + |----|----| + |0|下書き| + |1|承認中| + |2|保留中| + |3|却下| + |4|差し戻され| + |5|差し戻し| + |6|承認完了| + type: integer + example: 1 + name: + description: 書類状態名称 + type: string + example: 承認中 + + g_field: + type: object + properties: + g_field1: + type: string + g_field2: + type: string + g_field3: + type: string + + attachments: + type: object + properties: + content_type: + description: ファイル種別 + type: string + seq: + description: シーケンス番号 + type: integer + name: + description: 添付ファイル名 + type: string + size: + description: 添付ファイルサイズ + type: integer + remarks: + description: 備考 + type: string + detail_no: + description: 対応明細行No (電帳法対応オプション) + type: integer + evidence_type: + description: | + 電帳法書類区分 (電帳法対応オプション) + |区分|名称| + |----|----| + |0|その他| + |1|電子取引| + type: integer + evidence_type_label: + description: 電帳法書類区分名称 (電帳法対応オプション) + type: string + relations: + type: object + properties: + docid: + description: 関連書類ID + type: integer + title1: + description: 関連書類件名1 + type: string + title2: + description: 関連書類件名2 + type: string + form_name: + description: 関連書類フォーム名称 + type: string + + comment_list: + type: object + properties: + seqno: + description: コメント番号 + type: string + attentionflg: + description: | + 重要コメントフラグ
+ true:重要コメント
+ false:通常のコメント + type: boolean + content: + description: コメント内容 + type: string + writername: + description: コメント登録者名 + type: string + writedate: + description: コメント登録日時 + type: string + + lumpapply: + description: | + 自動申請設定使用フラグ
+ true:自動申請設定を使用して書類を申請する。
+ false:自動申請設定を使用せず書類を申請する。
+ デフォルトは true
+ 「自動申請設定を使用する」の仕様についてはマニュアル[「3.1. 書類作成API/書類のワークフロー操作・編集・更新API」](./doc/manual.html#31-書類作成api書類のワークフロー操作編集更新api)をご確認ください。 + type: boolean + example: true + + route_code: + description: | + 承認ルートコード
+ * ワークフローフォーム(ユーザ選択ルート)
+ 承認ルートコードを指定します。
+ * ワークフローフォーム(自動選択ルート)
+ 空文字もしくは「--condroute」という自動選択
+ ルートを表す文字列を指定します。
+ (大文字、小文字は区別しません。)
+ * 標準フォーム
+ 空文字を指定します。 + type: string + example: route01 + + fields: + type: object + properties: + seq: + description: シーケンス番号 + type: integer + fieldid: + description: フィールドID + type: string + fieldtype: + description: | + フィールドタイプ + |タイプ|名称| + |----|----| + |9|文字フィールド| + |10|数値フィールド| + |11|整数フィールド| + |12|テキストエリア| + |13|パスワード| + |14|ボタン| + |15|ラジオボタン| + |16|チェックボックス| + |17|コンボボックス| + |18|リストボックス| + |23|バーコード| + |24|イメージ| + |25|西暦フィールド| + |26|月フィールド| + |27|日フィールド| + |28|曜日フィールド| + |29|印影フィールド| + |34|日時フィールド| + |35|イメージアップロード| + |99|不可視フィールド| + type: integer + maxlength: + description: フィールド最大値 + type: integer + label: + description: フィールドラベル + type: string + groupname: + description: グループ名称 + type: string + arraysize: + description: 表明細数 + type: integer + required: + description: | + 必須フィールドフラグ
+ true:必須フィールド
+ false:非必須フィールド + type: boolean + unique: + description: | + ユニークフィールドフラグ
+ true:ユニークフィールド
+ false:非ユニークフィールド + type: boolean + + form: + type: object + properties: + id: + description: フォームID + type: string + name: + description: フォーム名称 + type: string + code: + description: フォームコード + type: string + page_count: + description: フォーム構成ページ数 + type: integer + table_name: + description: DBテーブル名 + type: string + tsffile_name: + description: TSFファイル名 + type: string + + use_form: + type: object + properties: + id: + description: フォームID + type: string + name: + description: フォーム名称 + type: string + code: + description: フォームコード + type: string + route: + description: 承認ルート情報 + type: array + items: + type: object + properties: + id: + description: 承認ルートID + type: integer + code: + description: | + 承認ルートコード
+ 通常フォームまたは自動選択ルートの場合は、応答に承認ルートコードは含まれません。 + type: string + name: + description: 承認ルート名称 + type: string + + master: + type: object + properties: + type: + description: | + マスタタイプ
+ 0:簡易マスタ
+ 1:ユーザ固有マスタ
+ 2:X-point マスタ
+ 5:kintone 連携マスタ
+ 6:書類マスタ + type: integer + type_name: + description: マスタタイプ名称 + type: string + name: + description: マスタ名称 + type: string + code: + description: | + マスタコード
+ 簡易マスタ/kintone 連携マスタ/書類マスタはマスタコードが返される。
+ それ以外のマスタは空文字が返される。 + type: string + table_name: + description: | + マスタテーブル名
+ ユーザ固有マスタはテーブル名が返される。 + それ以外のマスタは空文字が返される。 + type: string + item_count: + description: | + 項目数
+ 簡易マスタはマスタデータ項目数が返される。
+ それ以外のマスタは「0」が返される。 + type: integer + remarks: + description: 備考 + type: string + + master_fields: + type: object + properties: + id: + description: フィールドID + type: string + type: + description: | + データ型
+ "numeric"もしくは"varchar"が返される。 + type: string + length: + description: | + データ桁数
+ データ型が"numeric"の場合は"整数桁数,小数桁数"の形式で返される。 + type: integer + primary_key: + description: | + 主キー
+ true の場合は主キーに設定されているフィールドを表す。 + type: boolean + index: + description: | + 索引
+ true の場合は索引の設定がされているフィールドを表す。 + type: boolean + + master_data: + type: object + properties: + id: + description: id + type: integer + name: + description: 氏名 + type: string + height: + description: 身長 + type: integer + + simplemaster_data: + type: object + properties: + code: + description: itemcd + type: string + value: + description: itemval + type: string + + simplemaster_result: + type: object + properties: + status: + description: | + インポート結果
+ 「SUCCESS」または「ERROR」が返される。 + type: string + data: + description: インポートデータ + type: object + properties: + code: + description: 項目コード(itemcd) + type: string + value: + description: 項目値(itemval) + type: string + message: + description: メッセージ + type: string + + webhooklog_data: + type: object + properties: + domain_code: + description: ドメインコード + type: string + docid: + description: 書類ID + type: string + form_code: + description: フォームコード + type: string + route_code: + description: 承認ルートコード + type: string + title1: + description: 件名 + type: string + url: + description: 送信先URL + type: string + status_code: + description: ステータスコード + type: string + send_date: + description: 送信日時 + type: string + uuid: + description: UUID + type: string + + steps_status0: + type: object + properties: + step: + type: object + properties: + no: + type: integer + name: + type: string + aprvusers: + type: array + items: + type: object + properties: + user: + type: object + properties: + code: + type: string + name: + type: string + stampName: + type: string + group: + type: object + properties: + code: + type: string + name: + type: string + part: + type: object + properties: + code: + type: string + name: + type: string + aprvdate: + type: string + status: + type: object + properties: + code: + type: integer + name: + type: string + + steps: + type: object + properties: + step: + type: object + properties: + no: + type: integer + name: + type: string + condition: + type: object + properties: + type: + type: string + aprvusers: + type: array + items: + type: object + properties: + user: + type: object + properties: + code: + type: string + name: + type: string + stampName: + type: string + group: + type: object + properties: + code: + type: string + name: + type: string + part: + type: object + properties: + code: + type: string + name: + type: string + status: + type: object + properties: + code: + type: integer + name: + type: string + + webhooks_config: + type: object + properties: + id: + description: | + Webhook ID
+ Webhook 設定の更新、削除 API で指定する ID。 + type: integer + url: + description: 送信先URL + type: string + remarks: + description: 備考 + type: string + + proxy_list: + type: object + properties: + use: + description: 代理ユーザ情報 + type: object + properties: + code: + description: ユーザコード + type: string + name: + description: 氏名 + type: string + apply: + description: | + 代理申請フラグ
+ true:代理申請権限有り
+ false:代理申請権限無し
+ type: boolean + aprv: + description: | + 代理承認フラグ
+ true:代理承認権限有り
+ false:代理承認権限無し
+ type: boolean + + approval_list: + type: object + properties: + docid: + description: 書類ID + type: integer + hidden: + description: | + 非表示フラグ
+ true:非表示書類
+ false:表示書類
+ リクエスト時にクエリパラメータの承認状況タイプに承認完了/承認完了(申請)/承認完了(承認)のいずれかを指定、かつ非表示書類の取得フラグで trueを指定した場合にのみ応答に含まれます。 + type: boolean + attachment: + description: | + 添付ファイルフラグ
+ true:添付ファイル有り
+ false:添付ファイル無し + type: boolean + comment: + description: | + コメントフラグ
+ true:コメントあり
+ false:コメントなし + type: boolean + title1: + description: 件名1 + type: string + title2: + description: 件名2 + type: string + form_name: + description: フォーム名称 + type: string + status: + description: | + ステータス名称
+ 書類の現在のステータス名称。 + type: string + display_status: + description: | + 画面表示ステータス名称
+ ユーザサイトの承認待ち一覧画面の状況列に表示されるステータス名称。 + type: string + apply_datetime: + description: 申請日時 + type: string + apply_user: + description: 申請者氏名 + type: string + approval_user: + description: | + 承認者
+ 現在ステップの承認者 + type: array + items: + example: + lastaprv_datetime: + description: 最終更新日時 + type: string + + status_list: + type: object + properties: + type: + description: | + 承認状況種別
+ 各承認状況種別は「承認待ち一覧取得」の承認状況タイプの小分類と対応します。 + |承認状況種別|名称|承認状況タイプ(小分類)| + |----|----|----| + |0|承認待ち|11| + |1|差し戻され|12| + |2|下書き|31| + |3|保留|32| + |4|承認中(申請)|41| + |5|差し戻し|43| + |6|承認完了(申請)|51| + |7|却下|21| + |8|回覧|22| + |9|承認中(承認)|42| + |10|承認完了(承認)|52| + type: integer + name: + description: 承認状況名称 + type: string + count: + description: 承認待ち件数 + type: integer + + wait_list: + type: object + properties: + docid: + description: 書類ID + type: integer + name: + description: フォーム名称 + type: string + title: + description: 件名 + type: string + writername: + description: 申請者名 + type: string + writedate: + description: 申請日時 + type: string + + search_items: + type: object + properties: + docid: + description: 書類 ID + type: integer + has_attachments: + description: | + 添付ファイルの有無
+ true:添付ファイルあり
+ false:添付ファイルなし + type: boolean + has_comments: + description: | + コメントの有無
+ true:コメントあり
+ false:コメントなし + type: boolean + title1: + description: 件名1 + type: string + title2: + description: 件名2 + type: string + form: + description: フォーム情報 + type: object + properties: + id: + description: フォームID + type: integer + code: + description: フォームコード + type: string + name: + description: フォーム名称 + type: string + route: + description: 承認ルート情報 + type: object + properties: + code: + description: 承認ルートコード + type: string + name: + description: 承認ルート名称 + type: string + step: + description: ステップ番号 + type: integer + stat: + description: | + 承認状況
+ 承認状況「-1」は通常フォームの場合に返される。 + type: integer + write_datetime: + description: | + 申請日時
+ 「YYYY/MM/DD hh:mm:ss」形式 + type: string + update_datetime: + description: | + 更新日時
+ 「YYYY/MM/DD hh:mm:ss」形式 + type: string + writer: + description: 申請者 + type: string + current_approvers: + description: 現在ステップの承認者 + type: array + items: + example: + url: + description: 書類URL + type: string + + queries: + type: object + properties: + query_id: + description: クエリID + type: integer + query_code: + description: クエリコード + type: string + query_name: + description: クエリ名 + type: string + query_type: + description: | + クエリの種類
+ "list"(一覧) / "summary"(サマリ) /"cross"(クロス集計) + type: string + query_type_name: + description: | + クエリの種類(名称)
+ "一覧" / "サマリ" / "クロス集計" + type: string + remarks: + description: 備考 + type: string + form_count: + description: | + フォーム件数
+ クエリが参照するフォームの件数 + fid: + description: | + フォームID
+ フォーム件数が 1 の場合に出力される + type: integer + form_name: + description: | + フォーム名
+ フォーム件数が 1 の場合に出力される + forms: + description: | + フォーム情報一覧
+ フォーム件数が 2 以上の場合に出力される + type: array + items: + type: object + properties: + fid: + description: フォームID + type: integer + form_name: + description: フォーム名 + type: string + + list_queries_data: + type: object + properties: + exec_result: + description: | + 検索結果
+ 実行結果取得フラグが false の場合は応答に含まれない。 + type: object + properties: + data: + description: クエリデータ + type: array + items: + type: object + properties: + docid: + description: 書類ID + type: integer + record: + description: | + クエリレコード情報
+ ※クエリの設定により異なります + type: object + properties: + "件名1": + type: string + "件名2": + type: string + "書類No": + type: integer + "訪問先": + type: string + "訪問要件": + type: string + "交通費": + type: integer + + summary_queries_data: + type: object + properties: + exec_result: + description: | + 検索結果
+ 実行結果取得フラグが false の場合は応答に含まれない。 + type: object + properties: + data: + description: | + クエリデータ
+ ※クエリの設定により異なります + type: array + items: + type: object + properties: + "年月": + type: string + "合計金額": + type: string + calc_type: + description: | + 計算種別 + * sum:合計 + * avg:平均 + * num:件数 + * max:最大 + * min:最小 + type: string + + cross_queries_data: + type: object + properties: + exec_result: + description: | + 検索結果
+ 実行結果取得フラグが false の場合は応答に含まれない。 + type: object + properties: + data: + description: | + クエリデータ
+ ※クエリの設定により異なります + type: object + properties: + "2023/01": + type: object + properties: + "勝 太郎": + type: string + "木戸 武史": + type: string + "2023/02": + type: object + properties: + "勝 太郎": + type: string + "木戸 武史": + type: string + calc_type: + description: | + 計算種別 + * sum:合計 + * avg:平均 + * num:件数 + * max:最大 + * min:最小 + type: string + + resources_item: + type: object + properties: + id: + description: ユーザID + type: string + externalId: + description: | + 外部ID
+ X-point Cloud では未使用の項目。
+ 常に空文字が返される。 + type: string + meta: + description: メタデータ + type: object + properties: + resourceType: + description: | + リソースタイプ
+ "User"固定。 + type: string + created: + description: | + ユーザ作成日
+ UTC で返される。 + type: string + lastModified: + description: | + ユーザ最終更新日
+ UTC で返される。 + type: string + location: + description: 指定ユーザ情報取得 API のリクエスト URL + type: string + schemas: + description: スキーマ + type: array + items: + example: "urn:ietf:params:scim:schemas:core:2.0:User" + userName: + description: ログインID + type: string + name: + description: 氏名情報 + type: object + properties: + formatted: + description: | + 氏名
+ 表示氏名(displayName)と同じ。 + type: string + displayName: + description: | + 表示氏名
+ 氏名(name.formatted)と同じ。 + type: string + active: + description: | + ログイン可否
+ true:ログイン可能
+ false:ログイン不可 + type: boolean + password: + description: | + パスワード
+ 常に"*"が返される。 + type: string + emails: + description: メール情報 + type: array + items: + type: object + properties: + value: + description: メールアドレス + type: string + type: + description: | + メールタイプ
+ "work"固定。 + type: string + primary: + description: | + 優先フラグ
+ true 固定。 + type: boolean + urn:atled:scim:schemas:1.0:User: + description: X-point 拡張属性 + type: object + properties: + userCode: + description: ユーザCD + type: string + kana: + description: 氏名カナ + type: string + groups: + description: 所属グループ情報 + type: array + items: + type: object + properties: + value: + description: ユーザグループID + type: string + display: + description: ユーザグループ名 + type: string + $ref: + description: 指定ユーザグループ情報取得 API のリクエスト URL + type: string + groupCode: + description: ユーザグループCD + type: string + primary: + description: | + 優先フラグ
+ 優先部署の場合は true。 + type: boolean + part: + description: 役職情報 + type: object + properties: + displayName: + description: 役職名 + type: string + partCode: + description: 役職CD + type: string + itemValues: + description: 予備項目情報 + type: array + items: + type: object + properties: + no: + description: 予備項目番号 + type: integer + value: + description: 予備項目内容 + type: string + remark: + description: 備考 + type: string + + resources_group_item: + type: object + properties: + id: + description: グループID + type: string + externalId: + description: | + 外部ID
+ X-point Cloud では未使用の項目。
+ 常に空文字が返される。 + type: string + meta: + description: メタデータ + type: object + properties: + resourceType: + description: | + リソースタイプ
+ "Group"固定。 + type: string + created: + description: | + ユーザ作成日
+ UTC で返される。 + type: string + lastModified: + description: | + ユーザ最終更新日
+ UTC で返される。 + type: string + location: + description: 指定ユーザ情報取得 API のリクエスト URL + type: string + schemas: + description: スキーマ + type: array + items: + example: "urn:ietf:params:scim:schemas:core:2.0:User" + displayName: + description: ユーザグループ名称 + type: string + members: + description: 所属ユーザ情報 + type: array + items: + type: object + properties: + $ref: + description: 指定ユーザ情報取得 APIのリクエスト URL + type: string + value: + description: ユーザID + type: string + display: + description: ユーザ氏名 + type: string + type: + description: | + ユーザタイプ
+ "User"固定。 + type: string + urn:atled:scim:schemas:1.0:GroupMember: + description: X-point 拡張属性(所属ユーザ) + type: object + properties: + userCode: + description: 所属ユーザのユーザ CD + type: string + userName: + description: 所属ユーザのログイン ID + type: string + part: + description: 所属ユーザ役職情報 + type: object + properties: + displayName: + description: 所属ユーザの役職名 + type: string + displayKana: + description: 所属ユーザの役職名カナ + type: string + partCode: + description: 所属ユーザの役職CD + type: string + urn:atled:scim:schemas:1.0:Group: + description: X-point 拡張属性(ユーザグループ) + type: object + properties: + groupCode: + description: グループCD + type: string + displayKana: + description: ユーザグループ名称カナ + type: string + parentGroup: + description: 親グループ情報 + type: object + properties: + value: + description: 親グループID + type: string + orderNo: + description: 並び順 + type: integer + + members_iteme: + type: object + properties: + value: + description: | + ユーザID
+ ユーザ ID とユーザ CD がどちらも指定されている場合はユーザ ID が優先されます。 + type: string + urn:atled:scim:schemas:1.0:GroupMember: + description: X-point 拡張属性(所属ユーザ) + type: object + properties: + usercode: + description: | + ユーザ CD
+ ユーザID とユーザCDがどちらも指定されている場合はユーザ ID が優先されます。 + type: string + partCode: + description: | + 役職 CD
+ partCode と part.partCode のどちらも指定されている場合は partCode が優先されます。 + type: string + part: + description: 役職情報 + type: object + properties: + partCode: + description: 役職CD + type: string + + resources_part_item: + type: object + properties: + id: + description: 役職ID + type: string + externalId: + description: | + 外部ID
+ X-point Cloud では未使用の項目。
+ 常に空文字が返される。 + type: string + meta: + description: メタデータ + type: object + properties: + resourceType: + description: | + リソースタイプ
+ "Part"固定。 + type: string + created: + description: | + ユーザ作成日
+ UTC で返される。 + type: string + lastModified: + description: | + ユーザ最終更新日
+ UTC で返される。 + type: string + location: + description: 指定ユーザ情報取得 API のリクエスト URL + type: string + schemas: + description: スキーマ + type: array + items: + example: "urn:ietf:params:scim:schemas:core:2.0:User" + displayName: + description: 役職名称 + type: string + displayKana: + description: 役職名称カナ + type: string + partCode: + description: 親グループ情報 + type: string + orderNo: + description: 並び順 + type: integer + + master_items: + type: object + properties: + comid: + description: コンポーネントID + type: integer + comname: + description: コンポーネント名称 + type: string + column: + description: | + 列名
+ 文字列の配列で指定(マスタ参照ウィンドウコンポーネントのみ) + type: array + items: + example: [] + + flow_results: + description: 承認状況情報 + type: array + items: + type: object + properties: + stepno: + description: ステップ番号 + type: integer + steptitle: + description: ステップタイトル + type: string + aprvusers: + description: 処理者情報 + type: array + items: + type: object + properties: + aprv: + type: object + properties: + usercode: + description: ユーザコード + type: string + username: + description: ユーザ名 + type: string + stampname: + description: 印影名 + type: string + datetime: + description: ワークフロー操作日時 + type: string + groupcd: + description: ユーザグループコード + type: string + groupname: + description: ユーザグループ名称 + type: string + partcd: + description: 役職コード + type: string + partname: + description: 役職名称 + type: string + statuscode: + description: | + ステップ状態コード

+ ・申請ステップの場合 + |コード|名称| + |----|----| + |0|申請| + + ・承認ステップの場合 + |コード|名称| + |----|----| + |0|未処理| + |1|承認| + |2|却下| + |3|差し戻し| + |4|保留| + + ・回覧ステップの場合 + |コード|名称| + |----|----| + |0|未読| + |1|既読| + type: integer + status: + description: ステップ状態名称 + type: string + cond: + description: 承認条件 + type: string + cond_num: + description: 承認条件の指定人数 + type: integer + adminskip: + description: 管理者スキップフラグ + type: integer + skip: + description: スキップフラグ + type: integer + backstepno: + description: 差し戻し先ステップ番号 + type: integer + + # ----------------------------------------------------------------------------------------- + + PatchDocumentRequest: + type: object + properties: + wf_type: + description: | + ワークフロー種別
+ -1: 下書き保存
+ 0:申請、再申請
+ 1:承認
+ 2:保留
+ 3:差し戻し
+ 4:却下
+ 5:取り戻し
+ ※承認完了書類の修正保存を行う場合はワークフロー種別を指定せずにリクエストしてください。 + type: integer + wf_comment: + description: | + ワークフローコメント
+ 却下、差し戻しの場合必須 + type: string + wf_backstep: + description: | + 差し戻し先ステップ番号
+ 差し戻しの場合必須 + type: string + form_code: + description: | + フォームコード
+ フォームコードもしくはフォーム名称のどちらかが必須です。
+ どちらも指定されていた場合はフォーム名称が優先されます。 + type: string + form_name: + description: | + フォーム名称
+ フォームコードもしくはフォーム名称のどちらかが必須です。
+ どちらも指定されていた場合はフォーム名称が優先されます。 + type: string + route_code: + allOf: + - $ref: "#/components/schemas/route_code" + type: string + datas: + description: | + ※書類データの変更を行う場合は指定
+ フォームの構成により異なります。 + type: array + xml: + wrapped: true + items: + type: object + properties: + page_no: + description: フォームのページ数に合わせて記載 + type: integer + fields: + description: 該当ページ内のフィールドを記載 + type: object + properties: + field1: + description: 文字列フィールド + type: string + field2: + description: 数値フィールド + type: string + group1: + description: 表明細項目 + allOf: + - $ref: "#/components/schemas/g_field" + lumpapply: + allOf: + - $ref: "#/components/schemas/lumpapply" + reason: + description: | + 更新理由
+ 電帳法対応オプションの利用で、X-poin 内作成型フォームの完了書類を更新する場合のみ必須 + type: string + + PostSearchDocumentsRequest: + type: object + properties: + docid: + description: | + 検索条件「書類 ID 範囲指定」
+ 一つの書類 ID を指定したい場合は、minと max に同じ値を指定します。 + type: object + properties: + min: + description: 書類 ID 範囲の最小値 + type: integer + max: + description: 書類 ID 範囲の最大値 + type: integer + title: + description: | + 検索条件「件名」
+ 部分一致検索で検索します。
+ 件名 1 と件名 2 の両方が対象となります。 + type: string + form_group: + description: | + 検索条件「フォームグループ」
+ フォームグループ名を部分一致で検索します。 + type: object + properties: + name: + description: 検索条件「フォームグループ名」 + type: string + form_name: + description: | + 検索条件「フォーム名」
+ 部分一致検索で検索します。 + type: string + stats: + description: | + 検索条件「承認状況」
+ 検索対象の承認状況をカンマ区切りで指定します。 + |指定可能値|承認状況| + |----|----| + |-1|承認状況での絞り込み無し| + |0|下書き| + |1|承認中| + |2|保留| + |3|却下| + |4|申請者へ差し戻し| + |5|承認者へ差し戻し| + |6|承認完了| + current_step: + description: | + 検索条件「現在ステップ」
+ 書類の現在の承認ステップで検索します。 + type: object + properties: + stepno: + description: 検索条件「ステップ No」 + type: integer + writer_list: + description: | + 検索条件「承認者リスト」
+ 書類の申請者で検索します。
+ 「種別」にはユーザ(user)、またはユーザグループ(group)を指定します。
+ 「コード」にはユーザコード、またはユーザグループコードを指定します。 + type: array + items: + type: object + properties: + type: + description: 検索条件「種別」 + type: string + code: + description: 検索条件「コード」 + type: string + date_type: + description: | + 検索条件「日付条件」
+ 新規更新日(cr_dt)/ 最終更新日(up_dt) + type: string + dt_cond_type: + description: | + 検索条件「日付複合条件」
+ 過去期間指定:0 / 日付直接指定:1 + type: string + date_span: + description: | + 検索条件「過去期間」
+ 「日付複合条件」が過去期間指定のとき必要。
+ 過去期間を指定する。 + type: integer + span_type: + description: | + 検索条件「過去期間種別」
+ N 日前:0 / N ヶ月前:1 + type: integer + lower_year: + description: | + 検索条件「開始年」
+ 「日付複合条件」が日付直接指定のとき必要。期間の開始年を指定する + type: integer + lower_month: + description: | + 検索条件「開始月」
+ 「日付複合条件」が日付直接指定のとき必要。期間の開始月を指定する + type: integer + lower_day: + description: | + 検索条件「開始日」
+ 「日付複合条件」が日付直接指定のとき必要。期間の開始日を指定する + type: integer + upper_year: + description: | + 検索条件「終了年」
+ 「日付複合条件」が日付直接指定のとき必要。期間の終了年を指定する + type: integer + upper_month: + description: | + 検索条件「終了月」
+ 「日付複合条件」が日付直接指定のとき必要。期間の終了月を指定する + type: integer + upper_day: + description: | + 検索条件「終了日」
+ 「日付複合条件」が日付直接指定のとき必要。期間の終了日を指定する + type: integer + fgid: + description: | + 検索条件「フォームグループ ID」
+ 文字列条件、数値条件を指定するとき必須(fgid が指定されない場合は文字列条件、数値条件を無視する) + type: integer + fid: + description: | + 検索条件「フォーム ID」
+ 文字列条件、数値条件を指定するとき必須(fid が指定されない場合は文字列条件、数値条件を無視する) + type: integer + int_col_name1: + description: | + 検索条件「数値条件列1」
+ 対象列名に検索対象項目のフィールドID を入力する。
+ 複数枚フォームの 2 枚目以降に存在するフィールド ID を対象とする場合はページ番号を指定する。
+ 単数枚フォームや、複数枚フォームの 1枚目に存在するフィールド ID の場合ページ番号は省略可能。 + type: object + properties: + page_no: + description: 対象列のページ番号 + type: integer + col_name: + description: 対象列名 + type: string + int_col_name2: + description: | + 検索条件「数値条件列2」
+ 対象列名に検索対象項目のフィールドID を入力する。
+ 複数枚フォームの 2 枚目以降に存在するフィールド ID を対象とする場合はページ番号を指定する。
+ 単数枚フォームや、複数枚フォームの 1枚目に存在するフィールド ID の場合ページ番号は省略可能。 + type: object + properties: + page_no: + description: 対象列のページ番号 + type: integer + col_name: + description: 対象列名 + type: string + int_col_name3: + description: | + 検索条件「数値条件列3」
+ 対象列名に検索対象項目のフィールドID を入力する。
+ 複数枚フォームの 2 枚目以降に存在するフィールド ID を対象とする場合はページ番号を指定する。
+ 単数枚フォームや、複数枚フォームの 1枚目に存在するフィールド ID の場合ページ番号は省略可能。 + type: object + properties: + page_no: + description: 対象列のページ番号 + type: integer + col_name: + description: 対象列名 + type: string + int_and_or1: + description: | + 検索条件「数値条件区分1」
+ 第 1 条件かつ第 2 条件(and)/ 第 1 条件または第 2 条件(or) + type: string + int_and_or2: + description: | + 検索条件「数値条件区分2」
+ 第 2 条件かつ第 3 条件(and)/ 第 2 条件または第 3 条件(or) + type: string + int_data1: + description: | + 検索条件「数値条件 1」
+ 条件とする数値を入力 + type: integer + int_data2: + description: | + 検索条件「数値条件 2」
+ 条件とする数値を入力 + type: integer + int_data3: + description: | + 検索条件「数値条件 3」
+ 条件とする数値を入力 + type: integer + compare_type1: + description: | + 検索条件「比較区分 1」
+ 「数値条件 1」に対して
+ 『と等しい:1
+ / より大きい:2
+ / と同じか大きい:3
+ / より小さい:4
+ / と同じか小さい:5』 + type: integer + compare_type2: + description: | + 検索条件「比較区分 2」
+ 「数値条件 1」に対して
+ 『と等しい:1
+ / より大きい:2
+ / と同じか大きい:3
+ / より小さい:4
+ / と同じか小さい:5』 + type: integer + compare_type3: + description: | + 検索条件「比較区分 3」
+ 「数値条件 1」に対して
+ 『と等しい:1
+ / より大きい:2
+ / と同じか大きい:3
+ / より小さい:4
+ / と同じか小さい:5』 + type: integer + char_col_name1: + description: | + 検索条件「文字列条件列1」
+ 対象列名に検索対象項目のフィールドID を入力する。
+ 複数枚フォームの 2 枚目以降に存在するフィールド ID を対象とする場合はページ番号を指定する。
+ 単数枚フォームや、複数枚フォームの 1枚目に存在するフィールド ID の場合ページ番号は省略可能。 + type: object + properties: + page_no: + description: 対象列のページ番号 + type: integer + col_name: + description: 対象列名 + type: string + char_col_name2: + description: | + 検索条件「文字列条件列2」
+ 対象列名に検索対象項目のフィールドID を入力する。
+ 複数枚フォームの 2 枚目以降に存在するフィールド ID を対象とする場合はページ番号を指定する。
+ 単数枚フォームや、複数枚フォームの 1枚目に存在するフィールド ID の場合ページ番号は省略可能。 + type: object + properties: + page_no: + description: 対象列のページ番号 + type: integer + col_name: + description: 対象列名 + type: string + char_col_name3: + description: | + 検索条件「文字列条件列3」
+ 対象列名に検索対象項目のフィールドID を入力する。
+ 複数枚フォームの 2 枚目以降に存在するフィールド ID を対象とする場合はページ番号を指定する。
+ 単数枚フォームや、複数枚フォームの 1枚目に存在するフィールド ID の場合ページ番号は省略可能。 + type: object + properties: + page_no: + description: 対象列のページ番号 + type: integer + col_name: + description: 対象列名 + type: string + char_and_or1: + description: | + 検索条件「文字列条件区分 1」
+ 第一条件かつ第二条件(and)/ 第一条件または第二条件(or) + type: string + char_and_or2: + description: | + 検索条件「文字列条件区分 2」
+ 第二条件かつ第三条件(and)/ 第二条件または第三条件(or) + type: string + char_data1: + description: | + 検索条件「文字列条件1」
+ 条件とする文字列を入力
+ (指定した文字列を含む書類を検索) + type: string + char_data2: + description: | + 検索条件「文字列条件2」
+ 条件とする文字列を入力
+ (指定した文字列を含む書類を検索) + type: string + char_data3: + description: | + 検索条件「文字列条件3」
+ 条件とする文字列を入力
+ (指定した文字列を含む書類を検索) + type: string + comment_flg: + description: | + 検索条件「コメントフラグ」
+ 条件なし:0
+ / コメントあり:1
+ / コメントなし:2
+ type: integer + comment_content: + description: | + 検索条件「コメント内容」
+ コメントの文字列を入力(部分一致) + type: string + comment_writercd: + description: | + 検索条件「発言者 CD」
+ コメントを発言したユーザ CD + type: string + comment_attentionflg: + description: | + 検索条件「重要コメントフラグ」
+ すべてのコメント:0 / 重要コメントのみ:1 + type: integer + attach_flg: + description: | + 検索条件「添付ファイルフラグ」
+ 条件なし:0
+ / 添付あり:1
+ / 添付なし:2
+ type: integer + attach_name: + description: | + 検索条件「添付ファイル名」
+ ファイル名・備考の文字列を入力(部分一致) + type: string + order: + description: | + 並び替え条件
+ 項目を指定してレスポンスの並び替えを行います。
+ 項目の先頭に「-」を指定した場合は降順に、項目のみ指定した場合は昇順に並び替えます。
+ 並び替え条件を指定しない場合は更新日時の降順になります。 + |項目|説明| + |----|----| + |docid|書類ID| + |title1|件名1| + |title2|件名2| + |form_code|フォームコード| + |form_name|フォーム名称| + |route_code|承認ルートコード| + |route_name|承認ルート名称| + |stat|承認状況| + |step|ステップ番号| + |update_datetime|更新日時| + |write_datetime|申請日時| + |writer|申請者| + 並び替え条件の指定方法についてはマニュアル[「2.9.2 並び替え」](./doc/manual.html#292-並び替え)をご参照ください。 + type: string + + PostDocumentRequest: + type: object + properties: + draft: + description: | + 下書き保存フラグ
+ true:作成された書類は下書きになる
+ false:作成された書類は申請される
+ 指定しない場合書類は申請されます。 + type: boolean + form_code: + description: | + フォームコード
+ フォームコードもしくはフォーム名称のどちらかが必須です。
+ どちらも指定されていた場合はフォーム名称が優先されます。 + type: string + form_name: + description: | + フォームネーム
+ フォームコードもしくはフォーム名称のどちらかが必須です。
+ どちらも指定されていた場合はフォーム名称が優先されます。 + type: string + route_code: + allOf: + - $ref: "#/components/schemas/route_code" + datas: + description: フォームの構成により異なります。 + type: array + xml: + wrapped: true + items: + type: object + properties: + page_no: + description: フォームのページ数に合わせて記載 + type: integer + fields: + description: 該当ページ内のフィールドを記載 + type: object + properties: + field1: + description: 文字列フィールド + type: string + field2: + description: 整数フィールド + type: string + group1: + description: 表明細項目 + allOf: + - $ref: "#/components/schemas/g_field" + lumpapply: + allOf: + - $ref: "#/components/schemas/lumpapply" + + GetCommentsResponses200: + type: object + properties: + docid: + description: 書類ID + type: integer + comment_list: + allOf: + - $ref: "#/components/schemas/comment_list" + + PostAttachmentsResponses200: + type: object + properties: + docid: + description: 書類ID + type: integer + seq: + description: 添付番号 + type: integer + message_type: + description: メッセージタイプ(0:NoError 固定) + type: integer + example: 0 + message: + description: メッセージ内容 + type: string + detail: + description: | + 詳細情報
+ リクエストで指定したユーザコードが X-point に登録されていないユーザだった場合、認証ユーザで添付ファイルを追加した旨のメッセージが返されます。
+ リクエストで指定したユーザコードが X-point に登録されているユーザだった場合、detail 項目はレスポンスに含まれません。 + type: string + + PatchAttachmentsResponses200: + type: object + properties: + docid: + description: 書類ID + type: integer + seq: + description: 添付番号 + type: integer + message_type: + description: メッセージタイプ(0:NoError 固定) + type: integer + example: 0 + message: + description: メッセージ内容 + type: string + detail: + description: | + 詳細情報
+ リクエストで指定したユーザコードが X-point に登録されていないユーザだった場合、認証ユーザで添付ファイルを追加した旨のメッセージが返されます。
+ リクエストで指定したユーザコードが X-point に登録されているユーザだった場合、detail 項目はレスポンスに含まれません。 + type: string + + GetAttachmentsListResponses200: + type: object + properties: + attachments: + description: | + 添付ファイル情報
+ 添付ファイルが存在しない場合は空配列が返される。 + type: array + items: + type: object + properties: + content_type: + description: ファイル種類 + type: string + seq: + description: | + 添付番号
+ 添付ファイル取得(Attachments)時に指定する番号。 + type: integer + name: + description: | + ファイル名
+ 拡張子を含めたファイル名。 + type: string + size: + description: | + ファイルサイズ
+ Byte で返される。 + type: integer + remarks: + description: 備考 + type: string + detail_no: + description: | + 対応明細行No
+ 電帳法対応オプションの添付型フォームの場合にレスポンスに含まれます。 + type: integer + evidence_type: + description: | + 電帳法書類区分
+ 電帳法対応オプションの添付型フォームの場合にレスポンスに含まれます。
+ 以下いずれかの区分値が設定されます。
+ 0:その他
+ 1:電子取引 + type: integer + evidence_type_label: + description: | + 電帳法書類区分(名称)
+ 電帳法対応オプションの添付型フォームの場合にレスポンスに含まれます。
+ 以下いずれかの区分名称が設定されます。
+ 0:その他
+ 1:電子取引 + type: string + + GetStatusResponses200: + type: object + properties: + document: + type: object + properties: + docid: + description: 書類ID + type: integer + title1: + description: 件名1 + type: string + title2: + description: 件名2 + type: string + form: + allOf: + - $ref: "#/components/schemas/doc_form" + route: + description: 承認ルート情報 + type: object + properties: + code: + description: 承認ルートコード + type: string + name: + description: 承認ルート名称 + type: string + type: + description: | + フォーム種別 + * standard:通常フォーム + * workflow:ワークフローフォーム + type: string + status: + allOf: + - $ref: "#/components/schemas/status" + step: + allOf: + - $ref: "#/components/schemas/step" + current_version: + description: 現在バージョン番号 + type: integer + writer: + type: object + properties: + usercode: + description: 申請者ユーザコード + type: string + username: + description: 申請者ユーザ名 + type: string + stampname: + description: 申請者印影名 + type: string + datetime: + description: 申請日時 + type: string + lastaprv: + type: object + properties: + usercode: + description: 最終承認者ユーザコード + type: string + username: + description: 最終承認者ユーザ名 + type: string + stampname: + description: 最終承認者印影名 + type: string + datetime: + description: 最終更新日時 + type: string + flow_versions: + description: 承認履歴情報 通常フォームの場合は空配列が返されます。 + type: array + items: + type: object + properties: + flow_results: + $ref: "#/components/schemas/flow_results" + histories: + description: 承認履歴情報 クエリパラメータ history がtrueの場合に返されます。通常フォームの場合は空配列が返されます。 + type: array + items: + type: object + properties: + version: + description: バージョン番号 + type: integer + flow_results: + $ref: "#/components/schemas/flow_results" + + GetLumpapplyListResponses200: + type: object + properties: + lumpapply: + description: | + 自動申請情報
+ 自動申請が設定されていない場合は空配列を返します。 + type: array + items: + type: object + properties: + id: + description: | + 自動申請ID
+ 自動申請の定義情報取得時(Lumpapply)に使用します。 + type: integer + name: + description: 自動申請名称 + type: string + form_id: + description: フォームID + type: integer + form_cd: + description: フォームコード + type: string + form_name: + description: フォーム名称 + type: string + route_id: + description: ルートID + type: integer + route_cd: + description: ルートコード + type: string + route_name: + description: ルート名称 + type: string + + GetFormsResponses200: + type: object + properties: + form: + description: フォーム定義情報 + type: object + properties: + code: + description: フォームコード + type: string + name: + description: フォーム名称 + type: string + max_step: + description: フォーム最大ステップ数 + type: integer + route: + description: | + フォームルート情報
+ 通常フォームの場合は空配列が返される。 + type: array + items: + type: object + properties: + code: + description: ルートコード + type: string + name: + description: ルート名称 + type: string + condroute: + description: | + 条件付きルート
+ - 条件付きルート: true + - ユーザ選択ルート: false + type: boolean + pages: + description: フォームページ情報 + type: array + items: + type: object + properties: + page_no: + description: ページ番号 + type: integer + form_code: + description: | + フォームコード
+ 複数枚フォームの場合のみ出力される。 + type: string + form_name: + description: | + フォーム名称
+ 複数枚フォームの場合のみ出力される。 + type: string + fields: + description: フィールド情報 + allOf: + - $ref: "#/components/schemas/fields" + + GetMasterListResponses200: + type: object + properties: + master: + description: | + マスタ情報
+ マスタが存在しない場合は空配列が返される。 + allOf: + - $ref: "#/components/schemas/master" + + GetMasterDataResponses200: + type: object + properties: + master: + description: マスタ情報 + type: object + properties: + type: + description: | + マスタタイプ
+ 0:簡易マスタ
+ 1:ユーザ固有マスタ
+ 2:X-point マスタ
+ 5:kintone 連携マスタ
+ type: integer + type_name: + description: マスタタイプ名称 + type: string + name: + description: マスタ名 + type: string + code: + description: | + マスタコード
+ 簡易マスタはマスタコードが返され、ユーザ固有マスタは空文字が返される。 + type: string + table_name: + description: | + マスタテーブル名
+ ユーザ固有マスタはテーブル名が返され、簡易マスタは空文字が返される。 + type: string + total_count: + description: データ件数 + type: integer + data: + description: | + マスタデータ情報
+ マスタデータが配列で返される。
+ ※作成したマスタ情報によって項目が異なります + allOf: + - $ref: "#/components/schemas/master_data" + + GetWebhooklogResponses200: + type: object + properties: + data: + description: | + ログデータ
+ ログが存在しない場合は空配列が返されます。 + allOf: + - $ref: "#/components/schemas/webhooklog_data" + + GetWebhookConfigResponses200: + type: object + properties: + form_name: + description: フォーム名称 + type: string + form_type: + description: | + フォーム種別
+ "standard":通常フォーム
+ "workflow":ワークフローフォーム + type: string + webhooks: + description: | + Webhook 設定情報
+ 取得対象の Webhook 設定が存在しない場合は空配列を返す + allOf: + - $ref: "#/components/schemas/webhooks_config" + + GetProxyInfoResponses200: + type: object + properties: + proxy: + description: | + 代理権限リスト
+ 代理権限が設定されていない場合は空配列が返される。 + allOf: + - $ref: "#/components/schemas/proxy_list" + + GetQueryListResponses200: + type: object + properties: + query_groups: + description: | + クエリグループ情報
+ 取得したクエリグループ情報の一覧が格納される。
+ 取得結果が 1 件も無い場合は空の配列となる。 + type: array + items: + type: object + properties: + query_group_id: + description: | + クエリグループ ID
+ [マイクエリ]の場合は 0 固定 + type: integer + query_group_name: + description: クエリグループ名称 + type: string + queries: + description: | + クエリ情報一覧
+ クエリグループに属するクエリの一覧 + allOf: + - $ref: "#/components/schemas/queries" + + GetQueryResponses200: + type: object + properties: + query: + description: クエリ情報 + type: object + properties: + query_id: + description: クエリID + type: integer + query_code: + description: クエリコード + type: string + query_name: + description: クエリ名 + type: string + query_type: + description: | + クエリ種別
+ "list"(一覧) / "summary"(サマリ) /"cross"(クロス集計) + type: string + form_count: + description: | + フォーム件数
+ クエリが参照するフォームの件数 + type: integer + fid: + description: | + フォームID
+ フォーム件数が 1 の場合に出力される + type: integer + form_name: + description: | + フォーム名
+ フォーム件数が 1 の場合に出力される + type: string + subtbl: + description: | + 表定義
+ フォーム件数が 1 の場合に出力される + type: string + forms: + description: | + フォーム情報
+ フォーム件数が 2 以上の場合に出力される + type: object + properties: + fid: + description: フォームID + type: integer + form_name: + description: フォーム名 + type: string + subtbl: + description: 表定義 + type: string + toprowmark: + description: 先頭行文字 + type: string + secondmark: + description: 継続行文字 + type: string + csv_filename: + description: CSVファイル名 + type: string + csv_header_flg: + description: | + CSV ファイルのヘッダー表示
+ true(表示する) / false(表示しない) + type: boolean + csvexport_manage_type: + description: | + CSV ファイル出力済み管理グラフ
+ "auto"(csv ファイル自動出力された書類だけを出力済みにする) / "all"(クエリ機能で出力された書類を全て出力済みにする) + type: string + graph: + description: | + グラフ情報
+ サマリ・クロス集計クエリ以外の場合応答に含まれない。 + type: object + properties: + graph_active_flg: + description: | + グラフ表示 + * true:グラフ表示する + * false:グラフ表示しない + type: boolean + graph_type: + description: | + グラフ種別 + * circle:円 + * bar:棒 + * line:折れ線 + * area:領域 + type: string + graph_3d: + description: | + 3D表示 + * true:3D表示する + * false:3D表示しない + type: boolean + graph_alpha: + description: | + 透過表示 + * true:透過表示する + * false:透過表示しない + type: boolean + graph_stack: + description: | + 積上げ表示 + * true:積上げ表示する + * false:積上げ表示しない + type: boolean + graph_direction: + description: | + 表示方向 + * vertical:縦 + * horizontal:横 + type: string + graph_reverse: + description: | + データマッピング + * column:値 = 列項目 + * row:値 = 行項目 + type: string + graph_label_title: + description: ラベル(題名) + type: string + graph_label_category: + description: ラベル(カテゴリー) + type: string + graph_label_value: + description: ラベル(値) + type: string + height: + description: 高さ(単位:px) + type: integer + width: + description: 幅(単位:px) + type: integer + graph_category_angle: + description: カテゴリー文字列の傾き(単位:度) + type: integer + remarks: + description: 備考 + type: string + cr_dt: + description: | + 新規作成
+ 書式:YYYY/MM/DD hh:mm:ss + type: string + up_dt: + description: | + 最終更新
+ 書式:YYYY/MM/DD hh:mm:ss + type: string + + PatchUpdateUserRequest: + type: object + properties: + schemas: + description: スキーマ + type: array + items: + example: [] + Operations: + description: ログイン ID を指定した値に置換する + type: array + items: + type: object + properties: + path: + type: string + op: + description: | + オペレーション
+ 置換:replace
+ 追加:add
+ 削除:remove + type: string + value: + description: 更新対象の項目と値を指定 + type: object + properties: + userName: + type: string + + PatchUpdateUserGroupInfoRequest: + type: object + properties: + schemas: + description: スキーマ + type: array + items: + example: [] + Operations: + description: オペレーション + type: array + items: + type: object + properties: + path: + type: string + op: + type: string + value: + type: object + properties: + displayName: + type: string + + PatchUpdatePartInfoRequest: + type: object + properties: + schemas: + description: スキーマ + type: array + items: + example: [] + Operations: + description: オペレーション + type: array + items: + type: object + properties: + path: + type: string + op: + type: string + value: + type: object + properties: + displayName: + type: string + displayKana: + type: string + partCode: + type: string diff --git a/internal/xpoint/schema.go b/internal/xpoint/schema.go new file mode 100644 index 0000000..004259c --- /dev/null +++ b/internal/xpoint/schema.go @@ -0,0 +1,204 @@ +package xpoint + +import ( + _ "embed" + "fmt" + "net/url" + "sort" + "strings" + "sync" + + "gopkg.in/yaml.v3" +) + +//go:embed openapi.yaml +var openapiYAML []byte + +// Operation maps a dotted schema path (e.g. "form.list") to an OpenAPI +// operation in the embedded X-point spec. +type Operation struct { + Path string + Method string +} + +// operationAliases maps user-facing identifiers to OpenAPI path+method pairs. +// The set mirrors the commands exposed by the CLI. +var operationAliases = map[string]Operation{ + "form.list": {Path: "/api/v1/forms", Method: "get"}, + "approval.list": {Path: "/api/v1/approvals", Method: "get"}, + "document.search": {Path: "/api/v1/search/documents", Method: "post"}, +} + +var ( + specOnce sync.Once + specRoot map[string]any + specErr error +) + +func loadSpec() (map[string]any, error) { + specOnce.Do(func() { + var raw any + if err := yaml.Unmarshal(openapiYAML, &raw); err != nil { + specErr = fmt.Errorf("parse embedded openapi.yaml: %w", err) + return + } + norm, ok := toStringKeyed(raw).(map[string]any) + if !ok { + specErr = fmt.Errorf("openapi root is not a mapping") + return + } + specRoot = norm + }) + return specRoot, specErr +} + +// SchemaAliases returns the sorted list of supported dotted aliases. +func SchemaAliases() []string { + out := make([]string, 0, len(operationAliases)) + for k := range operationAliases { + out = append(out, k) + } + sort.Strings(out) + return out +} + +// LookupOperation returns the OpenAPI operation object for the given alias. +// If resolveRefs is true, all $ref pointers within the operation are +// recursively inlined. +func LookupOperation(alias string, resolveRefs bool) (map[string]any, error) { + op, ok := operationAliases[alias] + if !ok { + return nil, fmt.Errorf("unknown schema alias %q (run `xp schema` to list supported aliases)", alias) + } + root, err := loadSpec() + if err != nil { + return nil, err + } + paths, _ := root["paths"].(map[string]any) + if paths == nil { + return nil, fmt.Errorf("openapi spec is missing `paths`") + } + path, _ := paths[op.Path].(map[string]any) + if path == nil { + return nil, fmt.Errorf("openapi spec is missing path %q", op.Path) + } + opObj, _ := path[op.Method].(map[string]any) + if opObj == nil { + return nil, fmt.Errorf("openapi spec is missing %s %s", strings.ToUpper(op.Method), op.Path) + } + result := cloneMap(opObj) + result["_path"] = op.Path + result["_method"] = strings.ToUpper(op.Method) + if resolveRefs { + resolved, err := resolveRefsIn(result, root, make(map[string]bool)) + if err != nil { + return nil, err + } + m, _ := resolved.(map[string]any) + return m, nil + } + return result, nil +} + +func resolveRefsIn(node any, root map[string]any, seen map[string]bool) (any, error) { + switch v := node.(type) { + case map[string]any: + if ref, ok := v["$ref"].(string); ok && len(v) == 1 { + if seen[ref] { + return map[string]any{"$ref": ref, "_circular": true}, nil + } + target, err := lookupRef(root, ref) + if err != nil { + return nil, err + } + next := make(map[string]bool, len(seen)+1) + for k := range seen { + next[k] = true + } + next[ref] = true + return resolveRefsIn(target, root, next) + } + out := make(map[string]any, len(v)) + for k, child := range v { + resolved, err := resolveRefsIn(child, root, seen) + if err != nil { + return nil, err + } + out[k] = resolved + } + return out, nil + case []any: + out := make([]any, len(v)) + for i, child := range v { + resolved, err := resolveRefsIn(child, root, seen) + if err != nil { + return nil, err + } + out[i] = resolved + } + return out, nil + default: + return v, nil + } +} + +// lookupRef resolves a local JSON pointer like "#/components/schemas/Foo". +func lookupRef(root map[string]any, ref string) (any, error) { + if !strings.HasPrefix(ref, "#/") { + return nil, fmt.Errorf("external or non-fragment $ref not supported: %q", ref) + } + parts := strings.Split(strings.TrimPrefix(ref, "#/"), "/") + var cur any = root + for _, raw := range parts { + seg, err := url.PathUnescape(raw) + if err != nil { + seg = raw + } + seg = strings.ReplaceAll(strings.ReplaceAll(seg, "~1", "/"), "~0", "~") + m, ok := cur.(map[string]any) + if !ok { + return nil, fmt.Errorf("cannot resolve %q: %q is not a mapping", ref, seg) + } + child, ok := m[seg] + if !ok { + return nil, fmt.Errorf("cannot resolve %q: segment %q not found", ref, seg) + } + cur = child + } + return cur, nil +} + +func cloneMap(m map[string]any) map[string]any { + out := make(map[string]any, len(m)) + for k, v := range m { + out[k] = v + } + return out +} + +// toStringKeyed recursively converts yaml.v3's map[any]any / map[string]any +// trees into purely JSON-compatible forms with string keys. +func toStringKeyed(v any) any { + switch m := v.(type) { + case map[any]any: + out := make(map[string]any, len(m)) + for k, val := range m { + out[fmt.Sprint(k)] = toStringKeyed(val) + } + return out + case map[string]any: + out := make(map[string]any, len(m)) + for k, val := range m { + out[k] = toStringKeyed(val) + } + return out + case []any: + out := make([]any, len(m)) + for i, val := range m { + out[i] = toStringKeyed(val) + } + return out + default: + return v + } +} diff --git a/internal/xpoint/schema_test.go b/internal/xpoint/schema_test.go new file mode 100644 index 0000000..6b6d6f4 --- /dev/null +++ b/internal/xpoint/schema_test.go @@ -0,0 +1,89 @@ +package xpoint + +import ( + "strings" + "testing" +) + +func TestSchemaAliases_Sorted(t *testing.T) { + got := SchemaAliases() + want := []string{"approval.list", "document.search", "form.list"} + if len(got) != len(want) { + t.Fatalf("aliases = %v", got) + } + for i, w := range want { + if got[i] != w { + t.Errorf("aliases[%d] = %q, want %q", i, got[i], w) + } + } +} + +func TestLookupOperation_Unknown(t *testing.T) { + _, err := LookupOperation("nope.missing", false) + if err == nil || !strings.Contains(err.Error(), "unknown schema alias") { + t.Errorf("err = %v", err) + } +} + +func TestLookupOperation_FormList_NoResolve(t *testing.T) { + op, err := LookupOperation("form.list", false) + if err != nil { + t.Fatalf("LookupOperation: %v", err) + } + if op["_method"] != "GET" { + t.Errorf("_method = %v", op["_method"]) + } + if op["_path"] != "/api/v1/forms" { + t.Errorf("_path = %v", op["_path"]) + } + if op["operationId"] != "GetAvailableFormList" { + t.Errorf("operationId = %v", op["operationId"]) + } + params, ok := op["parameters"].([]any) + if !ok || len(params) == 0 { + t.Fatalf("parameters = %v", op["parameters"]) + } + // Without --resolve-refs, the first parameter is still a $ref. + first, _ := params[0].(map[string]any) + if _, hasRef := first["$ref"]; !hasRef { + t.Errorf("expected $ref in parameter, got %v", first) + } +} + +func TestLookupOperation_FormList_ResolveRefs(t *testing.T) { + op, err := LookupOperation("form.list", true) + if err != nil { + t.Fatalf("LookupOperation: %v", err) + } + params, _ := op["parameters"].([]any) + if len(params) == 0 { + t.Fatalf("no parameters") + } + first, _ := params[0].(map[string]any) + if _, hasRef := first["$ref"]; hasRef { + t.Errorf("expected $ref to be inlined, got %v", first) + } + if first["name"] != "fgid" { + t.Errorf("first param name = %v", first["name"]) + } +} + +func TestLookupOperation_DocumentSearch(t *testing.T) { + op, err := LookupOperation("document.search", false) + if err != nil { + t.Fatalf("LookupOperation: %v", err) + } + if op["_method"] != "POST" { + t.Errorf("_method = %v", op["_method"]) + } + if op["_path"] != "/api/v1/search/documents" { + t.Errorf("_path = %v", op["_path"]) + } +} + +func TestLookupRef_MissingSegment(t *testing.T) { + root := map[string]any{"a": map[string]any{"b": 1}} + if _, err := lookupRef(root, "#/a/c"); err == nil { + t.Error("expected error for missing segment") + } +} From f98d5170da56b9bd5084197e1ffbb49c4a04c538 Mon Sep 17 00:00:00 2001 From: buty4649 Date: Fri, 17 Apr 2026 13:03:41 +0900 Subject: [PATCH 2/5] Replace embedded OpenAPI spec with curated schema.yaml The upstream X-point OpenAPI spec has schema/example inconsistencies (notably `form[].id` typed as string while the API actually returns integer). Since the API response is the source of truth, drop the embedded openapi.yaml in favor of a hand-maintained schema.yaml that covers only the operations this CLI supports and reflects the real response shapes. - Remove internal/xpoint/openapi.yaml (~9.5k lines) - Add internal/xpoint/schema.yaml describing form.list / approval.list / document.search with correct types - Simplify schema.go: drop $ref resolution, just lookup by alias - Drop --resolve-refs flag (no refs to resolve anymore) - Update tests and output field names (method/path instead of _method/_path) Co-Authored-By: Claude Opus 4.7 --- cmd/schema.go | 12 +- cmd/schema_test.go | 11 +- internal/xpoint/openapi.yaml | 9505 -------------------------------- internal/xpoint/schema.go | 179 +- internal/xpoint/schema.yaml | 264 + internal/xpoint/schema_test.go | 72 +- 6 files changed, 342 insertions(+), 9701 deletions(-) delete mode 100644 internal/xpoint/openapi.yaml create mode 100644 internal/xpoint/schema.yaml diff --git a/cmd/schema.go b/cmd/schema.go index 44a1e84..7529851 100644 --- a/cmd/schema.go +++ b/cmd/schema.go @@ -10,15 +10,12 @@ import ( "github.com/spf13/cobra" ) -var ( - schemaResolveRefs bool - schemaJQ string -) +var schemaJQ string var schemaCmd = &cobra.Command{ Use: "schema [service.resource.method]", - Short: "Show the OpenAPI schema for an X-point operation", - Long: `Print the OpenAPI operation object for a given X-point endpoint. + Short: "Show the schema for an X-point operation", + Long: `Print the schema object for a given X-point endpoint. Supported aliases map to the CLI's commands: form.list GET /api/v1/forms @@ -32,7 +29,6 @@ Run without arguments to list supported aliases.`, func init() { rootCmd.AddCommand(schemaCmd) - schemaCmd.Flags().BoolVar(&schemaResolveRefs, "resolve-refs", false, "inline $ref pointers into the output") schemaCmd.Flags().StringVar(&schemaJQ, "jq", "", "apply a gojq filter to the schema") } @@ -45,7 +41,7 @@ func runSchema(_ *cobra.Command, args []string) error { return nil } alias := strings.TrimSpace(args[0]) - op, err := xpoint.LookupOperation(alias, schemaResolveRefs) + op, err := xpoint.LookupOperation(alias) if err != nil { return err } diff --git a/cmd/schema_test.go b/cmd/schema_test.go index f5ecbd1..b179789 100644 --- a/cmd/schema_test.go +++ b/cmd/schema_test.go @@ -21,9 +21,8 @@ func TestSchemaCmd_ListsAliases(t *testing.T) { } func TestSchemaCmd_EmitsJSON(t *testing.T) { - schemaResolveRefs = false schemaJQ = "" - t.Cleanup(func() { schemaResolveRefs = false; schemaJQ = "" }) + t.Cleanup(func() { schemaJQ = "" }) out, err := captureStdout(t, func() error { return runSchema(schemaCmd, []string{"form.list"}) @@ -35,13 +34,12 @@ func TestSchemaCmd_EmitsJSON(t *testing.T) { if err := json.Unmarshal([]byte(out), &decoded); err != nil { t.Fatalf("output not JSON: %v (%s)", err, out) } - if decoded["_method"] != "GET" || decoded["_path"] != "/api/v1/forms" { + if decoded["method"] != "GET" || decoded["path"] != "/api/v1/forms" { t.Errorf("decoded = %v", decoded) } } func TestSchemaCmd_UnknownAlias(t *testing.T) { - schemaResolveRefs = false schemaJQ = "" err := runSchema(schemaCmd, []string{"nope"}) if err == nil || !strings.Contains(err.Error(), "unknown schema alias") { @@ -50,8 +48,7 @@ func TestSchemaCmd_UnknownAlias(t *testing.T) { } func TestSchemaCmd_JQFilter(t *testing.T) { - schemaResolveRefs = false - schemaJQ = ".operationId" + schemaJQ = ".summary" t.Cleanup(func() { schemaJQ = "" }) out, err := captureStdout(t, func() error { @@ -60,7 +57,7 @@ func TestSchemaCmd_JQFilter(t *testing.T) { if err != nil { t.Fatalf("runSchema: %v", err) } - if strings.TrimSpace(out) != `"GetAvailableFormList"` { + if strings.TrimSpace(out) != `"利用可能フォーム一覧取得"` { t.Errorf("output = %q", out) } } diff --git a/internal/xpoint/openapi.yaml b/internal/xpoint/openapi.yaml deleted file mode 100644 index 3df2887..0000000 --- a/internal/xpoint/openapi.yaml +++ /dev/null @@ -1,9505 +0,0 @@ -openapi: 3.0.3 -info: - title: X-point API - version: 1.0.0 - description: | - **[X-point REST API利用ガイド](./doc/manual.html)**

- OpenAPI定義ファイル(openapi.yaml)はダウンロード後、APIを利用するためのツールに取り込むことができます。 -servers: - - url: https://{sub_domain}.atledcloud.jp/xpoint - variables: - sub_domain: - default: sub_domain - description: X-pointのサブドメイン -tags: - - name: 書類編集・承認操作API - - name: システムAPI - - name: ユーザー別API - - name: SCIM API - - name: その他API -paths: - /api/v1/documents: - post: - tags: - - 書類編集・承認操作API - summary: 書類作成 - description: | - REST API による書類の作成(申請・下書き)を行います。
- 書類の作成にはフォームの特定に必要なフォームコードもしくはフォーム名称、承認ルートコードを指定する必要があります。
- 書類作成後の応答には X-point 上で書類を一意に特定する為の書類 ID が含まれます。
- 取得した書類 ID は、以後の書類操作に必須となるため、書類作成APIを使用したシステム側で保存する事が望ましい情報となります。 - - **APIトークンの必要権限** - * 追加権限 - - **注意事項** - * 通常の書類作成時に行える以下の事項は書類作成APIで行うことができません。 - * ファイルの添付、コメントの追加はできません。添付ファイル追加APIやコメント追加APIを利用してください。 - * 未定義ステップの承認者追加や、回覧ステップへの回覧者追加を行うことはできません。 - * 申請者が複数部署に所属していても申請部署を変更することはできません。 - * 各フィールドの初期値、初期取得値は登録されません。リクエスト内容の書類データに初期値、初期取得値を含める必要があります。 - * 各フィールドの入力値の書式チェックはできません。各フィールドの書式に合わせてリクエスト内容の書類データを指定する必要があります。 - * フォームに設定されたJavaScript、自動計算、マスタ検索、書類制御、ミラー項目は書類作成時に実行されません。 - * イメージアップロード・フィールドに画像をアップロードすることはできません。 - * 自動申請設定を使用する場合は自動申請と同様にリクエスト時のデータに含める事ができる表定義はフォーム内の1つのみになります。自動申請設定を利用しない場合は「表定義は1つのみ」の制約が無くなり、全ての表定義をリクエスト時のデータに含めることができます。 - * 管理者サイトの「フォーム管理>フィールド編集権限」で設定した編集禁止フィールド設定は効きません。 - * 電帳法対応オプションの添付型フォーム書類を申請する場合、添付ファイル(電子取引データ・取引関係書類)が添付されていない状態でも申請されます。 - - **補足** - * 申請ステップで添付ファイルが必須の承認ルートの書類を申請した場合はエラーレスポンスが返されます。
- ファイルを添付して申請したい場合は、書類作成APIで下書き書類を作成し、作成した下書き書類に添付ファイルを追加してから下書き提出してください。 - operationId: CreateDocument - requestBody: - $ref: "#/components/requestBodies/PostDocumentRequest" - security: - - bearerAuth: [] - - APIKeyAuth: [] - responses: - "200": - $ref: "#/components/responses/PostDocumentResponses200" - "400": - $ref: "#/components/responses/ErrorResponses400" - "401": - $ref: "#/components/responses/ErrorResponses401" - "403": - $ref: "#/components/responses/ErrorResponses403" - "500": - $ref: "#/components/responses/ErrorResponses500" - - # -------------------------------------------------------------------------------------------------- - - /api/v1/documents/{docid}: - patch: - tags: - - 書類編集・承認操作API - summary: 書類のワークフロー操作・編集・更新 - description: | - 指定された ID の書類内容を、送信されたフィールド項目について更新します。 - - **APIトークンの必要権限** - * 更新権限 - - **注意事項**
- * ワークフロー操作のみを行う場合は、リクエストボディ「datas」(書類データ)無しでリクエストしてください。 - * 書類データの更新のみを行う場合は、リクエストボディ「wf_type」(ワークフロー種別)無しでリクエストしてください。 - * 書類データの更新は、更新したいフィールドのみをリクエストボディ「datas」(書類データ)内に指定してリクエストします。 - * 通常の書類操作時に行える以下の事項は書類のワークフロー操作・編集・更新APIで行うことができません。 - * ファイルの添付、コメントの追加はできません。添付ファイル追加APIやコメント追加APIを利用してください。 - * 未定義ステップの承認者追加や、回覧ステップへの回覧者追加を行うことはできません。 - * 申請者が複数部署に所属していても申請部署を変更することはできません。 - * 各フィールドの初期値、初期取得値は登録されません。リクエスト内容の書類データに初期値、初期取得値を含める必要があります。 - * 各フィールドの入力値の書式チェックはできません。各フィールドの書式に合わせてリクエスト内容の書類データを指定する必要があります。 - * フォームに設定されたJavaScript、自動計算、マスタ検索、書類制御、ミラー項目は書類操作時に実行されません。 - * イメージアップロード・フィールドに画像をアップロードすることはできません。 - * 自動申請設定を使用する場合は自動申請と同様にリクエスト時のデータに含めることができる表定義はフォーム内の1つのみになります。自動申請設定を使用しない場合は「表定義は1つのみ」の制約が無くなり、全ての表定義をリクエスト時のデータに含めることができます。 - * 書類のワークフロー操作・編集・更新APIで承認操作を行う場合、「連続した承認ステップでの自動承認」は動作しますが、「下位役職承認のスキップ」は動作しません。 - * 管理者サイトの「フォーム管理>フィールド編集権限」で設定した編集禁止フィールド設定は効きません。 - * 電帳法対応オプションの添付型フォーム書類をワークフロー操作する場合、添付ファイル(電子取引データ・取引関係書類)が添付されていない状態でも警告が発生せずワークフロー処理が進みます。 - operationId: UpdateDocument - requestBody: - $ref: "#/components/requestBodies/PatchDocumentRequest" - security: - - bearerAuth: [] - - APIKeyAuth: [] - parameters: - - $ref: "#/components/parameters/path_docid_required" - responses: - "200": - $ref: "#/components/responses/PatchDocumentResponses200" - "400": - $ref: "#/components/responses/ErrorResponses400" - "401": - $ref: "#/components/responses/ErrorResponses401" - "403": - $ref: "#/components/responses/ErrorResponses403" - "500": - $ref: "#/components/responses/ErrorResponses500_noReasons" - - # -------------------------------------------------------------------------------------------------- - - get: - tags: - - 書類編集・承認操作API - summary: 書類内容取得 - description: | - 指定された ID の書類を取得し応答として返します。
- 応答には、コメント情報、添付ファイル情報が含まれますが、添付ファイルは別途用意されている添付ファイル取得API(GetAttachments)を利用してダウンロードします。 - - **APIトークンの必要権限** - * 閲覧権限 - - **注意事項** - * OAuth2 認証で REST API を利用する場合、認証ユーザーが書類に対するアクセス権限を保持している必要があります。 - operationId: GetDocument - security: - - bearerAuth: [] - - APIKeyAuth: [] - parameters: - - $ref: "#/components/parameters/path_docid_required" - responses: - "200": - $ref: "#/components/responses/GetDocumentResponses200" - "400": - $ref: "#/components/responses/ErrorResponses400" - "403": - $ref: "#/components/responses/ErrorResponses403" - - # -------------------------------------------------------------------------------------------------- - - delete: - tags: - - 書類編集・承認操作API - summary: 書類削除 - description: | - 指定された ID の書類を削除します。 - - **APIトークンの必要権限** - * 削除権限 - operationId: DeleteDocument - security: - - bearerAuth: [] - - APIKeyAuth: [] - parameters: - - $ref: "#/components/parameters/path_docid_required" - responses: - "200": - $ref: "#/components/responses/DeleteDocumentResponses200" - "403": - $ref: "#/components/responses/ErrorResponses403" - "500": - $ref: "#/components/responses/ErrorResponses500_noReasons" - - # -------------------------------------------------------------------------------------------------- - - /api/v1/documents/{docid}/comments: - post: - tags: - - 書類編集・承認操作API - summary: コメント追加 - description: | - 指定された ID の書類にコメントを追加します。 - - **APIトークンの必要権限** - * 更新権限 - operationId: AddComment - requestBody: - $ref: "#/components/requestBodies/PostCommentsRequest" - security: - - bearerAuth: [] - - APIKeyAuth: [] - parameters: - - $ref: "#/components/parameters/path_docid_required" - responses: - "200": - $ref: "#/components/responses/PostCommentsResponses200" - "400": - $ref: "#/components/responses/ErrorResponses400" - "403": - $ref: "#/components/responses/ErrorResponses403" - "500": - $ref: "#/components/responses/ErrorResponses500_noReasons" - - # -------------------------------------------------------------------------------------------------- - - get: - tags: - - 書類編集・承認操作API - summary: コメント取得 - description: | - 指定された ID の書類に登録されているコメントを一括で取得します。 - - **APIトークンの必要権限** - * 閲覧権限 - operationId: GetComment - security: - - bearerAuth: [] - - APIKeyAuth: [] - parameters: - - $ref: "#/components/parameters/path_docid_required" - responses: - "200": - $ref: "#/components/responses/GetCommentsResponses200" - "400": - $ref: "#/components/responses/ErrorResponses400" - "403": - $ref: "#/components/responses/ErrorResponses403" - "500": - $ref: "#/components/responses/ErrorResponses500_noReasons" - - # -------------------------------------------------------------------------------------------------- - - /api/v1/documents/{docid}/comments/{seq}: - patch: - tags: - - 書類編集・承認操作API - summary: コメント更新 - description: | - 指定された ID の書類に登録されているコメントの内容を更新します。 - - **APIトークンの必要権限** - * 更新権限 - operationId: UpdateComment - requestBody: - $ref: "#/components/requestBodies/PatchCommentsRequest" - security: - - bearerAuth: [] - - APIKeyAuth: [] - parameters: - - $ref: "#/components/parameters/path_docid_required" - - $ref: "#/components/parameters/path_commentNo_required" - responses: - "200": - $ref: "#/components/responses/PatchCommentsResponses200" - "400": - $ref: "#/components/responses/ErrorResponses400" - "403": - $ref: "#/components/responses/ErrorResponses403" - "500": - $ref: "#/components/responses/ErrorResponses500_noReasons" - - # -------------------------------------------------------------------------------------------------- - - delete: - tags: - - 書類編集・承認操作API - summary: コメント削除 - description: | - 指定された ID の書類に登録されているコメントを削除します。 - - **APIトークンの必要権限** - * 削除権限 - operationId: DeleteComment - security: - - bearerAuth: [] - - APIKeyAuth: [] - parameters: - - $ref: "#/components/parameters/path_docid_required" - - $ref: "#/components/parameters/path_commentNo_required" - responses: - "200": - $ref: "#/components/responses/DeleteCommentsResponses200" - "400": - $ref: "#/components/responses/ErrorResponses400" - "403": - $ref: "#/components/responses/ErrorResponses403" - "500": - $ref: "#/components/responses/ErrorResponses500_noReasons" - - # -------------------------------------------------------------------------------------------------- - - /api/v1/documents/{docid}/pdf: - get: - tags: - - 書類編集・承認操作API - summary: PDFダウンロード - description: | - 指定された ID の書類の PDF がダウンロードできます。 - - **APIトークンの必要権限** - * 閲覧権限 - - **注意事項** - * OAuth2 認証で REST API を利用する場合、認証ユーザーが書類に対するアクセス権限を保持している必要があります。 - operationId: DownloadPdf - security: - - bearerAuth: [] - - APIKeyAuth: [] - parameters: - - $ref: "#/components/parameters/path_docid_required" - responses: - "200": - $ref: "#/components/responses/GetPDFDownloadResponses200" - "400": - $ref: "#/components/responses/ErrorResponses400" - "403": - $ref: "#/components/responses/ErrorResponses403" - "500": - $ref: "#/components/responses/ErrorResponses500_noReasons" - - # -------------------------------------------------------------------------------------------------- - - /api/v1/documents/{docid}/openview: - get: - tags: - - 書類編集・承認操作API - summary: 書類表示 - description: | - 指定された ID の書類を表示するための HTML(JavaScript 含む)一式がダウンロードされます。 - - 本APIで書類を表示した場合、閉じるナビボタンで書類を閉じることができません。 - 書類を閉じる場合はブラウザのウィンドウやタブの×ボタンから閉じてください。 - - **APIトークンの必要権限** - * 閲覧権限 - operationId: ViewDocument - security: - - bearerAuth: [] - - APIKeyAuth: [] - parameters: - - $ref: "#/components/parameters/path_docid_required" - - $ref: "#/components/parameters/query_proxyUser3" - responses: - "200": - $ref: "#/components/responses/GetDocumentViewResponses200" - "400": - $ref: "#/components/responses/ErrorResponses400" - "403": - $ref: "#/components/responses/ErrorResponses403" - "500": - $ref: "#/components/responses/ErrorResponses500_noReasons" - - # -------------------------------------------------------------------------------------------------- - - /api/v1/documents/docview: - get: - tags: - - 書類編集・承認操作API - summary: 新規書類・関連書類作成 - description: | - 書類の新規作成、関連書類の作成を行うための書類ビューHTML がダウンロードされます。 - - 本APIで書類を表示した場合、閉じるナビボタンで書類を閉じることができません。 - 書類を閉じる場合はブラウザのウィンドウやタブの×ボタンから閉じてください。 - - **APIトークンの必要権限** - * 閲覧権限 - operationId: ViewNewDocument - security: - - bearerAuth: [] - - APIKeyAuth: [] - parameters: - - $ref: "#/components/parameters/query_fcd" - - $ref: "#/components/parameters/query_formname" - - $ref: "#/components/parameters/query_routecd_required" - - $ref: "#/components/parameters/query_fromdocid" - - $ref: "#/components/parameters/query_proxyUser" - responses: - "200": - $ref: "#/components/responses/GetCreateDocumentResponses200" - "400": - $ref: "#/components/responses/ErrorResponses400" - "403": - $ref: "#/components/responses/ErrorResponses403" - - # -------------------------------------------------------------------------------------------------- - - /multiapi/v1/documents/docview: - post: - tags: - - 書類編集・承認操作API - summary: 新規書類・関連書類作成 - description: | - リクエスト時に、表示する書類ビューのフィールドに事前入力する値、事前添付するファイルが指定可能な新規書類・関連書類作成 API です。
- GETメソッド版同様、書類の新規作成、関連書類の作成を行うための書類ビューHTML がダウンロードされます。 - - 本APIで書類を表示した場合、閉じるナビボタンで書類を閉じることができません。 - 書類を閉じる場合はブラウザのウィンドウやタブの×ボタンから閉じてください。 - - **APIトークンの必要権限** - * 閲覧権限 - - **注意事項** - * Content-Type に multipart/form-data を指定すると、アプリケーション側でリクエストに境界情報が付与できずエラーになる場合があります。
- エラーになる場合は Content-Type を指定せずに実行してください。 - operationId: ViewNewDocumentMultipart - requestBody: - $ref: "#/components/requestBodies/PostCreateDocumentsRequest" - security: - - bearerAuth: [] - - APIKeyAuth: [] - responses: - "200": - $ref: "#/components/responses/PostCreateDocumentResponses200" - "400": - $ref: "#/components/responses/ErrorResponses400" - "403": - $ref: "#/components/responses/ErrorResponses403" - - # -------------------------------------------------------------------------------------------------- - - /api/v1/documents/{docid}/status: - get: - tags: - - 書類編集・承認操作API - summary: 書類承認状況取得 - description: | - 指定された書類 ID の最新版の承認状況を取得します。 - - **APIトークンの必要権限** - * 閲覧権限 - operationId: GetDocumentStatus - security: - - bearerAuth: [] - - APIKeyAuth: [] - parameters: - - $ref: "#/components/parameters/path_docid_required" - - $ref: "#/components/parameters/query_history" - responses: - "200": - $ref: "#/components/responses/GetStatusResponses200" - "400": - $ref: "#/components/responses/ErrorResponses400" - "403": - $ref: "#/components/responses/ErrorResponses403" - "500": - $ref: "#/components/responses/ErrorResponses500_noReasons" - - # -------------------------------------------------------------------------------------------------- - - /api/v1/documents/{docid}/statusview: - get: - tags: - - 書類編集・承認操作API - summary: 承認進捗状況表示 - description: | - 指定された ID の書類の承認進捗状況を表示するための HTML 一式がダウンロードされます。
- 取得した HTML は X-point の承認状況を表す画面とほぼ同じ内容で、Webkit 等に表示する際に利用します。 - - **APIトークンの必要権限** - * 閲覧権限 - operationId: ViewDocumentStatus - security: - - bearerAuth: [] - - APIKeyAuth: [] - parameters: - - $ref: "#/components/parameters/path_docid_required" - responses: - "200": - $ref: "#/components/responses/GetStatusviewResponses200" - "400": - $ref: "#/components/responses/ErrorResponses400" - "403": - $ref: "#/components/responses/ErrorResponses403" - "500": - $ref: "#/components/responses/ErrorResponses500_noReasons" - - # -------------------------------------------------------------------------------------------------- - - /multiapi/v1/attachments/{docid}: - post: - tags: - - 書類編集・承認操作API - summary: 添付ファイル追加 - description: | - 指定された ID の書類に添付ファイルのアップロード追加を行います。 - - **APIトークンの必要権限** - * 更新権限 - - **注意事項** - * Content-Type に multipart/form-data を指定すると、アプリケーション側でリクエストに境界情報が付与できずエラーになる場合があります。
- エラーになる場合は Content-Type を指定せずに実行してください。 - operationId: AddAttachment - requestBody: - $ref: "#/components/requestBodies/PostAddAttachmentsRequest" - security: - - bearerAuth: [] - - APIKeyAuth: [] - parameters: - - $ref: "#/components/parameters/path_docid_required" - responses: - "200": - $ref: "#/components/responses/PostAttachmentsResponses200" - "400": - $ref: "#/components/responses/ErrorResponses400" - "403": - $ref: "#/components/responses/ErrorResponses403" - - # -------------------------------------------------------------------------------------------------- - - /multiapi/v1/attachments/{docid}/{attach_seq}: - patch: - tags: - - 書類編集・承認操作API - summary: 添付ファイル更新/削除 - description: | - 指定された ID の書類に添付されている指定されたファイルを更新または削除します。 - - **APIトークンの必要権限** - * 更新権限 - - **注意事項** - * Content-Type に multipart/form-data を指定すると、アプリケーション側でリクエストに境界情報が付与できずエラーになる場合があります。
- エラーになる場合は Content-Type を指定せずに実行してください。 - operationId: UpdateAttachment - requestBody: - $ref: "#/components/requestBodies/PatchUpdateAttachmentsRequest" - security: - - bearerAuth: [] - - APIKeyAuth: [] - parameters: - - $ref: "#/components/parameters/path_docid_required" - - $ref: "#/components/parameters/path_attachSeq_required" - responses: - "200": - $ref: "#/components/responses/PatchAttachmentsResponses200" - "400": - $ref: "#/components/responses/ErrorResponses400" - "403": - $ref: "#/components/responses/ErrorResponses403" - "500": - $ref: "#/components/responses/ErrorResponses500_noReasons" - - # -------------------------------------------------------------------------------------------------- - - /api/v1/attachments/{docid}: - get: - tags: - - 書類編集・承認操作API - summary: 添付ファイル一覧取得 - description: | - 指定された ID の書類に添付されている添付ファイルの一覧を取得します。 - - **APIトークンの必要権限** - * 閲覧権限 - operationId: GetAttachmentList - security: - - bearerAuth: [] - - APIKeyAuth: [] - parameters: - - $ref: "#/components/parameters/path_docid_required" - responses: - "200": - $ref: "#/components/responses/GetAttachmentsListResponses200" - "400": - $ref: "#/components/responses/ErrorResponses400" - "403": - $ref: "#/components/responses/ErrorResponses403" - "500": - $ref: "#/components/responses/ErrorResponses500_noReasons" - - # -------------------------------------------------------------------------------------------------- - - /api/v1/attachments/{docid}/{attach_seq}: - get: - tags: - - 書類編集・承認操作API - summary: 添付ファイル取得 - description: | - 指定された ID の書類に添付されている添付ファイルをダウンロードします。 - - **APIトークンの必要権限** - * 閲覧権限 - operationId: GetAttachment - security: - - bearerAuth: [] - - APIKeyAuth: [] - parameters: - - $ref: "#/components/parameters/path_docid_required" - - $ref: "#/components/parameters/path_attachSeq_required" - responses: - "200": - $ref: "#/components/responses/GetAttachmentsResponses200" - "400": - $ref: "#/components/responses/ErrorResponses400" - "403": - $ref: "#/components/responses/ErrorResponses403" - "500": - $ref: "#/components/responses/ErrorResponses500_noReasons" - - # -------------------------------------------------------------------------------------------------- - - /api/v1/system/lumpapply: - get: - tags: - - システムAPI - summary: 自動申請登録の一覧取得 - description: 認証ドメインの管理サイトに登録されている自動申請の一覧を取得します。 - operationId: GetLumpapplyList - security: - - bearerAuth: [] - responses: - "200": - $ref: "#/components/responses/GetLumpapplyListResponses200" - - # -------------------------------------------------------------------------------------------------- - - /api/v1/system/lumpapply/{lumpapplyid}: - get: - tags: - - システムAPI - summary: 自動申請の定義情報取得 - description: | - 指定された自動申請登録 ID に従い、登録されている自動申請の詳細設定を取得します。 - - **注意事項** - * 管理者権限を持つユーザで認証した場合のみ自動申請の定義情報が取得できます。
- 一般ユーザーの場合は権限エラーが返されます。 - operationId: GetLumpapplyDefinition - security: - - bearerAuth: [] - parameters: - - $ref: "#/components/parameters/path_lumpapplyid_required" - responses: - "200": - $ref: "#/components/responses/GetLumpapplyResponses200" - "400": - $ref: "#/components/responses/ErrorResponses400" - "403": - $ref: "#/components/responses/ErrorResponses403" - "500": - $ref: "#/components/responses/ErrorResponses500_noReasons" - - # -------------------------------------------------------------------------------------------------- - - /api/v1/system/forms/{fid}: - get: - tags: - - システムAPI - summary: フォーム定義情報取得 - description: | - フォームを構成するフィールドの詳細情報を取得します。 - - **注意事項** - * 本APIは管理者ユーザで認証した場合のみフォーム定義が取得できます。 - * 一般ユーザでフォーム定義を取得したい場合は「/api/v1/forms/{フォームID}」をリクエストしてください。 - operationId: GetFormDefinitionByAdmin - security: - - bearerAuth: [] - parameters: - - $ref: "#/components/parameters/path_fid_required" - responses: - "200": - $ref: "#/components/responses/GetFormsResponses200" - "400": - $ref: "#/components/responses/ErrorResponses400" - "500": - $ref: "#/components/responses/ErrorResponses500_noReasons" - - # -------------------------------------------------------------------------------------------------- - - /api/v1/system/forms: - get: - tags: - - システムAPI - summary: 登録フォーム一覧取得 - description: | - 管理者サイトの「フォーム管理」で表示される一覧相当のリストが取得できます。 - - **注意事項** - * 管理者権限を持つユーザーで認証した場合のみ登録フォーム一覧情報が取得できます。
- 一般ユーザーの場合は権限エラーが返されます。 - operationId: GetRegistrationFormList - security: - - bearerAuth: [] - responses: - "200": - $ref: "#/components/responses/GetFormsListResponses200" - - # -------------------------------------------------------------------------------------------------- - - /api/v1/system/master: - get: - tags: - - システムAPI - summary: マスタ一覧取得 - description: 管理者サイトの「マスタ管理」で表示されるマスタ一覧相当のリストが取得できます。 - operationId: GetMasterList - security: - - bearerAuth: [] - responses: - "200": - $ref: "#/components/responses/GetMasterListResponses200" - "403": - $ref: "#/components/responses/ErrorResponses403" - - # -------------------------------------------------------------------------------------------------- - - /api/v1/system/master/{master_table_name}: - get: - tags: - - システムAPI - summary: ユーザ固有マスタ情報取得 - description: 管理者サイトの「マスタ管理>ユーザ固有マスタ>取込>ユーザ固有マスタプロパティ」で表示される情報相当が取得できます。 - operationId: GetUserSpecificMasterInfo - security: - - bearerAuth: [] - parameters: - - $ref: "#/components/parameters/path_masterTableName_required" - responses: - "200": - $ref: "#/components/responses/GetUserMasterListResponses200" - "403": - $ref: "#/components/responses/ErrorResponses403" - "404": - $ref: "#/components/responses/ErrorResponses404" - - # -------------------------------------------------------------------------------------------------- - - /api/v1/system/master/{master_code}/data: - get: - tags: - - システムAPI - summary: マスタデータ取得 - description: | - 管理者サイトの「マスタ管理>マスタ一覧>エクスポート」相当の機能の API です。
- 簡易マスタ、ユーザ固有マスタのデータを JSON 形式もしくは CSV 形式で取得できます。 - - **URL**
- エンドポイントの「data」を「data.json」とするとJSON形式で、「data.csv」とするとCSV形式でマスタデータが取得できます。 - * 【JSON 形式で取得する場合】
-  /api/v1/system/master/{マスタ識別情報}/data
-  /api/v1/system/master/{マスタ識別情報}/data.json -

- * 【CSV 形式で取得する場合】
-  /api/v1/system/master/{マスタ識別情報}/data.csv - operationId: GetMasterData - security: - - bearerAuth: [] - parameters: - - $ref: "#/components/parameters/path_masterCode_required" - - $ref: "#/components/parameters/query_masterType_required" - - $ref: "#/components/parameters/query_rows" - - $ref: "#/components/parameters/query_offset" - - $ref: "#/components/parameters/query_fileName" - - $ref: "#/components/parameters/query_delimiter" - - $ref: "#/components/parameters/query_title" - - $ref: "#/components/parameters/query_fields" - responses: - "200": - $ref: "#/components/responses/GetMasterDataResponses200" - "400": - $ref: "#/components/responses/ErrorResponses400" - "403": - $ref: "#/components/responses/ErrorResponses403" - "404": - $ref: "#/components/responses/ErrorResponses404" - - # -------------------------------------------------------------------------------------------------- - - put: - tags: - - システムAPI - summary: 簡易マスタデータインポート - description: | - 管理者サイトの「マスタ管理>マスタ一覧>インポート」相当の機能の API です。
- JSON 形式のマスタデータを簡易マスタにインポートすることが可能です。 - operationId: ImportSimpleMasterData - requestBody: - $ref: "#/components/requestBodies/PutMasterDataRequest" - security: - - bearerAuth: [] - parameters: - - $ref: "#/components/parameters/path_simpleMasterCode_required" - responses: - "200": - $ref: "#/components/responses/PutMasterDataResponses200" - "403": - $ref: "#/components/responses/ErrorResponses403" - "404": - $ref: "#/components/responses/ErrorResponses404" - - # -------------------------------------------------------------------------------------------------- - - /multiapi/v1/system/master/{master_table_name}/data: - post: - tags: - - システムAPI - summary: ユーザ固有マスタデータアップロード - description: | - リモート入出力機能のマスタリモート入力機能相当の API です。
- ユーザ固有マスタのインポートに利用する CSV ファイルを X-point へアップロードすることが可能です。 - - **注意事項** - * ユーザ固有マスタデータアップロード API でインポートに利用する CSV ファイルをアップロードするには、対象のユーザ固有マスタの「ユーザ固有マスタインポートバッチ」を事前に登録しておく必要があります。 - * ユーザ固有マスタデータアップロード API はマスタデータのインポート実行までは行いません。
- インポートの実行は管理者サイトのタスク管理画面から手動で実行するか、スケジュールを設定して実行する必要があります。 - * Content-Type に multipart/form-data を指定すると、アプリケーション側でリクエストに境界情報が付与できずエラーになる場合があります。
- エラーになる場合は Content-Type を指定せずにリクエストしてください。 - operationId: UploadUserSpecificMasterData - requestBody: - $ref: "#/components/requestBodies/PostUserMasterUpdateRequest" - security: - - bearerAuth: [] - parameters: - - $ref: "#/components/parameters/path_masterTableName_required" - responses: - "200": - $ref: "#/components/responses/PostUserMasterUploadResponses200" - "400": - $ref: "#/components/responses/ErrorResponses400" - "403": - $ref: "#/components/responses/ErrorResponses403" - "404": - $ref: "#/components/responses/ErrorResponses404" - "500": - $ref: "#/components/responses/ErrorResponses500_noReasons" - - # -------------------------------------------------------------------------------------------------- - - /api/v1/system/webhooklog: - get: - tags: - - システムAPI - summary: Webhookログ取得 - description: Webhook の送信日時等を指定して Webhook 送信ログを検索/取得します。 - operationId: GetWebhookLog - security: - - bearerAuth: [] - parameters: - - $ref: "#/components/parameters/query_from" - - $ref: "#/components/parameters/query_to" - - $ref: "#/components/parameters/query_docid" - - $ref: "#/components/parameters/query_formCode" - - $ref: "#/components/parameters/query_routeCode" - - $ref: "#/components/parameters/query_status" - - $ref: "#/components/parameters/query_url" - - $ref: "#/components/parameters/query_limit" - - $ref: "#/components/parameters/query_offset_position" - responses: - "200": - $ref: "#/components/responses/GetWebhooklogResponses200" - - # -------------------------------------------------------------------------------------------------- - - /api/v1/system/webhooklog/{uuid}: - get: - tags: - - システムAPI - summary: Webhook詳細ログ取得 - description: Webhook 送信ログの詳細情報であるリクエスト情報、レスポンス情報を取得できます。 - operationId: GetWebhookLogDetail - security: - - bearerAuth: [] - parameters: - - $ref: "#/components/parameters/path_uuid_required" - responses: - "200": - $ref: "#/components/responses/GetWebhooklogDetailsResponses200" - "400": - $ref: "#/components/responses/ErrorResponses400" - - # -------------------------------------------------------------------------------------------------- - - /api/v1/system/{fid}/webhooks: - get: - tags: - - システムAPI - summary: Webhook設定取得 - description: | - 指定したフォームの Webhook 設定情報を取得します。
- リクエストには FQDN に指定が必要で、指定した FQDN と Webhook 送信先 URL の FQDN が完全一致する Webhook 設定のみ取得できます。 - operationId: GetWebhookConfig - security: - - bearerAuth: [] - parameters: - - $ref: "#/components/parameters/path_fid_required" - - $ref: "#/components/parameters/query_fqdn_required" - responses: - "200": - $ref: "#/components/responses/GetWebhookConfigResponses200" - "400": - $ref: "#/components/responses/ErrorResponses400" - "404": - $ref: "#/components/responses/ErrorResponses404" - - # -------------------------------------------------------------------------------------------------- - - post: - tags: - - システムAPI - summary: Webhook設定登録 - description: 指定したフォームに Webhook 設定を登録します。 - operationId: RegistWebhookConfig - requestBody: - $ref: "#/components/requestBodies/PostWebhookInsertRequest" - security: - - bearerAuth: [] - parameters: - - $ref: "#/components/parameters/path_fid_required" - responses: - "200": - $ref: "#/components/responses/PostWebhookInsertResponses200" - "400": - $ref: "#/components/responses/ErrorResponses400" - "404": - $ref: "#/components/responses/ErrorResponses404" - - # -------------------------------------------------------------------------------------------------- - - /api/v1/system/{fid}/webhooks/{webhookId}: - patch: - tags: - - システムAPI - summary: Webhook設定更新 - description: | - 指定したフォームの指定した Webhook 設定を更新します。
- リクエストには FQDN に指定が必要で、指定した FQDN と Webhook 送信先 URL の FQDN が完全一致する場合のみ Webhook 設定が更新可能です。 - operationId: UpdateWebhookConfig - requestBody: - $ref: "#/components/requestBodies/PatchWebhookUpdateRequest" - security: - - bearerAuth: [] - parameters: - - $ref: "#/components/parameters/path_fid_required" - - $ref: "#/components/parameters/path_webhookId_required" - responses: - "200": - $ref: "#/components/responses/PatchWebhookUpdateResponses200" - "400": - $ref: "#/components/responses/ErrorResponses400" - "404": - $ref: "#/components/responses/ErrorResponses404" - - # -------------------------------------------------------------------------------------------------- - - delete: - tags: - - システムAPI - summary: Webhook設定削除 - description: | - 指定したフォームの指定した Webhook 設定を削除します。
- リクエストには FQDN に指定が必要で、指定した FQDN と Webhook 送信先 URL の FQDN が完全一致する場合のみ Webhook 設定の削除が可能です。 - operationId: DeleteWebhookConfig - security: - - bearerAuth: [] - parameters: - - $ref: "#/components/parameters/path_fid_required" - - $ref: "#/components/parameters/path_webhookId_required" - - $ref: "#/components/parameters/query_fqdn_required2" - responses: - "200": - $ref: "#/components/responses/DeleteWebhookConfigResponses200" - "400": - $ref: "#/components/responses/ErrorResponses400" - "404": - $ref: "#/components/responses/ErrorResponses404" - - # -------------------------------------------------------------------------------------------------- - - /api/v1/forms/{fid}: - get: - tags: - - ユーザー別API - summary: フォーム定義情報取得 - description: フォームを構成するフィールドの詳細情報を取得します。 - operationId: GetFormDefinition - security: - - bearerAuth: [] - parameters: - - $ref: "#/components/parameters/path_fid_required" - responses: - "200": - $ref: "#/components/responses/GetFormsResponses200" - "400": - $ref: "#/components/responses/ErrorResponses400" - "500": - $ref: "#/components/responses/ErrorResponses500_noReasons" - - # -------------------------------------------------------------------------------------------------- - - /api/v1/forms: - get: - tags: - - ユーザー別API - summary: 利用可能フォーム一覧取得 - description: | - 認証ユーザーが利用できるフォームのフォームID、名称を所属グループ(グループID、グループ名)とセットで取得します。
- 代理申請者のユーザーコードを指定することで、代理申請可能なフォーム情報が取得できます。 - operationId: GetAvailableFormList - security: - - bearerAuth: [] - parameters: - - $ref: "#/components/parameters/query_fgid" - - $ref: "#/components/parameters/query_formname_flg" - - $ref: "#/components/parameters/query_proxyUser2" - - $ref: "#/components/parameters/query_keyword" - - $ref: "#/components/parameters/query_order" - responses: - "200": - $ref: "#/components/responses/GetUseFormsListResponses200" - "400": - $ref: "#/components/responses/ErrorResponses400" - - # -------------------------------------------------------------------------------------------------- - - /api/v1/proxy: - get: - tags: - - ユーザー別API - summary: 代理権限情報取得 - description: | - 認証ユーザ―が代理を許可されている、ユーザ―、ワークフロー操作(申請、承認)、フォーム・ステップに関わる応報を取得します。
- 代理ユーザ―情報を REST API 呼び出し際に指定することで、許可された範囲で代理者として情報を取得・操作する事ができます。 - operationId: GetProxyInfo - security: - - bearerAuth: [] - responses: - "200": - $ref: "#/components/responses/GetProxyInfoResponses200" - - # -------------------------------------------------------------------------------------------------- - - /api/v1/approvals: - get: - tags: - - ユーザー別API - summary: 承認待ち一覧取得 - description: | - ユーザ―サイトの「承認」で表示される一覧相当のリストを取得できます。
- 代理ユーザーのユーザーコードを指定することで、代理ユーザーの承認待ち一覧が取得できます。 - operationId: GetApprovalList - security: - - bearerAuth: [] - parameters: - - $ref: "#/components/parameters/query_stat" - - $ref: "#/components/parameters/query_fgid2" - - $ref: "#/components/parameters/query_fid" - - $ref: "#/components/parameters/query_step" - - $ref: "#/components/parameters/query_recordNo" - - $ref: "#/components/parameters/query_getLine" - - $ref: "#/components/parameters/query_proxyUser2" - - $ref: "#/components/parameters/query_filter" - - $ref: "#/components/parameters/query_showHiddenDoc" - responses: - "200": - $ref: "#/components/responses/GetApprovalsListResponses200" - "400": - $ref: "#/components/responses/ErrorResponses400" - "500": - $ref: "#/components/responses/ErrorResponses500_noReasons" - - # -------------------------------------------------------------------------------------------------- - - /api/v1/approvals/wait: - get: - tags: - - ユーザー別API - summary: 承認待ち件数取得 - description: | - PCブラウザを利用しユーザートップを表示した際に「承認」ガジェットに表示される内容を取得します。
- 認証ユーザー、もしくは指定されたユーザーの、承認待ち、差し戻され、却下、回覧、下書き、保留、承認中(申請)、承認中(承認)、差し戻し、承認完了(申請)、承認完了(承認)の11種類の件数、及び最新の承認待ち書類5件について、件名、フォーム名、提出者、最終更新日時を取得します。 - operationId: GetApprovalCount - security: - - bearerAuth: [] - parameters: - - $ref: "#/components/parameters/query_fgid2" - - $ref: "#/components/parameters/query_fid" - - $ref: "#/components/parameters/query_step" - responses: - "200": - $ref: "#/components/responses/GetApprovalsWaitResponses200" - "400": - $ref: "#/components/responses/ErrorResponses400" - "500": - $ref: "#/components/responses/ErrorResponses500_noReasons" - - # -------------------------------------------------------------------------------------------------- - - /api/v1/approvals/hidden: - put: - tags: - - ユーザー別API - summary: 承認完了書類非表示設定 - description: | - ユーザサイトの承認画面で設定できる承認完了書類の非表示/表示設定相当の設定を行う API です。
- 承認待ち一覧取得 API で取得した承認完了書類の書類 ID をまとめて指定して、非表示/表示設定を切り替えます。 - operationId: SetCompDocumentDisplaySetting - requestBody: - $ref: "#/components/requestBodies/PutApprovalsHiddenRequest" - security: - - bearerAuth: [] - responses: - "200": - $ref: "#/components/responses/PutApprovalsHiddenResponses200" - "400": - $ref: "#/components/responses/ErrorResponses400" - - # -------------------------------------------------------------------------------------------------- - - /api/v1/search/documents: - post: - tags: - - ユーザー別API - summary: 書類検索 - description: 指定された検索条件で検索を行い、検索結果を取得します。 - operationId: SearchDocument - requestBody: - $ref: "#/components/requestBodies/PostSearchDocumentsRequest" - security: - - bearerAuth: [] - parameters: - - $ref: "#/components/parameters/query_size" - - $ref: "#/components/parameters/query_offset2" - - $ref: "#/components/parameters/query_page" - responses: - "200": - $ref: "#/components/responses/PostSearchDocumentsResponses200" - "400": - $ref: "#/components/responses/ErrorResponses400" - - # -------------------------------------------------------------------------------------------------- - - /api/v1/query/: - get: - tags: - - ユーザー別API - summary: 利用可能クエリ一覧取得 - description: 認証ユーザーが利用できるクエリ情報の一覧を取得します。 - operationId: GetAvailableQueryList - security: - - bearerAuth: [] - responses: - "200": - $ref: "#/components/responses/GetQueryListResponses200" - "401": - $ref: "#/components/responses/ErrorResponses401" - - # -------------------------------------------------------------------------------------------------- - - /api/v1/query/{query_code}: - get: - tags: - - ユーザー別API - summary: クエリ取得 - description: | - 認証ユーザーが閲覧できるクエリをひとつ選択し、その設定情報を取得します。
- 更に、実行結果取得フラグのパラメータが true に指定されているとき、クエリの実行結果を取得します。
- また、出力行数とオフセット値のパラメータによりページングを行うことが可能です。

- クエリの実行結果は、X-point のクエリ管理より設定したフォーマット設定、カンマ区切り等の書式が反映されます。
- 抽出条件設定を行っていた場合は、抽出条件設定にしたがって絞り込まれた状態で実行結果が出力されます。

- なお、クエリの検索項目設定については本 API での取得には反映されず、
- 本 API によるクエリの実行時に絞り込み条件を付与することはできません。 - operationId: GetQuery - security: - - bearerAuth: [] - parameters: - - $ref: "#/components/parameters/path_queryCode_required" - - $ref: "#/components/parameters/query_execFlg" - - $ref: "#/components/parameters/query_rows2" - - $ref: "#/components/parameters/query_offset3" - responses: - "200": - $ref: "#/components/responses/GetQueryResponses200" - "400": - $ref: "#/components/responses/ErrorResponses400" - - # -------------------------------------------------------------------------------------------------- - - /api/v1/query/graph/{query_code}: - get: - tags: - - ユーザー別API - summary: クエリグラフ表示 - description: | - 認証ユーザーが閲覧できるクエリをひとつ選択し、そのクエリに設定されているグラフを取得します。
- グラフは PNG 形式か JPEG 形式かを任意で選択することができます。(デフォルトは PNG) - operationId: GetQueryGraph - security: - - bearerAuth: [] - parameters: - - $ref: "#/components/parameters/path_queryCode_required" - - $ref: "#/components/parameters/query_outFormat" - responses: - "200": - $ref: "#/components/responses/GetQueryGraphResponses200" - "404": - $ref: "#/components/responses/ErrorResponses404" - - # -------------------------------------------------------------------------------------------------- - - /api/v1/adminrole: - get: - tags: - - ユーザー別API - summary: ユーザ権限情報取得 - description: | - 認証ユーザが持つ管理者権限の一覧を取得します。 - operationId: GetAdminRole - security: - - bearerAuth: [] - responses: - "200": - $ref: "#/components/responses/GetAdminroleResponses200" - - # -------------------------------------------------------------------------------------------------- - - /x/v1/service: - get: - tags: - - その他API - summary: X-point情報取得 - description: | - X-point のバージョンや利用できる機能、作成されたドメインが 1 つのみかの情報を取得します。
- OAuth2 認証のアクセストークン取得時に、ドメインコードが省略可能か否かを判断する際に使用します。
- ユーザー認証無しで利用可能です。 - operationId: GetXpointInfo - responses: - "200": - $ref: "#/components/responses/GetXpointInfoResponses200" - - # -------------------------------------------------------------------------------------------------- - - /scim/v2/{domain_code}/Users: - get: - tags: - - SCIM API - summary: ユーザ情報取得 - description: 指定された条件を元にユーザ情報を取得します。 - operationId: GetUsers - security: - - bearerAuth: [] - parameters: - - $ref: "#/components/parameters/path_domainCode_required" - - $ref: "#/components/parameters/query_filter2" - - $ref: "#/components/parameters/query_startIndex" - - $ref: "#/components/parameters/query_count" - responses: - "200": - $ref: "#/components/responses/ScimUserResponse" - "401": - $ref: "#/components/responses/ScimErrorResponse401" - - # -------------------------------------------------------------------------------------------------- - - post: - tags: - - SCIM API - summary: ユーザ情報作成 - description: リクエストボディに指定したデータを元にユーザ情報を作成します。 - operationId: CreateUser - requestBody: - $ref: "#/components/requestBodies/ScimUserRequest" - security: - - bearerAuth: [] - parameters: - - $ref: "#/components/parameters/path_domainCode_required" - responses: - "201": - $ref: "#/components/responses/ScimUserResponse" - "400": - $ref: "#/components/responses/ScimErrorResponse400" - "401": - $ref: "#/components/responses/ScimErrorResponse401" - "404": - $ref: "#/components/responses/ScimErrorResponse404" - - # -------------------------------------------------------------------------------------------------- - - /scim/v2/{domain_code}/Users/{userId}: - get: - tags: - - SCIM API - summary: 指定ユーザ情報取得 - description: パスに指定したユーザ ID に紐づくユーザの情報を取得します。 - operationId: GetUser - security: - - bearerAuth: [] - parameters: - - $ref: "#/components/parameters/path_domainCode_required" - - $ref: "#/components/parameters/path_userId_required" - responses: - "200": - $ref: "#/components/responses/ScimUserResponse" - "401": - $ref: "#/components/responses/ScimErrorResponse401" - - # -------------------------------------------------------------------------------------------------- - - put: - tags: - - SCIM API - summary: ユーザ情報更新 - description: | - パスに指定したユーザ ID に紐づくユーザの情報を全て更新します。
-
- **注意事項**
- * リクエストボディで指定しなかった項目は削除、もしくは初期値に更新されますのでご注意ください。 - operationId: UpdateUser - requestBody: - $ref: "#/components/requestBodies/ScimUserRequest" - security: - - bearerAuth: [] - parameters: - - $ref: "#/components/parameters/path_domainCode_required" - - $ref: "#/components/parameters/path_userId_required" - responses: - "200": - $ref: "#/components/responses/ScimUserResponse" - "400": - $ref: "#/components/responses/ScimErrorResponse400" - "401": - $ref: "#/components/responses/ScimErrorResponse401" - "404": - $ref: "#/components/responses/ScimErrorResponse404" - - # -------------------------------------------------------------------------------------------------- - - patch: - tags: - - SCIM API - summary: ユーザ情報一部更新 - description: パスに指定したユーザ ID に紐づくユーザ情報の指定項目のみを更新します。 - operationId: PatchUser - requestBody: - $ref: "#/components/requestBodies/PatchUpdateUserRequest" - security: - - bearerAuth: [] - parameters: - - $ref: "#/components/parameters/path_domainCode_required" - - $ref: "#/components/parameters/path_userId_required" - responses: - "200": - $ref: "#/components/responses/ScimUserResponse" - "400": - $ref: "#/components/responses/ScimErrorResponse400" - "401": - $ref: "#/components/responses/ScimErrorResponse401" - "404": - $ref: "#/components/responses/ScimErrorResponse404" - - # -------------------------------------------------------------------------------------------------- - - delete: - tags: - - SCIM API - summary: ユーザ情報削除 - description: パスに指定したユーザ ID に紐づくユーザ情報を削除します。 - operationId: DeleteUser - security: - - bearerAuth: [] - parameters: - - $ref: "#/components/parameters/path_domainCode_required" - - $ref: "#/components/parameters/path_userId_required" - responses: - "204": - $ref: "#/components/responses/DeleteScimInfoResponses204" - "400": - $ref: "#/components/responses/ScimErrorResponse400" - "401": - $ref: "#/components/responses/ScimErrorResponse401" - "404": - $ref: "#/components/responses/ScimErrorResponse404" - - # -------------------------------------------------------------------------------------------------- - - /scim/v2/{domain_code}/Groups: - get: - tags: - - SCIM API - summary: ユーザグループ情報取得 - description: 指定された条件を元にユーザグループ情報を取得します。 - operationId: GetGroups - security: - - bearerAuth: [] - parameters: - - $ref: "#/components/parameters/path_domainCode_required" - - $ref: "#/components/parameters/query_filter3" - - $ref: "#/components/parameters/query_startIndex" - - $ref: "#/components/parameters/query_count" - responses: - "200": - $ref: "#/components/responses/ScimGroupResponse" - "401": - $ref: "#/components/responses/ScimErrorResponse401" - - # -------------------------------------------------------------------------------------------------- - - post: - tags: - - SCIM API - summary: ユーザグループ情報作成 - description: リクエストボディに指定したデータを元にユーザグループ情報を作成します。 - operationId: CreateGroup - requestBody: - $ref: "#/components/requestBodies/ScimGroupRequest" - security: - - bearerAuth: [] - parameters: - - $ref: "#/components/parameters/path_domainCode_required" - responses: - "200": - $ref: "#/components/responses/ScimGroupResponse" - "400": - $ref: "#/components/responses/ScimErrorResponse400" - "401": - $ref: "#/components/responses/ScimErrorResponse401" - "404": - $ref: "#/components/responses/ScimErrorResponse404" - - # -------------------------------------------------------------------------------------------------- - - /scim/v2/{domain_code}/Groups/{groupId}: - get: - tags: - - SCIM API - summary: 指定ユーザグループ情報取得 - description: パスに指定したグループ ID に紐づくユーザグループの情報を取得します。 - operationId: GetGroup - security: - - bearerAuth: [] - parameters: - - $ref: "#/components/parameters/path_domainCode_required" - - $ref: "#/components/parameters/path_groupId_required" - responses: - "200": - $ref: "#/components/responses/ScimGroupResponse" - "401": - $ref: "#/components/responses/ScimErrorResponse401" - - # -------------------------------------------------------------------------------------------------- - - put: - tags: - - SCIM API - summary: ユーザグループ情報更新 - description: | - パスに指定したグループ ID に紐づくユーザグループの情報を全て更新します。
-
- **注意事項**
- * リクエストボディで指定しなかった項目は削除、もしくは初期値に更新されますのでご注意ください。 - operationId: UpdateGroup - requestBody: - $ref: "#/components/requestBodies/ScimGroupRequest" - security: - - bearerAuth: [] - parameters: - - $ref: "#/components/parameters/path_domainCode_required" - - $ref: "#/components/parameters/path_groupId_required" - responses: - "200": - $ref: "#/components/responses/ScimGroupResponse" - "400": - $ref: "#/components/responses/ScimErrorResponse400" - "401": - $ref: "#/components/responses/ScimErrorResponse401" - "404": - $ref: "#/components/responses/ScimErrorResponse404" - - # -------------------------------------------------------------------------------------------------- - - patch: - tags: - - SCIM API - summary: ユーザグループ情報一部更新 - description: パスに指定したグループ ID に紐づくユーザグループ情報の指定項目のみを更新します。 - operationId: PatchGroup - requestBody: - $ref: "#/components/requestBodies/PatchUpdateUserGroupInfoRequest" - security: - - bearerAuth: [] - parameters: - - $ref: "#/components/parameters/path_domainCode_required" - - $ref: "#/components/parameters/path_groupId_required" - responses: - "200": - $ref: "#/components/responses/ScimGroupResponse" - "400": - $ref: "#/components/responses/ScimErrorResponse400" - "401": - $ref: "#/components/responses/ScimErrorResponse401" - "404": - $ref: "#/components/responses/ScimErrorResponse404" - - # -------------------------------------------------------------------------------------------------- - - delete: - tags: - - SCIM API - summary: ユーザグループ情報削除 - description: パスに指定したグループ ID に紐づくユーザグループ情報を削除します。 - operationId: DeleteGroup - security: - - bearerAuth: [] - parameters: - - $ref: "#/components/parameters/path_domainCode_required" - - $ref: "#/components/parameters/path_groupId_required" - responses: - "204": - $ref: "#/components/responses/DeleteScimInfoResponses204" - "401": - $ref: "#/components/responses/ScimErrorResponse401" - "404": - $ref: "#/components/responses/ScimErrorResponse404" - - # -------------------------------------------------------------------------------------------------- - - /scim/v2/{domain_code}/Parts: - get: - tags: - - SCIM API - summary: 役職情報取得 - description: 指定された条件を元に役職情報を取得します。 - operationId: GetParts - security: - - bearerAuth: [] - parameters: - - $ref: "#/components/parameters/path_domainCode_required" - - $ref: "#/components/parameters/query_filter4" - - $ref: "#/components/parameters/query_startIndex" - - $ref: "#/components/parameters/query_count" - responses: - "200": - $ref: "#/components/responses/ScimPartResponse" - "401": - $ref: "#/components/responses/ScimErrorResponse401" - - # -------------------------------------------------------------------------------------------------- - - post: - tags: - - SCIM API - summary: 役職情報作成 - description: リクエストボディに指定したデータを元に役職情報を作成します。 - operationId: CreatePart - requestBody: - $ref: "#/components/requestBodies/ScimPartRequest" - security: - - bearerAuth: [] - parameters: - - $ref: "#/components/parameters/path_domainCode_required" - responses: - "200": - $ref: "#/components/responses/ScimPartResponse" - "400": - $ref: "#/components/responses/ScimErrorResponse400" - "401": - $ref: "#/components/responses/ScimErrorResponse401" - - # -------------------------------------------------------------------------------------------------- - - /scim/v2/{domain_code}/Parts/{partId}: - get: - tags: - - SCIM API - summary: 指定役職情報取得 - description: パスに指定した役職 ID に紐づく役職の情報を取得します。 - operationId: GetPart - security: - - bearerAuth: [] - parameters: - - $ref: "#/components/parameters/path_domainCode_required" - - $ref: "#/components/parameters/path_partId_required" - responses: - "200": - $ref: "#/components/responses/ScimPartResponse" - "401": - $ref: "#/components/responses/ScimErrorResponse401" - - # -------------------------------------------------------------------------------------------------- - - put: - tags: - - SCIM API - summary: 役職情報更新 - description: | - パスに指定した役職 ID に紐づく役職の情報を全て更新します。 - - **注意事項** - * リクエストボディで指定しなかった項目は削除、もしくは初期値に更新されますのでご注意ください。 - operationId: UpdatePart - requestBody: - $ref: "#/components/requestBodies/ScimPartRequest" - security: - - bearerAuth: [] - parameters: - - $ref: "#/components/parameters/path_domainCode_required" - - $ref: "#/components/parameters/path_partId_required" - responses: - "200": - $ref: "#/components/responses/ScimPartResponse" - "400": - $ref: "#/components/responses/ScimErrorResponse400" - "401": - $ref: "#/components/responses/ScimErrorResponse401" - "404": - $ref: "#/components/responses/ScimErrorResponse404" - - # -------------------------------------------------------------------------------------------------- - - patch: - tags: - - SCIM API - summary: 役職情報一部更新 - description: パスに指定した役職 ID に紐づく役職情報の指定項目のみを更新します。 - operationId: PatchPart - requestBody: - $ref: "#/components/requestBodies/PatchUpdatePartInfoRequest" - security: - - bearerAuth: [] - parameters: - - $ref: "#/components/parameters/path_domainCode_required" - - $ref: "#/components/parameters/path_partId_required" - responses: - "200": - $ref: "#/components/responses/ScimPartResponse" - "400": - $ref: "#/components/responses/ScimErrorResponse400" - "401": - $ref: "#/components/responses/ScimErrorResponse401" - "404": - $ref: "#/components/responses/ScimErrorResponse404" - - # -------------------------------------------------------------------------------------------------- - - delete: - tags: - - SCIM API - summary: 役職情報削除 - description: パスに指定した役職 ID に紐づく役職情報を削除します。 - operationId: DeletePart - security: - - bearerAuth: [] - parameters: - - $ref: "#/components/parameters/path_domainCode_required" - - $ref: "#/components/parameters/path_partId_required" - responses: - "204": - $ref: "#/components/responses/DeleteScimInfoResponses204" - "401": - $ref: "#/components/responses/ScimErrorResponse401" - "404": - $ref: "#/components/responses/ScimErrorResponse404" - - # -------------------------------------------------------------------------------------------------- - - /scim/v2/{domain_code}/Me: - get: - tags: - - SCIM API - summary: 認証ユーザ情報取得 - description: OAuth2 認証で認証したユーザの情報を返します。 - operationId: GetSelfInfo - security: - - bearerAuth: [] - parameters: - - $ref: "#/components/parameters/path_domainCode_required" - responses: - "200": - $ref: "#/components/responses/GetAuthorizeUserInfoResponses200" - "401": - $ref: "#/components/responses/ScimErrorResponse401" - -# ----------------------------------------------- -# コンポーネントの定義 -# ----------------------------------------------- - -components: - # ----------------------------------------------- - # セキュリティスキーマ components/securitySchemes - # ----------------------------------------------- - - securitySchemes: - bearerAuth: - type: http - scheme: bearer - description: OAuth2 認証情報 - APIKeyAuth: - type: apiKey - in: header - name: X-ATLED-Generic-API-Token - description: トークン情報 - - # ----------------------------------------------- - # パラメータ components/parameters - # ----------------------------------------------- - - parameters: - # ----------------------------------------------- - # パスパラメータ - # ----------------------------------------------- - - path_docid_required: - description: 書類ID - name: docid - in: path - schema: - type: integer - example: 999 - required: true - - path_commentNo_required: - description: コメント番号 - name: seq - in: path - schema: - type: string - example: 1 - required: true - - path_attachSeq_required: - description: | - 添付番号
- 添付番号には書類内容取得(Documents)、添付ファイル一覧取得(Attachments)で取得した添付ファイル情報の “seq” 項目に設定された番号を指定します。 - name: attach_seq - in: path - schema: - type: integer - example: 1 - required: true - - path_lumpapplyid_required: - description: | - 自動申請ID
- 自動申請IDには自動申請登録の一覧取得(Lumpapply)で取得したIDを指定します。 - name: lumpapplyid - in: path - schema: - type: integer - example: 999 - required: true - - path_fid_required: - description: フォームID - name: fid - in: path - schema: - type: integer - example: 999 - required: true - - path_masterTableName_required: - description: テーブル名 - name: master_table_name - in: path - schema: - type: string - example: user_table - required: true - - path_masterCode_required: - description: | - マスタ識別情報
- データ取得対象のマスタが特定可能な情報を指定します。
- 簡易マスタであれば「マスタコード」、ユーザ固有マスタであれば「テーブル名」を指定します。 - name: master_code - in: path - schema: - type: string - example: master01 - required: true - - path_simpleMasterCode_required: - description: 簡易マスタの「マスタコード」 - name: master_code - in: path - schema: - type: string - example: master01 - required: true - - path_uuid_required: - description: 「Webhookログ取得API」で取得した UUID を指定します。 - name: uuid - in: path - schema: - type: string - example: xxxxxxxx-0017-4c74-b48a-91a9e9b629a8 - required: true - - path_webhookId_required: - description: 「Webhook設定取得API」で取得した Webhook ID を指定する。 - name: webhookId - in: path - schema: - type: string - example: 999 - required: true - - path_queryCode_required: - description: クエリコード - name: query_code - in: path - schema: - type: string - example: query01 - required: true - - path_domainCode_required: - description: ドメインコード - name: domain_code - in: path - schema: - type: string - example: domain01 - required: true - - path_userId_required: - description: ユーザID - name: userId - in: path - schema: - type: integer - example: 100 - required: true - - path_groupId_required: - description: グループID - name: groupId - in: path - schema: - type: integer - example: 100 - required: true - - path_partId_required: - description: 役職ID - name: partId - in: path - schema: - type: integer - example: 100 - required: true - - # ----------------------------------------------- - # クエリパラメータ - # ----------------------------------------------- - - query_proxyUser: - description: | - 代理ユーザコード
- 代理申請時に使用します。 - name: proxy_user - in: query - schema: - type: string - example: u001 - - query_proxyUser2: - description: | - 代理ユーザコード
- 代理申請者のユーザコードを指定する。 - name: proxy_user - in: query - schema: - type: string - example: u001 - - query_proxyUser3: - description: | - 代理ユーザコード
- 代理モードで書類を表示する際に使用します。 - name: proxy_user - in: query - schema: - type: string - example: u001 - - query_fcd: - description: | - フォームコード
- フォームコードかフォーム名称何れか一方をクエリパラメータに指定します。
- どちらも指定されている場合はフォーム名称と一致するフォームで REST API が実行されます。
-
- **注意事項**
- * 同一フォームコードを持つフォームがある場合は、フォームコードでフォームを特定できず期待する動作になりません。
- その場合はフォームコードではなくフォーム名称をクエリパラメータに指定してください。 - name: fcd - in: query - schema: - type: integer - example: 999 - - query_formname: - description: フォーム名称 - name: formname - in: query - schema: - type: string - example: 経費申請書 - - query_routecd_required: - description: | - 承認ルートコード
- * ワークフローフォーム(ユーザ選択ルート)
- 承認ルートコードを指定します。
- * ワークフローフォーム(自動選択ルート)
- 空文字もしくは「--condroute」という自動選択ルートを表す文字列を指定します。
- (大文字、小文字は区別しません。)
- * 標準フォーム
- 空文字を指定します。 - name: routecd - in: query - schema: - type: integer - example: 999 - required: true - - query_fromdocid: - description: | - 関連元書類の書類 ID
- 関連書類の作成時に使用します。 - name: fromdocid - in: query - schema: - type: integer - example: 999 - - query_masterType_required: - description: | - マスタタイプ
- 簡易マスタもしくはユーザ固有マスタのマスタタイプを数値で指定します。
- 0:簡易マスタ
- 1:ユーザ固有マスタ - name: master_type - in: query - schema: - type: integer - example: 0 - required: true - - query_rows: - description: | - 取得行数
- デフォルトは 100 行です。
- 最大 1000 行まで指定可能です。 - name: rows - in: query - schema: - type: integer - example: 100 - - query_rows2: - description: | - 出力行数
- ※デフォルトは 500
- ※1~10000 の間で指定可能 - name: rows - in: query - schema: - type: integer - example: 100 - - query_offset: - description: | - オフセット値
- デフォルトは 0 です。 - name: offset - in: query - schema: - type: integer - example: 0 - - query_offset2: - description: | - 取得項目のオフセット
- offset と page の両方を指定した場合はoffset が優先されます。 - name: offset - in: query - schema: - type: integer - example: 0 - - query_offset3: - description: | - オフセット値
- 一覧クエリのみ有効。
- ※デフォルトは 0
- ※0 以上で指定可能 - name: offset - in: query - schema: - type: integer - example: 0 - - query_offset_position: - description: | - 取得開始位置
- 何件目から取得するかを指定します。
- デフォルトは 0 です。 - name: offset - in: query - schema: - type: integer - example: 0 - - query_fileName: - description: | - CSVファイル名
- CSV 形式でマスタデータを取得する場合に指定可能です。
- デフォルトのファイル名は「{マスタコード}.csv」、または「{テーブル名}.csv」です。 - name: file_name - in: query - schema: - type: string - example: test.csv - - query_delimiter: - description: | - 区切り文字
- CSV 形式でマスタデータを取得する場合に指定可能です。
- 「comma」を指定した場合はカンマ区切り、「tab」を指定した場合はタブ区切りでデータを取得します。
- デフォルトはカンマ区切りです。 - name: delimiter - in: query - schema: - type: string - example: comma - - query_title: - description: | - タイトル有無
- CSV 形式かつユーザ固有マスタのデータを取得する場合に指定可能です。
- true:先頭行にフィールド名を出力する。
- false:先頭行にフィールド名を出力しない。
- デフォルトは true です。 - name: title - in: query - schema: - type: boolean - example: true - - query_fields: - description: | - 出力項目
- CSV 形式かつ簡易マスタのデータを取得する場合に指定可能です。
- 取得したい項目をカンマ区切りで指定します。
- デフォルトは項目コードと項目値が出力されます。 - name: fields - in: query - schema: - type: string - example: id,name - - query_from: - description: | - 送信日時 From
- Webhook の送信日時を範囲指定します。 - name: from - in: query - schema: - type: string - example: 2022/10/01 - - query_to: - description: | - 送信日時 To
- Webhook の送信日時を範囲指定します。 - name: to - in: query - schema: - type: string - example: 2022/12/01 - - query_docid: - description: 書類ID - name: docid - in: query - schema: - type: integer - example: "33341" - - query_formCode: - description: フォームコード - name: form_code - in: query - schema: - type: string - example: DEMO_S01 - - query_routeCode: - description: 承認ルートコード - name: route_code - in: query - schema: - type: string - example: condRouteA - - query_status: - description: | - ステータス
- 全て取得    :all を指定
- 送信成功のみ取得:success を指定
- 送信失敗のみ取得:failed を指定 - name: status - in: query - schema: - type: string - example: success - - query_url: - description: | - 送信先URL
- 送信先 URL を部分一致検索します。 - name: url - in: query - schema: - type: string - example: google - - query_limit: - description: | - 取得件数
- 何件取得するかを指定します。
- デフォルトは 50 です。
- 推奨値は1000件以下の値です。 - name: limit - in: query - schema: - type: integer - example: "10" - minimum: 0 - maximum: 1000 - - query_fqdn_required: - description: | - 取得したい Webhook 設定の Webhook 送信先 FQDN を指定します。
- FQDN 例:example.com - name: fqdn - in: query - schema: - type: string - example: www.example.com - required: true - - query_fqdn_required2: - description: | - 削除したい Webhook 設定の Webhook 送信先 FQDN を指定します。
- FQDN 例:example.com - name: fqdn - in: query - schema: - type: string - example: www.example.com - required: true - - query_fgid: - description: | - フォームグループID
- 指定なしの場合は全てのフォームグループを取得 - name: fgid - in: query - schema: - type: integer - example: 1 - - query_fgid2: - description: フォームグループID - name: fgid - in: query - schema: - type: integer - example: 1 - - query_formname_flg: - description: | - フォームグループフラグ
- true:フォームグループのみ取得
- false:フォームグループに加えて所属フォームも取得
- ※指定なしの場合は「false」が指定されたと見做されます - name: formname - in: query - schema: - type: boolean - example: "false" - - query_keyword: - description: | - 検索条件
- 以下の【対象項目】に対して指定したキーワードで検索を行います。 - |対象項目|説明| - |----|----| - |formgroup_name|フォームグループ名称| - |form_name|フォーム名称| - |form_code|フォームコード| - |route_name|承認ルート名称| - |route_code|承認ルートコード| - キーワードの指定方法についてはマニュアル[「2.9.1 絞り込み条件」](./doc/manual.html#291-絞り込み条件)をご参照ください。 - name: keyword - in: query - schema: - type: string - example: form_name eq "フォーム01" - - query_order: - description: | - 並び替え条件
- 以下の【対象項目】を指定してレスポンスの並び替えを行います。
- 項目の先頭に「-」を指定した場合は降順に、項目のみ指定した場合は昇順に並び替えます。
- 並び替え条件を指定しない場合 X-point提出画面で表示されるフォーム一覧と同じ並び順です。 - |対象項目|説明| - |----|----| - |formgroup_name|フォームグループ名称| - |form_name|フォーム名称| - |form_code|フォームコード| - |route_name|承認ルート名称| - |route_code|承認ルートコード| - 並び替え条件の指定方法についてはマニュアル[「2.9.2 並び替え」](./doc/manual.html#292-並び替え)をご参照ください。 - name: order - in: query - schema: - type: string - example: "-form_name" - - query_stat: - description: | - 承認状況タイプ
- |設定値|承認待ち|分類| - |----|----|----| - |10|承認待ち|大分類| - |11|承認待ち|小分類| - |12|差し戻され|小分類| - |20|通知|大分類| - |21|却下|小分類| - |22|回覧|小分類| - |30|保留|小分類| - |31|下書き|小分類| - |32|保留|小分類| - |40|状況確認|大分類| - |41|承認中(申請)|小分類| - |42|承認中(承認)|小分類| - |43|差し戻し|小分類| - |50|承認完了|大分類| - |51|承認完了(申請)|小分類| - |52|承認完了(承認)|小分類| - name: stat - in: query - schema: - type: integer - example: "10" - required: true - - query_fid: - description: | - フォームID
- フォームグループ ID が指定されている場合のみ有効。 - name: fid - in: query - schema: - type: integer - example: "1" - - query_step: - description: | - ステップ数
- 正の整数値のみ有効。
- フォームグループ ID、フォーム IDが指定されている場合のみ有効。 - name: step - in: query - schema: - type: integer - example: "1" - - query_recordNo: - description: | - 開始レコード番号
- 省略時は「0」で動作する。 - name: record_no - in: query - schema: - type: integer - example: "0" - - query_getLine: - description: | - 取得行数
- 省略時は「50」で動作する。
- 推奨値は1000件以下の値です。 - name: get_line - in: query - schema: - type: integer - example: "50" - minimum: 0 - maximum: 1000 - - query_filter: - description: | - フィルター
- 日付の範囲条件で承認待ち一覧を絞り込む際に指定します。
- 日付範囲の指定方法についてはマニュアル[「2.9.3. 日付範囲」](./doc/manual.html#293-日付範囲)をご参照ください。 - name: filter - in: query - schema: - type: string - example: cr_dt between "2023-01-01" and "2023-12-31" - - query_filter2: - description: | - フィルター
- ログイン ID またはユーザ CDでユーザを絞り込む時に指定します。
-
- クエリパラメータの「filter」にログイン ID またはユーザ CD を指定する事でユーザ情報の絞り込みができます。
-
- 【フィルター指定形式】
- フィルターでログイン ID またはユーザ CD を指定する場合は以下のフォーマットで指定します。 - * ログイン ID
- userName eq "{ログイン ID}" - * ユーザ CD
- userCode eq "{ユーザ CD}" -

- - 【フィルター指定例】
- * ログイン ID で絞り込みを行う場合
- /scim/v2/{ドメイン CD}/Users?filter=userName eq "u001" - * ユーザ CD で絞り込みを行う場合
- /scim/v2/{ドメイン CD}/Users?filter=userCode eq "u001" - name: filter - in: query - schema: - type: string - example: userCode eq "u001" - - query_filter3: - description: | - フィルター
- グループ CD でユーザグループを絞り込む時に指定します。
- クエリパラメータの「filter」にグループ CD を指定する事でユーザグループ情報の絞り込みができます。
-
- 【フィルター指定形式】
- フィルターでグループ CD を指定する場合は以下のフォーマットで指定します。
- groupCode eq "{グループ CD}"
-
- 【フィルター指定例】
- /scim/v2/{ドメイン CD}/Groups?filter=groupCode eq "g001" - name: filter - in: query - schema: - type: string - example: groupCode eq "g001" - - query_filter4: - description: | - フィルター
- 役職 CD で役職情報を絞り込む時に指定します。
- クエリパラメータの「filter」に役職 CD を指定する事で役職情報の絞り込みができます。
-
- 【フィルター指定形式】
- フィルターで役職 CD を指定する場合は以下のフォーマットで指定します。
- partCode eq "{役職 CD}"
-
- 【フィルター指定例】
- /scim/v2/{ドメイン CD}/Parts?filter=partCode eq "p001" - name: filter - in: query - schema: - type: string - example: partCode eq "p001" - - query_showHiddenDoc: - description: | - 非表示書類の取得フラグ
- true :非表示書類も取得する
- false:非表示書類は取得しない
- 承認画面や承認完了書類非表示設定で非表示に設定した承認完了書類を一覧に含めるか指定します。
- デフォルトは false です。
- クエリパラメータの承認状況タイプで、承認完了/承認完了(申請)/承認完了(承認)のいずれかを指定した場合のみ有効です。 - name: show_hidden_doc - in: query - schema: - type: boolean - example: false - - query_size: - description: | - 1 ページあたりの取得件数
- 省略時は 1 ページあたり 50 件の書類を取得します。
- 推奨値は1000件以下の値です。 - name: size - in: query - schema: - type: integer - example: "2" - minimum: 0 - maximum: 1000 - - query_page: - description: 取得ページ - name: page - in: query - schema: - type: integer - example: "2" - - query_execFlg: - description: | - 実行結果取得フラグ
- true(クエリ実行する) - / false(定義のみ取得)
- ※デフォルトは false
- name: exec_flg - in: query - schema: - type: boolean - example: false - - query_outFormat: - description: | - フォーマット
- "png"(PNG 画像) / "jpeg"(JPEG 画像)
- ※デフォルトは PNG 画像 - name: outFormat - in: query - schema: - type: string - example: png - - query_startIndex: - description: | - 取得開始レコード番号
- 1 以上の整数値のみ有効。
- name: startIndex - in: query - schema: - type: integer - example: 3 - - query_count: - description: | - 取得レコード数
- 正の整数値のみ有効。
- name: count - in: query - schema: - type: integer - example: 10 - - query_history: - description: | - 承認履歴情報取得フラグ
- true:承認履歴情報を取得する。
- false:承認履歴情報を取得しない。
- デフォルトは false です。 - name: history - in: query - schema: - type: boolean - example: true - - # ----------------------------------------------- - # リクエスト components/requestBodies - # ----------------------------------------------- - - requestBodies: - PostDocumentRequest: - content: - application/json: - schema: - required: - - route_code - - datas - allOf: - - $ref: "#/components/schemas/PostDocumentRequest" - examples: - 下書き書類作成: - value: - draft: true - form_code: form01 - route_code: route01 - datas: - - page_no: 1 - fields: - field1: "件名" - field2: "12345" - group1: - - g_field1: 名前 - g_field2: 個数 - g_field3: 価格 - lumpapply: true - 書類申請: - value: - draft: false - form_name: フォーム01 - route_code: route01 - datas: - - page_no: 1 - fields: - field1: "件名" - field2: "12345" - group1: - - g_field1: 名前 - g_field2: 個数 - g_field3: 価格 - lumpapply: false - - # -------------------------------------------------------------------------------------------------- - - PatchDocumentRequest: - content: - application/json: - schema: - required: - - route_code - allOf: - - $ref: "#/components/schemas/PatchDocumentRequest" - examples: - 書類データを更新し承認: - value: - wf_type: 1 - form_code: form01 - route_code: route01 - datas: - - page_no: 1 - fields: - field1: 件名 - field2: "12345" - group1: - - g_field1: "100" - g_field2: "200" - g_field3: "300" - - g_field1: "100" - g_field2: "200" - g_field3: "300" - lumpapply: true - 書類の差し戻し: - value: - wf_type: 3 - wf_comment: 記載内容不備 - wf_backstep: 1 - form_name: フォーム01 - route_code: route01 - lumpapply: true - 電帳法対対象の承認完了書類更新: - value: - form_code: form01 - route_code: route01 - datas: - - page_no: 1 - fields: - field1: 件名 - field2: "12345" - group1: - - g_field1: "100" - g_field2: "200" - g_field3: "300" - - g_field1: "100" - g_field2: "200" - g_field3: "300" - lumpapply: true - reason: 記載内容修正 - - # -------------------------------------------------------------------------------------------------- - - PostCommentsRequest: - content: - application/json: - schema: - required: - - content - - attentionflg - type: object - properties: - content: - description: コメント内容 - type: string - example: コメントを追加します。 - attentionflg: - description: | - 重要コメントフラグ - * 0:通常コメント - * 1:重要コメント - type: integer - example: 1 - - # -------------------------------------------------------------------------------------------------- - - PatchCommentsRequest: - content: - application/json: - schema: - type: object - properties: - content: - description: | - コメント内容 - type: string - example: 更新コメント - attentionflg: - description: | - 重要コメントフラグ - * 0:通常コメント - * 1:重要コメント - type: integer - example: 1 - - # -------------------------------------------------------------------------------------------------- - - PutMasterDataRequest: - content: - application/json: - schema: - required: - - data - type: object - properties: - overwrite: - description: | - 上書きフラグ
- 簡易マスタデータをインポートデータに置き換えるかを指定します。
- true:インポートデータに置き換える。
- false:置き換えずにインポートデータを追加する。
- デフォルトは false です。 - type: boolean - example: true - data: - description: | - インポートデータ
- インポートするデータを code(itemcd)、value(itemval)で指定します。 - allOf: - - $ref: "#/components/schemas/simplemaster_data" - - example: - - code: name - value: 田中 - - code: age - value: 25 - - code: height - value: 170.31 - - # -------------------------------------------------------------------------------------------------- - - PostWebhookInsertRequest: - content: - application/json: - schema: - required: - - url - type: object - properties: - url: - description: | - 送信先URL
- Webhook 送信先の URL を指定する。
- 無効な URL が指定された場合はエラーが返される。 - type: string - example: https://example.com/webhook/post - remarks: - description: 備考 - type: string - example: Webhook 設定登録 - - # -------------------------------------------------------------------------------------------------- - - PatchWebhookUpdateRequest: - content: - application/json: - schema: - required: - - fqdn - type: object - properties: - fqdn: - description: | - FQDN
- 更新したい Webhook 設定の Webhook 送信先 FQDN を指定します。
- FQDN 例:example.com - type: string - example: example.com - url: - description: | - 送信先URL
- Webhook 送信先の URL を指定する。
- 無効な URL が指定された場合はエラーが返される。 - type: string - example: https://example.com/webhook/post - remarks: - description: 備考 - type: string - example: Webhook 設定登録 - - # -------------------------------------------------------------------------------------------------- - - PutApprovalsHiddenRequest: - content: - application/json: - schema: - required: - - hidden - - docid - type: object - properties: - hidden: - description: | - 非表示設定フラグ
- true :指定した承認完了書類を非表示状態に設定
- false:指定した承認完了書類を表示状態に設定 - type: boolean - example: true - docid: - description: | - 書類ID配列
- 非表示/表示に設定する承認完了書類の書類 ID を指定する。
-
- **注意事項**
- * docid 配列に承認状況が承認完了以外の書類 ID を指定した場合はエラー応答が返されます。 - example: - - 100 - - 101 - - 102 - - 103 - proxy_user: - description: | - 代理承認者ユーザCD
- 代理承認した承認完了書類を非表示/表示設定する場合に指定する。 - type: string - example: u001 - - # -------------------------------------------------------------------------------------------------- - - PostSearchDocumentsRequest: - description: | - リクエストボディに検索条件を指定します。
- リクエストボディを指定しない場合や、空オブジェクトを指定した場合は全書類がヒットします。 - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/PostSearchDocumentsRequest" - examples: - 件名指定: - description: 件名1、件名2に「経費申請」が含まれる書類を検索 - value: - title: 経費申請 - フォーム指定: - description: フォーム名に「経費申請書」が含まれる書類を検索 - value: - form_name: 経費申請書 - 申請者指定: - description: | - 申請者のユーザCDが「u001」な書類を検索
- type には「user」(ユーザ)または「group」(ユーザグループ)を指定します。
- code にはユーザコードまたはユーザグループコードを指定します。 - value: - writer_list: - - type: user - code: u001 - 過去期間指定: - description: | - 書類の申請日が現在から20日前以内の書類を検索 - * date_type (日付条件)
- 「cr_dt」(新規更新日)または「up_dt」(最終更新日)を指定します。 - * dt_cond_type (日付複合条件)
- 「0」(過去期間指定)または「1」(日付直接指定)を指定します。 - * date_span (過去期間)
- dt_cond_typeが0(過去期間指定)の時に過去期間を指定します。 - * span_type (過去期間種別)
- dt_cond_typeが0(過去期間指定)の時に指定します。
- 「0」(N日前)または「1」(Nか月前)を指定します。 - value: - date_type: cr_dt - dt_cond_type: 0 - date_span: 20 - span_type: 0 - 日付直接指定: - description: | - 書類の申請日が「2022/01/01」から「2023/12/31」の書類を検索 - * date_type (日付条件)
- 「cr_dt」(新規更新日)または「up_dt」(最終更新日)を指定します。 - * dt_cond_type (日付複合条件)
- 「0」(過去期間指定)または「1」(日付直接指定)を指定します。 - * lower_year (開始年) - * lower_month (開始月) - * lower_day (開始日)
- dt_cond_typeが1(日付直接指定)の場合に開始年・月・日を指定します。 - * upper_year (終了年) - * upper_month (終了月) - * upper_day (終了日)
- dt_cond_typeが1(日付直接指定)の場合に終了年・月・日を指定します。 - value: - date_type: cr_dt - dt_cond_type: 1 - lower_year: 2022 - lower_month: 1 - lower_day: 1 - upper_year: 2023 - upper_month: 12 - upper_day: 31 - 数値条件指定: - description: | - 書類の金額フィールドの値が1000以上 5000以下の書類を検索 - * fgid (フォームグループID)
- 検索対象フィールドのフォームが所属するフォームグループのIDを指定します。
- 数値条件、文字列条件を指定する場合は必須です。 - * fid (フォームID)
- 検索対象フィールドが存在するフォームのIDを指定します。
- 数値条件、文字列条件を指定する場合は必須です。 - * int_col_name1 (数値条件列1) - * int_col_name2 (数値条件列2) - * int_col_name3 (数値条件列3)
- col_name (対象列名) に検索対象のフィールドIDを指定します。
- page_no (ページ番号) は検索対象のフィールドが複数枚フォームの2ページ目以降に存在する場合にページ番号を指定します。
- 単数枚フォームや複数枚フォームの1ページ目に存在するフィールドIDを指定する場合は省略可能です。 - * int_and_or1 (数値条件区分1) - * int_and_or2 (数値条件区分2)
- 複数の数値条件を指定する場合に「and」もしくは「or」を指定します。 - * int_data1 (数値条件1) - * int_data2 (数値条件2) - * int_data3 (数値条件3)
- 条件とする数値を指定します。 - * compare_type1 (比較区分1) - * compare_type2 (比較区分2) - * compare_type3 (比較区分3)
- 数値条件の比較区分を指定します。 - * 1:と等しい - * 2:より大きい - * 3:と同じか大きい - * 4:より小さい - * 5:と同じか小さい - value: - fgid: 1 - fid: 1 - int_col_name1: - page_no: 1 - col_name: money - int_col_name2: - page_no: 1 - col_name: money - int_and_or1: and - int_data1: 1000 - int_data2: 5000 - compare_type1: 3 - compaer_type2: 5 - 文字列条件指定: - description: | - 書類の商品コードフィールドの値が「A0001」または「B0001」の書類を検索 - * fgid (フォームグループID)
- 検索対象フィールドのフォームが所属するフォームグループのIDを指定します。
- 数値条件、文字列条件を指定する場合は必須です。 - * fid (フォームID)
- 検索対象フィールドが存在するフォームのIDを指定します。
- 数値条件、文字列条件を指定する場合は必須です。 - * char_col_name1 (文字列条件列1) - * char_col_name2 (文字列条件列2) - * char_col_name3 (文字列条件列3)
- col_name (対象列名) に検索対象のフィールドIDを指定します。
- page_no (ページ番号) は検索対象のフィールドが複数枚フォームの2ページ目以降に存在する場合にページ番号を指定します。
- 単数枚フォームや複数枚フォームの1ページ目に存在するフィールドIDを指定する場合は省略可能です。 - * char_and_or1 (文字列条件区分1) - * char_and_or2 (文字列条件区分2)
- 複数の文字列条件を指定する場合に「and」もしくは「or」を指定します。 - * char_data1 (文字列条件1) - * char_data2 (文字列条件2) - * char_data3 (文字列条件3)
- 条件とする文字列を指定します。 - value: - fgid: 1 - fid: 1 - char_col_name1: - page_no: 1 - col_name: product_code - char_col_name2: - page_no: 1 - col_name: product_code - char_and_or1: or - char_data1: A0001 - char_data2: B0001 - コメント指定: - description: | - 勝 太郎(ユーザコード:u001)が発言した重要コメントの内、コメント内容に「修正」が含まれる書類を検索 - * comment_flg (コメントフラグ) - * 0:条件なし - * 1:コメントあり - * 2:コメントなし - * comment_content (コメント内容)
- コメントの文字列を指定します。(部分一致) - * comment_writercd (発言者CD)
- コメントを発言したユーザのユーザコードを指定します。 - * comment_attentionflg (重要コメントフラグ)
- * 0:すべてのコメント - * 1:重要コメントのみ - value: - comment_flg: 1 - comment_content: 修正 - comment_writercd: u001 - comment_attentionflg: 1 - 添付ファイル指定: - description: | - 添付ファイル名または添付ファイルの備考に「test.txt」が含まれる書類を検索 - * attach_flg (添付ファイルフラグ) - * 0:条件なし - * 1:添付あり - * 2:添付なし - * attach_name (コメント内容)
- 添付ファイル名、備考の文字列を指定します。(部分一致) - value: - attach_flg: 1 - attach_name: test.txt - 並び替え指定: - description: | - 検索結果を件名1の降順に並び替え - * order (並び替え条件)
- 指定した以下の項目で並び替えを行います。
- 項目の先頭に「-」を指定した場合は降順に、項目のみ指定した場合は昇順に並び替えます。
- 並び替え条件を指定しない場合は更新日時の降順で並び替えます。
- 並び替え条件の指定方法についてはマニュアル[「2.9.2 並び替え」](./doc/manual.html#292-並び替え)をご参照ください。 - * docid:書類ID - * title1:件名1 - * title2:件名2 - * form_code:フォームコード - * form_name:フォーム名称 - * route_code:承認ルートコード - * route_name:承認ルート名称 - * stat:承認状況 - * step:ステップ番号 - * update_datetime:更新日時 - * write_datetime:申請日時 - * writer:申請者 - value: - order: -title1 - 複数項目指定: - value: - docid: - min: 1 - max: 1 - title: 経費申請 - form_group: - name: 営業部 - form_name: 経費申請書 - stats: - - 1 - current_step: - stepno: 1 - writer_list: - - type: user - code: u001 - date_type: up_dt - dt_cond_type: 1 - lower_year: 2022 - lower_month: 1 - lower_day: 1 - upper_year: 2023 - upper_month: 12 - upper_day: 31 - fgid: 100 - fid: 100 - int_col_name1: - page_no: 1 - col_name: id - int_col_name2: - page_no: 1 - col_name: day - int_col_name3: - page_no: 1 - col_name: money - int_and_or1: or - int_and_or2: or - int_data1: 100 - int_data2: 15 - int_data3: 0 - compare_type1: 1 - compare_type2: 1 - compare_type3: 2 - char_col_name1: - page_no: 1 - col_name: name - char_col_name2: - page_no: 1 - col_name: code - char_col_name3: - page_no: 1 - col_name: text - char_and_or1: or - char_and_or2: or - char_data1: 田中 - char_data2: code01 - char_data3: 営業 - comment_flg: 1 - comment_content: 添付あり - comment_writercd: u002 - comment_attentionflg: 0 - attach_flg: 1 - attach_name: 領収書 - order: -docid - - # -------------------------------------------------------------------------------------------------- - - PostCreateDocumentsRequest: - description: | - **注意事項** - * 表示する書類ビューに事前添付できるファイルは 1 つまでになります。 - * file_name に設定するファイル名が日本語を含む場合は、UTF-8 でエンコードした内容を設定する必要があります。 - * 「detail_no」「evidence_type」は、電帳法対応オプションで添付型を設定したフォームにファイルを事前添付する時に指定する項目です。 - 電帳法対応オプションでデータ保存を設定していないフォームや電帳法対応オプションで X-point 内作成型を設定したフォームの場合は指定する必要はありません。 - content: - multipart/form-data: - schema: - required: - - routecd - type: object - properties: - fcd: - description: | - フォームコード
- フォームコードかフォーム名称の何れかをクエリパラメータに指定します。
- どちらも指定されている場合はフォーム名称と一致するフォームで REST API が実行されます。 - type: string - example: form01 - formname: - description: フォーム名称 - type: string - example: フォーム01 - routecd: - allOf: - - $ref: "#/components/schemas/route_code" - type: string - example: route01 - fromdocid: - description: 関連元書類ID - type: integer - example: "1" - proxy_user: - description: 代理申請者ユーザCD - type: string - example: u001 - datas: - description: | - 書類データ
- 書類ビュー表示時にフィールドに事前入力する場合は指定。
- フォームの構成によって異なります。 - type: string - file: - description: | - アップロードファイル情報
- 書類ビュー表示時に事前に添付ファイルを登録したい場合は指定。
- アップロードファイル名は拡張子を含めて指定する。 - type: string - format: binary - file_name: - description: | - アップロードファイル名
- 書類ビュー表示時に事前に添付ファイルを登録したい場合は指定。
- アップロードファイル名は拡張子を含めて指定する。 - type: string - example: sample.txt - remarks: - description: | - アップロードファイル備考
- 書類ビュー表示時に事前に添付ファイルを登録したい場合は指定。
- アップロードファイル名は拡張子を含めて指定する。 - type: string - example: test - detail_no: - description: | - アップロードファイル対応明細行No
- 電帳法対応オプションの添付型フォームかつフォームに明細行が存在する場合に、アップロードファイルに対応する明細行を指定します。
- 電帳法書類区分で「1:電子取引」を指定した場合は 1 以上の整数の指定が必須です。
- デフォルトは 0 です。 - type: integer - example: "1" - evidence_type: - description: | - アップロードファイル対応明細行No
- 電帳法対応オプションの添付型フォームの場合に、アップロードファイルの電帳法書類区分を指定します。
- 以下いずれかの整数が指定可能で、デフォルトは「1:電子取引」です。
- 0:その他
- 1:電子取引 - type: integer - example: "1" - - # -------------------------------------------------------------------------------------------------- - - PostAddAttachmentsRequest: - description: | - **注意事項** - * 一度に追加できるファイルは 1 つまでになります。 - * 添付ファイルのファイルサイズ制限は設けていませんが、ファイルサイズが大きいファイルを追加する場合はX-pointの応答速度に影響を与える可能性があります。 - * 「detail_no」「evidence_type」は、電帳法対応オプションで添付型を設定したフォームの書類にファイルを添付する時に指定する項目です。
- 電帳法対応オプションでデータ保存を設定していないフォームや電帳法対応オプションで X-point 内作成型を設定したフォームの場合は指定する必要はありません。 - content: - multipart/form-data: - schema: - required: - - user_code - - file - - file_name - type: object - properties: - user_code: - description: | - ユーザコード
- X-point に登録されていないユーザのユーザコードを指定した場合は、認証したユーザで添付ファイルが追加されます。 - type: string - example: u001 - file: - description: アップロードファイル情報 - type: string - format: binary - file_name: - description: | - アップロードファイル名
- 拡張子を含んだファイル名を指定 - type: string - example: サンプル.txt - remarks: - description: 備考 - type: string - example: テスト - overwrite: - description: | - 上書きフラグ
- 既に添付されているファイルと同じファイル名称のファイルを添付する場合に、新しい添付ファイルに上書きするか否かを指定します。デフォルトは true です。
- true:同名ファイルを上書きして添付する。
- false:同名ファイルを別ファイルとして添付する。
- type: boolean - example: "true" - reason: - description: | - 更新理由
- 新しい添付ファイルに上書きする場合に、上書きする理由を指定します。
- 電帳法対応オプションのデータ保存対象フォームで添付ファイルを上書きする場合は指定必須です。 - type: string - example: テスト - detail_no: - description: | - 対応明細行No
- 電帳法対応オプションの添付型フォームの書類かつフォームに明細行が存在する場合に、追加するファイルに対応する明細行を指定します。
- 電帳法書類区分で「1:電子取引」を指定した場合は 1 以上の整数の指定が必須です。
- デフォルトは 0 です。 - type: integer - example: "1" - evidence_type: - description: | - 電帳法書類区分
- 電帳法対応オプションの添付型フォームの書類の場合に、追加するファイルの電帳法書類区分を指定します。
- 以下いずれかの整数が指定可能で、デフォルトは「1:電子取引」です。
- 0:その他
- 1:電子取引 - type: integer - example: "1" - - # -------------------------------------------------------------------------------------------------- - - PatchUpdateAttachmentsRequest: - description: | - **注意事項** - * 一度に更新できるファイルは 1 つまでになります。 - * 添付ファイルのファイルサイズ制限は設けていませんが、ファイルサイズが大きいファイルを追加する場合はX-pointの応答速度に影響を与える可能性があります。 - * 「detail_no」「evidence_type」は、電帳法対応オプションで添付型を設定したフォームの添付ファイルを更新する時に指定できる項目です。
- 電帳法対応オプションでデータ保存を設定していないフォームや電帳法対応オプションで X-point 内作成型を設定したフォームの場合は指定する必要はありません。 - content: - multipart/form-data: - schema: - required: - - user_code - type: object - properties: - delete: - description: | - 削除フラグ
- 添付ファイルの更新/削除を指定します。
- デフォルトは false(更新)です。
- true:添付ファイル削除
- false:添付ファイル更新 - type: boolean - example: "false" - user_code: - description: | - ユーザコード
- X-point に登録されていないユーザのユーザコードを指定した場合は、認証したユーザで添付ファイルが追加されます。 - type: string - example: u001 - file: - description: | - アップロードファイル情報
- ファイルを更新せず備考のみ更新したい場合は指定なし。 - type: string - format: binary - file_name: - description: | - アップロードファイル名
- 拡張子を含んだファイル名を指定する。
- アップロードファイル情報を指定する場合は必須です。 - type: string - example: sample.pdf - remarks: - description: 備考 - type: string - example: テスト - reason: - description: | - 更新理由
- 更新/削除する理由を指定します。
- 電帳法対応オプションのデータ保存対象フォームの場合は指定必須です。 - type: string - example: テスト - detail_no: - description: | - 対応明細行No
- 電帳法対応オプションの添付型フォームの書類かつフォームに明細行が存在する場合に、ファイルに対応する明細行を指定します。 - type: integer - example: "1" - evidence_type: - description: | - 電帳法書類区分
- 電帳法対応オプションの添付型フォームの書類の場合に、ファイルの電帳法書類区分を指定します。
- 以下いずれかの整数が指定可能です。
- 0:その他
- 1:電子取引
- type: integer - example: "1" - - # -------------------------------------------------------------------------------------------------- - - PostUserMasterUpdateRequest: - content: - multipart/form-data: - schema: - required: - - file - type: object - properties: - file: - description: | - アップロードファイル
- ユーザ固有マスタのインポートに利用する CSV ファイルを指定します。 - type: string - format: binary - overwrite: - description: | - 上書きフラグ
- インポートに利用する CSV ファイルが既にアップロードされている場合に、ファイルを上書きするか指定します。
- true:上書きする
- false:上書きしない
- デフォルトは false です。
- type: boolean - example: "false" - - # -------------------------------------------------------------------------------------------------- - - ScimUserRequest: - content: - application/scim+json: - schema: - required: - - userName - - displayName - - password - - urn:atled:scim:schemas:1.0:User - type: object - properties: - userName: - description: ログインID - type: string - example: u001 - displayName: - description: 氏名 - type: string - example: 田中 - name: - description: 氏名情報 - type: object - properties: - formatted: - description: 氏名 - type: string - example: 田中 - active: - description: | - ログイン拒否
- true:ログイン拒否する。
- false:ログイン拒否しない。
- デフォルトは false です。 - type: boolean - example: false - password: - description: パスワード - type: string - example: tanaka001 - emails: - description: メールアドレス情報 - type: array - items: - type: object - properties: - value: - description: メールアドレス - type: string - example: scim@example.com - type: - description: | - メールタイプ
- 未使用項目のため指定する必要はありません。 - type: string - example: "" - primary: - description: | - 優先フラグ
- 未使用項目のため指定する必要はありません。 - type: boolean - example: true - urn:atled:scim:schemas:1.0:User: - description: X-point 拡張属性 - type: object - required: - - userCode - properties: - userCode: - description: ユーザCD - type: string - example: u001 - kana: - description: 氏名カナ - type: string - example: タナカ - groups: - description: 所属グループ情報 - type: array - items: - type: object - properties: - value: - description: | - ユーザグループ ID
- ユーザグループ ID またはユーザグループ CDのいずれか指定必須。
- どちらも指定されている場合はユーザグループ ID が優先されます。 - type: string - example: 100 - groupCode: - description: ユーザグループCD - type: string - example: group01 - primary: - description: 優先フラグ - type: boolean - example: true - partCode: - description: | - 役職CD
- partCode と part.partCode のどちらも指定されている場合は partCode が優先されます。 - type: string - example: part01 - part: - description: 役職情報 - type: object - properties: - partCode: - description: 役職CD - type: string - example: part01 - itemValues: - description: 予備項目情報 - type: array - items: - required: - - no - type: object - properties: - no: - description: 予備項目番号 - type: integer - example: 1 - value: - description: 予備項目内容 - type: string - example: 予備1 - remark: - description: 備考 - type: string - example: 備考 - - # -------------------------------------------------------------------------------------------------- - - PatchUpdateUserRequest: - content: - application/scim+json: - schema: - allOf: - - $ref: "#/components/schemas/PatchUpdateUserRequest" - examples: - 置換(replace): - description: ログイン ID と予備項目5を指定した値に置換する - value: - schemas: - - urn:ietf:params:scim:api:messages:2.0:PatchOp - Operations: - - path: "" - op: replace - value: - userName: u001 - - path: urn:atled:scim:schemas:1.0:User.itemValues[no eq 5] - op: replace - value: - no: 5 - value: 99999 - 追加(add): - description: | - 指定した所属ユーザグループと予備項目を追加する
-
- **注意事項**
- * 追加(add)の操作はリソース内の配列の項目にのみ行うことができます。
- 配列以外の項目に追加(add)の操作を行った場合はエラーレスポンスが返されます。 - value: - schemas: - - urn:ietf:params:scim:api:messages:2.0:PatchOp - Operations: - - path: urn:atled:scim:schemas:1.0:User.groups - op: add - value: - groupCode: group01 - primary: true - partCode: part01 - - path: urn:atled:scim:schemas:1.0:User.itemValues - op: add - value: - no: 10 - value: 99999 - 削除(remove): - description: | - メールアドレスと予備項目10を削除する
-
- **注意事項**
- * 削除(remove)の操作はリソースの必須項目(userName や displayName)に対して行うことはできません。
- 必須指定の項目に削除(remove)の操作を行った場合はエラーレスポンスが返されます。 - value: - schemas: - - urn:ietf:params:scim:api:messages:2.0:PatchOp - Operations: - - path: emails - op: remove - - path: urn:atled:scim:schemas:1.0:User.itemValues[no eq 10] - op: remove - 指定した値に置き換える: - description: ユーザCDを置き換える - value: - userName: u001 - urn:atled:scim:schemas:1.0:User: - userCode: u001 - - # -------------------------------------------------------------------------------------------------- - - ScimGroupRequest: - content: - application/scim+json: - schema: - required: - - displayName - - urn:atled:scim:schemas:1.0:Group - type: object - properties: - displayName: - description: ユーザグループ名称 - type: string - example: 営業部 - members: - description: 所属ユーザ情報 - allOf: - - $ref: "#/components/schemas/members_iteme" - - example: - - value: "100" - urn:atled:scim:schemas:1.0:GroupMember: - usercode: u001 - partCode: part01 - part: - partCode: part01 - - value: "101" - urn:atled:scim:schemas:1.0:GroupMember: - usercode: u002 - partCode: part02 - part: - partCode: part02 - urn:atled:scim:schemas:1.0:Group: - description: X-point 拡張属性(ユーザグループ) - required: - - groupCode - type: object - properties: - groupCode: - description: グループCD - type: string - example: group01 - displayKana: - description: ユーザグループ名称カナ - type: string - example: エイギョウブ - parentGroup: - description: 親グループ情報 - type: object - properties: - value: - description: | - 親グループID
- value と groupCode のどちらも指定されている場合は value が優先されます。 - type: string - example: 105 - groupCode: - description: 親グループCD - type: string - example: group02 - - # -------------------------------------------------------------------------------------------------- - - PutUpdateUserGroupInfoRequest: - content: - application/scim+json: - schema: - required: - - displayName - - urn:atled:scim:schemas:1.0:Group - type: object - properties: - displayName: - description: ユーザグループ名称 - type: string - example: 開発部 - members: - description: 所属ユーザ情報 - allOf: - - $ref: "#/components/schemas/members_iteme" - - example: - - value: 100 - urn:atled:scim:schemas:1.0:GroupMember: - usercode: u001 - partCode: part01 - part: - partCode: part01 - - value: 101 - urn:atled:scim:schemas:1.0:GroupMember: - usercode: u002 - partCode: part02 - part: - partCode: part02 - urn:atled:scim:schemas:1.0:Group: - description: X-point 拡張属性(ユーザグループ) - required: - - groupCode - type: object - properties: - groupCode: - description: グループCD - type: string - example: group01 - displayKana: - description: ユーザグループ名称カナ - type: string - example: カイハツブ - parentGroup: - description: 親グループ情報 - type: object - properties: - value: - description: | - 親グループID
- value と groupCode のどちらも指定されている場合は value が優先されます。 - type: string - example: 102 - groupCode: - description: 親グループCD - type: string - example: group02 - - # -------------------------------------------------------------------------------------------------- - - PatchUpdateUserGroupInfoRequest: - content: - application/scim+json: - schema: - required: - - schemas - allOf: - - $ref: "#/components/schemas/PatchUpdateUserGroupInfoRequest" - examples: - 置換(replace): - description: | - ユーザグループ名称を指定した値に置換する
- 所属ユーザ(ユーザ ID:1000)を指定したユーザ(ユーザ ID:1001)に置換する - value: - schemas: - - urn:ietf:params:scim:api:messages:2.0:PatchOp - Operations: - - path: "" - op: replace - value: - displayName: 営業部 - - path: members[value eq 1000] - op: replace - value: - value: 1001 - urn:atled:scim:schemas:1.0:GroupMember: - part: - partCode: part01 - 追加(add): - description: | - ユーザ CD:u003 のユーザを所属ユーザに追加する
-
- **注意事項**
- * 追加(add)の操作はリソース内の配列の項目にのみ行うことができます。
- 配列以外の項目に追加(add)の操作を行った場合はエラーレスポンスが返されます。 - value: - schemas: - - urn:ietf:params:scim:api:messages:2.0:PatchOp - Operations: - - path: members - op: add - value: - urn:atled:scim:schemas:1.0:GroupMember: - userCode: u003 - part: - partCode: part01 - 削除(remove): - description: | - 親グループ設定と所属ユーザからユーザ ID:1003 のユーザを削除する
-
- ※ 削除(remove)の操作はリソースの必須項目(displayName や groupCode)に対して行うことはできません。
-   必須指定の項目に削除(remove)の操作を行った場合はエラーレスポンスが返されます。 - value: - schemas: - - urn:ietf:params:scim:api:messages:2.0:PatchOp - Operations: - - path: urn:atled:scim:schemas:1.0:Group.parentGroup - op: remove - - path: members[value eq 1003] - op: remove - 指定した値に置き換える: - description: グループCDと表示名称カナを置き換える - value: - urn:atled:scim:schemas:1.0:Group: - groupCode: group02 - displayKana: エイギョウブ - - # -------------------------------------------------------------------------------------------------- - - ScimPartRequest: - content: - application/scim+json: - schema: - required: - - displayName - - partCode - type: object - properties: - displayName: - description: 役職名称 - type: string - example: 一般 - displayKana: - description: 役職名称カナ - type: string - example: イッパン - partCode: - description: 役職CD - type: string - example: part01 - orderNo: - description: 並び順 - type: integer - example: 1 - - # -------------------------------------------------------------------------------------------------- - - PatchUpdatePartInfoRequest: - description: | - **注意事項**
- * 役職リソースは配列項目が存在しない為、追加(add)の更新操作はできません。 - content: - application/scim+json: - schema: - allOf: - - $ref: "#/components/schemas/PatchUpdatePartInfoRequest" - examples: - 置換(replace): - description: 役職名称と役職 CD を指定した値に置換する - value: - schemas: - - urn:ietf:params:scim:api:messages:2.0:PatchOp - Operations: - - path: "" - op: replace - value: - displayName: 代表取締役 - partCode: p001 - 削除(remove): - description: 役職情報カナを削除する - value: - schemas: - - urn:ietf:params:scim:api:messages:2.0:PatchOp - Operations: - - path: displayKana - op: remove - 指定した値に置き換える: - description: 表示名称と役職CDを置き換える - value: - displayKana: ダイヒョウトリシマリヤク - partCode: p001 - - # ----------------------------------------------- - # レスポンス components/responses - # ----------------------------------------------- - - responses: - ErrorResponses400: - description: "Error response" - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/ErrorResponse" - - type: object - properties: - error_code: - example: 400 - - ErrorResponses401: - description: "Error response" - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/ErrorResponse" - - type: object - properties: - error_code: - example: 401 - - ErrorResponses403: - description: "Error response" - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/ErrorResponse" - - type: object - properties: - error_code: - example: 403 - - ErrorResponses404: - description: "Error response" - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/ErrorResponse" - - type: object - properties: - error_code: - example: 404 - - ErrorResponses500: - description: "Error response" - content: - application/json: - schema: - type: object - properties: - error_code: - type: integer - example: 500 - error_message: - type: string - example: "{エラーメッセージ}" - reasons: - type: string - example: ["{エラーメッセージ}"] - - ErrorResponses500_noReasons: - description: "Error response" - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/ErrorResponse" - - type: object - properties: - error_code: - example: 500 - - ScimErrorResponse400: - description: "Error response" - content: - application/scim+json: - schema: - allOf: - - $ref: "#/components/schemas/ScimErrorResponse" - - type: object - properties: - status: - example: 400 - - ScimErrorResponse401: - description: "Error response" - content: - application/scim+json: - schema: - allOf: - - $ref: "#/components/schemas/ScimErrorResponse" - - type: object - properties: - status: - example: 401 - - ScimErrorResponse404: - description: "Error response" - content: - application/scim+json: - schema: - allOf: - - $ref: "#/components/schemas/ScimErrorResponse" - - type: object - properties: - status: - example: 404 - - # -------------------------------------------------------------------------------------------------- - - PostDocumentResponses200: - description: Successful response - content: - application/json: - schema: - type: object - properties: - docid: - description: 書類ID - type: integer - example: 999 - message_type: - description: メッセージタイプ(3:INFO 固定) - type: integer - example: 3 - message: - description: メッセージ内容 - type: string - example: 書類が提出されました (ID = 999) - - # -------------------------------------------------------------------------------------------------- - - PatchDocumentResponses200: - description: Successful response - content: - application/json: - schema: - type: object - properties: - docid: - description: 書類ID - type: integer - example: 999 - message_type: - description: メッセージタイプ(3:INFO 固定) - type: integer - example: 3 - message: - description: メッセージ内容 - type: string - example: 書類が承認されました (ID = 999) - - # -------------------------------------------------------------------------------------------------- - - GetDocumentResponses200: - description: Successful response - content: - application/json: - schema: - type: object - properties: - document: - type: object - properties: - docid: - description: 書類ID - type: integer - example: 999 - title1: - description: 件名1 - type: string - example: 件名 - title2: - description: 件名2 - type: string - example: 件名2 - form: - allOf: - - $ref: "#/components/schemas/doc_form" - route: - description: | - 承認ルート情報
- 通常フォームの場合は応答に承認ルートコードと承認ルート名称は含まれません。 - type: object - properties: - code: - description: 承認ルートコード - type: string - example: route01 - name: - description: 承認ルート名称 - type: string - example: 営業部ルート - writer: - description: 申請情報 - type: object - properties: - user: - description: 申請者情報 - type: object - properties: - code: - description: 申請者ユーザコード - type: string - example: u001 - name: - description: 申請者ユーザ名 - type: string - example: 田中 - stampname: - description: 申請者印影名 - type: string - example: 田 - group: - description: 申請ユーザグループ情報 - type: object - properties: - code: - description: 申請ユーザグループコード - type: string - example: group01 - name: - description: 申請ユーザグループ名称 - type: string - example: 営業部 - proxy: - description: | - 代理申請者情報 - 代理申請していない書類の場合は、応答に代理申請者のユーザコードとユーザ名は含まれません。 - type: object - properties: - code: - description: 代理申請者ユーザコード - type: string - example: u002 - name: - description: 代理申請者ユーザ名 - type: string - example: 佐藤 - datetime: - description: 申請日時 - type: string - example: 2023/01/01 12:00:00 - lastaprv: - description: 最終承認者情報 - type: object - properties: - user: - description: 承認者情報 - type: object - properties: - code: - description: 最終承認者ユーザコード - type: string - example: u003 - name: - description: 最終承認者ユーザ名 - type: string - example: 加藤 - stampname: - description: 最終承認者印影名 - type: string - example: 加 - datetime: - description: ワークフロー操作日時 - type: string - example: 2023/01/01 12:00:00 - step: - allOf: - - $ref: "#/components/schemas/step" - version: - description: 版数 - type: integer - example: 3 - status: - allOf: - - $ref: "#/components/schemas/status" - pages: - type: array - items: - type: object - properties: - page_no: - description: ページ番号 - type: integer - example: 1 - fields: - description: | - 書類データ
- fields内のキーはフィールドIDを指定するため、フォーム毎に異なります。 - type: object - properties: - field1: - type: string - example: 件名 - field2: - type: string - example: "12345" - group1: - type: array - items: - type: object - properties: - g_field1: - type: integer - example: 100 - g_field2: - type: string - example: テキスト - g_field3: - type: string - example: テキスト - attachments: - allOf: - - $ref: "#/components/schemas/attachments" - - example: - - content_type: text/csv - seq: 1234 - name: filename.csv - size: 684 - remarks: CSV data1 - - content_type: text/csv - seq: 1235 - name: filename2.csv - size: 12345 - remarks: CSV data2 - comments: - type: array - items: - type: object - properties: - writer: - description: コメント登録者情報 - type: object - properties: - code: - description: コメント登録者ユーザコード - type: string - example: u001 - name: - description: コメント登録者ユーザ名 - type: string - example: 田中 - date: - description: コメント登録日時 - type: string - example: 2023/01/01 12:00:00 - update: - description: コメント更新者情報 - type: object - properties: - code: - description: コメント更新者ユーザコード - type: string - example: u002 - name: - description: コメント更新者ユーザ名 - type: string - example: 佐藤 - date: - description: コメント更新日時 - type: string - example: 2023/01/01 12:00:00 - content: - description: コメント内容 - type: string - example: コメント本文 - flags: - description: | - コメントタイプ - * back:差し戻しコメントまたは却下コメント - * attention:重要コメント - type: array - items: - type: string - example: back - relations: - allOf: - - $ref: "#/components/schemas/relations" - - example: - - docid: 999 - title1: 件名 - title2: 件名2 - form_name: 経費申請書 - - docid: 999 - title1: 件名 - title2: 件名2 - form_name: 経費申請書 - - # -------------------------------------------------------------------------------------------------- - - DeleteDocumentResponses200: - description: Successful response - content: - application/json: - schema: - type: object - properties: - docid: - type: integer - example: 999 - message_type: - description: メッセージタイプ(3:INFO 固定) - type: integer - example: 3 - message: - type: string - example: 書類が削除されました (ID = 999) - - # -------------------------------------------------------------------------------------------------- - - PostCommentsResponses200: - description: Successful response - content: - application/json: - schema: - type: object - properties: - docid: - description: 書類ID - type: integer - example: 999 - seq: - description: コメント番号 - type: integer - example: 1 - message_type: - description: メッセージタイプ(3:INFO 固定) - type: integer - example: 3 - message: - description: メッセージ内容 - type: string - example: コメントが追加されました (ID = 999 / seq = 1) - - # -------------------------------------------------------------------------------------------------- - - GetCommentsResponses200: - description: Successful response - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/GetCommentsResponses200" - examples: - コメントあり: - value: - docid: 999 - comment_list: - - seqno: 1 - attentionflg: true - content: 重要コメントです - writername: 田中 - writedata: 2023/01/01 12:00:00 - - seqno: 2 - attentionflg: false - content: 通常コメントです - writername: 佐藤 - writedata: 2023/01/01 12:00:00 - コメントなし: - value: - docid: 999 - comment_list: [] - - # -------------------------------------------------------------------------------------------------- - - PatchCommentsResponses200: - description: Successful response - content: - application/json: - schema: - type: object - properties: - docid: - description: 書類ID - type: integer - example: 999 - seq: - description: コメント番号 - type: integer - example: 1 - message_type: - description: メッセージタイプ(3:INFO 固定) - type: integer - example: 3 - message: - description: メッセージ内容 - type: string - example: コメントが更新されました (ID = 999 / seq = 1) - - # -------------------------------------------------------------------------------------------------- - - DeleteCommentsResponses200: - description: Successful response - content: - application/json: - schema: - type: object - properties: - docid: - description: 書類ID - type: integer - example: 999 - seq: - description: コメント番号 - type: integer - example: 1 - message_type: - description: メッセージタイプ(3:INFO 固定) - type: integer - example: 3 - message: - description: メッセージ内容 - type: string - example: コメントが削除されました (ID = 999 / seq = 1) - - # -------------------------------------------------------------------------------------------------- - - GetStatusResponses200: - description: Successful response - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/GetStatusResponses200" - examples: - ワークフローフォーム: - value: - document: - docid: 999 - title1: 件名1 - title2: 件名2 - form: - id: 99 - code: form01 - name: 経費申請書 - route: - code: route01 - name: 営業部ルート - type: workflow - status: - code: 1 - name: 承認中 - step: - max: 3 - current: 2 - current_version: 3 - writer: - usercode: u001 - username: 田中 - stampname: 田 - datetime: 2023-01-01 12:00:00 - lastaprv: - usercode: u002 - username: 佐藤 - stampname: 佐 - datetime: 2023-01-01 12:00:00 - flow_versions: - - flow_results: - - stepno: 0 - steptitle: 申請 - aprvusers: - - aprv: - usercode: u001 - username: 田中 - stampname: 田 - datetime: 2023-01-01 12:00:00 - groupcd: group01 - groupname: 営業部 - partcd: part01 - partname: 一般 - statuscode: 0 - status: 申請 - - stepno: 1 - steptitle: 承認 - aprvusers: - - aprv: - usercode: u002 - username: 佐藤 - stampname: 佐 - datetime: 2023-01-01 12:00:00 - groupcd: group01 - groupname: 営業部 - partcd: part02 - partname: 課長 - statuscode: 1 - status: 承認 - cond: AND - cond_num: 1 - adminskip: 0 - skip: 0 - backstepno: 0 - - stepno: 2 - steptitle: 承認 - aprvusers: - - aprv: - usercode: u003 - username: 加藤 - stampname: 加 - datetime: 2023-01-01 12:00:00 - groupcd: group01 - groupname: 営業部 - partcd: part03 - partname: 次長 - statuscode: 0 - status: 未処理 - cond: AND - cond_num: 1 - adminskip: 0 - skip: 0 - backstepno: 0 - - stepno: 3 - steptitle: 承認 - aprvusers: - - aprv: - usercode: u004 - username: 後藤 - stampname: 後 - datetime: 2023-01-01 12:00:00 - groupcd: group02 - groupname: 営業部 - partcd: part04 - partname: 部長 - statuscode: 0 - status: 未処理 - cond: AND - cond_num: 1 - adminskip: 0 - skip: 0 - backstepno: 0 - - stepno: 4 - steptitle: 回覧 - aprvusers: - - aprv: - usercode: u001 - username: 田中 - stampname: 田 - datetime: 2023-01-01 12:00:00 - groupcd: group01 - groupname: 営業部 - partcd: part01 - partname: 一般 - statuscode: 1 - status: 既読 - - aprv: - usercode: u022 - username: 青木 - stampname: 青 - datetime: "" - groupcd: group03 - groupname: 店舗 - partcd: part01 - partname: 一般 - statuscode: 0 - status: 未読 - histories: - [{ - version: 3, - flow_results: - [ - { - stepno: 0, - steptitle: 申請, - aprvusers: - [ - { - aprv: - [{ - usercode: u001, - username: 田中圭太, - stampname: 田中, - datetime: 2023-01-01 12:00:00, - groupcd: group01, - groupname: 営業部, - partcd: part01, - partname: 一般, - }], - statuscode: 0, - status: 申請, - }, - ], - }, - { - stepno: 1, - steptitle: 承認, - aprvusers: - [ - { - aprv: - [{ - usercode: u002, - username: 佐藤哲郎, - stampname: 佐藤, - datetime: 2023-01-01 12:00:00, - groupcd: group01, - groupname: 営業部, - partcd: part02, - partname: 課長, - }], - statuscode: 1, - status: 承認, - }, - ], - cond: AND, - cond_num: 1, - adminskip: 0, - skip: 0, - backstepno: 0, - }, - { - stepno: 4, - steptitle: 総務承認, - aprvusers: - [ - { - aprv: - [{ - usercode: u004, - username: 濱崎貴子, - stampname: 濱崎, - datetime: "", - groupcd: group02, - groupname: 総務課, - partcd: part01, - partname: 一般, - }], - statuscode: 0, - status: 未処理, - }, - { - aprv: - [{ - usercode: u006, - username: 芥川幸三, - stampname: 芥川, - datetime: "", - groupcd: group02, - groupname: 総務課, - partcd: part03, - partname: 部長, - }], - statuscode: 0, - status: 未処理, - }, - ], - cond: AND, - cond_num: 0, - adminskip: 0, - skip: 0, - backstepno: 0, - } - ], - }, - { - version: 2, - flow_results: - [ - { - stepno: 0, - steptitle: 申請, - aprvusers: - [ - { - aprv: - [{ - usercode: u001, - username: 田中圭太, - stampname: 田中, - datetime: 2023-01-01 12:00:00, - groupcd: group01, - groupname: 営業部, - partcd: part01, - partname: 一般, - }], - statuscode: 0, - status: 申請, - }, - ], - }, - { - stepno: 1, - steptitle: 承認, - aprvusers: - [ - { - aprv: - [{ - usercode: u002, - username: 佐藤哲郎, - stampname: 佐藤, - datetime: 2023-01-01 12:00:00, - groupcd: group01, - groupname: 営業部, - partcd: part02, - partname: 課長, - }], - statuscode: 3, - status: 差し戻し, - }, - ], - cond: AND, - cond_num: 1, - adminskip: 0, - skip: 0, - backstepno: 0, - }, - { - stepno: 4, - steptitle: 総務承認, - aprvusers: - [ - { - aprv: - [{ - usercode: u004, - username: 濱崎貴子, - stampname: 濱崎, - datetime: "", - groupcd: group02, - groupname: 総務課, - partcd: part01, - partname: 一般, - }], - statuscode: 0, - status: 未処理, - }, - { - aprv: - [{ - usercode: u006, - username: 芥川幸三, - stampname: 芥川, - datetime: "", - groupcd: group02, - groupname: 総務課, - partcd: part03, - partname: 部長, - }], - statuscode: 0, - status: 未処理, - }, - ], - cond: AND, - cond_num: 0, - adminskip: 0, - skip: 0, - backstepno: 0, - } - ], - }, - { - version: 1, - flow_results: - [ - { - stepno: 0, - steptitle: 申請, - aprvusers: - [ - { - aprv: - [{ - usercode: u001, - username: 田中圭太, - stampname: 田中, - datetime: 2023-01-01 12:00:00, - groupcd: group01, - groupname: 営業部, - partcd: part01, - partname: 一般, - }], - statuscode: 0, - status: 申請, - }, - ], - }, - { - stepno: 1, - steptitle: 承認, - aprvusers: - [ - { - aprv: - [{ - usercode: u002, - username: 佐藤哲郎, - stampname: 佐藤, - datetime: 2023-01-01 12:00:00, - groupcd: group01, - groupname: 営業部, - partcd: part02, - partname: 課長, - }], - statuscode: 3, - status: 差し戻し, - }, - ], - cond: AND, - cond_num: 1, - adminskip: 0, - skip: 0, - backstepno: 0, - }, - { - stepno: 4, - steptitle: 総務承認, - aprvusers: - [ - { - aprv: - [{ - usercode: u004, - username: 濱崎貴子, - stampname: 濱崎, - datetime: "", - groupcd: group02, - groupname: 総務課, - partcd: part01, - partname: 一般, - }], - statuscode: 0, - status: 未処理, - }, - { - aprv: - [{ - usercode: u006, - username: 芥川幸三, - stampname: 芥川, - datetime: "", - groupcd: group02, - groupname: 総務課, - partcd: part03, - partname: 部長, - }], - statuscode: 0, - status: 未処理, - }, - ], - cond: AND, - cond_num: 0, - adminskip: 0, - skip: 0, - backstepno: 0, - } - ], - } - ] - 通常フォーム: - value: - document: - docid: 999 - title1: 件名1 - title2: 件名2 - form: - id: 99 - code: form01 - name: 経費申請書 - route: - code: "" - name: "" - type: standard - status: - code: 0 - name: 下書き - step: - max: 0 - current: 0 - current_version: 1 - writer: - usercode: u001 - username: 田中 - stampname: 田 - datetime: 2023-01-01T12:00:00.000Z - lastaprv: - usercode: "" - username: "" - stampname: "" - datetime: "" - flow_versions: [] - histories: [] - - # -------------------------------------------------------------------------------------------------- - - PostAttachmentsResponses200: - description: Successful response - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/PostAttachmentsResponses200" - examples: - X-point に登録されているユーザを指定: - value: - docid: 999 - seq: 1 - message_type: 0 - message: 添付ファイルが追加されました(ID = 999 / Seq = 1) - X-point に登録されていないユーザを指定: - value: - docid: 999 - seq: 1 - message_type: 0 - message: 添付ファイルが追加されました(ID = 999 / Seq = 1) - detail: 指定されたユーザ CD と一致するユーザは登録されていない為、認証ユーザで添付ファイルを追加しました。 - - # -------------------------------------------------------------------------------------------------- - - PatchAttachmentsResponses200: - description: Successful response - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/PatchAttachmentsResponses200" - examples: - 添付ファイル更新: - value: - docid: 999 - seq: 1 - message_type: 0 - message: 添付ファイルが更新されました(ID = 999 / Seq = 1) - 添付ファイル削除: - value: - docid: 999 - seq: 1 - message_type: 0 - message: 添付ファイルが削除されました(ID = 999 / Seq = 1) - X-point に登録されていないユーザを指定: - value: - docid: 999 - seq: 1 - message_type: 0 - message: 添付ファイルが更新されました(ID = 999 / Seq = 1) - detail: 指定されたユーザ CD と一致するユーザは登録されていない為、認証ユーザで添付ファイルを追加しました。 - - # -------------------------------------------------------------------------------------------------- - - GetAttachmentsListResponses200: - description: Successful response - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/GetAttachmentsListResponses200" - examples: - 添付ファイルあり: - value: - attachments: - - content_type: text/csv - seq: 1 - name: filename.csv - size: 684 - remarks: CSV data1 - - content_type: text/csv - seq: 2 - name: filename2.csv - size: 684 - remarks: CSV data2 - 添付ファイル無し: - value: - attachments: [] - 電帳法対応オプションの添付型フォーム: - value: - attachments: - - content_type: text/csv - seq: 1 - name: filename.csv - size: 684 - remarks: CSV data1 - detail_no: 1 - evidence_type: 1 - evidence_type_label: 電子取引 - - content_type: text/csv - seq: 2 - name: filename2.csv - size: 684 - remarks: CSV data2 - detail_no: 1 - evidence_type: 0 - evidence_type_label: その他 - - # -------------------------------------------------------------------------------------------------- - - GetLumpapplyListResponses200: - description: Successful response - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/GetLumpapplyListResponses200" - examples: - 自動申請設定あり: - value: - lumpapply: - - id: 100 - name: 営業部経費申請書作成 - form_id: 100 - form_cd: form01 - form_name: 経費申請書 - route_id: 100 - route_cd: route01 - route_name: 営業部ルート - - id: 101 - name: 人事部経費申請書作成 - form_id: 100 - form_cd: form01 - form_name: 経費申請書 - route_id: 100 - route_cd: route02 - route_name: 人事部ルート - 自動申請設定なし: - value: - lumpapply: [] - - # -------------------------------------------------------------------------------------------------- - - GetLumpapplyResponses200: - description: Successful response - content: - application/json: - schema: - type: object - properties: - lumpapply: - description: 自動申請情報 - type: object - properties: - name: - description: 自動申請登録名称 - type: string - example: 営業部の経費申請書作成 - form: - description: フォーム情報 - type: object - properties: - name: - description: フォーム名称 - type: string - example: 経費申請書 - code: - description: フォームコード - type: string - example: form01 - route: - description: 承認ルート情報 - type: object - properties: - name: - description: ルート名称 - type: string - example: 営業部ルート - code: - description: ルートコード - type: string - example: route01 - import_file: - description: 取込ファイル情報 - type: object - properties: - name: - description: 取込ファイル名称 - type: string - example: input.csv - success: - description: 取込ファイル成功時処理(数値) - type: integer - example: 0 - success_str: - description: 取込ファイル成功時処理(文字列) - type: string - example: 何もしない - failed: - description: 取込ファイル失敗時処理(数値) - type: integer - example: 0 - failed_str: - description: 取込ファイル失敗時処理(文字列) - type: string - example: 何もしない - first_row: - description: 取込ファイル1行目の処理(数値) - type: integer - example: 1 - first_row_str: - description: 取込ファイル1行目の処理(文字列) - type: string - example: 項目行として無視する - first_colum: - description: 申請書類の切り替え判定項目(数値) - type: integer - example: 1 - first_colum_str: - description: 申請書類の切り替え判定項目(文字列) - type: string - example: 先頭列を書類切換えに利用(先頭行文字「*」 継続行文字「」) - remarks: - description: 備考 - type: string - example: 営業部用 - apply: - description: 申請者情報 - type: object - properties: - usertype: - description: 申請者種別 - type: string - example: ユーザ指定 - usercode: - description: 申請者コード - type: string - example: domain_admin - username: - description: 申請者氏名 - type: string - example: 管理者 - create: - description: 作成者情報 - type: object - properties: - username: - description: 作成者氏名 - type: string - example: 管理者 - datetime: - description: 作成日 - type: string - example: 2023/01/01 12:00 - lastaprv: - description: 最終更新者情報 - type: object - properties: - username: - description: 最終更新者氏名 - type: string - example: 管理者 - datetime: - description: 更新日 - type: string - example: 2023/01/01 12:00 - csv_format: - description: CSVフォーマット情報 - type: array - items: - type: object - properties: - seq: - description: シーケンス番号 - type: integer - example: 1 - field_id: - description: フィールドID - type: string - example: usercode - field_name: - description: フィールド名称 - type: string - example: ユーザコード - page_no: - description: ページ番号 - type: integer - example: 1 - apply_user: - description: | - 申請ユーザー使用判定
- true:申請ユーザー
- false:申請ユーザーではない - type: boolean - example: true - group_key: - description: | - グループキー使用判定
- true:グループキー
- false:グループキーではない - type: boolean - example: false - - # -------------------------------------------------------------------------------------------------- - - GetFormsResponses200: - description: Successful response - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/GetFormsResponses200" - examples: - ワークフローフォーム: - value: - form: - code: form01 - name: 経費申請書 - max_step: 4 - route: - - code: route01 - name: 営業部ルート - condroute: false - pages: - - page_no: 1 - fields: - - seq: 1 - fieldid: usercode - fieldtype: 9 - maxlength: 100 - label: ユーザコード - groupname: "" - arraysize: 0 - required: true - unique: true - - seq: 2 - fieldid: username - fieldtype: 9 - maxlength: 100 - label: ユーザ名 - groupname: "" - arraysize: 0 - required: true - unique: false - - seq: 3 - fieldid: purpose - fieldtype: 9 - maxlength: 100 - label: 概要 - groupname: "" - arraysize: 0 - required: true - unique: false - - seq: 4 - fieldid: money - fieldtype: 10 - maxlength: 100 - label: 金額 - groupname: "" - arraysize: 0 - required: true - unique: false - 通常フォーム: - value: - form: - code: form01 - name: 経費申請書 - max_step: 0 - route: [] - pages: - - page_no: 1 - fields: - - seq: 1 - fieldid: usercode - fieldtype: 9 - maxlength: 100 - label: ユーザコード - groupname: "" - arraysize: 0 - required: true - unique: true - - seq: 2 - fieldid: username - fieldtype: 9 - maxlength: 100 - label: ユーザ名 - groupname: "" - arraysize: 0 - required: true - unique: false - - seq: 3 - fieldid: purpose - fieldtype: 9 - maxlength: 100 - label: 概要 - groupname: "" - arraysize: 0 - required: true - unique: false - - seq: 4 - fieldid: money - fieldtype: 10 - maxlength: 100 - label: 金額 - groupname: "" - arraysize: 0 - required: true - unique: false - 複数枚フォーム: - value: - form: - code: form01 - name: 経費申請書 - max_step: 4 - route: - - code: route01 - name: 営業部ルート - condroute: true - pages: - - page_no: 1 - form_code: form01 - form_name: 経費申請書 - fields: - - seq: 1 - fieldid: usercode - fieldtype: 9 - maxlength: 100 - label: ユーザコード - groupname: "" - arraysize: 0 - required: true - unique: true - - seq: 2 - fieldid: username - fieldtype: 9 - maxlength: 100 - label: ユーザ名 - groupname: "" - arraysize: 0 - required: true - unique: false - - seq: 3 - fieldid: purpose - fieldtype: 9 - maxlength: 100 - label: 概要 - groupname: "" - arraysize: 0 - required: true - unique: false - - seq: 4 - fieldid: money - fieldtype: 10 - maxlength: 100 - label: 金額 - groupname: "" - arraysize: 0 - required: true - unique: false - - page_no: 2 - form_code: form02 - form_name: 交通費申請書 - fields: - - seq: 1 - fieldid: usercode - fieldtype: 9 - maxlength: 100 - label: ユーザコード - groupname: "" - arraysize: 0 - required: true - unique: true - - seq: 2 - fieldid: username - fieldtype: 9 - maxlength: 100 - label: ユーザ名 - groupname: "" - arraysize: 0 - required: true - unique: false - - seq: 3 - fieldid: purpose - fieldtype: 9 - maxlength: 100 - label: 概要 - groupname: "" - arraysize: 0 - required: true - unique: false - - seq: 4 - fieldid: money - fieldtype: 10 - maxlength: 100 - label: 金額 - groupname: "" - arraysize: 0 - required: true - unique: false - - # -------------------------------------------------------------------------------------------------- - - GetFormsListResponses200: - description: Successful response - content: - application/json: - schema: - type: object - properties: - form_group: - description: | - フォームグループ情報
- フォームグループが存在しない場合は空配列が返される。 - type: array - items: - type: object - properties: - id: - description: フォームグループID - type: string - example: group01 - name: - description: フォームグループ名称 - type: string - example: 営業部 - form_count: - description: 所属フォーム数 - type: integer - example: 2 - form: - description: | - 所属フォーム情報
- 所属フォームが存在しない場合は空配列が返される。 - allOf: - - $ref: "#/components/schemas/form" - - example: - - id: 1 - name: 経費申請書 - code: form01 - page_count: 1 - table_name: table01 - tsffile_name: form01.tsf - - id: 2 - name: 休暇届 - code: form02 - page_count: 1 - table_name: table02 - tsffile_name: form02.tsf - - # -------------------------------------------------------------------------------------------------- - - GetMasterListResponses200: - description: Successful response - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/GetMasterListResponses200" - examples: - マスタが存在する: - value: - master: - - type: 1 - type_name: ユーザ固有マスタ - name: 社員マスタ - code: master01 - table_name: 社員マスタテーブル - item_count: 100 - remarks: 社員情報 - - type: 0 - type_name: 簡易マスタ - name: 簡易顧客マスタ - code: master02 - table_name: 簡易顧客マスタテーブル - item_count: 50 - remarks: 顧客情報 - マスタが存在しない: - value: - master: [] - - # -------------------------------------------------------------------------------------------------- - - GetUserMasterListResponses200: - description: Successful response - content: - application/json: - schema: - type: object - properties: - table_name: - description: マスタテーブル名 - type: string - example: user_table - fields: - allOf: - - $ref: "#/components/schemas/master_fields" - - example: - - id: id - type: varchar - length: 10 - primary_key: true - index: true - - id: name - type: varchar - length: 50 - primary_key: false - index: true - - id: weight - type: numeric - length: 10.2 - primary_key: false - index: false - - # -------------------------------------------------------------------------------------------------- - - GetMasterDataResponses200: - description: Successful response - headers: - Content-Disposition: - description: 「filename*」はファイル名がRFC5987に従いエンコーディングされているため、受信時にデコードが必要になります。受信環境が自動的にデコードを行う場合はデコード不要になります。 - schema: - type: string - example: attachment; filename="{ファイル名}"; filename*=UTF-8''{URLエンコードされたファイル名} - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/GetMasterDataResponses200" - examples: - 簡易マスタ: - value: - master: - type: 0 - type_name: 簡易マスタ - name: 契約区分マスタ - code: keiyaku_master - table_name: "" - total_count: 2 - data: - - id: 1 - code: item1 - value: アイテム1 - - id: 2 - code: item2 - value: アイテム2 - ユーザ固有マスタ: - value: - master: - type: 1 - type_name: ユーザ固有マスタ - name: 顧客マスタ - code: "" - table_name: "m_customer" - total_count: 2 - data: - - code: 1 - name: 株式会社えいとれっど商事 - kana: カブシキガイシャエイトレッドショウジ - bank_name: えいとれっど銀行 - - code: 2 - name: 株式会社えいとれっど商社 - kana: カブシキガイシャエイトレッドショウシャ - bank_name: えいとれっど銀行 - text/csv: - examples: - 簡易マスタ: - value: "\"itemcd\",\"itemval\"\n\"item1\",\"アイテム1\"\n\"item2\",\"アイテム2\"" - ユーザ固有マスタ: - value: "\"code\",\"name\",\"kana\",\"bank_name\"\n\"1\",\"株式会社えいとれっど商事\",\"カブシキガイシャエイトレッドショウジ\",\"えいとれっど銀行\"\n\"2\",\"株式会社えいとれっど商社\",\"カブシキガイシャエイトレッドショウシャ\",\"えいとれっど銀行\"" - - # -------------------------------------------------------------------------------------------------- - - PutMasterDataResponses200: - description: Successful response - content: - application/json: - schema: - type: object - properties: - master: - description: マスタ情報 - type: object - properties: - type: - description: | - マスタタイプ
- 「0」固定。 - type: integer - example: 0 - type_name: - description: | - マスタタイプ名称
- 「簡易マスタ」固定。 - type: string - example: 簡易マスタ - name: - description: マスタ名 - type: string - example: ユーザマスタ - code: - description: マスタコード - type: string - example: user_master - table_name: - description: | - テーブル名
- 空文字固定。 - type: string - example: "" - all_count: - description: 全インポート件数 - type: integer - example: 3 - success_count: - description: インポート成功件数 - type: integer - example: 3 - error_count: - description: インポート失敗件数 - type: integer - example: 0 - result: - description: インポート結果情報 - allOf: - - $ref: "#/components/schemas/simplemaster_result" - - example: - - status: SUCCESS - data: - code: name - value: 田中 - message: 新規登録が行われました。 - - status: SUCCESS - data: - code: age - value: 25 - message: 新規登録が行われました。 - - status: SUCCESS - data: - code: height - value: 170.31 - message: 新規登録が行われました。 - - # -------------------------------------------------------------------------------------------------- - - PostUserMasterUploadResponses200: - description: Successful response - content: - application/json: - schema: - type: object - properties: - master: - description: マスタ情報 - type: object - properties: - type: - description: | - マスタタイプ
- 「1」固定。 - type: integer - example: 1 - type_name: - description: | - マスタタイプ名称
- 「ユーザ固有マスタ」固定。 - type: string - example: ユーザ固有マスタ - name: - description: マスタ名 - type: string - example: ユーザマスタ - code: - description: | - マスタコード
- 空文字固定。 - type: string - example: "" - table_name: - description: テーブル名
- type: string - example: user_table - message_type: - description: メッセージタイプ(3:INFO 固定) - type: integer - example: 3 - message: - description: メッセージ内容 - type: string - example: ユーザ固有マスタにインポートする CSV ファイルのアップロードが完了しました。 - - # -------------------------------------------------------------------------------------------------- - - GetWebhooklogResponses200: - description: Successful response - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/GetWebhooklogResponses200" - examples: - ログが存在する: - value: - data: - - domain_code: domain01 - docid: doc01 - form_code: form01 - route_code: route01 - title1: 件名 - url: https://script.xxx.com/macros/s/sample/exec - status_code: 200 - send_date: 2023/01/01 12:00:00 - uuid: xxxxxxxx-0017-4c74-b48a-91a9e9b629a8 - - domain_code: domain01 - docid: doc01 - form_code: form01 - route_code: route02 - title1: 件名 - url: https://script.xxx.com/macros/s/sample/exec - status_code: 200 - send_date: 2023/01/01 12:00:00 - uuid: xxxxxxxx-0018-4c74-b48a-91a9e9b629a8 - ログが存在しない: - value: - data: [] - - # -------------------------------------------------------------------------------------------------- - - GetWebhooklogDetailsResponses200: - description: | - Successful response
-
- **注意事項**
- * 応答内容の「response.body」は Webhook 送信先の応答データ形式により、JSON ではなく文字列型等になる可能性があります。 - content: - application/json: - schema: - type: object - properties: - domain_code: - description: ドメインコード - type: string - example: domain01 - docid: - description: 書類ID - type: string - example: doc01 - url: - description: 送信先URL - type: string - example: https://script.xxx.com/macros/s/sample/exec - status_code: - description: ステータスコード - type: string - example: 200 - uuid: - description: UUID - type: string - example: xxxxxxxx-0017-4c74-b48a-91a9e9b629a8 - request: - description: | - リクエスト情報
- Webhook 送信時の送信データ情報。 - type: object - properties: - header: - description: リクエストヘッダ - type: object - properties: - X-point-API-Sender: - type: array - items: - type: string - example: X-point [apitest] - Accept: - type: array - items: - type: string - example: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 - Cache-Control: - type: array - items: - type: string - example: no-cache - Connection: - type: array - items: - type: string - example: keep-alive - User-Agent: - type: array - items: - type: string - example: Java/11.0.4 - Host: - type: array - items: - type: string - example: script.google.com - Pragma: - type: array - items: - type: string - example: no-cache - Content-Length: - type: array - items: - type: string - example: 5222 - Content-Type: - type: array - items: - type: string - example: application/json; charset=UTF-8 - body: - description: リクエストボディ - type: object - properties: - document: - type: object - properties: - docid: - type: integer - example: 999 - title: - type: string - example: 件名 - title2: - type: string - example: 件名2 - form: - type: object - properties: - code: - type: string - example: form01 - name: - type: string - example: 経費申請書 - route: - type: object - properties: - code: - type: string - example: route01 - name: - type: string - example: 営業部ルート - status: - type: object - properties: - code: - type: string - example: 1 - name: - type: string - example: 承認中 - type: - type: string - example: workflow - step: - type: object - properties: - max: - type: integer - example: 4 - current: - type: integer - example: 1 - version: - type: integer - example: 1 - writer: - type: object - properties: - user: - type: object - properties: - code: - type: string - example: u001 - name: - type: string - example: 田中 - stampName: - type: string - example: 田 - date: - type: string - example: 2023/01/01 12:00:00 - lastaprv: - type: object - properties: - user: - type: object - properties: - code: - type: string - example: u001 - name: - type: string - example: 田中 - date: - type: string - example: 2023/01/01 12:00:00 - docdata: - type: object - properties: - obj_set: - type: object - properties: {} - data_set: - type: object - properties: - stat: - type: integer - example: 1 - send_date: - type: string - example: 2023/01/01 12:00:00 - domcd: - type: string - example: dom01 - docid: - type: string - example: doc01 - domid: - type: integer - example: 50 - formname: - type: string - example: 経費申請書 - title1: - type: string - example: 件名 - title2: - type: string - example: 件名2 - formcd: - type: string - example: form01 - routename: - type: string - example: 営業部ルート - routecd: - type: string - example: route01 - uuid: - type: string - example: xxxxxxxx-0017-4c74-b48a-91a9e9b629a8 - pages: - type: array - items: - type: object - properties: - pageno: - type: integer - example: 1 - fields: - type: object - properties: - title: - type: string - example: 件名 - name: - type: string - example: 氏名 - journals: - type: object - properties: - current: - type: object - properties: - steps: - allOf: - - $ref: "#/components/schemas/steps_status0" - - example: - - step: - no: 0 - name: 申請 - aprvusers: - - user: - code: u001 - name: 田中 - stampName: 田 - group: - code: group01 - name: 営業部 - part: - code: part01 - name: 一般 - aprvdate: 2023/01/01 12:00:00 - status: - code: 0 - name: 申請 - - $ref: "#/components/schemas/steps" - - example: - - step: - no: 1 - name: 承認 - condition: - type: AND - aprvusers: - - user: - code: u002 - name: 佐藤 - stampName: 佐 - group: - code: group01 - name: 営業部 - part: - code: part02 - name: 課長 - aprvdate: 2023/01/01 12:00:00 - status: - code: 0 - name: 未処理 - - step: - no: 2 - name: 承認 - condition: - type: AND - aprvusers: - - user: - code: u003 - name: 加藤 - stampName: 加 - group: - code: group01 - name: 営業部 - part: - code: part03 - name: 部長 - aprvdate: 2023/01/01 12:00:00 - status: - code: 0 - name: 未処理 - - step: - no: 3 - name: 承認 - condition: - type: OR - aprvusers: - - user: - code: u004 - name: 山田 - stampName: 山 - group: - code: group01 - name: 営業部 - part: - code: part03 - name: 部長 - aprvdate: 2023/01/01 12:00:00 - status: - code: 0 - name: 未処理 - - user: - code: u005 - name: 後藤 - stampName: 後 - group: - code: group01 - name: 営業部 - part: - code: part03 - name: 部長 - aprvdate: 2023/01/01 12:00:00 - status: - code: 0 - name: 未処理 - response: - type: object - properties: - header: - type: object - properties: - Transfer-Encoding: - type: array - items: - example: chunked - x-empty-key: - description: 実際のキーは空文字列になります。✕:"x-empty-key" ◯:"" - type: array - items: - example: HTTP/1.1 200 OK - Alt-Svc: - type: array - items: - example: h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000 - Server: - type: array - items: - example: GSE - X-Content-Type-Options: - type: array - items: - example: nosniff - Pragma: - type: array - items: - example: no-cache - Date: - type: array - items: - example: Mon, 09 Oct 2023 19:00:14 GMT - Accept-Ranges: - type: array - items: - example: none - Referrer-Policy: - type: array - items: - example: origin - Cache-Control: - type: array - items: - example: no-cache, no-store, max-age=0, must-revalidate - Vary: - type: array - items: - example: Accept-Encoding - Expires: - type: array - items: - example: Mon, 01 Jan 1990 00:00:00 GMT - X-XSS-Protection: - type: array - items: - example: 1; mode=block - Content-Type: - type: array - items: - example: text/html; charset=utf-8 - body: - type: string - example: OK - - # -------------------------------------------------------------------------------------------------- - - GetWebhookConfigResponses200: - description: Successful response - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/GetWebhookConfigResponses200" - examples: - Webhook設定あり: - value: - form_name: 稟議書 - form_type: workflow - webhooks: - - id: 1 - url: https://example.com/webhook - remarks: 設定1 - - id: 2 - url: https://example.com/webhook/test - remarks: 設定2 - Webhook設定なし: - value: - form_name: 稟議書 - form_type: workflow - webhooks: [] - - # -------------------------------------------------------------------------------------------------- - - PostWebhookInsertResponses200: - description: Successful response - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/webhooks_config" - - example: - id: 1 - url: https://example.com/webhook - remarks: 設定1 - - # -------------------------------------------------------------------------------------------------- - - PatchWebhookUpdateResponses200: - description: Successful response - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/webhooks_config" - - example: - id: 1 - url: https://example.com/webhook - remarks: Webhook設定更新 - - # -------------------------------------------------------------------------------------------------- - - DeleteWebhookConfigResponses200: - description: Successful response - content: - application/json: - schema: - type: object - properties: - id: - description: | - Webhook ID
- 削除した Webhook 設定のWebhookID が返される。 - type: integer - example: 1 - - # -------------------------------------------------------------------------------------------------- - - GetUseFormsListResponses200: - description: Successful response - content: - application/json: - schema: - type: object - properties: - form_group: - description: | - フォームグループ情報
- フォームグループが存在しない場合は空配列が返される。 - type: array - items: - type: object - properties: - id: - description: フォームグループID - type: integer - example: 10 - name: - description: フォームグループ名称 - type: string - example: 営業部 - form: - description: | - 所属フォーム情報
- 所属フォームが存在しない場合は空配列が返される。 - allOf: - - $ref: "#/components/schemas/use_form" - - example: - - id: 1 - name: 経費申請書 - code: form01 - route: - - id: -1 - name: (自動選択ルート) - - id: 999 - code: route01 - name: 営業部ルート - - id: 2 - name: 交通費清算書 - code: form02 - route: - - id: -1 - name: (自動選択ルート) - - id: 1000 - code: route02 - name: 営業部ルート - - id: 3 - name: 顧客カード - code: form03 - route: - - id: -1 - name: "" - - # -------------------------------------------------------------------------------------------------- - - GetProxyInfoResponses200: - description: Successful response - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/GetProxyInfoResponses200" - examples: - 代理権限設定あり: - value: - proxy: - - user: - code: u001 - name: 田中 - apply: true - aprv: true - - user: - code: u002 - name: 加藤 - apply: true - aprv: true - 代理権限設定なし: - value: - proxy: [] - - # -------------------------------------------------------------------------------------------------- - - GetApprovalsListResponses200: - description: Successful response - content: - application/json: - schema: - type: object - properties: - total_count: - description: 承認状況の総数 - type: integer - example: 2 - approval_list: - description: | - 承認状況情報
- 該当する書類が存在しない場合は空配列が返される。 - allOf: - - $ref: "#/components/schemas/approval_list" - - example: - - docid: 100 - hidden: true - attachment: true - comment: false - title1: 1月分経費 - title2: 営業部 - form_name: 経費申請書 - status: 承認中 - display_status: 承認中 - apply_datetime: 2023/01/01 12:00:00 - apply_user: 佐藤 - approval_user: - - 加藤 - lastaprv_datetime: 2023/01/01 12:00:00 - - docid: 101 - hidden: true - attachment: true - comment: false - title1: 2月分経費 - title2: 営業部 - form_name: 経費申請書 - status: 承認中 - display_status: 承認中 - apply_datetime: 2023/01/01 12:00:00 - apply_user: 佐藤 - approval_user: - - 加藤 - lastaprv_datetime: 2023/01/01 12:00:00 - - # -------------------------------------------------------------------------------------------------- - - GetApprovalsWaitResponses200: - description: Successful response - content: - application/json: - schema: - type: object - properties: - status_list: - description: 承認状況リスト - allOf: - - $ref: "#/components/schemas/status_list" - - example: - - type: 0 - name: 承認待ち - count: 0 - - type: 1 - name: 差し戻され - count: 5 - - type: 2 - name: 下書き - count: 1 - - type: 3 - name: 保留 - count: 1 - - type: 4 - name: 承認中(申請) - count: 10 - - type: 5 - name: 差し戻し - count: 0 - - type: 6 - name: 承認完了(申請) - count: 100 - - type: 7 - name: 却下 - count: 0 - - type: 8 - name: 回覧 - count: 6 - - type: 9 - name: 承認中(承認) - count: 0 - - type: 10 - name: 承認完了(承認) - count: 0 - wait_list: - description: 承認待ち書類リスト - allOf: - - $ref: "#/components/schemas/wait_list" - - example: - - docid: 100 - name: 経費申請書 - title: 1月分経費 - writername: 佐藤 - writedate: 2023/01/01 12:00:00 - - docid: 100 - name: 経費申請書 - title: 1月分経費 - writername: 加藤 - writedate: 2023/01/01 12:00:00 - - docid: 100 - name: 経費申請書 - title: 1月分経費 - writername: 田中 - writedate: 2023/01/01 12:00:00 - - # -------------------------------------------------------------------------------------------------- - - PutApprovalsHiddenResponses200: - description: Successful response - content: - application/json: - schema: - type: object - properties: - docid: - description: | - 書類ID配列
- 非表示/表示設定した書類 ID - example: - - 100 - - 101 - - 102 - - 103 - message_type: - description: メッセージタイプ(3:INFO 固定) - type: integer - example: 3 - message: - description: メッセージ内容 - type: string - example: 対象の承認完了書類を非表示に設定しました。 - - # -------------------------------------------------------------------------------------------------- - - PostSearchDocumentsResponses200: - description: Successful response - content: - application/json: - schema: - type: object - properties: - total_count: - description: 検索結果の総件数 - type: integer - example: 3 - items: - description: | - 検索結果の書類情報
- クエリパラメータで指定した「size」分の書類情報が返されます。
- (size を指定していない場合は 50 件) - allOf: - - $ref: "#/components/schemas/search_items" - - example: - - docid: 1000 - has_attachments: true - has_comments: true - title1: 1月分経費 - title2: 営業部 - form: - id: 100 - code: form01 - name: 経費申請書 - route: - code: route01 - name: 営業部ルート - step: 4 - stat: 1 - write_datetime: 2023/01/01 12:00:00 - update_datetime: 2023/01/01 12:00:00 - writer: 田中 - current_approvers: - - 佐藤 - url: https://xxxxx.atledcloud.jp/xpoint/form.do?act=view&fid=100&docid=1000 - - docid: 1001 - has_attachments: true - has_comments: true - title1: 1月分経費 - title2: 営業部 - form: - id: 100 - code: form01 - name: 経費申請書 - route: - code: route01 - name: 営業部ルート - step: 4 - stat: 1 - write_datetime: 2023/01/01 12:00:00 - update_datetime: 2023/01/01 12:00:00 - writer: 加藤 - current_approvers: - - 佐藤 - url: https://xxxxx.atledcloud.jp/xpoint/form.do?act=view&fid=100&docid=1001 - - # -------------------------------------------------------------------------------------------------- - - GetQueryListResponses200: - description: Successful response - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/GetQueryListResponses200" - examples: - クエリグループ情報あり: - value: - query_groups: - - query_group_id: 1 - query_group_name: 営業部クエリ - queries: - - query_id: 100 - query_code: query01 - query_name: 営業部経費クエリ(クロス) - query_type: cross - query_type_name: クロス集計 - remarks: "" - form_count: 1 - fid: 200 - form_name: 経費申請書 - - query_id: 101 - query_code: query02 - query_name: 営業部経費クエリ(一覧) - query_type: list - query_type_name: 一覧 - remarks: "" - form_count: 1 - fid: 200 - form_name: 経費申請書 - - query_group_id: 2 - query_group_name: 営業部クエリ - queries: - - query_id: 102 - query_code: query03 - query_name: 経費申請クエリ - query_type: list - query_type_name: 一覧 - remarks: "" - form_count: 3 - forms: - - fid: 201 - form_name: 経費申請書(1月) - - fid: 202 - form_name: 経費申請書(2月) - - fid: 203 - form_name: 経費申請書(3月) - - query_group_id: 0 - query_group_name: マイクエリ - queries: - - query_id: 103 - query_code: query04 - query_name: マイクエリ - query_type: cross - query_type_name: クロス集計 - remarks: "" - form_count: 1 - fid: 200 - form_name: 経費申請書 - クエリグループ情報なし: - value: - query_groups: [] - - # -------------------------------------------------------------------------------------------------- - - GetQueryResponses200: - description: Successful response - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/GetQueryResponses200" - oneOf: - - $ref: "#/components/schemas/list_queries_data" - - $ref: "#/components/schemas/summary_queries_data" - - $ref: "#/components/schemas/cross_queries_data" - examples: - 一覧クエリ(クエリ実行ON): - value: - query: - query_id: 100 - query_code: query01 - query_name: 営業部経費一覧クエリ - query_type: list - form_count: 1 - fid: 200 - form_name: 経費申請書 - subtbl: "" - toprowmark: "*" - secondmark: "" - csv_filename: 営業部.csv - csv_header_flg: true - csvexport_manage_type: auto - remarks: "" - cr_dt: 2023/01/01 12:00:00 - up_dt: 2023/01/01 12:00:00 - exec_result: - data: - - docid: 100 - record: - "件名1": 客先訪問 - "件名2": 営業部 - "書類No": 100 - "訪問先": 株式会社xxx - "訪問要件": 商談 - "交通費": 1500 - - docid: 200 - record: - "件名1": 客先訪問 - "件名2": 営業部 - "書類No": 200 - "訪問先": 株式会社yyy - "訪問要件": 商談 - "交通費": 1800 - 一覧クエリ(クエリ実行OFF): - value: - query: - query_id: 100 - query_code: query01 - query_name: 営業部経費一覧クエリ - query_type: list - form_count: 1 - fid: 200 - form_name: 経費申請書 - subtbl: "" - toprowmark: "*" - secondmark: "" - csv_filename: 営業部.csv - csv_header_flg: true - csvexport_manage_type: auto - remarks: "" - cr_dt: 2023/01/01 12:00:00 - up_dt: 2023/01/01 12:00:00 - 一覧クエリ(連結クエリ): - value: - query: - query_id: 101 - query_code: query02 - query_name: 営業部経費一覧連結クエリ - query_type: list - form_count: 1 - forms: - - fid: 200 - form_name: 経費申請書(20年度) - subtbl: "表定義グループ(group2)" - - fid: 201 - form_name: 経費申請書(21年度) - subtbl: "表定義グループ(group2)" - - fid: 202 - form_name: 経費申請書(22年度) - subtbl: "表定義グループ(group2)" - subtbl: "" - toprowmark: "*" - secondmark: "" - csv_filename: 営業部.csv - csv_header_flg: true - csvexport_manage_type: auto - remarks: "" - cr_dt: 2023/01/01 12:00:00 - up_dt: 2023/01/01 12:00:00 - exec_result: - data: - - docid: 100 - record: - "件名1": 客先訪問 - "件名2": 営業部 - "書類No": 100 - "訪問先": 株式会社xxx - "訪問要件": 商談 - "交通費": 1500 - - docid: 200 - record: - "件名1": 客先訪問 - "件名2": 営業部 - "書類No": 200 - "訪問先": 株式会社yyy - "訪問要件": 商談 - "交通費": 1800 - サマリクエリ: - value: - query: - query_id: 102 - query_code: query03 - query_name: 営業部月別交通費合計金額 - query_type: summary - form_count: 1 - fid: 203 - form_name: 交通費精算書 - subtbl: "" - toprowmark: "*" - secondmark: "" - csv_filename: 営業部.csv - csv_header_flg: true - csvexport_manage_type: auto - graph: - graph_active_flg: true - graph_type: bar - graph3d: false - graph_alpha: false - graph_stack: false - graph_direction: vertical - graph_reverse: column - graph_label_title: "" - graph_label_category: "" - graph_label_value: "" - height: 300 - width: 400 - graph_category_angle: 0 - remarks: "" - cr_dt: 2023/01/01 12:00:00 - up_dt: 2023/01/01 12:00:00 - exec_result: - data: - - "年月": 2023/01 - "合計金額": 100000 - - "年月": 2023/02 - "合計金額": 50000 - calc_type: sum - クロス集計クエリ: - value: - query: - query_id: 103 - query_code: query04 - query_name: 営業部月別残業時間集計 - query_type: cross - form_count: 1 - fid: 204 - form_name: 残業報告書 - subtbl: "" - toprowmark: "*" - secondmark: "" - csv_filename: 営業部.csv - csv_header_flg: true - csvexport_manage_type: auto - graph: - graph_active_flg: true - graph_type: bar - graph3d: true - graph_alpha: true - graph_stack: false - graph_direction: vertical - graph_reverse: column - graph_label_title: "" - graph_label_category: "" - graph_label_value: "" - height: 300 - width: 400 - graph_category_angle: 45 - remarks: "" - cr_dt: 2023/01/01 12:00:00 - up_dt: 2023/01/01 12:00:00 - exec_result: - data: - "2023/01": - "勝 太郎": 5.5 - "木戸 武史": 3 - "2023/02": - "勝 太郎": 8.8 - "木戸 武史": 0 - calc_type: sum - - # -------------------------------------------------------------------------------------------------- - - GetXpointInfoResponses200: - description: Successful response - content: - application/json: - schema: - type: object - properties: - version: - description: X-point バージョン - type: string - example: 3.7.00 - api_level: - description: | - API レベル
- バージョン 3.1 時点では「1」 - type: integer - example: 1 - single_domain: - description: | - シングルドメインフラグ
- true:作成されたドメインが 1 つ
- false:作成されたドメインが 2 つ以上
- OAuth2 認証のアクセストークン取得時にドメイン指定が省略可能か判断できる。 - type: boolean - example: false - features: - description: | - 利用可能機能リスト
- サポートされている機能であってもライセンスや設定で無効化されている場合は出力されない。 - example: - - oauth2_base - - rest_base - - # -------------------------------------------------------------------------------------------------- - - GetPDFDownloadResponses200: - description: Successful response - content: - application/pdf: {} - headers: - Content-Disposition: - description: 「filename*」はファイル名がRFC5987に従いエンコーディングされているため、受信時にデコードが必要になります。受信環境が自動的にデコードを行う場合はデコード不要になります。 - schema: - type: string - example: attachment; filename="{ファイル名}"; filename*=UTF-8''{URLエンコードされたファイル名} - - # -------------------------------------------------------------------------------------------------- - - GetDocumentViewResponses200: - description: Successful response - content: - text/html: {} - - # -------------------------------------------------------------------------------------------------- - - GetCreateDocumentResponses200: - description: Successful response - content: - text/html: {} - - # -------------------------------------------------------------------------------------------------- - - PostCreateDocumentResponses200: - description: Successful response - content: - text/html: {} - - # -------------------------------------------------------------------------------------------------- - - GetStatusviewResponses200: - description: Successful response - content: - text/html: {} - - # -------------------------------------------------------------------------------------------------- - - GetAttachmentsResponses200: - description: Successful response - content: - text/plain: {} - image/png: {} - application/pdf: {} - headers: - Content-Type: - description: Content-Typeは取得するファイルによって異なります。 - schema: - type: string - Content-Disposition: - description: 「filename*」はファイル名がRFC5987に従いエンコーディングされているため、受信時にデコードが必要になります。受信環境が自動的にデコードを行う場合はデコード不要になります。 - schema: - type: string - example: attachment; filename="{ファイル名}"; filename*=UTF-8''{URLエンコードされたファイル名} - - # -------------------------------------------------------------------------------------------------- - - GetQueryGraphResponses200: - description: Successful response - content: - image/png: {} - image/jpeg: {} - headers: - Content-Disposition: - description: 「filename*」はファイル名がRFC5987に従いエンコーディングされているため、受信時にデコードが必要になります。受信環境が自動的にデコードを行う場合はデコード不要になります。 - schema: - type: string - example: attachment; filename="{query_cd}.png"; filename*=UTF-8''{query_cd}.png - - # -------------------------------------------------------------------------------------------------- - - GetAdminroleResponses200: - description: Successful response - content: - application/json: - schema: - type: object - properties: - role: - example: - - "domain" - - "form" - - "user" - - "master" - - "query" - - "wkfl" - description: | - 権限情報リスト。
- いずれの権限も持たない一般ユーザの場合は空配列が返却されます。 - - "domain": ドメイン管理権限 - - "form": フォーム管理権限 - - "user": ユーザ管理権限 - - "master": マスタ管理権限 - - "query": クエリ管理権限 - - "wkfl": ワークフロー管理権限 - - # -------------------------------------------------------------------------------------------------- - - ScimUserResponse: - description: Successful response - content: - application/scim+json: - schema: - type: object - properties: - schemas: - description: スキーマ - type: array - items: - example: urn:ietf:params:scim:api:messages:2.0:ListResponse - totalResults: - description: 検索結果件数 - type: integer - example: 1 - startIndex: - description: | - 取得開始番号
- クエリパラメータの「startIndex」を指定してリクエストした場合のみ応答に含まれる。 - type: integer - example: 1 - itemsPerPage: - description: | - 1 ページあたりの件数
- クエリパラメータの「count」を指定してリクエストした場合のみ応答に含まれる。 - example: 10 - Resources: - description: ユーザ情報 - allOf: - - $ref: "#/components/schemas/resources_item" - - example: - - id: 100 - externalId: "" - meta: - resourceType: User - created: 2023-01-01T12:00:00.000Z - lastModified: 2023-01-01T12:00:00.000Z - location: /xpoint/scim/v2/apitest/Users/xxx - schemas: - - urn:ietf:params:scim:schemas:core:2.0:User - userName: u001 - name: - formatted: 田中 - displayName: 田中 - active: true - password: "*" - emails: - - value: domain_admin@example.com - type: work - primary: true - urn:atled:scim:schemas:1.0:User: - userCode: u001 - kana: タナカ - groups: - - value: 100 - display: 営業部 - $ref: /xpoint/scim/v2/apitest/Groups/xxx - groupCode: group01 - primary: true - part: - displayName: 一般 - partCode: part01 - itemValues: - - no: 1 - value: 予備1 - remark: 備考 - - # -------------------------------------------------------------------------------------------------- - - ScimGroupResponse: - description: Successful response - content: - application/scim+json: - schema: - type: object - properties: - schemas: - description: スキーマ - type: array - items: - example: urn:ietf:params:scim:api:messages:2.0:ListResponse - totalResults: - description: 検索結果件数 - type: integer - example: 1 - startIndex: - description: | - 取得開始番号
- クエリパラメータの「startIndex」を指定してリクエストした場合のみ応答に含まれる。 - type: integer - example: 1 - itemsPerPage: - description: | - 1 ページあたりの件数
- クエリパラメータの「count」を指定してリクエストした場合のみ応答に含まれる。 - example: 10 - Resources: - description: ユーザグループ情報 - allOf: - - $ref: "#/components/schemas/resources_group_item" - - example: - - id: 100 - externalId: "" - meta: - resourceType: Group - created: 2023-01-01T12:00:00.000Z - lastModified: 2023-01-01T12:00:00.000Z - location: /xpoint/scim/v2/apitest/Groups/xxx - schemas: - - urn:ietf:params:scim:schemas:core:2.0:Group - displayName: 営業部 - members: - - $ref: /xpoint/scim/v2/apitest/Users/xxx - value: 100 - display: 田中 - type: User - urn:atled:scim:schemas:1.0:GroupMember: - userCode: u001 - userName: u001 - part: - displayName: 一般 - displayKana: イッパン - partCode: part01 - - $ref: /xpoint/scim/v2/apitest/Users/xxx - value: 101 - display: 佐藤 - type: User - urn:atled:scim:schemas:1.0:GroupMember: - userCode: u002 - userName: u002 - part: - displayName: 課長 - displayKana: カチョウ - partCode: part02 - urn:atled:scim:schemas:1.0:Group: - groupCode: group01 - displayKana: エイギョウブ - parentGroup: - value: 105 - orderNo: 1 - - # -------------------------------------------------------------------------------------------------- - - ScimPartResponse: - description: Successful response - content: - application/scim+json: - schema: - type: object - properties: - schemas: - description: スキーマ - type: array - items: - example: urn:ietf:params:scim:api:messages:2.0:ListResponse - totalResults: - description: 検索結果件数 - type: integer - example: 1 - startIndex: - description: | - 取得開始番号
- クエリパラメータの「startIndex」を指定してリクエストした場合のみ応答に含まれる。 - type: integer - example: 1 - itemsPerPage: - description: | - 1 ページあたりの件数
- クエリパラメータの「count」を指定してリクエストした場合のみ応答に含まれる。 - example: 10 - Resources: - description: 役職情報 - allOf: - - $ref: "#/components/schemas/resources_part_item" - - example: - - id: 100 - externalId: "" - meta: - resourceType: Part - created: 2023-01-01T12:00:00.000Z - lastModified: 2023-01-01T12:00:00.000Z - location: /xpoint/scim/v2/apitest/Parts/xxx - schemas: - - urn:ietf:params:scim:schemas:core:2.0:Group - displayName: 一般 - displayKana: イッパン - partCode: part01 - orderNo: 1 - - # -------------------------------------------------------------------------------------------------- - - DeleteScimInfoResponses204: - description: Successful response - content: - application/scim+json: {} - - # -------------------------------------------------------------------------------------------------- - - GetAuthorizeUserInfoResponses200: - description: Successful response - content: - application/scim+json: - schema: - type: object - properties: - id: - description: ユーザID - type: string - example: 100 - meta: - description: メタデータ - type: object - properties: - resourceType: - description: | - リソースタイプ
- "User"固定。 - type: string - example: User - created: - description: | - ユーザ作成日
- UTC で返される。 - type: string - example: 2023-01-01T12:00:00.000Z - lastModified: - description: | - ユーザ最終更新日
- UTC で返される。 - type: string - example: 2023-01-01T12:00:00.000Z - schemas: - description: スキーマ - type: array - items: - example: urn:ietf:params:scim:schemas:core:2.0:User - userName: - description: ログインID - type: string - example: u001 - displayName: - description: | - 表示氏名
- 氏名(name.formatted)と同じ。 - type: string - example: 田中 - emails: - description: メール情報 - type: array - items: - type: object - properties: - value: - description: メールアドレス - type: string - example: u001@example.com - type: - description: | - メールタイプ
- "work"固定。 - type: string - example: work - primary: - description: | - 優先フラグ
- true 固定。 - type: boolean - example: true - urn:atled:scim:schemas:1.0:User: - description: X-point 拡張属性 - type: object - properties: - userCode: - description: ユーザCD - type: string - example: u001 - kana: - description: 氏名カナ - type: string - example: タナカ - itemValues: - description: 予備項目情報 - type: array - items: - type: object - properties: - no: - description: 予備項目番号 - type: integer - example: 1 - value: - description: 予備項目内容 - type: string - example: 予備項目 - remark: - description: 備考 - type: string - example: 備考 - - # ----------------------------------------------- - # スキーマ components/schemas - # ----------------------------------------------- - - schemas: - ErrorResponse: - description: "Error response" - type: object - properties: - error_code: - type: integer - example: 400 - error_message: - type: string - example: "{エラーメッセージ}" - - ScimErrorResponse: - description: "Error response" - type: object - properties: - schemas: - type: array - items: - type: string - example: urn:ietf:params:scim:api:messages:2.0:Error - scimType: - type: string - example: "{エラー内容}" - detail: - type: string - example: "{エラー詳細}" - status: - type: string - example: 400 - - doc_form: - description: フォーム情報 - type: object - properties: - id: - description: フォームID - type: integer - example: 99 - code: - description: フォームコード - type: string - example: form01 - name: - description: フォーム名称 - type: string - example: 経費申請書 - - step: - description: ステップ情報 - type: object - properties: - max: - description: 最大ステップ数 - type: integer - example: 5 - current: - description: 現在ステップ番号 - type: integer - example: 3 - - status: - description: 書類状態 - type: object - properties: - code: - description: | - 書類状態コード - |コード|名称| - |----|----| - |0|下書き| - |1|承認中| - |2|保留中| - |3|却下| - |4|差し戻され| - |5|差し戻し| - |6|承認完了| - type: integer - example: 1 - name: - description: 書類状態名称 - type: string - example: 承認中 - - g_field: - type: object - properties: - g_field1: - type: string - g_field2: - type: string - g_field3: - type: string - - attachments: - type: object - properties: - content_type: - description: ファイル種別 - type: string - seq: - description: シーケンス番号 - type: integer - name: - description: 添付ファイル名 - type: string - size: - description: 添付ファイルサイズ - type: integer - remarks: - description: 備考 - type: string - detail_no: - description: 対応明細行No (電帳法対応オプション) - type: integer - evidence_type: - description: | - 電帳法書類区分 (電帳法対応オプション) - |区分|名称| - |----|----| - |0|その他| - |1|電子取引| - type: integer - evidence_type_label: - description: 電帳法書類区分名称 (電帳法対応オプション) - type: string - relations: - type: object - properties: - docid: - description: 関連書類ID - type: integer - title1: - description: 関連書類件名1 - type: string - title2: - description: 関連書類件名2 - type: string - form_name: - description: 関連書類フォーム名称 - type: string - - comment_list: - type: object - properties: - seqno: - description: コメント番号 - type: string - attentionflg: - description: | - 重要コメントフラグ
- true:重要コメント
- false:通常のコメント - type: boolean - content: - description: コメント内容 - type: string - writername: - description: コメント登録者名 - type: string - writedate: - description: コメント登録日時 - type: string - - lumpapply: - description: | - 自動申請設定使用フラグ
- true:自動申請設定を使用して書類を申請する。
- false:自動申請設定を使用せず書類を申請する。
- デフォルトは true
- 「自動申請設定を使用する」の仕様についてはマニュアル[「3.1. 書類作成API/書類のワークフロー操作・編集・更新API」](./doc/manual.html#31-書類作成api書類のワークフロー操作編集更新api)をご確認ください。 - type: boolean - example: true - - route_code: - description: | - 承認ルートコード
- * ワークフローフォーム(ユーザ選択ルート)
- 承認ルートコードを指定します。
- * ワークフローフォーム(自動選択ルート)
- 空文字もしくは「--condroute」という自動選択
- ルートを表す文字列を指定します。
- (大文字、小文字は区別しません。)
- * 標準フォーム
- 空文字を指定します。 - type: string - example: route01 - - fields: - type: object - properties: - seq: - description: シーケンス番号 - type: integer - fieldid: - description: フィールドID - type: string - fieldtype: - description: | - フィールドタイプ - |タイプ|名称| - |----|----| - |9|文字フィールド| - |10|数値フィールド| - |11|整数フィールド| - |12|テキストエリア| - |13|パスワード| - |14|ボタン| - |15|ラジオボタン| - |16|チェックボックス| - |17|コンボボックス| - |18|リストボックス| - |23|バーコード| - |24|イメージ| - |25|西暦フィールド| - |26|月フィールド| - |27|日フィールド| - |28|曜日フィールド| - |29|印影フィールド| - |34|日時フィールド| - |35|イメージアップロード| - |99|不可視フィールド| - type: integer - maxlength: - description: フィールド最大値 - type: integer - label: - description: フィールドラベル - type: string - groupname: - description: グループ名称 - type: string - arraysize: - description: 表明細数 - type: integer - required: - description: | - 必須フィールドフラグ
- true:必須フィールド
- false:非必須フィールド - type: boolean - unique: - description: | - ユニークフィールドフラグ
- true:ユニークフィールド
- false:非ユニークフィールド - type: boolean - - form: - type: object - properties: - id: - description: フォームID - type: string - name: - description: フォーム名称 - type: string - code: - description: フォームコード - type: string - page_count: - description: フォーム構成ページ数 - type: integer - table_name: - description: DBテーブル名 - type: string - tsffile_name: - description: TSFファイル名 - type: string - - use_form: - type: object - properties: - id: - description: フォームID - type: string - name: - description: フォーム名称 - type: string - code: - description: フォームコード - type: string - route: - description: 承認ルート情報 - type: array - items: - type: object - properties: - id: - description: 承認ルートID - type: integer - code: - description: | - 承認ルートコード
- 通常フォームまたは自動選択ルートの場合は、応答に承認ルートコードは含まれません。 - type: string - name: - description: 承認ルート名称 - type: string - - master: - type: object - properties: - type: - description: | - マスタタイプ
- 0:簡易マスタ
- 1:ユーザ固有マスタ
- 2:X-point マスタ
- 5:kintone 連携マスタ
- 6:書類マスタ - type: integer - type_name: - description: マスタタイプ名称 - type: string - name: - description: マスタ名称 - type: string - code: - description: | - マスタコード
- 簡易マスタ/kintone 連携マスタ/書類マスタはマスタコードが返される。
- それ以外のマスタは空文字が返される。 - type: string - table_name: - description: | - マスタテーブル名
- ユーザ固有マスタはテーブル名が返される。 - それ以外のマスタは空文字が返される。 - type: string - item_count: - description: | - 項目数
- 簡易マスタはマスタデータ項目数が返される。
- それ以外のマスタは「0」が返される。 - type: integer - remarks: - description: 備考 - type: string - - master_fields: - type: object - properties: - id: - description: フィールドID - type: string - type: - description: | - データ型
- "numeric"もしくは"varchar"が返される。 - type: string - length: - description: | - データ桁数
- データ型が"numeric"の場合は"整数桁数,小数桁数"の形式で返される。 - type: integer - primary_key: - description: | - 主キー
- true の場合は主キーに設定されているフィールドを表す。 - type: boolean - index: - description: | - 索引
- true の場合は索引の設定がされているフィールドを表す。 - type: boolean - - master_data: - type: object - properties: - id: - description: id - type: integer - name: - description: 氏名 - type: string - height: - description: 身長 - type: integer - - simplemaster_data: - type: object - properties: - code: - description: itemcd - type: string - value: - description: itemval - type: string - - simplemaster_result: - type: object - properties: - status: - description: | - インポート結果
- 「SUCCESS」または「ERROR」が返される。 - type: string - data: - description: インポートデータ - type: object - properties: - code: - description: 項目コード(itemcd) - type: string - value: - description: 項目値(itemval) - type: string - message: - description: メッセージ - type: string - - webhooklog_data: - type: object - properties: - domain_code: - description: ドメインコード - type: string - docid: - description: 書類ID - type: string - form_code: - description: フォームコード - type: string - route_code: - description: 承認ルートコード - type: string - title1: - description: 件名 - type: string - url: - description: 送信先URL - type: string - status_code: - description: ステータスコード - type: string - send_date: - description: 送信日時 - type: string - uuid: - description: UUID - type: string - - steps_status0: - type: object - properties: - step: - type: object - properties: - no: - type: integer - name: - type: string - aprvusers: - type: array - items: - type: object - properties: - user: - type: object - properties: - code: - type: string - name: - type: string - stampName: - type: string - group: - type: object - properties: - code: - type: string - name: - type: string - part: - type: object - properties: - code: - type: string - name: - type: string - aprvdate: - type: string - status: - type: object - properties: - code: - type: integer - name: - type: string - - steps: - type: object - properties: - step: - type: object - properties: - no: - type: integer - name: - type: string - condition: - type: object - properties: - type: - type: string - aprvusers: - type: array - items: - type: object - properties: - user: - type: object - properties: - code: - type: string - name: - type: string - stampName: - type: string - group: - type: object - properties: - code: - type: string - name: - type: string - part: - type: object - properties: - code: - type: string - name: - type: string - status: - type: object - properties: - code: - type: integer - name: - type: string - - webhooks_config: - type: object - properties: - id: - description: | - Webhook ID
- Webhook 設定の更新、削除 API で指定する ID。 - type: integer - url: - description: 送信先URL - type: string - remarks: - description: 備考 - type: string - - proxy_list: - type: object - properties: - use: - description: 代理ユーザ情報 - type: object - properties: - code: - description: ユーザコード - type: string - name: - description: 氏名 - type: string - apply: - description: | - 代理申請フラグ
- true:代理申請権限有り
- false:代理申請権限無し
- type: boolean - aprv: - description: | - 代理承認フラグ
- true:代理承認権限有り
- false:代理承認権限無し
- type: boolean - - approval_list: - type: object - properties: - docid: - description: 書類ID - type: integer - hidden: - description: | - 非表示フラグ
- true:非表示書類
- false:表示書類
- リクエスト時にクエリパラメータの承認状況タイプに承認完了/承認完了(申請)/承認完了(承認)のいずれかを指定、かつ非表示書類の取得フラグで trueを指定した場合にのみ応答に含まれます。 - type: boolean - attachment: - description: | - 添付ファイルフラグ
- true:添付ファイル有り
- false:添付ファイル無し - type: boolean - comment: - description: | - コメントフラグ
- true:コメントあり
- false:コメントなし - type: boolean - title1: - description: 件名1 - type: string - title2: - description: 件名2 - type: string - form_name: - description: フォーム名称 - type: string - status: - description: | - ステータス名称
- 書類の現在のステータス名称。 - type: string - display_status: - description: | - 画面表示ステータス名称
- ユーザサイトの承認待ち一覧画面の状況列に表示されるステータス名称。 - type: string - apply_datetime: - description: 申請日時 - type: string - apply_user: - description: 申請者氏名 - type: string - approval_user: - description: | - 承認者
- 現在ステップの承認者 - type: array - items: - example: - lastaprv_datetime: - description: 最終更新日時 - type: string - - status_list: - type: object - properties: - type: - description: | - 承認状況種別
- 各承認状況種別は「承認待ち一覧取得」の承認状況タイプの小分類と対応します。 - |承認状況種別|名称|承認状況タイプ(小分類)| - |----|----|----| - |0|承認待ち|11| - |1|差し戻され|12| - |2|下書き|31| - |3|保留|32| - |4|承認中(申請)|41| - |5|差し戻し|43| - |6|承認完了(申請)|51| - |7|却下|21| - |8|回覧|22| - |9|承認中(承認)|42| - |10|承認完了(承認)|52| - type: integer - name: - description: 承認状況名称 - type: string - count: - description: 承認待ち件数 - type: integer - - wait_list: - type: object - properties: - docid: - description: 書類ID - type: integer - name: - description: フォーム名称 - type: string - title: - description: 件名 - type: string - writername: - description: 申請者名 - type: string - writedate: - description: 申請日時 - type: string - - search_items: - type: object - properties: - docid: - description: 書類 ID - type: integer - has_attachments: - description: | - 添付ファイルの有無
- true:添付ファイルあり
- false:添付ファイルなし - type: boolean - has_comments: - description: | - コメントの有無
- true:コメントあり
- false:コメントなし - type: boolean - title1: - description: 件名1 - type: string - title2: - description: 件名2 - type: string - form: - description: フォーム情報 - type: object - properties: - id: - description: フォームID - type: integer - code: - description: フォームコード - type: string - name: - description: フォーム名称 - type: string - route: - description: 承認ルート情報 - type: object - properties: - code: - description: 承認ルートコード - type: string - name: - description: 承認ルート名称 - type: string - step: - description: ステップ番号 - type: integer - stat: - description: | - 承認状況
- 承認状況「-1」は通常フォームの場合に返される。 - type: integer - write_datetime: - description: | - 申請日時
- 「YYYY/MM/DD hh:mm:ss」形式 - type: string - update_datetime: - description: | - 更新日時
- 「YYYY/MM/DD hh:mm:ss」形式 - type: string - writer: - description: 申請者 - type: string - current_approvers: - description: 現在ステップの承認者 - type: array - items: - example: - url: - description: 書類URL - type: string - - queries: - type: object - properties: - query_id: - description: クエリID - type: integer - query_code: - description: クエリコード - type: string - query_name: - description: クエリ名 - type: string - query_type: - description: | - クエリの種類
- "list"(一覧) / "summary"(サマリ) /"cross"(クロス集計) - type: string - query_type_name: - description: | - クエリの種類(名称)
- "一覧" / "サマリ" / "クロス集計" - type: string - remarks: - description: 備考 - type: string - form_count: - description: | - フォーム件数
- クエリが参照するフォームの件数 - fid: - description: | - フォームID
- フォーム件数が 1 の場合に出力される - type: integer - form_name: - description: | - フォーム名
- フォーム件数が 1 の場合に出力される - forms: - description: | - フォーム情報一覧
- フォーム件数が 2 以上の場合に出力される - type: array - items: - type: object - properties: - fid: - description: フォームID - type: integer - form_name: - description: フォーム名 - type: string - - list_queries_data: - type: object - properties: - exec_result: - description: | - 検索結果
- 実行結果取得フラグが false の場合は応答に含まれない。 - type: object - properties: - data: - description: クエリデータ - type: array - items: - type: object - properties: - docid: - description: 書類ID - type: integer - record: - description: | - クエリレコード情報
- ※クエリの設定により異なります - type: object - properties: - "件名1": - type: string - "件名2": - type: string - "書類No": - type: integer - "訪問先": - type: string - "訪問要件": - type: string - "交通費": - type: integer - - summary_queries_data: - type: object - properties: - exec_result: - description: | - 検索結果
- 実行結果取得フラグが false の場合は応答に含まれない。 - type: object - properties: - data: - description: | - クエリデータ
- ※クエリの設定により異なります - type: array - items: - type: object - properties: - "年月": - type: string - "合計金額": - type: string - calc_type: - description: | - 計算種別 - * sum:合計 - * avg:平均 - * num:件数 - * max:最大 - * min:最小 - type: string - - cross_queries_data: - type: object - properties: - exec_result: - description: | - 検索結果
- 実行結果取得フラグが false の場合は応答に含まれない。 - type: object - properties: - data: - description: | - クエリデータ
- ※クエリの設定により異なります - type: object - properties: - "2023/01": - type: object - properties: - "勝 太郎": - type: string - "木戸 武史": - type: string - "2023/02": - type: object - properties: - "勝 太郎": - type: string - "木戸 武史": - type: string - calc_type: - description: | - 計算種別 - * sum:合計 - * avg:平均 - * num:件数 - * max:最大 - * min:最小 - type: string - - resources_item: - type: object - properties: - id: - description: ユーザID - type: string - externalId: - description: | - 外部ID
- X-point Cloud では未使用の項目。
- 常に空文字が返される。 - type: string - meta: - description: メタデータ - type: object - properties: - resourceType: - description: | - リソースタイプ
- "User"固定。 - type: string - created: - description: | - ユーザ作成日
- UTC で返される。 - type: string - lastModified: - description: | - ユーザ最終更新日
- UTC で返される。 - type: string - location: - description: 指定ユーザ情報取得 API のリクエスト URL - type: string - schemas: - description: スキーマ - type: array - items: - example: "urn:ietf:params:scim:schemas:core:2.0:User" - userName: - description: ログインID - type: string - name: - description: 氏名情報 - type: object - properties: - formatted: - description: | - 氏名
- 表示氏名(displayName)と同じ。 - type: string - displayName: - description: | - 表示氏名
- 氏名(name.formatted)と同じ。 - type: string - active: - description: | - ログイン可否
- true:ログイン可能
- false:ログイン不可 - type: boolean - password: - description: | - パスワード
- 常に"*"が返される。 - type: string - emails: - description: メール情報 - type: array - items: - type: object - properties: - value: - description: メールアドレス - type: string - type: - description: | - メールタイプ
- "work"固定。 - type: string - primary: - description: | - 優先フラグ
- true 固定。 - type: boolean - urn:atled:scim:schemas:1.0:User: - description: X-point 拡張属性 - type: object - properties: - userCode: - description: ユーザCD - type: string - kana: - description: 氏名カナ - type: string - groups: - description: 所属グループ情報 - type: array - items: - type: object - properties: - value: - description: ユーザグループID - type: string - display: - description: ユーザグループ名 - type: string - $ref: - description: 指定ユーザグループ情報取得 API のリクエスト URL - type: string - groupCode: - description: ユーザグループCD - type: string - primary: - description: | - 優先フラグ
- 優先部署の場合は true。 - type: boolean - part: - description: 役職情報 - type: object - properties: - displayName: - description: 役職名 - type: string - partCode: - description: 役職CD - type: string - itemValues: - description: 予備項目情報 - type: array - items: - type: object - properties: - no: - description: 予備項目番号 - type: integer - value: - description: 予備項目内容 - type: string - remark: - description: 備考 - type: string - - resources_group_item: - type: object - properties: - id: - description: グループID - type: string - externalId: - description: | - 外部ID
- X-point Cloud では未使用の項目。
- 常に空文字が返される。 - type: string - meta: - description: メタデータ - type: object - properties: - resourceType: - description: | - リソースタイプ
- "Group"固定。 - type: string - created: - description: | - ユーザ作成日
- UTC で返される。 - type: string - lastModified: - description: | - ユーザ最終更新日
- UTC で返される。 - type: string - location: - description: 指定ユーザ情報取得 API のリクエスト URL - type: string - schemas: - description: スキーマ - type: array - items: - example: "urn:ietf:params:scim:schemas:core:2.0:User" - displayName: - description: ユーザグループ名称 - type: string - members: - description: 所属ユーザ情報 - type: array - items: - type: object - properties: - $ref: - description: 指定ユーザ情報取得 APIのリクエスト URL - type: string - value: - description: ユーザID - type: string - display: - description: ユーザ氏名 - type: string - type: - description: | - ユーザタイプ
- "User"固定。 - type: string - urn:atled:scim:schemas:1.0:GroupMember: - description: X-point 拡張属性(所属ユーザ) - type: object - properties: - userCode: - description: 所属ユーザのユーザ CD - type: string - userName: - description: 所属ユーザのログイン ID - type: string - part: - description: 所属ユーザ役職情報 - type: object - properties: - displayName: - description: 所属ユーザの役職名 - type: string - displayKana: - description: 所属ユーザの役職名カナ - type: string - partCode: - description: 所属ユーザの役職CD - type: string - urn:atled:scim:schemas:1.0:Group: - description: X-point 拡張属性(ユーザグループ) - type: object - properties: - groupCode: - description: グループCD - type: string - displayKana: - description: ユーザグループ名称カナ - type: string - parentGroup: - description: 親グループ情報 - type: object - properties: - value: - description: 親グループID - type: string - orderNo: - description: 並び順 - type: integer - - members_iteme: - type: object - properties: - value: - description: | - ユーザID
- ユーザ ID とユーザ CD がどちらも指定されている場合はユーザ ID が優先されます。 - type: string - urn:atled:scim:schemas:1.0:GroupMember: - description: X-point 拡張属性(所属ユーザ) - type: object - properties: - usercode: - description: | - ユーザ CD
- ユーザID とユーザCDがどちらも指定されている場合はユーザ ID が優先されます。 - type: string - partCode: - description: | - 役職 CD
- partCode と part.partCode のどちらも指定されている場合は partCode が優先されます。 - type: string - part: - description: 役職情報 - type: object - properties: - partCode: - description: 役職CD - type: string - - resources_part_item: - type: object - properties: - id: - description: 役職ID - type: string - externalId: - description: | - 外部ID
- X-point Cloud では未使用の項目。
- 常に空文字が返される。 - type: string - meta: - description: メタデータ - type: object - properties: - resourceType: - description: | - リソースタイプ
- "Part"固定。 - type: string - created: - description: | - ユーザ作成日
- UTC で返される。 - type: string - lastModified: - description: | - ユーザ最終更新日
- UTC で返される。 - type: string - location: - description: 指定ユーザ情報取得 API のリクエスト URL - type: string - schemas: - description: スキーマ - type: array - items: - example: "urn:ietf:params:scim:schemas:core:2.0:User" - displayName: - description: 役職名称 - type: string - displayKana: - description: 役職名称カナ - type: string - partCode: - description: 親グループ情報 - type: string - orderNo: - description: 並び順 - type: integer - - master_items: - type: object - properties: - comid: - description: コンポーネントID - type: integer - comname: - description: コンポーネント名称 - type: string - column: - description: | - 列名
- 文字列の配列で指定(マスタ参照ウィンドウコンポーネントのみ) - type: array - items: - example: [] - - flow_results: - description: 承認状況情報 - type: array - items: - type: object - properties: - stepno: - description: ステップ番号 - type: integer - steptitle: - description: ステップタイトル - type: string - aprvusers: - description: 処理者情報 - type: array - items: - type: object - properties: - aprv: - type: object - properties: - usercode: - description: ユーザコード - type: string - username: - description: ユーザ名 - type: string - stampname: - description: 印影名 - type: string - datetime: - description: ワークフロー操作日時 - type: string - groupcd: - description: ユーザグループコード - type: string - groupname: - description: ユーザグループ名称 - type: string - partcd: - description: 役職コード - type: string - partname: - description: 役職名称 - type: string - statuscode: - description: | - ステップ状態コード

- ・申請ステップの場合 - |コード|名称| - |----|----| - |0|申請| - - ・承認ステップの場合 - |コード|名称| - |----|----| - |0|未処理| - |1|承認| - |2|却下| - |3|差し戻し| - |4|保留| - - ・回覧ステップの場合 - |コード|名称| - |----|----| - |0|未読| - |1|既読| - type: integer - status: - description: ステップ状態名称 - type: string - cond: - description: 承認条件 - type: string - cond_num: - description: 承認条件の指定人数 - type: integer - adminskip: - description: 管理者スキップフラグ - type: integer - skip: - description: スキップフラグ - type: integer - backstepno: - description: 差し戻し先ステップ番号 - type: integer - - # ----------------------------------------------------------------------------------------- - - PatchDocumentRequest: - type: object - properties: - wf_type: - description: | - ワークフロー種別
- -1: 下書き保存
- 0:申請、再申請
- 1:承認
- 2:保留
- 3:差し戻し
- 4:却下
- 5:取り戻し
- ※承認完了書類の修正保存を行う場合はワークフロー種別を指定せずにリクエストしてください。 - type: integer - wf_comment: - description: | - ワークフローコメント
- 却下、差し戻しの場合必須 - type: string - wf_backstep: - description: | - 差し戻し先ステップ番号
- 差し戻しの場合必須 - type: string - form_code: - description: | - フォームコード
- フォームコードもしくはフォーム名称のどちらかが必須です。
- どちらも指定されていた場合はフォーム名称が優先されます。 - type: string - form_name: - description: | - フォーム名称
- フォームコードもしくはフォーム名称のどちらかが必須です。
- どちらも指定されていた場合はフォーム名称が優先されます。 - type: string - route_code: - allOf: - - $ref: "#/components/schemas/route_code" - type: string - datas: - description: | - ※書類データの変更を行う場合は指定
- フォームの構成により異なります。 - type: array - xml: - wrapped: true - items: - type: object - properties: - page_no: - description: フォームのページ数に合わせて記載 - type: integer - fields: - description: 該当ページ内のフィールドを記載 - type: object - properties: - field1: - description: 文字列フィールド - type: string - field2: - description: 数値フィールド - type: string - group1: - description: 表明細項目 - allOf: - - $ref: "#/components/schemas/g_field" - lumpapply: - allOf: - - $ref: "#/components/schemas/lumpapply" - reason: - description: | - 更新理由
- 電帳法対応オプションの利用で、X-poin 内作成型フォームの完了書類を更新する場合のみ必須 - type: string - - PostSearchDocumentsRequest: - type: object - properties: - docid: - description: | - 検索条件「書類 ID 範囲指定」
- 一つの書類 ID を指定したい場合は、minと max に同じ値を指定します。 - type: object - properties: - min: - description: 書類 ID 範囲の最小値 - type: integer - max: - description: 書類 ID 範囲の最大値 - type: integer - title: - description: | - 検索条件「件名」
- 部分一致検索で検索します。
- 件名 1 と件名 2 の両方が対象となります。 - type: string - form_group: - description: | - 検索条件「フォームグループ」
- フォームグループ名を部分一致で検索します。 - type: object - properties: - name: - description: 検索条件「フォームグループ名」 - type: string - form_name: - description: | - 検索条件「フォーム名」
- 部分一致検索で検索します。 - type: string - stats: - description: | - 検索条件「承認状況」
- 検索対象の承認状況をカンマ区切りで指定します。 - |指定可能値|承認状況| - |----|----| - |-1|承認状況での絞り込み無し| - |0|下書き| - |1|承認中| - |2|保留| - |3|却下| - |4|申請者へ差し戻し| - |5|承認者へ差し戻し| - |6|承認完了| - current_step: - description: | - 検索条件「現在ステップ」
- 書類の現在の承認ステップで検索します。 - type: object - properties: - stepno: - description: 検索条件「ステップ No」 - type: integer - writer_list: - description: | - 検索条件「承認者リスト」
- 書類の申請者で検索します。
- 「種別」にはユーザ(user)、またはユーザグループ(group)を指定します。
- 「コード」にはユーザコード、またはユーザグループコードを指定します。 - type: array - items: - type: object - properties: - type: - description: 検索条件「種別」 - type: string - code: - description: 検索条件「コード」 - type: string - date_type: - description: | - 検索条件「日付条件」
- 新規更新日(cr_dt)/ 最終更新日(up_dt) - type: string - dt_cond_type: - description: | - 検索条件「日付複合条件」
- 過去期間指定:0 / 日付直接指定:1 - type: string - date_span: - description: | - 検索条件「過去期間」
- 「日付複合条件」が過去期間指定のとき必要。
- 過去期間を指定する。 - type: integer - span_type: - description: | - 検索条件「過去期間種別」
- N 日前:0 / N ヶ月前:1 - type: integer - lower_year: - description: | - 検索条件「開始年」
- 「日付複合条件」が日付直接指定のとき必要。期間の開始年を指定する - type: integer - lower_month: - description: | - 検索条件「開始月」
- 「日付複合条件」が日付直接指定のとき必要。期間の開始月を指定する - type: integer - lower_day: - description: | - 検索条件「開始日」
- 「日付複合条件」が日付直接指定のとき必要。期間の開始日を指定する - type: integer - upper_year: - description: | - 検索条件「終了年」
- 「日付複合条件」が日付直接指定のとき必要。期間の終了年を指定する - type: integer - upper_month: - description: | - 検索条件「終了月」
- 「日付複合条件」が日付直接指定のとき必要。期間の終了月を指定する - type: integer - upper_day: - description: | - 検索条件「終了日」
- 「日付複合条件」が日付直接指定のとき必要。期間の終了日を指定する - type: integer - fgid: - description: | - 検索条件「フォームグループ ID」
- 文字列条件、数値条件を指定するとき必須(fgid が指定されない場合は文字列条件、数値条件を無視する) - type: integer - fid: - description: | - 検索条件「フォーム ID」
- 文字列条件、数値条件を指定するとき必須(fid が指定されない場合は文字列条件、数値条件を無視する) - type: integer - int_col_name1: - description: | - 検索条件「数値条件列1」
- 対象列名に検索対象項目のフィールドID を入力する。
- 複数枚フォームの 2 枚目以降に存在するフィールド ID を対象とする場合はページ番号を指定する。
- 単数枚フォームや、複数枚フォームの 1枚目に存在するフィールド ID の場合ページ番号は省略可能。 - type: object - properties: - page_no: - description: 対象列のページ番号 - type: integer - col_name: - description: 対象列名 - type: string - int_col_name2: - description: | - 検索条件「数値条件列2」
- 対象列名に検索対象項目のフィールドID を入力する。
- 複数枚フォームの 2 枚目以降に存在するフィールド ID を対象とする場合はページ番号を指定する。
- 単数枚フォームや、複数枚フォームの 1枚目に存在するフィールド ID の場合ページ番号は省略可能。 - type: object - properties: - page_no: - description: 対象列のページ番号 - type: integer - col_name: - description: 対象列名 - type: string - int_col_name3: - description: | - 検索条件「数値条件列3」
- 対象列名に検索対象項目のフィールドID を入力する。
- 複数枚フォームの 2 枚目以降に存在するフィールド ID を対象とする場合はページ番号を指定する。
- 単数枚フォームや、複数枚フォームの 1枚目に存在するフィールド ID の場合ページ番号は省略可能。 - type: object - properties: - page_no: - description: 対象列のページ番号 - type: integer - col_name: - description: 対象列名 - type: string - int_and_or1: - description: | - 検索条件「数値条件区分1」
- 第 1 条件かつ第 2 条件(and)/ 第 1 条件または第 2 条件(or) - type: string - int_and_or2: - description: | - 検索条件「数値条件区分2」
- 第 2 条件かつ第 3 条件(and)/ 第 2 条件または第 3 条件(or) - type: string - int_data1: - description: | - 検索条件「数値条件 1」
- 条件とする数値を入力 - type: integer - int_data2: - description: | - 検索条件「数値条件 2」
- 条件とする数値を入力 - type: integer - int_data3: - description: | - 検索条件「数値条件 3」
- 条件とする数値を入力 - type: integer - compare_type1: - description: | - 検索条件「比較区分 1」
- 「数値条件 1」に対して
- 『と等しい:1
- / より大きい:2
- / と同じか大きい:3
- / より小さい:4
- / と同じか小さい:5』 - type: integer - compare_type2: - description: | - 検索条件「比較区分 2」
- 「数値条件 1」に対して
- 『と等しい:1
- / より大きい:2
- / と同じか大きい:3
- / より小さい:4
- / と同じか小さい:5』 - type: integer - compare_type3: - description: | - 検索条件「比較区分 3」
- 「数値条件 1」に対して
- 『と等しい:1
- / より大きい:2
- / と同じか大きい:3
- / より小さい:4
- / と同じか小さい:5』 - type: integer - char_col_name1: - description: | - 検索条件「文字列条件列1」
- 対象列名に検索対象項目のフィールドID を入力する。
- 複数枚フォームの 2 枚目以降に存在するフィールド ID を対象とする場合はページ番号を指定する。
- 単数枚フォームや、複数枚フォームの 1枚目に存在するフィールド ID の場合ページ番号は省略可能。 - type: object - properties: - page_no: - description: 対象列のページ番号 - type: integer - col_name: - description: 対象列名 - type: string - char_col_name2: - description: | - 検索条件「文字列条件列2」
- 対象列名に検索対象項目のフィールドID を入力する。
- 複数枚フォームの 2 枚目以降に存在するフィールド ID を対象とする場合はページ番号を指定する。
- 単数枚フォームや、複数枚フォームの 1枚目に存在するフィールド ID の場合ページ番号は省略可能。 - type: object - properties: - page_no: - description: 対象列のページ番号 - type: integer - col_name: - description: 対象列名 - type: string - char_col_name3: - description: | - 検索条件「文字列条件列3」
- 対象列名に検索対象項目のフィールドID を入力する。
- 複数枚フォームの 2 枚目以降に存在するフィールド ID を対象とする場合はページ番号を指定する。
- 単数枚フォームや、複数枚フォームの 1枚目に存在するフィールド ID の場合ページ番号は省略可能。 - type: object - properties: - page_no: - description: 対象列のページ番号 - type: integer - col_name: - description: 対象列名 - type: string - char_and_or1: - description: | - 検索条件「文字列条件区分 1」
- 第一条件かつ第二条件(and)/ 第一条件または第二条件(or) - type: string - char_and_or2: - description: | - 検索条件「文字列条件区分 2」
- 第二条件かつ第三条件(and)/ 第二条件または第三条件(or) - type: string - char_data1: - description: | - 検索条件「文字列条件1」
- 条件とする文字列を入力
- (指定した文字列を含む書類を検索) - type: string - char_data2: - description: | - 検索条件「文字列条件2」
- 条件とする文字列を入力
- (指定した文字列を含む書類を検索) - type: string - char_data3: - description: | - 検索条件「文字列条件3」
- 条件とする文字列を入力
- (指定した文字列を含む書類を検索) - type: string - comment_flg: - description: | - 検索条件「コメントフラグ」
- 条件なし:0
- / コメントあり:1
- / コメントなし:2
- type: integer - comment_content: - description: | - 検索条件「コメント内容」
- コメントの文字列を入力(部分一致) - type: string - comment_writercd: - description: | - 検索条件「発言者 CD」
- コメントを発言したユーザ CD - type: string - comment_attentionflg: - description: | - 検索条件「重要コメントフラグ」
- すべてのコメント:0 / 重要コメントのみ:1 - type: integer - attach_flg: - description: | - 検索条件「添付ファイルフラグ」
- 条件なし:0
- / 添付あり:1
- / 添付なし:2
- type: integer - attach_name: - description: | - 検索条件「添付ファイル名」
- ファイル名・備考の文字列を入力(部分一致) - type: string - order: - description: | - 並び替え条件
- 項目を指定してレスポンスの並び替えを行います。
- 項目の先頭に「-」を指定した場合は降順に、項目のみ指定した場合は昇順に並び替えます。
- 並び替え条件を指定しない場合は更新日時の降順になります。 - |項目|説明| - |----|----| - |docid|書類ID| - |title1|件名1| - |title2|件名2| - |form_code|フォームコード| - |form_name|フォーム名称| - |route_code|承認ルートコード| - |route_name|承認ルート名称| - |stat|承認状況| - |step|ステップ番号| - |update_datetime|更新日時| - |write_datetime|申請日時| - |writer|申請者| - 並び替え条件の指定方法についてはマニュアル[「2.9.2 並び替え」](./doc/manual.html#292-並び替え)をご参照ください。 - type: string - - PostDocumentRequest: - type: object - properties: - draft: - description: | - 下書き保存フラグ
- true:作成された書類は下書きになる
- false:作成された書類は申請される
- 指定しない場合書類は申請されます。 - type: boolean - form_code: - description: | - フォームコード
- フォームコードもしくはフォーム名称のどちらかが必須です。
- どちらも指定されていた場合はフォーム名称が優先されます。 - type: string - form_name: - description: | - フォームネーム
- フォームコードもしくはフォーム名称のどちらかが必須です。
- どちらも指定されていた場合はフォーム名称が優先されます。 - type: string - route_code: - allOf: - - $ref: "#/components/schemas/route_code" - datas: - description: フォームの構成により異なります。 - type: array - xml: - wrapped: true - items: - type: object - properties: - page_no: - description: フォームのページ数に合わせて記載 - type: integer - fields: - description: 該当ページ内のフィールドを記載 - type: object - properties: - field1: - description: 文字列フィールド - type: string - field2: - description: 整数フィールド - type: string - group1: - description: 表明細項目 - allOf: - - $ref: "#/components/schemas/g_field" - lumpapply: - allOf: - - $ref: "#/components/schemas/lumpapply" - - GetCommentsResponses200: - type: object - properties: - docid: - description: 書類ID - type: integer - comment_list: - allOf: - - $ref: "#/components/schemas/comment_list" - - PostAttachmentsResponses200: - type: object - properties: - docid: - description: 書類ID - type: integer - seq: - description: 添付番号 - type: integer - message_type: - description: メッセージタイプ(0:NoError 固定) - type: integer - example: 0 - message: - description: メッセージ内容 - type: string - detail: - description: | - 詳細情報
- リクエストで指定したユーザコードが X-point に登録されていないユーザだった場合、認証ユーザで添付ファイルを追加した旨のメッセージが返されます。
- リクエストで指定したユーザコードが X-point に登録されているユーザだった場合、detail 項目はレスポンスに含まれません。 - type: string - - PatchAttachmentsResponses200: - type: object - properties: - docid: - description: 書類ID - type: integer - seq: - description: 添付番号 - type: integer - message_type: - description: メッセージタイプ(0:NoError 固定) - type: integer - example: 0 - message: - description: メッセージ内容 - type: string - detail: - description: | - 詳細情報
- リクエストで指定したユーザコードが X-point に登録されていないユーザだった場合、認証ユーザで添付ファイルを追加した旨のメッセージが返されます。
- リクエストで指定したユーザコードが X-point に登録されているユーザだった場合、detail 項目はレスポンスに含まれません。 - type: string - - GetAttachmentsListResponses200: - type: object - properties: - attachments: - description: | - 添付ファイル情報
- 添付ファイルが存在しない場合は空配列が返される。 - type: array - items: - type: object - properties: - content_type: - description: ファイル種類 - type: string - seq: - description: | - 添付番号
- 添付ファイル取得(Attachments)時に指定する番号。 - type: integer - name: - description: | - ファイル名
- 拡張子を含めたファイル名。 - type: string - size: - description: | - ファイルサイズ
- Byte で返される。 - type: integer - remarks: - description: 備考 - type: string - detail_no: - description: | - 対応明細行No
- 電帳法対応オプションの添付型フォームの場合にレスポンスに含まれます。 - type: integer - evidence_type: - description: | - 電帳法書類区分
- 電帳法対応オプションの添付型フォームの場合にレスポンスに含まれます。
- 以下いずれかの区分値が設定されます。
- 0:その他
- 1:電子取引 - type: integer - evidence_type_label: - description: | - 電帳法書類区分(名称)
- 電帳法対応オプションの添付型フォームの場合にレスポンスに含まれます。
- 以下いずれかの区分名称が設定されます。
- 0:その他
- 1:電子取引 - type: string - - GetStatusResponses200: - type: object - properties: - document: - type: object - properties: - docid: - description: 書類ID - type: integer - title1: - description: 件名1 - type: string - title2: - description: 件名2 - type: string - form: - allOf: - - $ref: "#/components/schemas/doc_form" - route: - description: 承認ルート情報 - type: object - properties: - code: - description: 承認ルートコード - type: string - name: - description: 承認ルート名称 - type: string - type: - description: | - フォーム種別 - * standard:通常フォーム - * workflow:ワークフローフォーム - type: string - status: - allOf: - - $ref: "#/components/schemas/status" - step: - allOf: - - $ref: "#/components/schemas/step" - current_version: - description: 現在バージョン番号 - type: integer - writer: - type: object - properties: - usercode: - description: 申請者ユーザコード - type: string - username: - description: 申請者ユーザ名 - type: string - stampname: - description: 申請者印影名 - type: string - datetime: - description: 申請日時 - type: string - lastaprv: - type: object - properties: - usercode: - description: 最終承認者ユーザコード - type: string - username: - description: 最終承認者ユーザ名 - type: string - stampname: - description: 最終承認者印影名 - type: string - datetime: - description: 最終更新日時 - type: string - flow_versions: - description: 承認履歴情報 通常フォームの場合は空配列が返されます。 - type: array - items: - type: object - properties: - flow_results: - $ref: "#/components/schemas/flow_results" - histories: - description: 承認履歴情報 クエリパラメータ history がtrueの場合に返されます。通常フォームの場合は空配列が返されます。 - type: array - items: - type: object - properties: - version: - description: バージョン番号 - type: integer - flow_results: - $ref: "#/components/schemas/flow_results" - - GetLumpapplyListResponses200: - type: object - properties: - lumpapply: - description: | - 自動申請情報
- 自動申請が設定されていない場合は空配列を返します。 - type: array - items: - type: object - properties: - id: - description: | - 自動申請ID
- 自動申請の定義情報取得時(Lumpapply)に使用します。 - type: integer - name: - description: 自動申請名称 - type: string - form_id: - description: フォームID - type: integer - form_cd: - description: フォームコード - type: string - form_name: - description: フォーム名称 - type: string - route_id: - description: ルートID - type: integer - route_cd: - description: ルートコード - type: string - route_name: - description: ルート名称 - type: string - - GetFormsResponses200: - type: object - properties: - form: - description: フォーム定義情報 - type: object - properties: - code: - description: フォームコード - type: string - name: - description: フォーム名称 - type: string - max_step: - description: フォーム最大ステップ数 - type: integer - route: - description: | - フォームルート情報
- 通常フォームの場合は空配列が返される。 - type: array - items: - type: object - properties: - code: - description: ルートコード - type: string - name: - description: ルート名称 - type: string - condroute: - description: | - 条件付きルート
- - 条件付きルート: true - - ユーザ選択ルート: false - type: boolean - pages: - description: フォームページ情報 - type: array - items: - type: object - properties: - page_no: - description: ページ番号 - type: integer - form_code: - description: | - フォームコード
- 複数枚フォームの場合のみ出力される。 - type: string - form_name: - description: | - フォーム名称
- 複数枚フォームの場合のみ出力される。 - type: string - fields: - description: フィールド情報 - allOf: - - $ref: "#/components/schemas/fields" - - GetMasterListResponses200: - type: object - properties: - master: - description: | - マスタ情報
- マスタが存在しない場合は空配列が返される。 - allOf: - - $ref: "#/components/schemas/master" - - GetMasterDataResponses200: - type: object - properties: - master: - description: マスタ情報 - type: object - properties: - type: - description: | - マスタタイプ
- 0:簡易マスタ
- 1:ユーザ固有マスタ
- 2:X-point マスタ
- 5:kintone 連携マスタ
- type: integer - type_name: - description: マスタタイプ名称 - type: string - name: - description: マスタ名 - type: string - code: - description: | - マスタコード
- 簡易マスタはマスタコードが返され、ユーザ固有マスタは空文字が返される。 - type: string - table_name: - description: | - マスタテーブル名
- ユーザ固有マスタはテーブル名が返され、簡易マスタは空文字が返される。 - type: string - total_count: - description: データ件数 - type: integer - data: - description: | - マスタデータ情報
- マスタデータが配列で返される。
- ※作成したマスタ情報によって項目が異なります - allOf: - - $ref: "#/components/schemas/master_data" - - GetWebhooklogResponses200: - type: object - properties: - data: - description: | - ログデータ
- ログが存在しない場合は空配列が返されます。 - allOf: - - $ref: "#/components/schemas/webhooklog_data" - - GetWebhookConfigResponses200: - type: object - properties: - form_name: - description: フォーム名称 - type: string - form_type: - description: | - フォーム種別
- "standard":通常フォーム
- "workflow":ワークフローフォーム - type: string - webhooks: - description: | - Webhook 設定情報
- 取得対象の Webhook 設定が存在しない場合は空配列を返す - allOf: - - $ref: "#/components/schemas/webhooks_config" - - GetProxyInfoResponses200: - type: object - properties: - proxy: - description: | - 代理権限リスト
- 代理権限が設定されていない場合は空配列が返される。 - allOf: - - $ref: "#/components/schemas/proxy_list" - - GetQueryListResponses200: - type: object - properties: - query_groups: - description: | - クエリグループ情報
- 取得したクエリグループ情報の一覧が格納される。
- 取得結果が 1 件も無い場合は空の配列となる。 - type: array - items: - type: object - properties: - query_group_id: - description: | - クエリグループ ID
- [マイクエリ]の場合は 0 固定 - type: integer - query_group_name: - description: クエリグループ名称 - type: string - queries: - description: | - クエリ情報一覧
- クエリグループに属するクエリの一覧 - allOf: - - $ref: "#/components/schemas/queries" - - GetQueryResponses200: - type: object - properties: - query: - description: クエリ情報 - type: object - properties: - query_id: - description: クエリID - type: integer - query_code: - description: クエリコード - type: string - query_name: - description: クエリ名 - type: string - query_type: - description: | - クエリ種別
- "list"(一覧) / "summary"(サマリ) /"cross"(クロス集計) - type: string - form_count: - description: | - フォーム件数
- クエリが参照するフォームの件数 - type: integer - fid: - description: | - フォームID
- フォーム件数が 1 の場合に出力される - type: integer - form_name: - description: | - フォーム名
- フォーム件数が 1 の場合に出力される - type: string - subtbl: - description: | - 表定義
- フォーム件数が 1 の場合に出力される - type: string - forms: - description: | - フォーム情報
- フォーム件数が 2 以上の場合に出力される - type: object - properties: - fid: - description: フォームID - type: integer - form_name: - description: フォーム名 - type: string - subtbl: - description: 表定義 - type: string - toprowmark: - description: 先頭行文字 - type: string - secondmark: - description: 継続行文字 - type: string - csv_filename: - description: CSVファイル名 - type: string - csv_header_flg: - description: | - CSV ファイルのヘッダー表示
- true(表示する) / false(表示しない) - type: boolean - csvexport_manage_type: - description: | - CSV ファイル出力済み管理グラフ
- "auto"(csv ファイル自動出力された書類だけを出力済みにする) / "all"(クエリ機能で出力された書類を全て出力済みにする) - type: string - graph: - description: | - グラフ情報
- サマリ・クロス集計クエリ以外の場合応答に含まれない。 - type: object - properties: - graph_active_flg: - description: | - グラフ表示 - * true:グラフ表示する - * false:グラフ表示しない - type: boolean - graph_type: - description: | - グラフ種別 - * circle:円 - * bar:棒 - * line:折れ線 - * area:領域 - type: string - graph_3d: - description: | - 3D表示 - * true:3D表示する - * false:3D表示しない - type: boolean - graph_alpha: - description: | - 透過表示 - * true:透過表示する - * false:透過表示しない - type: boolean - graph_stack: - description: | - 積上げ表示 - * true:積上げ表示する - * false:積上げ表示しない - type: boolean - graph_direction: - description: | - 表示方向 - * vertical:縦 - * horizontal:横 - type: string - graph_reverse: - description: | - データマッピング - * column:値 = 列項目 - * row:値 = 行項目 - type: string - graph_label_title: - description: ラベル(題名) - type: string - graph_label_category: - description: ラベル(カテゴリー) - type: string - graph_label_value: - description: ラベル(値) - type: string - height: - description: 高さ(単位:px) - type: integer - width: - description: 幅(単位:px) - type: integer - graph_category_angle: - description: カテゴリー文字列の傾き(単位:度) - type: integer - remarks: - description: 備考 - type: string - cr_dt: - description: | - 新規作成
- 書式:YYYY/MM/DD hh:mm:ss - type: string - up_dt: - description: | - 最終更新
- 書式:YYYY/MM/DD hh:mm:ss - type: string - - PatchUpdateUserRequest: - type: object - properties: - schemas: - description: スキーマ - type: array - items: - example: [] - Operations: - description: ログイン ID を指定した値に置換する - type: array - items: - type: object - properties: - path: - type: string - op: - description: | - オペレーション
- 置換:replace
- 追加:add
- 削除:remove - type: string - value: - description: 更新対象の項目と値を指定 - type: object - properties: - userName: - type: string - - PatchUpdateUserGroupInfoRequest: - type: object - properties: - schemas: - description: スキーマ - type: array - items: - example: [] - Operations: - description: オペレーション - type: array - items: - type: object - properties: - path: - type: string - op: - type: string - value: - type: object - properties: - displayName: - type: string - - PatchUpdatePartInfoRequest: - type: object - properties: - schemas: - description: スキーマ - type: array - items: - example: [] - Operations: - description: オペレーション - type: array - items: - type: object - properties: - path: - type: string - op: - type: string - value: - type: object - properties: - displayName: - type: string - displayKana: - type: string - partCode: - type: string diff --git a/internal/xpoint/schema.go b/internal/xpoint/schema.go index 004259c..9fd9d12 100644 --- a/internal/xpoint/schema.go +++ b/internal/xpoint/schema.go @@ -3,177 +3,72 @@ package xpoint import ( _ "embed" "fmt" - "net/url" "sort" - "strings" "sync" "gopkg.in/yaml.v3" ) -//go:embed openapi.yaml -var openapiYAML []byte - -// Operation maps a dotted schema path (e.g. "form.list") to an OpenAPI -// operation in the embedded X-point spec. -type Operation struct { - Path string - Method string -} - -// operationAliases maps user-facing identifiers to OpenAPI path+method pairs. -// The set mirrors the commands exposed by the CLI. -var operationAliases = map[string]Operation{ - "form.list": {Path: "/api/v1/forms", Method: "get"}, - "approval.list": {Path: "/api/v1/approvals", Method: "get"}, - "document.search": {Path: "/api/v1/search/documents", Method: "post"}, -} +//go:embed schema.yaml +var schemaYAML []byte var ( - specOnce sync.Once - specRoot map[string]any - specErr error + schemaOnce sync.Once + schemaOps map[string]any + schemaOpsKeys []string + schemaErr error ) -func loadSpec() (map[string]any, error) { - specOnce.Do(func() { +func loadSchema() (map[string]any, []string, error) { + schemaOnce.Do(func() { var raw any - if err := yaml.Unmarshal(openapiYAML, &raw); err != nil { - specErr = fmt.Errorf("parse embedded openapi.yaml: %w", err) + if err := yaml.Unmarshal(schemaYAML, &raw); err != nil { + schemaErr = fmt.Errorf("parse embedded schema.yaml: %w", err) + return + } + root, ok := toStringKeyed(raw).(map[string]any) + if !ok { + schemaErr = fmt.Errorf("schema.yaml root is not a mapping") return } - norm, ok := toStringKeyed(raw).(map[string]any) + ops, ok := root["operations"].(map[string]any) if !ok { - specErr = fmt.Errorf("openapi root is not a mapping") + schemaErr = fmt.Errorf("schema.yaml is missing `operations` mapping") return } - specRoot = norm + keys := make([]string, 0, len(ops)) + for k := range ops { + keys = append(keys, k) + } + sort.Strings(keys) + schemaOps = ops + schemaOpsKeys = keys }) - return specRoot, specErr + return schemaOps, schemaOpsKeys, schemaErr } // SchemaAliases returns the sorted list of supported dotted aliases. func SchemaAliases() []string { - out := make([]string, 0, len(operationAliases)) - for k := range operationAliases { - out = append(out, k) + _, keys, err := loadSchema() + if err != nil { + return nil } - sort.Strings(out) + out := make([]string, len(keys)) + copy(out, keys) return out } -// LookupOperation returns the OpenAPI operation object for the given alias. -// If resolveRefs is true, all $ref pointers within the operation are -// recursively inlined. -func LookupOperation(alias string, resolveRefs bool) (map[string]any, error) { - op, ok := operationAliases[alias] - if !ok { - return nil, fmt.Errorf("unknown schema alias %q (run `xp schema` to list supported aliases)", alias) - } - root, err := loadSpec() +// LookupOperation returns the schema object for the given alias. +func LookupOperation(alias string) (map[string]any, error) { + ops, _, err := loadSchema() if err != nil { return nil, err } - paths, _ := root["paths"].(map[string]any) - if paths == nil { - return nil, fmt.Errorf("openapi spec is missing `paths`") - } - path, _ := paths[op.Path].(map[string]any) - if path == nil { - return nil, fmt.Errorf("openapi spec is missing path %q", op.Path) - } - opObj, _ := path[op.Method].(map[string]any) - if opObj == nil { - return nil, fmt.Errorf("openapi spec is missing %s %s", strings.ToUpper(op.Method), op.Path) - } - result := cloneMap(opObj) - result["_path"] = op.Path - result["_method"] = strings.ToUpper(op.Method) - if resolveRefs { - resolved, err := resolveRefsIn(result, root, make(map[string]bool)) - if err != nil { - return nil, err - } - m, _ := resolved.(map[string]any) - return m, nil - } - return result, nil -} - -func resolveRefsIn(node any, root map[string]any, seen map[string]bool) (any, error) { - switch v := node.(type) { - case map[string]any: - if ref, ok := v["$ref"].(string); ok && len(v) == 1 { - if seen[ref] { - return map[string]any{"$ref": ref, "_circular": true}, nil - } - target, err := lookupRef(root, ref) - if err != nil { - return nil, err - } - next := make(map[string]bool, len(seen)+1) - for k := range seen { - next[k] = true - } - next[ref] = true - return resolveRefsIn(target, root, next) - } - out := make(map[string]any, len(v)) - for k, child := range v { - resolved, err := resolveRefsIn(child, root, seen) - if err != nil { - return nil, err - } - out[k] = resolved - } - return out, nil - case []any: - out := make([]any, len(v)) - for i, child := range v { - resolved, err := resolveRefsIn(child, root, seen) - if err != nil { - return nil, err - } - out[i] = resolved - } - return out, nil - default: - return v, nil - } -} - -// lookupRef resolves a local JSON pointer like "#/components/schemas/Foo". -func lookupRef(root map[string]any, ref string) (any, error) { - if !strings.HasPrefix(ref, "#/") { - return nil, fmt.Errorf("external or non-fragment $ref not supported: %q", ref) - } - parts := strings.Split(strings.TrimPrefix(ref, "#/"), "/") - var cur any = root - for _, raw := range parts { - seg, err := url.PathUnescape(raw) - if err != nil { - seg = raw - } - seg = strings.ReplaceAll(strings.ReplaceAll(seg, "~1", "/"), "~0", "~") - m, ok := cur.(map[string]any) - if !ok { - return nil, fmt.Errorf("cannot resolve %q: %q is not a mapping", ref, seg) - } - child, ok := m[seg] - if !ok { - return nil, fmt.Errorf("cannot resolve %q: segment %q not found", ref, seg) - } - cur = child - } - return cur, nil -} - -func cloneMap(m map[string]any) map[string]any { - out := make(map[string]any, len(m)) - for k, v := range m { - out[k] = v + op, ok := ops[alias].(map[string]any) + if !ok { + return nil, fmt.Errorf("unknown schema alias %q (run `xp schema` to list supported aliases)", alias) } - return out + return op, nil } // toStringKeyed recursively converts yaml.v3's map[any]any / map[string]any diff --git a/internal/xpoint/schema.yaml b/internal/xpoint/schema.yaml new file mode 100644 index 0000000..eb08c05 --- /dev/null +++ b/internal/xpoint/schema.yaml @@ -0,0 +1,264 @@ +# X-point API schema (xpoint-cli curated) +# +# This file is the authoritative schema for the operations that +# xpoint-cli supports. It describes actual request/response shapes +# (types reflect real API behavior, not the upstream OpenAPI spec, +# which has known bugs e.g. `form[].id` typed as string while the +# API actually returns integer). + +operations: + form.list: + method: GET + path: /api/v1/forms + summary: 利用可能フォーム一覧取得 + description: | + 認証ユーザーが利用できるフォームのフォームID・名称を + 所属グループ (グループID・グループ名) とセットで返す。 + parameters: [] + response: + type: object + properties: + form_group: + type: array + description: フォームグループ情報 (空配列になり得る) + items: + type: object + properties: + id: + type: integer + description: フォームグループID + name: + type: string + description: フォームグループ名称 + form: + type: array + description: 所属フォーム情報 + items: + type: object + properties: + id: + type: integer + description: フォームID + code: + type: string + description: フォームコード + name: + type: string + description: フォーム名称 + route: + type: array + description: 承認ルート情報 + items: + type: object + properties: + id: + type: integer + description: 承認ルートID + code: + type: string + description: 承認ルートコード (通常フォーム/自動選択ルートでは含まれない) + name: + type: string + description: 承認ルート名称 + + approval.list: + method: GET + path: /api/v1/approvals + summary: 承認待ち一覧取得 + description: 指定した承認状況タイプに該当する書類の一覧を返す。 + parameters: + - name: stat + in: query + type: integer + required: true + description: | + 承認状況タイプ。 + 10:承認待ち / 20:承認完了 / 30:申請中 / 40:差戻 / 50:取止 ほか + 詳細は X-point API ドキュメントを参照。 + - name: fgid + in: query + type: integer + description: フォームグループID で絞り込み + - name: fid + in: query + type: integer + description: フォームID で絞り込み + - name: step + in: query + type: integer + description: ステップ番号で絞り込み + - name: record_no + in: query + type: integer + description: 取得開始レコード番号 + - name: get_line + in: query + type: integer + description: 取得件数 + - name: proxy_user + in: query + type: string + description: 代理ユーザーコード + - name: filter + in: query + type: string + description: 絞り込み条件式 (例 `cr_dt between "2023-01-01" and "2023-12-31"`) + - name: show_hidden_doc + in: query + type: boolean + description: 非表示書類も含めて取得するか + response: + type: object + properties: + total_count: + type: integer + description: 該当件数 + approval_list: + type: array + items: + type: object + properties: + docid: + type: integer + description: 書類ID + hidden: + type: boolean + description: 非表示書類フラグ (show_hidden_doc=true 指定時のみ含まれる) + attachment: + type: boolean + description: 添付ファイルフラグ + comment: + type: boolean + description: コメントフラグ + title1: + type: string + description: 件名1 + title2: + type: string + description: 件名2 + form_name: + type: string + description: フォーム名称 + status: + type: string + description: ステータス名称 + display_status: + type: string + description: 画面表示ステータス名称 + apply_datetime: + type: string + description: 申請日時 (YYYY/MM/DD hh:mm:ss) + apply_user: + type: string + description: 申請者氏名 + approval_user: + type: array + description: 現在ステップの承認者一覧 + items: + type: string + lastaprv_datetime: + type: string + description: 最終更新日時 (YYYY/MM/DD hh:mm:ss) + + document.search: + method: POST + path: /api/v1/search/documents + summary: 書類検索 + description: | + 検索条件を JSON ボディで指定して書類を検索する。 + ボディは省略可 (省略時は全書類が対象)。 + parameters: + - name: size + in: query + type: integer + description: 1ページあたりの取得件数 + - name: offset + in: query + type: integer + description: 取得開始位置 + - name: page + in: query + type: integer + description: ページ番号 + requestBody: + contentType: application/json + description: | + 任意の検索条件を JSON で指定する。代表的なキー: + * title 件名1/件名2 (部分一致) + * form_name フォーム名称 (部分一致) + * fgid / fid フォームグループID / フォームID + * comment_flg コメントフラグ (0:条件なし 1:あり 2:なし) + * order 並び替え条件 (例 `-title1`) + その他の条件キーは X-point API ドキュメントを参照。 + response: + type: object + properties: + total_count: + type: integer + description: 該当件数 + items: + type: array + items: + type: object + properties: + docid: + type: integer + description: 書類ID + has_attachments: + type: boolean + description: 添付ファイルの有無 + has_comments: + type: boolean + description: コメントの有無 + title1: + type: string + description: 件名1 + title2: + type: string + description: 件名2 + form: + type: object + description: フォーム情報 + properties: + id: + type: integer + description: フォームID + code: + type: string + description: フォームコード + name: + type: string + description: フォーム名称 + route: + type: object + description: 承認ルート情報 + properties: + code: + type: string + description: 承認ルートコード + name: + type: string + description: 承認ルート名称 + step: + type: integer + description: ステップ番号 + stat: + type: integer + description: 承認状況 (-1 は通常フォーム) + write_datetime: + type: string + description: 申請日時 (YYYY/MM/DD hh:mm:ss) + update_datetime: + type: string + description: 更新日時 (YYYY/MM/DD hh:mm:ss) + writer: + type: string + description: 申請者 + current_approvers: + type: array + description: 現在ステップの承認者一覧 + items: + type: string + url: + type: string + description: 書類URL diff --git a/internal/xpoint/schema_test.go b/internal/xpoint/schema_test.go index 6b6d6f4..4392f33 100644 --- a/internal/xpoint/schema_test.go +++ b/internal/xpoint/schema_test.go @@ -19,71 +19,65 @@ func TestSchemaAliases_Sorted(t *testing.T) { } func TestLookupOperation_Unknown(t *testing.T) { - _, err := LookupOperation("nope.missing", false) + _, err := LookupOperation("nope.missing") if err == nil || !strings.Contains(err.Error(), "unknown schema alias") { t.Errorf("err = %v", err) } } -func TestLookupOperation_FormList_NoResolve(t *testing.T) { - op, err := LookupOperation("form.list", false) +func TestLookupOperation_FormList(t *testing.T) { + op, err := LookupOperation("form.list") if err != nil { t.Fatalf("LookupOperation: %v", err) } - if op["_method"] != "GET" { - t.Errorf("_method = %v", op["_method"]) - } - if op["_path"] != "/api/v1/forms" { - t.Errorf("_path = %v", op["_path"]) - } - if op["operationId"] != "GetAvailableFormList" { - t.Errorf("operationId = %v", op["operationId"]) - } - params, ok := op["parameters"].([]any) - if !ok || len(params) == 0 { - t.Fatalf("parameters = %v", op["parameters"]) - } - // Without --resolve-refs, the first parameter is still a $ref. - first, _ := params[0].(map[string]any) - if _, hasRef := first["$ref"]; !hasRef { - t.Errorf("expected $ref in parameter, got %v", first) + if op["method"] != "GET" { + t.Errorf("method = %v", op["method"]) + } + if op["path"] != "/api/v1/forms" { + t.Errorf("path = %v", op["path"]) + } + // form.id must be integer per our curated schema (upstream spec has a bug). + resp, _ := op["response"].(map[string]any) + props, _ := resp["properties"].(map[string]any) + fg, _ := props["form_group"].(map[string]any) + fgItems, _ := fg["items"].(map[string]any) + fgProps, _ := fgItems["properties"].(map[string]any) + formArr, _ := fgProps["form"].(map[string]any) + formItems, _ := formArr["items"].(map[string]any) + formProps, _ := formItems["properties"].(map[string]any) + formID, _ := formProps["id"].(map[string]any) + if formID["type"] != "integer" { + t.Errorf("form.id type = %v, want integer", formID["type"]) } } -func TestLookupOperation_FormList_ResolveRefs(t *testing.T) { - op, err := LookupOperation("form.list", true) +func TestLookupOperation_ApprovalList_RequiredStat(t *testing.T) { + op, err := LookupOperation("approval.list") if err != nil { t.Fatalf("LookupOperation: %v", err) } params, _ := op["parameters"].([]any) if len(params) == 0 { - t.Fatalf("no parameters") + t.Fatal("no parameters") } first, _ := params[0].(map[string]any) - if _, hasRef := first["$ref"]; hasRef { - t.Errorf("expected $ref to be inlined, got %v", first) - } - if first["name"] != "fgid" { - t.Errorf("first param name = %v", first["name"]) + if first["name"] != "stat" || first["required"] != true { + t.Errorf("first param = %v", first) } } func TestLookupOperation_DocumentSearch(t *testing.T) { - op, err := LookupOperation("document.search", false) + op, err := LookupOperation("document.search") if err != nil { t.Fatalf("LookupOperation: %v", err) } - if op["_method"] != "POST" { - t.Errorf("_method = %v", op["_method"]) + if op["method"] != "POST" { + t.Errorf("method = %v", op["method"]) } - if op["_path"] != "/api/v1/search/documents" { - t.Errorf("_path = %v", op["_path"]) + if op["path"] != "/api/v1/search/documents" { + t.Errorf("path = %v", op["path"]) } -} - -func TestLookupRef_MissingSegment(t *testing.T) { - root := map[string]any{"a": map[string]any{"b": 1}} - if _, err := lookupRef(root, "#/a/c"); err == nil { - t.Error("expected error for missing segment") + if _, ok := op["requestBody"].(map[string]any); !ok { + t.Errorf("requestBody missing") } } From 0b865089ae6f2932fa6f51a5c7ec4d83e93c8d6c Mon Sep 17 00:00:00 2001 From: buty4649 Date: Fri, 17 Apr 2026 13:07:01 +0900 Subject: [PATCH 3/5] Drop --jq flag from schema command jq-style filtering belongs on runtime API responses where users care about trimming payloads, not on the static schema output. If users want to grep parts of the schema, piping through jq externally is simpler. Co-Authored-By: Claude Opus 4.7 --- cmd/schema.go | 6 ------ cmd/schema_test.go | 19 ------------------- 2 files changed, 25 deletions(-) diff --git a/cmd/schema.go b/cmd/schema.go index 7529851..457b5ef 100644 --- a/cmd/schema.go +++ b/cmd/schema.go @@ -10,8 +10,6 @@ import ( "github.com/spf13/cobra" ) -var schemaJQ string - var schemaCmd = &cobra.Command{ Use: "schema [service.resource.method]", Short: "Show the schema for an X-point operation", @@ -29,7 +27,6 @@ Run without arguments to list supported aliases.`, func init() { rootCmd.AddCommand(schemaCmd) - schemaCmd.Flags().StringVar(&schemaJQ, "jq", "", "apply a gojq filter to the schema") } func runSchema(_ *cobra.Command, args []string) error { @@ -45,9 +42,6 @@ func runSchema(_ *cobra.Command, args []string) error { if err != nil { return err } - if schemaJQ != "" { - return runJQ(op, schemaJQ) - } enc := json.NewEncoder(os.Stdout) enc.SetIndent("", " ") return enc.Encode(op) diff --git a/cmd/schema_test.go b/cmd/schema_test.go index b179789..11a3f14 100644 --- a/cmd/schema_test.go +++ b/cmd/schema_test.go @@ -21,9 +21,6 @@ func TestSchemaCmd_ListsAliases(t *testing.T) { } func TestSchemaCmd_EmitsJSON(t *testing.T) { - schemaJQ = "" - t.Cleanup(func() { schemaJQ = "" }) - out, err := captureStdout(t, func() error { return runSchema(schemaCmd, []string{"form.list"}) }) @@ -40,24 +37,8 @@ func TestSchemaCmd_EmitsJSON(t *testing.T) { } func TestSchemaCmd_UnknownAlias(t *testing.T) { - schemaJQ = "" err := runSchema(schemaCmd, []string{"nope"}) if err == nil || !strings.Contains(err.Error(), "unknown schema alias") { t.Errorf("err = %v", err) } } - -func TestSchemaCmd_JQFilter(t *testing.T) { - schemaJQ = ".summary" - t.Cleanup(func() { schemaJQ = "" }) - - out, err := captureStdout(t, func() error { - return runSchema(schemaCmd, []string{"form.list"}) - }) - if err != nil { - t.Fatalf("runSchema: %v", err) - } - if strings.TrimSpace(out) != `"利用可能フォーム一覧取得"` { - t.Errorf("output = %q", out) - } -} From dd1dde407e77115cc6d2b80c10023e51b88ea22d Mon Sep 17 00:00:00 2001 From: buty4649 Date: Fri, 17 Apr 2026 13:08:32 +0900 Subject: [PATCH 4/5] Switch schema storage from YAML to JSON Embed schema.json instead of schema.yaml so we can use encoding/json from the stdlib and drop the gopkg.in/yaml.v3 dependency (and its map[any]any -> map[string]any normalizer). Co-Authored-By: Claude Opus 4.7 --- go.mod | 1 - go.sum | 3 - internal/xpoint/schema.go | 47 +---- internal/xpoint/schema.json | 340 ++++++++++++++++++++++++++++++++++++ internal/xpoint/schema.yaml | 264 ---------------------------- 5 files changed, 347 insertions(+), 308 deletions(-) create mode 100644 internal/xpoint/schema.json delete mode 100644 internal/xpoint/schema.yaml diff --git a/go.mod b/go.mod index 2cdf033..e50ec37 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,6 @@ go 1.26.1 require ( github.com/itchyny/gojq v0.12.19 github.com/spf13/cobra v1.10.2 - gopkg.in/yaml.v3 v3.0.1 ) require ( diff --git a/go.sum b/go.sum index b91a035..3de9430 100644 --- a/go.sum +++ b/go.sum @@ -12,7 +12,4 @@ github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk= github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/internal/xpoint/schema.go b/internal/xpoint/schema.go index 9fd9d12..dcb9036 100644 --- a/internal/xpoint/schema.go +++ b/internal/xpoint/schema.go @@ -2,15 +2,14 @@ package xpoint import ( _ "embed" + "encoding/json" "fmt" "sort" "sync" - - "gopkg.in/yaml.v3" ) -//go:embed schema.yaml -var schemaYAML []byte +//go:embed schema.json +var schemaJSON []byte var ( schemaOnce sync.Once @@ -21,19 +20,14 @@ var ( func loadSchema() (map[string]any, []string, error) { schemaOnce.Do(func() { - var raw any - if err := yaml.Unmarshal(schemaYAML, &raw); err != nil { - schemaErr = fmt.Errorf("parse embedded schema.yaml: %w", err) - return - } - root, ok := toStringKeyed(raw).(map[string]any) - if !ok { - schemaErr = fmt.Errorf("schema.yaml root is not a mapping") + var root map[string]any + if err := json.Unmarshal(schemaJSON, &root); err != nil { + schemaErr = fmt.Errorf("parse embedded schema.json: %w", err) return } ops, ok := root["operations"].(map[string]any) if !ok { - schemaErr = fmt.Errorf("schema.yaml is missing `operations` mapping") + schemaErr = fmt.Errorf("schema.json is missing `operations` mapping") return } keys := make([]string, 0, len(ops)) @@ -70,30 +64,3 @@ func LookupOperation(alias string) (map[string]any, error) { } return op, nil } - -// toStringKeyed recursively converts yaml.v3's map[any]any / map[string]any -// trees into purely JSON-compatible forms with string keys. -func toStringKeyed(v any) any { - switch m := v.(type) { - case map[any]any: - out := make(map[string]any, len(m)) - for k, val := range m { - out[fmt.Sprint(k)] = toStringKeyed(val) - } - return out - case map[string]any: - out := make(map[string]any, len(m)) - for k, val := range m { - out[k] = toStringKeyed(val) - } - return out - case []any: - out := make([]any, len(m)) - for i, val := range m { - out[i] = toStringKeyed(val) - } - return out - default: - return v - } -} diff --git a/internal/xpoint/schema.json b/internal/xpoint/schema.json new file mode 100644 index 0000000..a320550 --- /dev/null +++ b/internal/xpoint/schema.json @@ -0,0 +1,340 @@ +{ + "operations": { + "form.list": { + "method": "GET", + "path": "/api/v1/forms", + "summary": "利用可能フォーム一覧取得", + "description": "認証ユーザーが利用できるフォームのフォームID・名称を\n所属グループ (グループID・グループ名) とセットで返す。\n", + "parameters": [], + "response": { + "type": "object", + "properties": { + "form_group": { + "type": "array", + "description": "フォームグループ情報 (空配列になり得る)", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "フォームグループID" + }, + "name": { + "type": "string", + "description": "フォームグループ名称" + }, + "form": { + "type": "array", + "description": "所属フォーム情報", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "フォームID" + }, + "code": { + "type": "string", + "description": "フォームコード" + }, + "name": { + "type": "string", + "description": "フォーム名称" + }, + "route": { + "type": "array", + "description": "承認ルート情報", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "承認ルートID" + }, + "code": { + "type": "string", + "description": "承認ルートコード (通常フォーム/自動選択ルートでは含まれない)" + }, + "name": { + "type": "string", + "description": "承認ルート名称" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "approval.list": { + "method": "GET", + "path": "/api/v1/approvals", + "summary": "承認待ち一覧取得", + "description": "指定した承認状況タイプに該当する書類の一覧を返す。", + "parameters": [ + { + "name": "stat", + "in": "query", + "type": "integer", + "required": true, + "description": "承認状況タイプ。\n10:承認待ち / 20:承認完了 / 30:申請中 / 40:差戻 / 50:取止 ほか\n詳細は X-point API ドキュメントを参照。\n" + }, + { + "name": "fgid", + "in": "query", + "type": "integer", + "description": "フォームグループID で絞り込み" + }, + { + "name": "fid", + "in": "query", + "type": "integer", + "description": "フォームID で絞り込み" + }, + { + "name": "step", + "in": "query", + "type": "integer", + "description": "ステップ番号で絞り込み" + }, + { + "name": "record_no", + "in": "query", + "type": "integer", + "description": "取得開始レコード番号" + }, + { + "name": "get_line", + "in": "query", + "type": "integer", + "description": "取得件数" + }, + { + "name": "proxy_user", + "in": "query", + "type": "string", + "description": "代理ユーザーコード" + }, + { + "name": "filter", + "in": "query", + "type": "string", + "description": "絞り込み条件式 (例 `cr_dt between \"2023-01-01\" and \"2023-12-31\"`)" + }, + { + "name": "show_hidden_doc", + "in": "query", + "type": "boolean", + "description": "非表示書類も含めて取得するか" + } + ], + "response": { + "type": "object", + "properties": { + "total_count": { + "type": "integer", + "description": "該当件数" + }, + "approval_list": { + "type": "array", + "items": { + "type": "object", + "properties": { + "docid": { + "type": "integer", + "description": "書類ID" + }, + "hidden": { + "type": "boolean", + "description": "非表示書類フラグ (show_hidden_doc=true 指定時のみ含まれる)" + }, + "attachment": { + "type": "boolean", + "description": "添付ファイルフラグ" + }, + "comment": { + "type": "boolean", + "description": "コメントフラグ" + }, + "title1": { + "type": "string", + "description": "件名1" + }, + "title2": { + "type": "string", + "description": "件名2" + }, + "form_name": { + "type": "string", + "description": "フォーム名称" + }, + "status": { + "type": "string", + "description": "ステータス名称" + }, + "display_status": { + "type": "string", + "description": "画面表示ステータス名称" + }, + "apply_datetime": { + "type": "string", + "description": "申請日時 (YYYY/MM/DD hh:mm:ss)" + }, + "apply_user": { + "type": "string", + "description": "申請者氏名" + }, + "approval_user": { + "type": "array", + "description": "現在ステップの承認者一覧", + "items": { + "type": "string" + } + }, + "lastaprv_datetime": { + "type": "string", + "description": "最終更新日時 (YYYY/MM/DD hh:mm:ss)" + } + } + } + } + } + } + }, + "document.search": { + "method": "POST", + "path": "/api/v1/search/documents", + "summary": "書類検索", + "description": "検索条件を JSON ボディで指定して書類を検索する。\nボディは省略可 (省略時は全書類が対象)。\n", + "parameters": [ + { + "name": "size", + "in": "query", + "type": "integer", + "description": "1ページあたりの取得件数" + }, + { + "name": "offset", + "in": "query", + "type": "integer", + "description": "取得開始位置" + }, + { + "name": "page", + "in": "query", + "type": "integer", + "description": "ページ番号" + } + ], + "requestBody": { + "contentType": "application/json", + "description": "任意の検索条件を JSON で指定する。代表的なキー:\n * title 件名1/件名2 (部分一致)\n * form_name フォーム名称 (部分一致)\n * fgid / fid フォームグループID / フォームID\n * comment_flg コメントフラグ (0:条件なし 1:あり 2:なし)\n * order 並び替え条件 (例 `-title1`)\nその他の条件キーは X-point API ドキュメントを参照。\n" + }, + "response": { + "type": "object", + "properties": { + "total_count": { + "type": "integer", + "description": "該当件数" + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "docid": { + "type": "integer", + "description": "書類ID" + }, + "has_attachments": { + "type": "boolean", + "description": "添付ファイルの有無" + }, + "has_comments": { + "type": "boolean", + "description": "コメントの有無" + }, + "title1": { + "type": "string", + "description": "件名1" + }, + "title2": { + "type": "string", + "description": "件名2" + }, + "form": { + "type": "object", + "description": "フォーム情報", + "properties": { + "id": { + "type": "integer", + "description": "フォームID" + }, + "code": { + "type": "string", + "description": "フォームコード" + }, + "name": { + "type": "string", + "description": "フォーム名称" + } + } + }, + "route": { + "type": "object", + "description": "承認ルート情報", + "properties": { + "code": { + "type": "string", + "description": "承認ルートコード" + }, + "name": { + "type": "string", + "description": "承認ルート名称" + } + } + }, + "step": { + "type": "integer", + "description": "ステップ番号" + }, + "stat": { + "type": "integer", + "description": "承認状況 (-1 は通常フォーム)" + }, + "write_datetime": { + "type": "string", + "description": "申請日時 (YYYY/MM/DD hh:mm:ss)" + }, + "update_datetime": { + "type": "string", + "description": "更新日時 (YYYY/MM/DD hh:mm:ss)" + }, + "writer": { + "type": "string", + "description": "申請者" + }, + "current_approvers": { + "type": "array", + "description": "現在ステップの承認者一覧", + "items": { + "type": "string" + } + }, + "url": { + "type": "string", + "description": "書類URL" + } + } + } + } + } + } + } + } +} diff --git a/internal/xpoint/schema.yaml b/internal/xpoint/schema.yaml deleted file mode 100644 index eb08c05..0000000 --- a/internal/xpoint/schema.yaml +++ /dev/null @@ -1,264 +0,0 @@ -# X-point API schema (xpoint-cli curated) -# -# This file is the authoritative schema for the operations that -# xpoint-cli supports. It describes actual request/response shapes -# (types reflect real API behavior, not the upstream OpenAPI spec, -# which has known bugs e.g. `form[].id` typed as string while the -# API actually returns integer). - -operations: - form.list: - method: GET - path: /api/v1/forms - summary: 利用可能フォーム一覧取得 - description: | - 認証ユーザーが利用できるフォームのフォームID・名称を - 所属グループ (グループID・グループ名) とセットで返す。 - parameters: [] - response: - type: object - properties: - form_group: - type: array - description: フォームグループ情報 (空配列になり得る) - items: - type: object - properties: - id: - type: integer - description: フォームグループID - name: - type: string - description: フォームグループ名称 - form: - type: array - description: 所属フォーム情報 - items: - type: object - properties: - id: - type: integer - description: フォームID - code: - type: string - description: フォームコード - name: - type: string - description: フォーム名称 - route: - type: array - description: 承認ルート情報 - items: - type: object - properties: - id: - type: integer - description: 承認ルートID - code: - type: string - description: 承認ルートコード (通常フォーム/自動選択ルートでは含まれない) - name: - type: string - description: 承認ルート名称 - - approval.list: - method: GET - path: /api/v1/approvals - summary: 承認待ち一覧取得 - description: 指定した承認状況タイプに該当する書類の一覧を返す。 - parameters: - - name: stat - in: query - type: integer - required: true - description: | - 承認状況タイプ。 - 10:承認待ち / 20:承認完了 / 30:申請中 / 40:差戻 / 50:取止 ほか - 詳細は X-point API ドキュメントを参照。 - - name: fgid - in: query - type: integer - description: フォームグループID で絞り込み - - name: fid - in: query - type: integer - description: フォームID で絞り込み - - name: step - in: query - type: integer - description: ステップ番号で絞り込み - - name: record_no - in: query - type: integer - description: 取得開始レコード番号 - - name: get_line - in: query - type: integer - description: 取得件数 - - name: proxy_user - in: query - type: string - description: 代理ユーザーコード - - name: filter - in: query - type: string - description: 絞り込み条件式 (例 `cr_dt between "2023-01-01" and "2023-12-31"`) - - name: show_hidden_doc - in: query - type: boolean - description: 非表示書類も含めて取得するか - response: - type: object - properties: - total_count: - type: integer - description: 該当件数 - approval_list: - type: array - items: - type: object - properties: - docid: - type: integer - description: 書類ID - hidden: - type: boolean - description: 非表示書類フラグ (show_hidden_doc=true 指定時のみ含まれる) - attachment: - type: boolean - description: 添付ファイルフラグ - comment: - type: boolean - description: コメントフラグ - title1: - type: string - description: 件名1 - title2: - type: string - description: 件名2 - form_name: - type: string - description: フォーム名称 - status: - type: string - description: ステータス名称 - display_status: - type: string - description: 画面表示ステータス名称 - apply_datetime: - type: string - description: 申請日時 (YYYY/MM/DD hh:mm:ss) - apply_user: - type: string - description: 申請者氏名 - approval_user: - type: array - description: 現在ステップの承認者一覧 - items: - type: string - lastaprv_datetime: - type: string - description: 最終更新日時 (YYYY/MM/DD hh:mm:ss) - - document.search: - method: POST - path: /api/v1/search/documents - summary: 書類検索 - description: | - 検索条件を JSON ボディで指定して書類を検索する。 - ボディは省略可 (省略時は全書類が対象)。 - parameters: - - name: size - in: query - type: integer - description: 1ページあたりの取得件数 - - name: offset - in: query - type: integer - description: 取得開始位置 - - name: page - in: query - type: integer - description: ページ番号 - requestBody: - contentType: application/json - description: | - 任意の検索条件を JSON で指定する。代表的なキー: - * title 件名1/件名2 (部分一致) - * form_name フォーム名称 (部分一致) - * fgid / fid フォームグループID / フォームID - * comment_flg コメントフラグ (0:条件なし 1:あり 2:なし) - * order 並び替え条件 (例 `-title1`) - その他の条件キーは X-point API ドキュメントを参照。 - response: - type: object - properties: - total_count: - type: integer - description: 該当件数 - items: - type: array - items: - type: object - properties: - docid: - type: integer - description: 書類ID - has_attachments: - type: boolean - description: 添付ファイルの有無 - has_comments: - type: boolean - description: コメントの有無 - title1: - type: string - description: 件名1 - title2: - type: string - description: 件名2 - form: - type: object - description: フォーム情報 - properties: - id: - type: integer - description: フォームID - code: - type: string - description: フォームコード - name: - type: string - description: フォーム名称 - route: - type: object - description: 承認ルート情報 - properties: - code: - type: string - description: 承認ルートコード - name: - type: string - description: 承認ルート名称 - step: - type: integer - description: ステップ番号 - stat: - type: integer - description: 承認状況 (-1 は通常フォーム) - write_datetime: - type: string - description: 申請日時 (YYYY/MM/DD hh:mm:ss) - update_datetime: - type: string - description: 更新日時 (YYYY/MM/DD hh:mm:ss) - writer: - type: string - description: 申請者 - current_approvers: - type: array - description: 現在ステップの承認者一覧 - items: - type: string - url: - type: string - description: 書類URL From c143d634eef12068f2d2b526ce85607f5733c145 Mon Sep 17 00:00:00 2001 From: buty4649 Date: Fri, 17 Apr 2026 13:09:54 +0900 Subject: [PATCH 5/5] Split schema into per-operation JSON files under internal/schema Each operation now lives in its own file (form.list.json, approval.list.json, document.search.json) inside the new internal/schema package. Adding or editing an endpoint no longer requires touching a monolithic schema.json. The loader uses embed.FS with `//go:embed *.json` and derives the alias name from the filename (minus the .json suffix), so new operations can be added just by dropping a JSON file. Co-Authored-By: Claude Opus 4.7 --- cmd/schema.go | 6 +- internal/schema/approval.list.json | 135 ++++++++ internal/schema/document.search.json | 130 ++++++++ internal/schema/form.list.json | 71 +++++ internal/schema/schema.go | 82 +++++ internal/{xpoint => schema}/schema_test.go | 28 +- internal/xpoint/schema.go | 66 ---- internal/xpoint/schema.json | 340 --------------------- 8 files changed, 435 insertions(+), 423 deletions(-) create mode 100644 internal/schema/approval.list.json create mode 100644 internal/schema/document.search.json create mode 100644 internal/schema/form.list.json create mode 100644 internal/schema/schema.go rename internal/{xpoint => schema}/schema_test.go (73%) delete mode 100644 internal/xpoint/schema.go delete mode 100644 internal/xpoint/schema.json diff --git a/cmd/schema.go b/cmd/schema.go index 457b5ef..28b4930 100644 --- a/cmd/schema.go +++ b/cmd/schema.go @@ -6,7 +6,7 @@ import ( "os" "strings" - "github.com/pepabo/xpoint-cli/internal/xpoint" + "github.com/pepabo/xpoint-cli/internal/schema" "github.com/spf13/cobra" ) @@ -32,13 +32,13 @@ func init() { func runSchema(_ *cobra.Command, args []string) error { if len(args) == 0 { fmt.Fprintln(os.Stdout, "Supported aliases:") - for _, a := range xpoint.SchemaAliases() { + for _, a := range schema.Aliases() { fmt.Fprintf(os.Stdout, " %s\n", a) } return nil } alias := strings.TrimSpace(args[0]) - op, err := xpoint.LookupOperation(alias) + op, err := schema.Lookup(alias) if err != nil { return err } diff --git a/internal/schema/approval.list.json b/internal/schema/approval.list.json new file mode 100644 index 0000000..c42e57a --- /dev/null +++ b/internal/schema/approval.list.json @@ -0,0 +1,135 @@ +{ + "method": "GET", + "path": "/api/v1/approvals", + "summary": "承認待ち一覧取得", + "description": "指定した承認状況タイプに該当する書類の一覧を返す。", + "parameters": [ + { + "name": "stat", + "in": "query", + "type": "integer", + "required": true, + "description": "承認状況タイプ。\n10:承認待ち / 20:承認完了 / 30:申請中 / 40:差戻 / 50:取止 ほか\n詳細は X-point API ドキュメントを参照。\n" + }, + { + "name": "fgid", + "in": "query", + "type": "integer", + "description": "フォームグループID で絞り込み" + }, + { + "name": "fid", + "in": "query", + "type": "integer", + "description": "フォームID で絞り込み" + }, + { + "name": "step", + "in": "query", + "type": "integer", + "description": "ステップ番号で絞り込み" + }, + { + "name": "record_no", + "in": "query", + "type": "integer", + "description": "取得開始レコード番号" + }, + { + "name": "get_line", + "in": "query", + "type": "integer", + "description": "取得件数" + }, + { + "name": "proxy_user", + "in": "query", + "type": "string", + "description": "代理ユーザーコード" + }, + { + "name": "filter", + "in": "query", + "type": "string", + "description": "絞り込み条件式 (例 `cr_dt between \"2023-01-01\" and \"2023-12-31\"`)" + }, + { + "name": "show_hidden_doc", + "in": "query", + "type": "boolean", + "description": "非表示書類も含めて取得するか" + } + ], + "response": { + "type": "object", + "properties": { + "total_count": { + "type": "integer", + "description": "該当件数" + }, + "approval_list": { + "type": "array", + "items": { + "type": "object", + "properties": { + "docid": { + "type": "integer", + "description": "書類ID" + }, + "hidden": { + "type": "boolean", + "description": "非表示書類フラグ (show_hidden_doc=true 指定時のみ含まれる)" + }, + "attachment": { + "type": "boolean", + "description": "添付ファイルフラグ" + }, + "comment": { + "type": "boolean", + "description": "コメントフラグ" + }, + "title1": { + "type": "string", + "description": "件名1" + }, + "title2": { + "type": "string", + "description": "件名2" + }, + "form_name": { + "type": "string", + "description": "フォーム名称" + }, + "status": { + "type": "string", + "description": "ステータス名称" + }, + "display_status": { + "type": "string", + "description": "画面表示ステータス名称" + }, + "apply_datetime": { + "type": "string", + "description": "申請日時 (YYYY/MM/DD hh:mm:ss)" + }, + "apply_user": { + "type": "string", + "description": "申請者氏名" + }, + "approval_user": { + "type": "array", + "description": "現在ステップの承認者一覧", + "items": { + "type": "string" + } + }, + "lastaprv_datetime": { + "type": "string", + "description": "最終更新日時 (YYYY/MM/DD hh:mm:ss)" + } + } + } + } + } + } +} diff --git a/internal/schema/document.search.json b/internal/schema/document.search.json new file mode 100644 index 0000000..7aae64f --- /dev/null +++ b/internal/schema/document.search.json @@ -0,0 +1,130 @@ +{ + "method": "POST", + "path": "/api/v1/search/documents", + "summary": "書類検索", + "description": "検索条件を JSON ボディで指定して書類を検索する。\nボディは省略可 (省略時は全書類が対象)。\n", + "parameters": [ + { + "name": "size", + "in": "query", + "type": "integer", + "description": "1ページあたりの取得件数" + }, + { + "name": "offset", + "in": "query", + "type": "integer", + "description": "取得開始位置" + }, + { + "name": "page", + "in": "query", + "type": "integer", + "description": "ページ番号" + } + ], + "requestBody": { + "contentType": "application/json", + "description": "任意の検索条件を JSON で指定する。代表的なキー:\n * title 件名1/件名2 (部分一致)\n * form_name フォーム名称 (部分一致)\n * fgid / fid フォームグループID / フォームID\n * comment_flg コメントフラグ (0:条件なし 1:あり 2:なし)\n * order 並び替え条件 (例 `-title1`)\nその他の条件キーは X-point API ドキュメントを参照。\n" + }, + "response": { + "type": "object", + "properties": { + "total_count": { + "type": "integer", + "description": "該当件数" + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "docid": { + "type": "integer", + "description": "書類ID" + }, + "has_attachments": { + "type": "boolean", + "description": "添付ファイルの有無" + }, + "has_comments": { + "type": "boolean", + "description": "コメントの有無" + }, + "title1": { + "type": "string", + "description": "件名1" + }, + "title2": { + "type": "string", + "description": "件名2" + }, + "form": { + "type": "object", + "description": "フォーム情報", + "properties": { + "id": { + "type": "integer", + "description": "フォームID" + }, + "code": { + "type": "string", + "description": "フォームコード" + }, + "name": { + "type": "string", + "description": "フォーム名称" + } + } + }, + "route": { + "type": "object", + "description": "承認ルート情報", + "properties": { + "code": { + "type": "string", + "description": "承認ルートコード" + }, + "name": { + "type": "string", + "description": "承認ルート名称" + } + } + }, + "step": { + "type": "integer", + "description": "ステップ番号" + }, + "stat": { + "type": "integer", + "description": "承認状況 (-1 は通常フォーム)" + }, + "write_datetime": { + "type": "string", + "description": "申請日時 (YYYY/MM/DD hh:mm:ss)" + }, + "update_datetime": { + "type": "string", + "description": "更新日時 (YYYY/MM/DD hh:mm:ss)" + }, + "writer": { + "type": "string", + "description": "申請者" + }, + "current_approvers": { + "type": "array", + "description": "現在ステップの承認者一覧", + "items": { + "type": "string" + } + }, + "url": { + "type": "string", + "description": "書類URL" + } + } + } + } + } + } +} diff --git a/internal/schema/form.list.json b/internal/schema/form.list.json new file mode 100644 index 0000000..001b30b --- /dev/null +++ b/internal/schema/form.list.json @@ -0,0 +1,71 @@ +{ + "method": "GET", + "path": "/api/v1/forms", + "summary": "利用可能フォーム一覧取得", + "description": "認証ユーザーが利用できるフォームのフォームID・名称を\n所属グループ (グループID・グループ名) とセットで返す。\n", + "parameters": [], + "response": { + "type": "object", + "properties": { + "form_group": { + "type": "array", + "description": "フォームグループ情報 (空配列になり得る)", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "フォームグループID" + }, + "name": { + "type": "string", + "description": "フォームグループ名称" + }, + "form": { + "type": "array", + "description": "所属フォーム情報", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "フォームID" + }, + "code": { + "type": "string", + "description": "フォームコード" + }, + "name": { + "type": "string", + "description": "フォーム名称" + }, + "route": { + "type": "array", + "description": "承認ルート情報", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "承認ルートID" + }, + "code": { + "type": "string", + "description": "承認ルートコード (通常フォーム/自動選択ルートでは含まれない)" + }, + "name": { + "type": "string", + "description": "承認ルート名称" + } + } + } + } + } + } + } + } + } + } + } + } +} diff --git a/internal/schema/schema.go b/internal/schema/schema.go new file mode 100644 index 0000000..fe233c6 --- /dev/null +++ b/internal/schema/schema.go @@ -0,0 +1,82 @@ +// Package schema serves xpoint-cli's curated operation schemas. +// Each supported operation is stored as its own JSON file in this +// directory (e.g. form.list.json) and embedded into the binary. +package schema + +import ( + "embed" + "encoding/json" + "fmt" + "io/fs" + "sort" + "strings" + "sync" +) + +//go:embed *.json +var files embed.FS + +var ( + loadOnce sync.Once + ops map[string]map[string]any + aliases []string + loadErr error +) + +func load() (map[string]map[string]any, []string, error) { + loadOnce.Do(func() { + entries, err := fs.ReadDir(files, ".") + if err != nil { + loadErr = fmt.Errorf("read embedded schema dir: %w", err) + return + } + ops = make(map[string]map[string]any, len(entries)) + for _, e := range entries { + if e.IsDir() || !strings.HasSuffix(e.Name(), ".json") { + continue + } + alias := strings.TrimSuffix(e.Name(), ".json") + data, err := fs.ReadFile(files, e.Name()) + if err != nil { + loadErr = fmt.Errorf("read %s: %w", e.Name(), err) + return + } + var m map[string]any + if err := json.Unmarshal(data, &m); err != nil { + loadErr = fmt.Errorf("parse %s: %w", e.Name(), err) + return + } + ops[alias] = m + } + aliases = make([]string, 0, len(ops)) + for k := range ops { + aliases = append(aliases, k) + } + sort.Strings(aliases) + }) + return ops, aliases, loadErr +} + +// Aliases returns the sorted list of supported dotted aliases. +func Aliases() []string { + _, a, err := load() + if err != nil { + return nil + } + out := make([]string, len(a)) + copy(out, a) + return out +} + +// Lookup returns the schema object for the given alias. +func Lookup(alias string) (map[string]any, error) { + o, _, err := load() + if err != nil { + return nil, err + } + op, ok := o[alias] + if !ok { + return nil, fmt.Errorf("unknown schema alias %q (run `xp schema` to list supported aliases)", alias) + } + return op, nil +} diff --git a/internal/xpoint/schema_test.go b/internal/schema/schema_test.go similarity index 73% rename from internal/xpoint/schema_test.go rename to internal/schema/schema_test.go index 4392f33..f702b85 100644 --- a/internal/xpoint/schema_test.go +++ b/internal/schema/schema_test.go @@ -1,12 +1,12 @@ -package xpoint +package schema import ( "strings" "testing" ) -func TestSchemaAliases_Sorted(t *testing.T) { - got := SchemaAliases() +func TestAliases_Sorted(t *testing.T) { + got := Aliases() want := []string{"approval.list", "document.search", "form.list"} if len(got) != len(want) { t.Fatalf("aliases = %v", got) @@ -18,17 +18,17 @@ func TestSchemaAliases_Sorted(t *testing.T) { } } -func TestLookupOperation_Unknown(t *testing.T) { - _, err := LookupOperation("nope.missing") +func TestLookup_Unknown(t *testing.T) { + _, err := Lookup("nope.missing") if err == nil || !strings.Contains(err.Error(), "unknown schema alias") { t.Errorf("err = %v", err) } } -func TestLookupOperation_FormList(t *testing.T) { - op, err := LookupOperation("form.list") +func TestLookup_FormList(t *testing.T) { + op, err := Lookup("form.list") if err != nil { - t.Fatalf("LookupOperation: %v", err) + t.Fatalf("Lookup: %v", err) } if op["method"] != "GET" { t.Errorf("method = %v", op["method"]) @@ -51,10 +51,10 @@ func TestLookupOperation_FormList(t *testing.T) { } } -func TestLookupOperation_ApprovalList_RequiredStat(t *testing.T) { - op, err := LookupOperation("approval.list") +func TestLookup_ApprovalList_RequiredStat(t *testing.T) { + op, err := Lookup("approval.list") if err != nil { - t.Fatalf("LookupOperation: %v", err) + t.Fatalf("Lookup: %v", err) } params, _ := op["parameters"].([]any) if len(params) == 0 { @@ -66,10 +66,10 @@ func TestLookupOperation_ApprovalList_RequiredStat(t *testing.T) { } } -func TestLookupOperation_DocumentSearch(t *testing.T) { - op, err := LookupOperation("document.search") +func TestLookup_DocumentSearch(t *testing.T) { + op, err := Lookup("document.search") if err != nil { - t.Fatalf("LookupOperation: %v", err) + t.Fatalf("Lookup: %v", err) } if op["method"] != "POST" { t.Errorf("method = %v", op["method"]) diff --git a/internal/xpoint/schema.go b/internal/xpoint/schema.go deleted file mode 100644 index dcb9036..0000000 --- a/internal/xpoint/schema.go +++ /dev/null @@ -1,66 +0,0 @@ -package xpoint - -import ( - _ "embed" - "encoding/json" - "fmt" - "sort" - "sync" -) - -//go:embed schema.json -var schemaJSON []byte - -var ( - schemaOnce sync.Once - schemaOps map[string]any - schemaOpsKeys []string - schemaErr error -) - -func loadSchema() (map[string]any, []string, error) { - schemaOnce.Do(func() { - var root map[string]any - if err := json.Unmarshal(schemaJSON, &root); err != nil { - schemaErr = fmt.Errorf("parse embedded schema.json: %w", err) - return - } - ops, ok := root["operations"].(map[string]any) - if !ok { - schemaErr = fmt.Errorf("schema.json is missing `operations` mapping") - return - } - keys := make([]string, 0, len(ops)) - for k := range ops { - keys = append(keys, k) - } - sort.Strings(keys) - schemaOps = ops - schemaOpsKeys = keys - }) - return schemaOps, schemaOpsKeys, schemaErr -} - -// SchemaAliases returns the sorted list of supported dotted aliases. -func SchemaAliases() []string { - _, keys, err := loadSchema() - if err != nil { - return nil - } - out := make([]string, len(keys)) - copy(out, keys) - return out -} - -// LookupOperation returns the schema object for the given alias. -func LookupOperation(alias string) (map[string]any, error) { - ops, _, err := loadSchema() - if err != nil { - return nil, err - } - op, ok := ops[alias].(map[string]any) - if !ok { - return nil, fmt.Errorf("unknown schema alias %q (run `xp schema` to list supported aliases)", alias) - } - return op, nil -} diff --git a/internal/xpoint/schema.json b/internal/xpoint/schema.json deleted file mode 100644 index a320550..0000000 --- a/internal/xpoint/schema.json +++ /dev/null @@ -1,340 +0,0 @@ -{ - "operations": { - "form.list": { - "method": "GET", - "path": "/api/v1/forms", - "summary": "利用可能フォーム一覧取得", - "description": "認証ユーザーが利用できるフォームのフォームID・名称を\n所属グループ (グループID・グループ名) とセットで返す。\n", - "parameters": [], - "response": { - "type": "object", - "properties": { - "form_group": { - "type": "array", - "description": "フォームグループ情報 (空配列になり得る)", - "items": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "フォームグループID" - }, - "name": { - "type": "string", - "description": "フォームグループ名称" - }, - "form": { - "type": "array", - "description": "所属フォーム情報", - "items": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "フォームID" - }, - "code": { - "type": "string", - "description": "フォームコード" - }, - "name": { - "type": "string", - "description": "フォーム名称" - }, - "route": { - "type": "array", - "description": "承認ルート情報", - "items": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "承認ルートID" - }, - "code": { - "type": "string", - "description": "承認ルートコード (通常フォーム/自動選択ルートでは含まれない)" - }, - "name": { - "type": "string", - "description": "承認ルート名称" - } - } - } - } - } - } - } - } - } - } - } - } - }, - "approval.list": { - "method": "GET", - "path": "/api/v1/approvals", - "summary": "承認待ち一覧取得", - "description": "指定した承認状況タイプに該当する書類の一覧を返す。", - "parameters": [ - { - "name": "stat", - "in": "query", - "type": "integer", - "required": true, - "description": "承認状況タイプ。\n10:承認待ち / 20:承認完了 / 30:申請中 / 40:差戻 / 50:取止 ほか\n詳細は X-point API ドキュメントを参照。\n" - }, - { - "name": "fgid", - "in": "query", - "type": "integer", - "description": "フォームグループID で絞り込み" - }, - { - "name": "fid", - "in": "query", - "type": "integer", - "description": "フォームID で絞り込み" - }, - { - "name": "step", - "in": "query", - "type": "integer", - "description": "ステップ番号で絞り込み" - }, - { - "name": "record_no", - "in": "query", - "type": "integer", - "description": "取得開始レコード番号" - }, - { - "name": "get_line", - "in": "query", - "type": "integer", - "description": "取得件数" - }, - { - "name": "proxy_user", - "in": "query", - "type": "string", - "description": "代理ユーザーコード" - }, - { - "name": "filter", - "in": "query", - "type": "string", - "description": "絞り込み条件式 (例 `cr_dt between \"2023-01-01\" and \"2023-12-31\"`)" - }, - { - "name": "show_hidden_doc", - "in": "query", - "type": "boolean", - "description": "非表示書類も含めて取得するか" - } - ], - "response": { - "type": "object", - "properties": { - "total_count": { - "type": "integer", - "description": "該当件数" - }, - "approval_list": { - "type": "array", - "items": { - "type": "object", - "properties": { - "docid": { - "type": "integer", - "description": "書類ID" - }, - "hidden": { - "type": "boolean", - "description": "非表示書類フラグ (show_hidden_doc=true 指定時のみ含まれる)" - }, - "attachment": { - "type": "boolean", - "description": "添付ファイルフラグ" - }, - "comment": { - "type": "boolean", - "description": "コメントフラグ" - }, - "title1": { - "type": "string", - "description": "件名1" - }, - "title2": { - "type": "string", - "description": "件名2" - }, - "form_name": { - "type": "string", - "description": "フォーム名称" - }, - "status": { - "type": "string", - "description": "ステータス名称" - }, - "display_status": { - "type": "string", - "description": "画面表示ステータス名称" - }, - "apply_datetime": { - "type": "string", - "description": "申請日時 (YYYY/MM/DD hh:mm:ss)" - }, - "apply_user": { - "type": "string", - "description": "申請者氏名" - }, - "approval_user": { - "type": "array", - "description": "現在ステップの承認者一覧", - "items": { - "type": "string" - } - }, - "lastaprv_datetime": { - "type": "string", - "description": "最終更新日時 (YYYY/MM/DD hh:mm:ss)" - } - } - } - } - } - } - }, - "document.search": { - "method": "POST", - "path": "/api/v1/search/documents", - "summary": "書類検索", - "description": "検索条件を JSON ボディで指定して書類を検索する。\nボディは省略可 (省略時は全書類が対象)。\n", - "parameters": [ - { - "name": "size", - "in": "query", - "type": "integer", - "description": "1ページあたりの取得件数" - }, - { - "name": "offset", - "in": "query", - "type": "integer", - "description": "取得開始位置" - }, - { - "name": "page", - "in": "query", - "type": "integer", - "description": "ページ番号" - } - ], - "requestBody": { - "contentType": "application/json", - "description": "任意の検索条件を JSON で指定する。代表的なキー:\n * title 件名1/件名2 (部分一致)\n * form_name フォーム名称 (部分一致)\n * fgid / fid フォームグループID / フォームID\n * comment_flg コメントフラグ (0:条件なし 1:あり 2:なし)\n * order 並び替え条件 (例 `-title1`)\nその他の条件キーは X-point API ドキュメントを参照。\n" - }, - "response": { - "type": "object", - "properties": { - "total_count": { - "type": "integer", - "description": "該当件数" - }, - "items": { - "type": "array", - "items": { - "type": "object", - "properties": { - "docid": { - "type": "integer", - "description": "書類ID" - }, - "has_attachments": { - "type": "boolean", - "description": "添付ファイルの有無" - }, - "has_comments": { - "type": "boolean", - "description": "コメントの有無" - }, - "title1": { - "type": "string", - "description": "件名1" - }, - "title2": { - "type": "string", - "description": "件名2" - }, - "form": { - "type": "object", - "description": "フォーム情報", - "properties": { - "id": { - "type": "integer", - "description": "フォームID" - }, - "code": { - "type": "string", - "description": "フォームコード" - }, - "name": { - "type": "string", - "description": "フォーム名称" - } - } - }, - "route": { - "type": "object", - "description": "承認ルート情報", - "properties": { - "code": { - "type": "string", - "description": "承認ルートコード" - }, - "name": { - "type": "string", - "description": "承認ルート名称" - } - } - }, - "step": { - "type": "integer", - "description": "ステップ番号" - }, - "stat": { - "type": "integer", - "description": "承認状況 (-1 は通常フォーム)" - }, - "write_datetime": { - "type": "string", - "description": "申請日時 (YYYY/MM/DD hh:mm:ss)" - }, - "update_datetime": { - "type": "string", - "description": "更新日時 (YYYY/MM/DD hh:mm:ss)" - }, - "writer": { - "type": "string", - "description": "申請者" - }, - "current_approvers": { - "type": "array", - "description": "現在ステップの承認者一覧", - "items": { - "type": "string" - } - }, - "url": { - "type": "string", - "description": "書類URL" - } - } - } - } - } - } - } - } -}