53.5. 生产者端点:


生产者端点可以使用端点前缀,后跟端点名称和关联的选项。可以将简写别名用于某些端点。端点 URI MUST 包含前缀。

不是强制的端点选项由 [] 表示。当端点没有强制选项时,必须提供其中一组 [] 选项。生成者端点也可以使用特殊选项 inBody,它应包含端点选项的名称,其值将包含在 Camel Exchange In 消息中。

任何端点选项都可以在端点 URI 中提供,或者在消息标头中动态提供。消息标头名称必须是 CamelBox.<option> 格式。请注意,inBody 选项会覆盖消息标头,即 Body=option 中的端点 选项会覆盖 CamelBox.option 标头。

如果没有为端点 URI 或消息标头中为 option defaultRequest 提供值,则会假定为 null。请注意,只有其他选项无法满足匹配端点时,才会使用 null 值。

如果是 Box API 错误,端点将引发一个 RuntimeCamelException,并带有 com.box.sdk.BoxAPIException 派生异常原因。

53.5.1. 端点 前缀协作

有关 Box 协作的更多信息,请参阅 https://developer.box.com/reference#collaboration-object。以下端点可以通过前缀 协作调用, 如下所示:

box:collaborations/endpoint?[options]
端点简写别名选项结果正文类型

addFolderCollaboration

add

folderId, collaborator, role

com.box.sdk.BoxCollaboration

addFolderCollaborationByEmail

addByEmail

folderId, email, role

com.box.sdk.BoxCollaboration

deleteCollaboration

delete

collaborationId

 

getFolderCollaborations

协作

folderId

java.util.Collection

getPendingCollaborations

pendingCollaborations

 

java.util.Collection

getCollaborationInfo

info

collaborationId

com.box.sdk.BoxCollaboration.Info

updateCollaborationInfo

updateInfo

collaborationId, info

com.box.sdk.BoxCollaboration

协作的 URI 选项

Name类型

collaborationId

字符串

collaborator

com.box.sdk.BoxCollaborator

role

com.box.sdk.BoxCollaboration.Role

folderId

字符串

email

字符串

info

com.box.sdk.BoxCollaboration.Info

53.5.2. 端点前缀 注释

有关 Box 注释的更多信息,请参阅 https://developer.box.com/reference#comment-object。以下端点可以通过前缀 注释 调用,如下所示:

box:comments/endpoint?[options]
端点简写别名选项结果正文类型

addFileComment

add

fileId, message

com.box.sdk.BoxFile

changeCommentMessage

updateMessage

commentId, message

com.box.sdk.BoxComment

deleteComment

delete

commentId

 

getCommentInfo

info

commentId

com.box.sdk.BoxComment.Info

getFileComments

注释

fileId

java.util.List

replyToComment

回复

commentId, message

com.box.sdk.BoxComment

协作的 URI 选项

Name类型

commentId

字符串

fileId

字符串

message

字符串

53.5.3. 端点前缀 events-logs

有关 Box 事件日志的更多信息,请参阅 https://developer.box.com/reference#events。以下端点可以通过前缀 event-logs 调用,如下所示:

box:event-logs/endpoint?[options]
端点简写别名选项结果正文类型

getEnterpriseEvents

events

position, after, before, [types]

java.util.List

event-logs的 URI 选项

Name类型

position

字符串

after

Date

before

Date

类型

com.box.sdk.BoxEvent.Types[]

53.5.4. 端点前缀 文件

有关 Box 文件的更多信息,请参阅 https://developer.box.com/reference#file-object。以下端点可以通过前缀 文件 调用,如下所示:

box:files/endpoint?[options]
端点简写别名选项结果正文类型

uploadFile

上传

parentFolderId, content, fileName, [created], [modified], [size], [listener]

com.box.sdk.BoxFile

downloadFile

下载

fileId, output, [rangeStart], [rangeEnd], [listener]

java.io.OutputStream

copyFile

复制

fileId, destinationFolderId, [newName]

com.box.sdk.BoxFile

moveFile

Move

fileId, destinationFolderId, [newName]

com.box.sdk.BoxFile

renameFile

rename

fileId, newFileName

com.box.sdk.BoxFile

createFileSharedLink

link

fileId, access, [unshareDate], [permissions]

com.box.sdk.BoxSharedLink

deleteFile

delete

fileId

 

uploadNewFileVersion

