API リファレンス
アプリの添付ファイル
アプリの添付ファイルの一覧と件数を取得し、アップロード済みの分割データを結合し、添付ファイルへの参照を解放します。
型定義
graphql
type Mutation {
mergeAppFileChunks(fileId: String!, totalChunks: Int!, fileName: String!, totalSize: Long!): MergeTask!
releaseAppFile(fileId: String!): Boolean!
}
type Query {
appFileCount(query: String!): Int!
appFiles(query: String!, offset: Int!, limit: Int!): [AppFile!]!
}
type AppFile {
id: String!
size: Long!
mimeType: String!
fileName: String!
realPath: String!
createdAt: Instant!
updatedAt: Instant!
}
scalar Instant
scalar Long
type MergeTask {
status: MergeTaskStatus!
value: String
mergedSize: Long
error: String
}
enum MergeTaskStatus {
NONE
STARTED
MERGING
DONE
FAILED
}操作
mutation
mergeAppFileChunks
アップロード済みチャンクをアプリ管理の添付ファイルにマージし始めます。完了は mergeStatus で確認します。
graphql
mutation mergeAppFileChunks($fileId: String!, $totalChunks: Int!, $fileName: String!, $totalSize: Long!) {
mergeAppFileChunks(fileId: $fileId, totalChunks: $totalChunks, fileName: $fileName, totalSize: $totalSize) { status value mergedSize error }
}mutation
releaseAppFile
指定したアプリ管理の添付参照を解放します。
graphql
mutation releaseAppFile($fileId: String!) {
releaseAppFile(fileId: $fileId)
}query
appFileCount
クエリに一致するアプリ管理の添付レコード数を数えます。
graphql
query appFileCount($query: String!) {
appFileCount(query: $query)
}query
appFiles
クエリに一致するアプリ管理の添付レコードをページ単位で読み取ります。
graphql
query appFiles($query: String!, $offset: Int!, $limit: Int!) {
appFiles(query: $query, offset: $offset, limit: $limit) { id size mimeType fileName realPath createdAt updatedAt }
}