...
The following endpoints can be invoked with the prefix collaborations
as follows:
Code Block |
---|
box://collaborations/endpoint?[options] |
...
The following endpoints can be invoked with the prefix events
as follows:
Code Block |
---|
box://events/endpoint?[options] |
...
The following endpoints can be invoked with the prefix groups
as follows:
Code Block |
---|
box://groups/endpoint?[options] |
...
The following endpoints can be invoked with the prefix search
as follows:
Code Block |
---|
box://search/endpoint?[options] |
...
The following endpoints can be invoked with the prefix comments or shared-comments
as follows. The shared-comments prefix requires a sharedLink and sharedPassword properties.
Code Block |
---|
box://comments/endpoint?[options] box://shared-comments/endpoint?[options] |
...
The following endpoints can be invoked with the prefix files
or shared-files
as follows. The shared-files
prefix requires a sharedLink and sharedPassword properties.
Code Block |
---|
box://files/endpoint?[options] box://shared-files/endpoint?[options] |
...
URI Options for files and shared-files
...
Name | Type |
---|---|
defaultRequest | com.box.restclientv2.requestsbase.BoxDefaultRequestObject |
destination | java.io.File |
extension | String |
fileId | String |
fileRequest | com.box.boxjavalibv2.requests.requestobjects.BoxFileRequestObject |
fileUploadRequest | com.box.restclientv2.requestsbase.BoxFileUploadRequestObject |
imageRequest | com.box.boxjavalibv2.requests.requestobjects.BoxImageRequestObject |
itemCopyRequest | com.box.boxjavalibv2.requests.requestobjects.BoxItemCopyRequestObject |
listener | com.box.boxjavalibv2.filetransfer.IFileTransferListener |
outputStreams | java.io.OutputStream[] |
sharedLinkRequest | com.box.boxjavalibv2.requests.requestobjects.BoxSharedLinkRequestObject |
Endpoint Prefix folders and shared-folders
The following endpoints can be invoked with the prefix folders
or shared-folders
as follows. The prefix shared-folders requires sharedLink and sharedPassword properties.
Code Block |
---|
box://folders/endpoint?[options] box://shared-folders/endpoint?[options] |
Endpoint | Shorthand Alias | Options | Result Body Type |
---|---|---|---|
copyFolder | folderId, itemCopyRequest | com.box.boxjavalibv2.dao.BoxFolder | |
createFolder | create | folderRequest | com.box.boxjavalibv2.dao.BoxFolder |
createSharedLink | create | folderId, sharedLinkRequest | com.box.boxjavalibv2.dao.BoxFolder |
deleteFolder | delete | folderDeleteRequest, folderId | |
getFolder | folder | defaultRequest, folderId | com.box.boxjavalibv2.dao.BoxFolder |
getFolderCollaborations | folderCollaborations | defaultRequest, folderId | java.util.List |
getFolderItems | folderItems | folderId, pagingRequest | com.box.boxjavalibv2.dao.BoxCollection |
updateFolderInfo | update | folderId, folderRequest | com.box.boxjavalibv2.dao.BoxFolder |
URI Options
...
for folders or shared-folders
...
Name | Type |
---|---|
defaultRequest | com.box.restclientv2. |
If a value is not provided for one of the option(s) [defaultRequest] either in the endpoint URI or in a message header, it will be assumed to be null
. Note that the null
value(s) will only be used if other options do not satisfy matching endpoints.
Name | Type |
---|---|
defaultRequest | com.box.restclientv2.requestsbase.BoxDefaultRequestObject |
folderDeleteRequest | com.box.boxjavalibv2.requests.requestobjects.BoxFolderDeleteRequestObject |
folderId | String |
folderRequest | com.box.boxjavalibv2.requests.requestobjects.BoxFolderRequestObject |
itemCopyRequest | com.box.boxjavalibv2.requests.requestobjects.BoxItemCopyRequestObject |
pagingRequest | com.box.boxjavalibv2.requests.requestobjects.BoxPagingRequestObject |
sharedLinkRequest | com.box.boxjavalibv2.requests.requestobjects.BoxSharedLinkRequestObject |
...
Endpoint Prefix shared-items
The following endpoints can be invoked with the prefix shared-items
as follows:
Code Block |
---|
...
|
...
box://shared-items/endpoint?[options] |
...
Endpoint | Shorthand Alias | Options | Result Body Type |
---|---|---|---|
getSharedItem | sharedItem | defaultRequest | com.box.boxjavalibv2.dao.BoxItem |
URI Options for shared-items
...
Name | Type |
---|---|
defaultRequest | com. |
If a value is not provided for one of the option(s) [defaultRequest] either in the endpoint URI or in a message header, it will be assumed to be null
. Note that the null
value(s) will only be used if other options do not satisfy matching endpoints.
Name | Type |
---|---|
defaultRequest | com.box.restclientv2.requestsbase.BoxDefaultRequestObject |
...
Endpoint Prefix users
The following endpoints can be invoked with the prefix users
as follows:
...
Code Block |
---|
box://users/endpoint?[options] |
...
Endpoint | Shorthand Alias | Options | Result Body Type |
---|---|---|---|
addEmailAlias | emailAliasRequest, userId | com.box.boxjavalibv2.dao.BoxEmailAlias | |
createEnterpriseUser | create | userRequest | com.box.boxjavalibv2.dao.BoxUser |
deleteEmailAlias | defaultRequest, emailId, userId | ||
deleteEnterpriseUser | userDeleteRequest, userId | ||
getAllEnterpriseUser | allEnterpriseUser | defaultRequest, filterTerm | java.util.List |
getCurrentUser | currentUser | defaultRequest | com.box.boxjavalibv2.dao.BoxUser |
getEmailAliases | emailAliases | defaultRequest, userId | java.util.List |
moveFolderToAnotherUser | folderId, simpleUserRequest, userId | com.box.boxjavalibv2.dao.BoxFolder | |
updateUserInformaiton | update | userId, userRequest | com.box.boxjavalibv2.dao.BoxUser |
updateUserPrimaryLogin | update | userId, userUpdateLoginRequest | com.box.boxjavalibv2.dao.BoxUser |
URI Options for users
...
Name | Type |
---|---|
defaultRequest | com.box.restclientv2. |
If a value is not provided for one of the option(s) [defaultRequest] either in the endpoint URI or in a message header, it will be assumed to be null
. Note that the null
value(s) will only be used if other options do not satisfy matching endpoints.
Name | Type |
---|---|
defaultRequest | com.box.restclientv2.requestsbase.BoxDefaultRequestObject |
emailAliasRequest | com.box.boxjavalibv2.requests.requestobjects.BoxEmailAliasRequestObject |
emailId | String |
filterTerm | String |
folderId | String |
simpleUserRequest | com.box.boxjavalibv2.requests.requestobjects.BoxSimpleUserRequestObject |
userDeleteRequest | com.box.boxjavalibv2.requests.requestobjects.BoxUserDeleteRequestObject |
userId | String |
userRequest | com.box.boxjavalibv2.requests.requestobjects.BoxUserRequestObject |
userUpdateLoginRequest | com.box.boxjavalibv2.requests.requestobjects.BoxUserUpdateLoginRequestObject |
...
Consumer endpoints can only use the endpoint prefix poll-events as shown in the example next. By default the consumer will split the com.box.boxjavalibv2.dao.BoxEventCollection from every long poll and create an exchange for every com.box.boxjavalibv2.dao.BoxEvent. To make the consumer return the entire collection in a single exchange, use the URI option consumer.splitResult=false.
Code Block |
---|
box://poll-events/endpoint?[options] |
...
Name | Type |
---|---|
limit | Integer |
streamPosition | Long |
streamType | String |
splitResult | boolean |
Message header
Any of the URI options#urioptions can options can be provided in a message header for producer endpoints with CamelFacebookCamelBox. prefix.
Message body
All result message bodies utilize objects provided by the Facebook4J APIBox Java SDK. Producer endpoints can specify the option name for incoming message body in the inBody endpoint parameter.
For endpoints that return an array, or facebook4j.ResponseList, or java.util.List, a consumer endpoint will map every elements in the list to distinct messages.
Use cases
Type Converter
The Box component also provides a Camel type converter to convert GenericFile objects from File component to a com.box.restclientv2.requestsbase.BoxFileUploadRequestObject to upload a new file to Box.com. The target folderId for the upload can be specified in the header property CamelBox.folderId. If not specified the it defaults to 0 for the root folder.
Use cases
The following route uploads new files to the Box.com root folderTo create a post within your Facebook profile, send this producer a facebook4j.PostUpdate body.
Code Block |
---|
from("directfile:foo...") .to("facebookbox://files/postFeedupload/inBody=postUpdatefileUploadRequest); |
To poll, every 5 sec., all statuses on your home feedyour account for updates:
Code Block |
---|
from("facebookbox://home?delay=5poll-events?") .to("bean:blah"); |
Searching using a producer with dynamic options from header.
...