Chilkat Online Tools

Foxpro / MongoDB Atlas / Delete an Organization

Back to Collection Items

LOCAL loHttp
LOCAL lnSuccess
LOCAL loResp

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

* For versions of Chilkat < 10.0.0, use CreateObject('Chilkat_9_5_0.Http')
loHttp = CreateObject('Chilkat.Http')

loHttp.DigestAuth = 1
loHttp.Login = "username"
loHttp.Password = "password"

loResp = loHttp.QuickRequest("DELETE","https://domain.com/api/atlas/{{version}}/orgs/{{ORG-ID}}")
IF (loHttp.LastMethodSuccess = 0) THEN
    ? loHttp.LastErrorText
    RELEASE loHttp
    CANCEL
ENDIF

? STR(loResp.StatusCode)
? loResp.BodyStr
RELEASE loResp

RELEASE loHttp

Curl Command

curl -X DELETE
	--digest -u 'username:password'
https://domain.com/api/atlas/{{version}}/orgs/{{ORG-ID}}

Postman Collection Item JSON

{
  "name": "Delete an Organization",
  "request": {
    "auth": {
      "type": "digest",
      "digest": [
        {
          "key": "password",
          "value": "3aed2321-9afb-40b8-b28e-cb3b811dd46d",
          "type": "string"
        },
        {
          "key": "username",
          "value": " iqutncno",
          "type": "string"
        },
        {
          "key": "algorithm",
          "value": "MD5",
          "type": "string"
        }
      ]
    },
    "method": "DELETE",
    "header": [
    ],
    "url": {
      "raw": "{{base_url}}/api/atlas/{{version}}/orgs/{{ORG-ID}}",
      "host": [
        "{{base_url}}"
      ],
      "path": [
        "api",
        "atlas",
        "{{version}}",
        "orgs",
        "{{ORG-ID}}"
      ]
    },
    "description": "https://docs.atlas.mongodb.com/reference/api/organization-get-all/"
  },
  "response": [
  ]
}