This web service allows ADMIN users to upload files to the Custom code library.
PORTAL_ADMIN users can use this web service if the Custom code Security toggle is inactive.
It is only possible to upload custom code files in the following formats:
.js.json.css.less.htm.html.vm
| Method | Endpoint |
|---|---|
POST |
|
- Use a
multipart/form-datarequest body to add files when using this web service. - Calling this web service with an existing file path overrides the existing content.
- It is necessary to provide an
Ft-Calling-Appvalue when using Fluid Topics web services. See Fluid Topics calling app.
The portal has a storage limit of 50 MB.
curl example
curl --request POST "https://docs.fluidtopics.com/api/admin/portal/custom-code" \
--header "Authorization: Basic XXX" \
--form "path/of/my/choice/for/script.js=@/Users/Fabrice/Desktop/script.js;type=application/javascript" \
--form "path/of/my/choice/for/style.css=@/Users/Fabrice/Desktop/style.css;type=text/css"
Use the following content types for each format:
| Extension | Content type |
|---|---|
.js |
text/javascript |
.json |
application/json |
.css |
text/css |
.less |
plain/text |
.htm |
text/html |
.html |
text/html |
.vm |
text/x-velocity |