Chilkat Online Tools

PureBasic / Belvo API Docs / Delete a risk insight

Back to Collection Items

IncludeFile "CkHttp.pb"
IncludeFile "CkHttpResponse.pb"

Procedure ChilkatExample()

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

    http.i = CkHttp::ckCreate()
    If http.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf

    success.i

    CkHttp::setCkBasicAuth(http, 1)
    CkHttp::setCkLogin(http, "{{secretId}}")
    CkHttp::setCkPassword(http, "{{secretPassword}}")

    resp.i = CkHttp::ckQuickRequest(http,"DELETE","https://domain.com/api/risk-insights/:id/")
    If CkHttp::ckLastMethodSuccess(http) = 0
        Debug CkHttp::ckLastErrorText(http)
        CkHttp::ckDispose(http)
        ProcedureReturn
    EndIf

    Debug Str(CkHttpResponse::ckStatusCode(resp))
    Debug CkHttpResponse::ckBodyStr(resp)
    CkHttpResponse::ckDispose(resp)



    CkHttp::ckDispose(http)


    ProcedureReturn
EndProcedure

Curl Command

curl -X DELETE
	-u '{{secretId}}:{{secretPassword}}'
https://domain.com/api/risk-insights/:id/

Postman Collection Item JSON

{
  "name": "Delete a risk insight",
  "request": {
    "method": "DELETE",
    "header": [
    ],
    "url": {
      "raw": "{{baseUrl}}/api/risk-insights/:id/",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "api",
        "risk-insights",
        ":id",
        ""
      ],
      "variable": [
        {
          "key": "id",
          "value": "uuid",
          "description": "The risk-insights.id that you want to get detailed information for."
        }
      ]
    }
  },
  "response": [
  ]
}