Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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

...

NameType
defaultRequestcom.box.restclientv2.requestsbase.BoxDefaultRequestObject
destinationjava.io.File
extensionString
fileIdString
fileRequestcom.box.boxjavalibv2.requests.requestobjects.BoxFileRequestObject
fileUploadRequestcom.box.restclientv2.requestsbase.BoxFileUploadRequestObject
imageRequestcom.box.boxjavalibv2.requests.requestobjects.BoxImageRequestObject
itemCopyRequestcom.box.boxjavalibv2.requests.requestobjects.BoxItemCopyRequestObject
listenercom.box.boxjavalibv2.filetransfer.IFileTransferListener
outputStreamsjava.io.OutputStream[]
sharedLinkRequestcom.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]
EndpointShorthand AliasOptionsResult Body Type
copyFolder folderId, itemCopyRequestcom.box.boxjavalibv2.dao.BoxFolder
createFoldercreatefolderRequestcom.box.boxjavalibv2.dao.BoxFolder
createSharedLinkcreatefolderId, sharedLinkRequestcom.box.boxjavalibv2.dao.BoxFolder
deleteFolderdeletefolderDeleteRequest, folderId 
getFolderfolderdefaultRequest, folderIdcom.box.boxjavalibv2.dao.BoxFolder
getFolderCollaborationsfolderCollaborationsdefaultRequest, folderIdjava.util.List
getFolderItemsfolderItemsfolderId, pagingRequestcom.box.boxjavalibv2.dao.BoxCollection
updateFolderInfoupdatefolderId, folderRequestcom.box.boxjavalibv2.dao.BoxFolder
URI Options

...

for folders or shared-folders

...

 

NameType
defaultRequestcom.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.

NameType
defaultRequestcom.box.restclientv2.requestsbase.BoxDefaultRequestObject
folderDeleteRequestcom.box.boxjavalibv2.requests.requestobjects.BoxFolderDeleteRequestObject
folderIdString
folderRequestcom.box.boxjavalibv2.requests.requestobjects.BoxFolderRequestObject
itemCopyRequestcom.box.boxjavalibv2.requests.requestobjects.BoxItemCopyRequestObject
pagingRequestcom.box.boxjavalibv2.requests.requestobjects.BoxPagingRequestObject
sharedLinkRequestcom.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]

...

EndpointShorthand AliasOptionsResult Body Type
getSharedItemsharedItemdefaultRequestcom.box.boxjavalibv2.dao.BoxItem
URI Options for shared-items

...

 

NameType
defaultRequestcom.

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.

NameType
defaultRequestcom.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]

...

EndpointShorthand AliasOptionsResult Body Type
addEmailAlias emailAliasRequest, userIdcom.box.boxjavalibv2.dao.BoxEmailAlias
createEnterpriseUsercreateuserRequestcom.box.boxjavalibv2.dao.BoxUser
deleteEmailAlias defaultRequest, emailId, userId 
deleteEnterpriseUser userDeleteRequest, userId 
getAllEnterpriseUserallEnterpriseUserdefaultRequest, filterTermjava.util.List
getCurrentUsercurrentUserdefaultRequestcom.box.boxjavalibv2.dao.BoxUser
getEmailAliasesemailAliasesdefaultRequest, userIdjava.util.List
moveFolderToAnotherUser folderId, simpleUserRequest, userIdcom.box.boxjavalibv2.dao.BoxFolder
updateUserInformaitonupdateuserId, userRequestcom.box.boxjavalibv2.dao.BoxUser
updateUserPrimaryLoginupdateuserId, userUpdateLoginRequestcom.box.boxjavalibv2.dao.BoxUser
URI Options for users

...

 

NameType
defaultRequestcom.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.

NameType
defaultRequestcom.box.restclientv2.requestsbase.BoxDefaultRequestObject
emailAliasRequestcom.box.boxjavalibv2.requests.requestobjects.BoxEmailAliasRequestObject
emailIdString
filterTermString
folderIdString
simpleUserRequestcom.box.boxjavalibv2.requests.requestobjects.BoxSimpleUserRequestObject
userDeleteRequestcom.box.boxjavalibv2.requests.requestobjects.BoxUserDeleteRequestObject
userIdString
userRequestcom.box.boxjavalibv2.requests.requestobjects.BoxUserRequestObject
userUpdateLoginRequestcom.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]

...

NameType
limitInteger
streamPositionLong
streamTypeString
splitResultboolean

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.

...