Thursday, July 6, 2023

OIC -Upload file to UCM using Rest service

Usecase: Here I will show you how to create a csv file into stage and upload the file to UCM using rest service.

Rest service URI used:

/fscmRestApi/resources/11.13.18.05/erpintegrations

Sample request payload:

{

  "OperationName":"uploadFileToUCM",

  "DocumentContent":"UEsDBBQAAAAIABCInEgIHJSKCgAAAAgAAAAIAAAAdGVzdC50eHRzTEpWCEktLgEAUEsBAh8AFAAAAAgAEIicSAgclIoKAAAACAAAAAgAJAAAAAAAAAAgAAAAAAAAAHRlc3QudHh0CgAgAAAAAAABABgAW4FRYEGh0QEBIE9gQaHRAckeCWBBodEBUEsFBgAAAAABAAEAWgAAADAAAAAAAA==",

  "DocumentAccount":"fin$/payables$/import$",

  "ContentType":"zip",

  "FileName":"Test.zip",

  "DocumentId":null

}

About Request parameters:

  • OperationName: uploadFileToUCM
  • Document content: base64 encoded file. Here, I have used oraext:encodeReferenceToBase64() to encode from file reference to base64.
  • DocumentAccount: "fin$/payables$/import$" >> anyone you need
  • Content type: Document or zip
  • Filename : give the file name which to be uploaded to UCM


Detailed steps with screenshots:

Create a rest connection 



Integration flow:


Create a csv file into stage:







Call rest service to upload file:






References:


No comments:

Post a Comment

Featured Post

11g to 12c OSB projects migration points

1. Export 11g OSB code and import in 12c Jdeveloper. Steps to import OSB project in Jdeveloper:   File⇾Import⇾Service Bus Resources⇾ Se...