Sections ▾

PATCH ​/api​/vaults

Updates the specified vault document.

  
    curl -X PATCH "https://app.contexthub.com/api/vaults" \
         -H "Authorization: Token token=\"534e565f-335a-469d-974e-e18a85f00d2d\"" \
         -H "CONTEXTHUB_DEVICE_ID: 41F87E4D-59CD-4315-936C-95CCC6BFCEFF" \
         -H "Content-Type: application/json" \
         -d $'{ "vault": {\n  "data": {\n    "text": "goodbye world"\n  },\n  "vault_info": {\n    "id": "d9e2ed83-88d8-4203-bbf4-467b43cd4704",\n    "tags": [\n      "foo"\n    ],\n    "created_at": "2014-12-08T19:14:49+00:00",\n    "updated_at": "2014-12-08T19:14:49+00:00",\n    "tag_string": "foo"\n  }\n}\n}' \
         -v \
  

Request

Example Request

{
  "vault": {
    "data": {
    },
    "vault_info": {
      "id": "6bf6fefb-2d4d-4a91-8a0a-ccc7ede5eaca",
      "tags": [
        [
          "hitchiker",
          "galaxy"
        ]
      ]
    }
  }
}

Example Parameters

Response

Example Response

{
  "data": {
  },
  "vault_info": {
    "id": "6bf6fefb-2d4d-4a91-8a0a-ccc7ede5eaca",
    "tags": [
      "foo"
    ],
    "created_at": "2014-06-26T16:00:37.035Z",
    "updated_at": "2014-06-26T16:00:37.035Z",
    "tag_string": "tag1,tag2,tag3"
  }
}

Response Parameters

Response Codes

Successful Response Codes

Failure Response Codes