Customer Portal

CloverDX Server Sandbox Output file to use

Comments 2

  • Avatar
    Hana Habrzettlova
    0
    Comment actions Permalink

    Hello, 

    It is, indeed, possible to use a file from the data-out folder, both within the same sandbox and within a different sandbox.

    If you want to refer to a file which is within the same sandbox, the URL would be as follows:

    ${DATAOUT_DIR}/filename

    To use a file from a different sandbox, the file URL would looks as follows:

    sandbox://sandboxname/path/to/file/filename.

    For example, if you want to refer to a file called testfile.txt in the data-out folder of a sandbox called ABCTEST, the URL would be:

    sandbox://ABCTEST/data-out/testfile.txt

    If you are working in a server project in CloverDX Designer, you can easily select files in different sandboxes in the CloverDX Server view in the URL dialog, where you can view all sandboxes and switch between them in the Browse field.

    Best regards, 

    Hana

  • Avatar
    Jolie
    0
    Comment actions Permalink

    Yes, it is possible to access a file from the data-out folder within a sandbox that is already deployed on a CloverDX server. You can use the CloverDX Server REST API to access the file.

    First, you'll need to authenticate and get an access token by making a POST request to the /auth/token endpoint with your credentials. Then, you can make a GET request to the /api/sandbox/{sandboxId}/file/{filePath} endpoint to download the file.

    Replace {sandboxId} with the ID of your sandbox (in this case, "ABCTEST"), and {filePath} with the relative path to the file within the data-out folder. For example, if your file is located at "data-out/myfile.csv", you would use "/api/sandbox/ABCTEST/file/data-out/myfile.csv" as the endpoint.

    Make sure to include the access token in the Authorization header of your GET request. The response will contain the contents of the file, which you can then process as needed in your new flow.

Please sign in to leave a comment.