uploadVersion

fileId, fileContent, [modified], [fileSize], [listener]

com.box.boxsdk.BoxFile

promoteFileVersion

promoteVersion

fileId, version

com.box.sdk.BoxFileVersion

getFileVersions

版本

fileId

java.util.Collection

downloadPreviousFileVersions

downloadVersion

fileId, version, output, [listener]

java.io.OutputStream

deleteFileVersion

deleteVersion

fileId, version

 

getFileInfo

info

fileId, fields

com.box.sdk.BoxFile.Info

updateFileInfo

updateInfo

fileId, info

com.box.sdk.BoxFile

createFileMetadata

createMetadata

fileId, metadata, [typeName]

com.box.sdk.Metadata

getFileMetadata

metadata

fileId, [typeName]

com.box.sdk.Metadata

updateFileMetadata

updateMetadata

fileId, metadata

com.box.sdk.Metadata

deleteFileMetadata

deleteMetadata

fileId

 

getDownloadUrl

url

fileId

java.net.URL

getPreviewLink

预览

fileId

java.net.URL

getFileThumbnail

thumbnail

fileId, fileType, minWidth, minHeight, maxWidth, maxHeight

byte[]

文件的URI 选项

Name类型

parentFolderId

字符串

content

java.io.InputStream

fileName

字符串

created

Date

modified

Date

size

Long

listener

com.box.sdk.ProgressListener

output

java.io.OutputStream

rangeStart

Long

rangeEnd

Long

outputStreams

java.io.OutputStream[]

destinationFolderId

字符串

newName

字符串

fields

string[]

info

com.box.sdk.BoxFile.Info

fileSize

Long

version

整数

access

com.box.sdk.BoxSharedLink.Access

unshareDate

Date

权限

com.box.sdk.BoxSharedLink.Permissions

fileType

com.box.sdk.BoxFile.ThumbnailFileType

minWidth

整数

minHeight

整数

maxWidth

整数

maxHeight

整数

metadata

com.box.sdk.Metadata

typeName

字符串

53.5.5. 端点前缀 文件夹

有关 Box 文件夹的更多信息,请参阅 https://developer.box.com/reference#folder-object。以下端点可以通过前缀 文件夹 调用,如下所示:

box:folders/endpoint?[options]
端点简写别名选项结果正文类型

getRootFolder

root

 

com.box.sdk.BoxFolder

createFolder

create

parentFolderId, folderName

com.box.sdk.BoxFolder

createFolder

create

parentFolderId, path

com.box.sdk.BoxFolder

copyFolder

复制

folderId, destinationfolderId, [newName]

com.box.sdk.BoxFolder

moveFolder

Move

folderId, destinationFolderId, newName

com.box.sdk.BoxFolder

renameFolder

rename

folderId, newFolderName

com.box.sdk.BoxFolder

createFolderSharedLink

link

folderId, access, [unsharedDate], [permissions]

java.util.List

deleteFolder

delete

folderId

 

getFolder

folder

path

com.box.sdk.BoxFolder

getFolderInfo

info

folderId, fields

com.box.sdk.BoxFolder.Info

getFolderItems

items

folderId, offset, limit, fields

java.util.List

updateFolderInfo

updateInfo

folderId, info

com.box.sdk.BoxFolder

文件夹的 URI 选项

Name类型

path

string[]

folderId

字符串

offset

Long

limit

Long

fields

string[]

parentFolderId

字符串

folderName

字符串

destinationFolderId

字符串

newName

字符串

newFolderName

字符串

info

字符串

access

com.box.sdk.BoxSharedLink.Access

unshareDate

Date

权限

com.box.sdk.BoxSharedLink.Permissions

53.5.6. 端点前缀

有关 Box 组的更多信息,请参阅 https://developer.box.com/reference#group-object。以下端点可以通过前缀 调用,如下所示:

box:groups/endpoint?[options]
端点简写别名选项结果正文类型

createGroup

create

Name, [provenance, externalSyncIdentifier, description, invitabilityLevel, memberViewabilityLevel]

com.box.sdk.BoxGroup

addGroupMembership

createMembership

GroupId, userId, role

com.box.sdk.BoxGroupMembership

deleteGroup

delete

groupId

 

getAllGroups

groups

 

java.util.Collection

getGroupInfo

info

groupId

com.box.sdk.BoxGroup.Info

