{
  "Guid": "phPFblTEb0GxSRJ-mNqhEw",
  "Document": {
    "Description": "Calls specified web service with method PUT. Expects JSON. Parses JSON to object.",
    "RelatedLinks": [
      {
        "Description": "httpGet",
        "Link": "~httpGet",
        "ROWID": "r1c00006-0001-0001-0001-000000000001"
      },
      {
        "Description": "httpPost",
        "Link": "~httpPost",
        "ROWID": "r1c00006-0001-0001-0001-000000000002"
      },
      {
        "Description": "Calling external APIs",
        "Link": "~Calling external APIs",
        "ROWID": "r1c00006-0001-0001-0001-000000000003"
      }
    ],
    "RelatedLinks_type": "RelatedLinks",
    "SortOrder": 5,
    "API": false,
    "HashExample": true,
    "JsExample": false,
    "Keyword": false,
    "ROWID": "a92cf9cc-b8ca-89db-51e9-c102c652e47f",
    "Expand": true,
    "Parameters": [
      {
        "Parameter": "url",
        "Type": "string",
        "Optional": false,
        "Description": "URL to call with HTTP PUT.",
        "ROWID": "86996ba9-9f1c-88e2-e751-6bd2a0ff8381"
      },
      {
        "Parameter": "data",
        "Type": "object",
        "Optional": false,
        "Description": "Data to PUT",
        "ROWID": "73a1f078-ac5a-428c-ca5d-fbd965a621c8"
      },
      {
        "Parameter": "headers",
        "Type": "object",
        "Optional": true,
        "Description": "Name / value object that will be converted to HTTP headers.",
        "ROWID": "ba945b02-5e6c-5688-22fe-274a64c2e8d2"
      }
    ],
    "Parameters_type": "Parameters",
    "Returns": "Returns JSON parsed object.",
    "Data": "{\n    \"login\" : \"test\",\n    \"password\": \"test\"\n}",
    "Code": "// Basic authentication\nlet headers = {\n    \"Authorization\" : \"BASIC \" + docly.base64(login + \":\" + password)\n};\n\nlet data = {\n    \"Field1\" : \"123\"\n};\n \n// Call some API\nvar result = docly.httpPut(\"https://somewebsite.com/API/Call?id=1\", data, headers);\n \n// Handle error \nif(result.DoclyError) throw new Error(result.DoclyError);\n \n// Output result\nreturn JSON.stringify(result);",
    "SpecifyOutput": true,
    "Output": "Only works in API functions, no demo.",
    "JsCode": "",
    "OKCount": "2",
    "PassedCount": "0",
    "FailedCount": "0",
    "TotalCount": "2",
    "RemainCount": "0"
  },
  "EmbeddedFiles": [],
  "Schema": "Docly function",
  "Tags": [],
  "Modified": "2026-06-23T18:07:08.601851+02:00",
  "Created": "2024-02-12T17:12:32.0002491+01:00"
}