POST api.ashx/v2/wikis/{wikiid}/files.{json|xml}
CREATE a wiki file.
Scopes
Wikis › Modify Files wikis.files.modify
Request Parameters
Name | Type | Location | Description | Required | Default | Options |
---|---|---|---|---|---|---|
FileData | Byte[] | Either FileData or FileUploadContext are required. | Optional | |||
FileName | string | File Name | Required | |||
FileUploadContext | string | Either FileData or FileUploadContext are required. | Optional | |||
WikiId | int? | Wiki Id | Required |
Example Requests
Widget Javascript
jQuery.telligent.evolution.post({ url: jQuery.telligent.evolution.site.getBaseUrl() + 'api.ashx/v2/wikis/{wikiid}/files.json', data: { 'wikiid': '6', 'FileName': 'filename' } }).then(function(response) { // use response });
Example Responses
JSON
{ "File": { "FileName": "filename", "FileSize": 0, "FileUrl": "fileurl", "FileStore": "filestore", "FilePath": "filepath" }, "Info": [ "string", "string" ], "Warnings": [ "string", "string" ], "Errors": [ "string", "string" ] }
XML
<?xml version="1.0" encoding="utf-16"?> <Response> <Info> <Message>string</Message> <Message>string</Message> </Info> <Warnings> <Message>string</Message> <Message>string</Message> </Warnings> <Errors> <Message>string</Message> <Message>string</Message> </Errors> <File> <FileName>filename</FileName> <FileSize>0</FileSize> <FileUrl>fileurl</FileUrl> <FileStore>filestore</FileStore> <FilePath>filepath</FilePath> </File> </Response>