Delete
This method instantly queues a set of Posts that will attempt deleting all instances of live Posts from selected Portals for a given Job.
Some Portals may not allow deleting, as indicated by the supports_delete element of the Portal's Detailed Information response and the Portal Management webservice responses.
Deleting can only be performed for Posts that have already successfully reached their Portals. Posts that are still pending (sitting in idibu's posting queue) can be cancelled.
Endpoint
POST https://ws.idibu.com/clients/api/REMOTE/V3/[client-hash]
Query parameters
| Parameter Name | Type restrictions | Required? | Notes |
|---|---|---|---|
xml_text | String | Yes | The full query XML (see the Query format below), URL-encoded within the parameter. |
Query format
<idibu>
<method>delete</method>
<job id="[integer]"> <!-- required; refer to https://docs.idibu.com/docs/v2/posting-api/job-section -->
<board id="[integer]" /> <!-- Portal ID; multiple allowed; if not provided, the system will attempt deleting all currently live Posts on all Portals for this Job -->
</job>
</idibu>
Response format
Successful queue attempt
<IDIBU>
<JOB ID="[integer]"> <!-- Job ID; make sure to save and store this, as it's used for all other methods, as well as the https://docs.idibu.com/docs/v2/webservices/job-management -->
<POST STATUS="PENDING" TYPE="Del" BOARDID="[integer]" REMOTEID=[string] QUEUEID="[integer]">Job was posted for deletion to this board.</POST>
<!-- STATUS="PENDING" indicates that the delete Post has been successfully added to the Posting Queue -->
<!-- "TYPE" - always "Del" for this method -->
<!-- "BOARDID" - ID of the Portal for which the deletion has been queued -->
<!-- "REMOTEID" - internal ID used to remove this specific Post on the Portal; used only for potential debugging by the idibu team -->
<!-- "QUEUEID" - ID of the Post while it's in the Posting Queue; can be used to cancel the posting - see https://docs.idibu.com/docs/v2/posting-api/cancel -->
<POST BOARDID="[integer]" STATUS="FAILED">No posts suitable for deletion were found for this board</POST>
<!-- STATUS="FAILED" indicates that the delete Post has not been added to the Posting Queue -->
<!-- "BOARDID" - ID of the Portal to which the Post has failed to queue -->
</JOB>
</idibu>
Failed queue attempt
<idibu>
<JOB ID="[integer]"> <!-- Job ID; make sure to save and store this, as it's used for all other methods, as well as the https://docs.idibu.com/docs/v2/webservices/job-management -->
<ERROR>No posts suitable for deletion were found for the stated job</ERROR>
<!-- "ERROR" indicates that the system did not attempt to queue any delete Posts; if at least one Post was successfully queued, failed Posts will be reported as POST STATUS="FAILED", as per the example above -->
</JOB>
</idibu>
Examples - deleting all live Posts for a Job
Example request
<?xml version="1.0" encoding="UTF-8"?>
<idibu>
<method>delete</method>
<job id="12345" />
</idibu>
Example response - successful queue attempt
<?xml version="1.0" encoding="UTF-8" ?>
<idibu>
<JOB ID="12345">
<POST STATUS="PENDING" TYPE="Del" BOARDID="1234" REMOTEID="567890" QUEUEID="6543210">Job was posted for deletion to this board.</POST>
<POST STATUS="PENDING" TYPE="Del" BOARDID="1661" REMOTEID="https://www.aptrack.co/uap/AbCdEfGhIjKlMnOp/" QUEUEID="6543211">Job was posted for deletion to this board.</POST>
<POST STATUS="PENDING" TYPE="Del" BOARDID="1229" REMOTEID="https://www.idibu.com" QUEUEID="6543212">Job was posted for deletion to this board.</POST>
</JOB>
</idibu>
Example response - failed queue attempt
<?xml version="1.0" encoding="UTF-8" ?>
<idibu>
<JOB ID="12345">
<ERROR TYPE="posts">No posts suitable for deletion were found for the stated job</ERROR>
</JOB>
</idibu>
Examples - deleting Posts on selected Portals
Example request
<?xml version="1.0" encoding="UTF-8"?>
<idibu>
<method>delete</method>
<job id="12345">
<board id="1234" />
<board id="1661" />
</idibu>
Example response - mixed results
<?xml version="1.0" encoding="UTF-8" ?>
<idibu>
<JOB ID="12345">
<POST STATUS="PENDING" TYPE="Del" BOARDID="1234" REMOTEID="567890" QUEUEID="6543210">Job was posted for deletion to this board.</POST>
<POST BOARDID="1661" STATUS="FAILED">No posts suitable for deletion were found for this board</POST>
</JOB>
</idibu>