Question

Independent
CA
Last activity: 25 Nov 2019 18:27 EST
Use of Repository API for Box Integration
We are looking into using Repository API to build Box content integration as we may able to switch to another repository later.
By looking at the Repository API article:
https://community.pega.com/knowledgebase/articles/data-integration/repository-apis
1) Create file API
In the case of BOX, Box returns a File ID upon successful creation of the file. Where can this ID be used/stored using the Repostory API (D_pxNewFile)?
E.g., let's say we have a folder called /folder1 already. The new file is to be create in /folder1 as file1. So the full path is /folder1/file1. Upon creation, Box will respond with the FileID.
2) Get file API (D_pxGetFile)
According the documentation, it takes the following parameters:
- repositoryName- the name of the repository from which to get the file
- filePath- the path, including the name of the file, to be retrieved, relative to the root path of the repository
- responseType- the type of content that is in the file to be retrieved, either "STREAM" or "STRING"
E.g., if the file path is /folder1/file1, and the Box's fileID is 123456:
- Is the expectation that "/folder1/file1" is passed as the parameter?
- Secondly, using Box as an example, as opposed to simply use the FileID, is there an expectation that D_pxGetFile datapage activity will traverse the directory structure to locate the file's FileID, and then start the downloading?