Chilkat Online Tools

Swift / Salesforce Platform APIs / Delete channel member

Back to Collection Items

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

    let http = CkoHttp()
    var success: Bool

    // Adds the "Authorization: Bearer <access_token>" header.
    http.AuthToken = "<access_token>"

    var resp: CkoHttpResponse? = http.QuickRequest("DELETE", url: "https://domain.com/services/data/v{{version}}/tooling/sobjects/PlatformEventChannelMember/:PLATFORM_EVENT_CHANNEL_MEMBER_ID")
    if http.LastMethodSuccess == false {
        print("\(http.LastErrorText)")
        return
    }

    print("\(resp!.StatusCode.intValue)")
    print("\(resp!.BodyStr)")
    resp = nil

}

Curl Command

curl -X DELETE
	-H "Authorization: Bearer <access_token>"
https://domain.com/services/data/v{{version}}/tooling/sobjects/PlatformEventChannelMember/:PLATFORM_EVENT_CHANNEL_MEMBER_ID

Postman Collection Item JSON

{
  "name": "Delete channel member",
  "protocolProfileBehavior": {
    "strictSSL": false
  },
  "request": {
    "method": "DELETE",
    "header": [
    ],
    "body": {
      "mode": "raw",
      "raw": "",
      "options": {
        "raw": {
          "language": "json"
        }
      }
    },
    "url": {
      "raw": "{{_endpoint}}/services/data/v{{version}}/tooling/sobjects/PlatformEventChannelMember/:PLATFORM_EVENT_CHANNEL_MEMBER_ID",
      "host": [
        "{{_endpoint}}"
      ],
      "path": [
        "services",
        "data",
        "v{{version}}",
        "tooling",
        "sobjects",
        "PlatformEventChannelMember",
        ":PLATFORM_EVENT_CHANNEL_MEMBER_ID"
      ],
      "variable": [
        {
          "key": "PLATFORM_EVENT_CHANNEL_MEMBER_ID",
          "value": null
        }
      ]
    }
  },
  "response": [
  ]
}