updateGroupInfo

updateInfo

groupId, groupInfo

com.box.sdk.BoxGroup

addGroupMembership

addMembership

GroupId, userId, role

com.box.sdk.BoxGroupMembership

deleteGroupMembership

deleteMembership

groupMembershipId

 

getGroupMemberships

成员资格

groupId

java.uti.Collection

getGroupMembershipInfo

membershipInfo

groupMemebershipId

com.box.sdk.BoxGroup.Info

updateGroupMembershipInfo

updateMembershipInfo

groupMemebershipId, info

com.box.sdk.BoxGroupMembership

组的URI 选项

Name类型

name

字符串

groupId

字符串

userId

字符串

role

com.box.sdk.BoxGroupMembership.Role

groupMembershipId

字符串

info

com.box.sdk.BoxGroupMembership.Info

53.5.7. 端点前缀 搜索

有关 Box 搜索 API 的更多信息,请参阅 https://developer.box.com/reference#searching-for-content。以下端点可以通过前缀 搜索 来调用,如下所示:

box:search/endpoint?[options]
端点简写别名选项结果正文类型

searchFolder

search

folderId, query

java.util.Collection

搜索的 URI 选项

Name类型

folderId

字符串

query

字符串

53.5.8. 端点前缀 任务

有关 Box 任务的详情,请参考 https://developer.box.com/reference#task-object-1。以下端点可以通过前缀 任务 调用:

box:tasks/endpoint?[options]
端点简写别名选项结果正文类型

addFileTask

add

fileId, action, dueAt, [message]

com.box.sdk.BoxUser

deleteTask

delete

taskId

 

getFileTasks

tasks

fileId

java.util.List

getTaskInfo

info

taskId

com.box.sdk.BoxTask.Info

updateTaskInfo

updateInfo

TaskID, info

com.box.sdk.BoxTask

addAssignmentToTask

addAssignment

taskId, assignTo

com.box.sdk.BoxTask

deleteTaskAssignment

deleteAssignment

taskAssignmentId

 

getTaskAssignments

分配

taskId

java.util.List

getTaskAssignmentInfo

assignmentInfo

taskAssignmentId

com.box.sdk.BoxTaskAssignment.Info

任务的URI 选项

Name类型

fileId

字符串

action

com.box.sdk.BoxTask.Action

dueAt

Date

message

字符串

taskId

字符串

info

com.box.sdk.BoxTask.Info

assignTo

com.box.sdk.BoxUser

taskAssignmentId

字符串

53.5.9. 端点前缀 用户

有关 Box 用户的详情,请参考 https://developer.box.com/reference#user-object。以下端点可以通过前缀 用户 调用,如下所示:

box:users/endpoint?[options]
端点简写别名选项结果正文类型

getCurrentUser

currentUser

 

com.box.sdk.BoxUser

getAllEnterpriseOrExternalUsers

users

filterTerm, [fields]

com.box.sdk.BoxUser

createAppUser

create

Name, [params]

com.box.sdk.BoxUser

createEnterpriseUser

create

login, name, [params]

com.box.sdk.BoxUser

deleteUser

delete

userId, notifyUser, force

 

getUserEmailAlias

emailAlias

userId

com.box.sdk.BoxUser

deleteUserEmailAlias

deleteEmailAlias

userId, emailAliasId

java.util.List

getUserInfo

info

userId

com.box.sdk.BoxUser.Info

updateUserInfo

updateInfo

userId, info

com.box.sdk.BoxUser

moveFolderToUser

-

userId, sourceUserId

com.box.sdk.BoxFolder.Info

用户的URI 选项

Name类型

defaultRequest

com.box.restclientv2.requestsbase.BoxDefaultRequestObject

emailAliasRequest

com.box.boxjavalibv2.requests.requestobjects.BoxEmailAliasRequestObject

emailId

字符串

filterTerm

字符串

folderId

字符串

simpleUserRequest

com.box.boxjavalibv2.requests.requestobjects.BoxSimpleUserRequestObject

userDeleteRequest

com.box.boxjavalibv2.requests.requestobjects.BoxUserDeleteRequestObject

userId

字符串

userRequest

com.box.boxjavalibv2.requests.requestobjects.BoxUserRequestObject

userUpdateLoginRequest

com.box.boxjavalibv2.requests.requestobjects.BoxUserUpdateLoginRequestObject

Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.