POST /resources/{path:.*}

Uploads a developer portal resource, such as a stylesheet, to the /resources/ folder structure.

Authorization Roles/Permissions: Must be logged in. Site Admin only.

This topic includes the following sections:

HTTP Method


Back to top



Back to top

Sample Request

The example below shows an upload of a revised custom.less file.

Request URL #1

Uploads a revised custom.less file.

Request URL #2

Uploads an image file to the resources folder.

Sample request headers (for request #1)

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Content-Type: multipart/form-data; boundary=---------------------------2366399137693

Sample request body

The content below has been abbreviated for display purposes.

Content-Disposition: form-data; name="File"; filename="custom.less"
Content-Type: application/octet-stream

 *  Commonly used variables to customize styles
 *  Tenant: acmepaymentscorp *  Theme: Default  

// base color, often used for navbar (left or top) background color, link text color, button background color, etc 
// @main-color: #810040;

// when base color is used as a background, what's the text color on top? 
// @inverse-color: #fff;

// widgets, such as those on dashboard, header text color
// @widget-header-text-color: @box-header-text-color;

// color of the leftnav header over form elements -- example would be the leftnav filter widget on Dashboard
// @leftnav-header-text-color: lighten(@disabled-text-color,40%);

// default color of leftnav link item
// @leftnav-default-text-color: @leftnav-header-text-color;

// color of the text of leftnav link item that signifies where you are, the "active" item
// @leftnav-active-text-color: @canvas-color;

// leftnav background color 
// @leftnav-bg-color: @main-color;

// leftnav header, found for example on a leftnav set of board filters, text color 
// @leftnav-header-text-color: screen(lighten(@plain-text-color,25%),#ccc);

// any horizontal rule that appears in the leftnav 
// @leftnav-divider-color: @leftnav-active-text-color;

// top left logo image path
// @logo-img: url("images/logo_50.png");

// width of the logo, max 295px; logo height is fixed at 46px
// @logo-width: 232px;

// default link color
// @link-color: @main-color;

Content-Disposition: form-data; name="X-Csrf-Token_acmepaymentscorp"


Back to top

Request Headers

For general information on request header values, refer to HTTP Request Headers.

Header Description
Content-Type multipart/form-data
X-Csrf-Token_{fedmemberID} The CSRF prevention header; may or may not be required, depending on platform settings. See CSRF Prevention on the Platform. By default, the CSRF header is not required for GET operations and is required for all others, with a few exceptions relating to user login.

Back to top

Request Parameters

Parameter Parm Type Data Type Required Description
inMP Body BufferedInMultiPart Required The content being uploaded.
path Path String Required The path for the content being uploaded. Include the path from the /resources/ folder downwards.
unpack Query Boolean Optional Indicates whether the content being uploaded is a ZIP file that needs to be unzipped. Default: False.

Back to top


If successful, this operation returns HTTP status code 200, and the specified content is uploaded to the platform resources folder structure.

Back to top

Sample Response

The sample response below shows successful completion of this operation.

Sample response headers

HTTP/1.1 200 OK
Content-Type: text/html
Cache-Control: no-cache
Expires: Wed, 23 Sep 2015 09:34:18 GMT

Sample response body


Back to top

Response Headers

For general information on response header values, refer to HTTP Response Headers.


Back to top

Response Body


Back to top

Error Codes/Messages

If the call is unsuccessful an error code/message is returned. One or more examples of possible errors for this operation are shown below.

Item Value
401 Unauthorized. For example, you would get this response if you didn't include the custom X-Csrf-Token_{fedmemberID} header in the request, when it was required by the platform settings; or if you included an invalid or expired value for this header. You would also get this response for any operation that requires login (almost all) if the login cookie was missing.

The resource could not be found.

For example, you might get this if the Accept header is set to a wrong value.
500 An error occurred processing the call.

More information about Akana API Platform API error messages.

Back to top

Related Topics