Create
4 min
Link Enterprise provides a web service endpoint that will allow you to create a document or folder.
The following endpoint allows the following capabilities.
- Create a File
- Create a File with metadata
- Create a folder
- Create a folder with metadata
- Create a nested folder structure (with parent obtaining metadata)
- Create a single level tree structure (with parent obtaining metadata)
Create a File
Create a file with no metadata
POST
https://localhost:82/scrud/create
{
"cmsName":"Name of the sharepoint system configured in Link Enterpri.",
"repository":"<domain_name>/sites/<rootSiteName>",
"fileLocation":"C:\\someFolder\\someFile.txt",
"location":"/<subsite>/<documentLibrary>",
"selectedCMS":"sp"
}Create a File (metadata)
Create a file with metadata
POST
http://localhost:82/scrud/create
{
"cmsName":"Name of the sharepoint system configured in Link Enterpri.",
"repository":"<domain_name>/sites/<rootSiteName>",
"fileLocation":"C:\\someFolder\\someFile.txt",
"type":"insertMetaDataTemplate",
"location":"/<subsite>/<documentLibrary>",
"selectedCMS":"sp",
"mdArray":[
{
"md1":"insertColumnName",
"md2":"insertValue"
},
{
"md1":"someVendor",
"md2":"Gimmal Inc"
}
]
}Create a Folder
Create a folder with no metadata
POST
https://localhost:82/scrud/create
{
"cmsName":"Name of the sharepoint system configured in Link Enterpri.",
"repository":"<domain_name>/sites/<rootSiteName>",
"location":"/<subsite>/<documentLibrary>",
"selectedCMS":"sp",
"custom1":"test"
}Create a Folder (metadata)
Create a Folder with metadata
POST
https://localhost:82/scrud/create
{
"cmsName":"Name of the sharepoint system configured in Link Enterpri.",
"repository":"<domain_name>/sites/<rootSiteName>",
"type":"insertMetaDataTemplate",
"location":"/<subsite>/<documentLibrary>",
"selectedCMS":"sp",
"mdArray":[
{
"md1":"insertColumnName",
"md2":"insertValue"
},
{
"md1":"someVendor",
"md2":"Gimmal Inc"
}
],
"custom1":"test",
"metaDataFolderFlag":true
}Create a Folder (metadata and nested)
Create a Folder with metadataFolderFlag set to true and enableNested set to false. A nested folder structure is created with metadata type and fields set to the parent folder and a document is added inside the specified subfolder or the parent folder.
POST
https://localhost:82/scrud/create
{
"cmsName":"Name of the sharepoint system configured in Link Enterpri.",
"repository":"<domain_name>/sites/<rootSiteName>",
"fileLocation": "C:\\someFolder\\someFile.txt",
"type":"insertMetaDataTemplate",
"location":"/<subsite>/<documentLibrary>",
"selectedCMS":"sp",
"mdArray":[
{
"md1":"insertColumnName",
"md2":"insertValue"
},
{
"md1":"someVendor",
"md2":"Gimmal Inc"
}
],
"custom1":"folderName#DFLOW#folderName2#DFLOW#folderName3",
"metaDataFolderFlag":true,
"enableNested":true
}Create a Folder (metadata and nested false)
Create a Folder with metadataFolderFlag set to true and enableNested set to false. A flat folder structure is created with metadata type and fields set to the parent folder and a document is added inside the parent folder.
POST
https://localhost:82/scrud/create
{
"cmsName":"Name of the sharepoint system configured in Link Enterpri.",
"repository":"<domain_name>/sites/<rootSiteName>",
"fileLocation": "C:\\someFolder\\someFile.txt",
"type":"insertMetaDataTemplate",
"location":"/<subsite>/<documentLibrary>",
"selectedCMS":"sp",
"mdArray":[
{
"md1":"insertColumnName",
"md2":"insertValue"
},
{
"md1":"someVendor",
"md2":"Gimmal Inc"
}
],
"custom1":"folderName#DFLOW#folderName2#DFLOW#folderName3",
"metaDataFolderFlag":true,
"enableNested":false
}Create a Folder (no metadata and nested false)
Create a Folder with metadataFloderFlag and enableNested set to false. A flat folder structure is created and a document is added inside the parent folder with metadata type and fields provided in the request.
POST
https://localhost:82/scrud/create
{
"cmsName":"Name of the sharepoint system configured in Link Enterpri.",
"repository":"<domain_name>/sites/<rootSiteName>",
"fileLocation": "C:\\someFolder\\someFile.txt",
"type":"insertMetaDataTemplate",
"location":"/<subsite>/<documentLibrary>",
"selectedCMS":"sp",
"mdArray":[
{
"md1":"insertColumnName",
"md2":"insertValue"
},
{
"md1":"someVendor",
"md2":"Gimmal Inc"
}
],
"custom1":"folderName#DFLOW#folderName2#DFLOW#folderName3",
"metaDataFolderFlag":false,
"enableNested":false
}