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

    1. $ http post :8001/default/files \
    2. contents=@<file-location>.html

    POST a Spec File

    Using cURL

    Using HTTPie

    1. $ curl -X POST http://<admin-hostname>:8001/default/files \
    2. -F "path=specs/homepage.json" \
    3. -F "contents=@<spec-location>.json"
    1. $ http post :8001/default/files \
    2. contents=@<spec-location>.json

    For more details about theme files, see the .

    Using cURL

    1. path=themes/base/partials/header.html \
    2. contents=@<partial-location>.html

    GET a File

    Using cURL

    Using HTTPie

    1. $ curl -X GET http://<admin-hostname>:8001/default/files/content/index.txt
    1. $ http :8001/default/files/content/index.txt

    Using cURL

    Using HTTPie

    1. $ http patch :8001/default/files/content/index.txt \
    2. contents=@<updated-content-file-location>.txt

    DELETE a File

    Using HTTPie

    1. $ curl -X DELETE http://<admin-hostname>:8001/default/files/content/index.txt