How to attach/upload a file to node using restws?
Here is the URL to access a node with file already attached to it  

{domain_name}/[end-point]/node/219.json 

Here 219 is the nid of the node.

Here is the sample JSON format to attach a file to node (node create).

{
    "title": "title_of_node",
    "type": "bundle_name",
    "field_samplefile": {
        "und": [{
            "fid": "17",
            "filename": "changes.txt",
            "uri": "public://changes.txt",
            "filemime": "text/plain"
        }]
    }
}