Chilkat Online Tools

PowerBuilder / Atlassian Confluence Cloud / Remove modules

Back to Collection Items

integer li_rc
oleobject loo_Http
integer li_Success
oleobject loo_Resp
integer li_RespStatusCode

// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.

loo_Http = create oleobject
li_rc = loo_Http.ConnectToNewObject("Chilkat_9_5_0.Http")
if li_rc < 0 then
    destroy loo_Http
    MessageBox("Error","Connecting to COM object failed")
    return
end if

loo_Resp = loo_Http.QuickRequest("DELETE","https://your-domain.atlassian.net/wiki/rest/atlassian-connect/1/app/module/dynamic?moduleKey=<string>&moduleKey=<string>")
if loo_Http.LastMethodSuccess = 0 then
    Write-Debug loo_Http.LastErrorText
    destroy loo_Http
    return
end if

li_RespStatusCode = loo_Resp.StatusCode
Write-Debug "Response Status Code = " + string(li_RespStatusCode)
if li_RespStatusCode <> 204 then
    Write-Debug "Response Header:"
    Write-Debug loo_Resp.Header
    Write-Debug "Response Body:"
    Write-Debug loo_Resp.BodyStr
    Write-Debug "Failed."
    destroy loo_Resp
    destroy loo_Http
    return
end if

destroy loo_Resp
Write-Debug "Success."


destroy loo_Http

Curl Command

curl -X DELETE
https://your-domain.atlassian.net/wiki/rest/atlassian-connect/1/app/module/dynamic?moduleKey=<string>&moduleKey=<string>

Postman Collection Item JSON

{
  "name": "Remove modules",
  "request": {
    "method": "DELETE",
    "header": [
    ],
    "url": {
      "raw": "{{baseUrl}}/atlassian-connect/1/app/module/dynamic?moduleKey=<string>&moduleKey=<string>",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "atlassian-connect",
        "1",
        "app",
        "module",
        "dynamic"
      ],
      "query": [
        {
          "key": "moduleKey",
          "value": "<string>",
          "description": "(Required) The key of the module to remove. To include multiple module keys, provide multiple copies of this parameter.\nFor example, `moduleKey=dynamic-attachment-entity-property&moduleKey=dynamic-select-field`.\nNonexistent keys are ignored."
        },
        {
          "key": "moduleKey",
          "value": "<string>",
          "description": "(Required) The key of the module to remove. To include multiple module keys, provide multiple copies of this parameter.\nFor example, `moduleKey=dynamic-attachment-entity-property&moduleKey=dynamic-select-field`.\nNonexistent keys are ignored."
        }
      ]
    },
    "description": "Remove all or a list of modules registered by the calling app.\n\n**[Permissions](#permissions) required:** Only Connect apps can make this request."
  },
  "response": [
    {
      "name": "Returned if the request is successful.",
      "originalRequest": {
        "method": "DELETE",
        "header": [
        ],
        "url": {
          "raw": "{{baseUrl}}/atlassian-connect/1/app/module/dynamic?moduleKey=<string>&moduleKey=<string>",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "atlassian-connect",
            "1",
            "app",
            "module",
            "dynamic"
          ],
          "query": [
            {
              "key": "moduleKey",
              "value": "<string>"
            },
            {
              "key": "moduleKey",
              "value": "<string>"
            }
          ]
        }
      },
      "status": "No Content",
      "code": 204,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    },
    {
      "name": "Returned if the call is not from a Connect app.",
      "originalRequest": {
        "method": "DELETE",
        "header": [
        ],
        "url": {
          "raw": "{{baseUrl}}/atlassian-connect/1/app/module/dynamic?moduleKey=<string>&moduleKey=<string>",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "atlassian-connect",
            "1",
            "app",
            "module",
            "dynamic"
          ],
          "query": [
            {
              "key": "moduleKey",
              "value": "<string>"
            },
            {
              "key": "moduleKey",
              "value": "<string>"
            }
          ]
        }
      },
      "status": "Unauthorized",
      "code": 401,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "*/*"
        }
      ],
      "cookie": [
      ],
      "body": ""
    }
  ]
}