Details

    • Work Funnel:
      Feature
    • Story Points:
      3
    • Template:

      Description

      As a developer using the REST API I want to update the content of a file in the repository so that I can build a client that allows file uploads.

      Acceptance Criteria

      • Does the /nodes/nodeId/content URL accept a PUT request with a binary body and return a 200 status code if successful? Yes
      • Can the Content-Type HTTP header be used to set the mimetype and encoding of the content? Yes
      • Does the name of the node get updated if the file extension does not match the mimetype? No
      • Does the response body return the default representation of the file node when successfully updated? Yes
      • Does the /nodes/nodeId/content URL return a 400 response if the nodeId path parameter does not represent a file? Yes
      • Does the /nodes/nodeId/content URL return a 404 response if the nodeId path parameter does not exist? Yes
      • Can the select query parameter be used to return additional info in the response (eg. path) ? Yes

      Example Request

      Content-Type: plain/text
      
      some test text....
      

      Example Response

      Content-Type: application/json
      
      {
         "createdAt": "2015-11-19T11:08:42.004+0000", 
         "createdByUser": {
            "displayName": "Joe Bloggs", 
            "userName": "jbloggs"
         }, 
         "id": "99532d84-d540-410c-b52a-c2131cf33589", 
         "isFolder": false, 
         "modifiedAt": "2015-11-19T11:08:42.004+0000", 
         "modifiedByUser": {
            "displayName": "Joe Bloggs", 
            "userName": "jbloggs"
         }, 
         "name": "test.txt", 
         "nodeType": "cm:content", 
         "parentId": "9afcc003-3911-4f75-a974-a163cc43c986",
         "content": {
            "encoding": "UTF-8", 
            "mimeType": "plain/text", 
            "sizeInBytes": 32
         },
         "properties": {
            "cm:title": "Title"
         },
         "path": {
            "name": "/Company Home",
            "isComplete": true
            "elements": [
               {
                  "id": "f17596e4-3027-4f2b-bd63-15ca147f31ec",
                  "name": "Company Home"
               }
            ]
         }
      }
      

        Attachments

          Issue Links

            Structure

              Activity

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  gcornwell Gavin Cornwell
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Structure Helper Panel