updateFragmentJavaScript

put

/ccadmin/v1/widgetDescriptors/{id}/element/{tag}/javascript

Update Fragment Java Script. Updates the fragment template widget /{id}/element/{tag}/template

Request

Supported Media Types
Path Parameters
Body ()
Root Schema : updateFragmentJavaScript_request
Type: object
Show Source
Example:
{
    "code":{
        "javascript":"define(\n\n['knockout'],\n\nfunction(ko)\n{\n\n'use strict'; \n return {\n currentDate: ko.observable(new Date()),\n\n onLoad:function(widget) {\n \n}\n};\n}\n);"
    }
}
Nested Schema : code
Type: object
the code element
Show Source
Back to Top

Response

Supported Media Types

200 Response

Following model is returned when operation succeeds.
Body ()
Root Schema : updateFragmentJavaScript_response
Type: object
Show Source
Example Response (application/json)
{
    "result":true,
    "links":[
        {
            "rel":"self",
            "href":"http://localhost:9080/ccadminui/v1/widgets/superTestWidget_v1/element/super-mailing-list-element/javascript"
        }
    ]
}

Default Response

The error response. The following are the internal error codes thrown by this API when the request processing fails in Oracle Commerce Cloud: |Error Code|Description| |------------------|------------------| |37010|The JavaScript editable flag for this widget is set to false| |37011|The widget does not have a fragment with that name| |37007|Could not update the fragment Javascript| |37009|No widget with that ID was found|
Body ()
Root Schema : errorModel
Type: object
Show Source
Nested Schema : errors
Type: array
An optional list of errors if multiple errors were encountered
Show Source
Nested Schema : items
Type: object
Show Source
Back to Top