Using the Portal Files API
Note: The @
symbol in a command automatically reads the file on disk and places its contents into the contents argument.
For more details about content files, see the .
Using cURL
Using HTTPie
$ http post :8001/default/files \
contents=@<file-location>.html
POST a Spec File
Using cURL
Using HTTPie
$ curl -X POST http://<admin-hostname>:8001/default/files \
-F "path=specs/homepage.json" \
-F "contents=@<spec-location>.json"
$ http post :8001/default/files \
contents=@<spec-location>.json
For more details about theme files, see the .
Using cURL
path=themes/base/partials/header.html \
contents=@<partial-location>.html
GET a File
Using cURL
Using HTTPie
$ curl -X GET http://<admin-hostname>:8001/default/files/content/index.txt
$ http :8001/default/files/content/index.txt
Using cURL
Using HTTPie
$ http patch :8001/default/files/content/index.txt \
contents=@<updated-content-file-location>.txt
DELETE a File
Using HTTPie
$ curl -X DELETE http://<admin-hostname>:8001/default/files/content/index.txt