Delete Method

This method allows you to delete records with matching keys or ids.

Parameters

table
the singular name of the table or its alias as returned by the Describe (Database) method. Please note that this parameter is embedded into the URL before the method name.
key or id
the value of key column or internal record id to retrieve. Can appear multiple times. You cannot mix keys with ids. You cannot retrieve more than 500 records at once.
workflow
pass 0 to suppress running workflow rules. The user should have ManageData administrative permissions otherwise method call will fail.
purge
pass 1 to bypass recycle bin and delete record immediately.

Each record is deleted individually. If parameters passed validation successfully, HTTP status 200 is returned even in case there was a failure to delete row(s). For each key/id passed in the method returns short status descriptor. Status descriptor consist of status code (200 indicates successful deletion), a copy of an id or a key, and, in case of error, standard error descriptor containing explanatory message.

Request

GET https://www.teamdesk.net/secure/api/v2/{appid}/{table}/delete.{json|xml}?parameters

Deletes records with keys 56 and 57

GET https://www.teamdesk.net/secure/api/v2/21995/Test/delete.json?key=56&key=57 

Deletes records with ids 56 and 57, attempts to suppress workflow rules

GET https://www.teamdesk.net/secure/api/v2/21995/Test/delete.xml?id=56&id=57&workflow=0

Response (JSON)

[ // An array of status descriptors
    {
        "status": 200, // Deleted successfully
        "id": 56,
    },
    {
        "status": 403,// In case of error non-200 status is returned
        "id": 57,
        "error": {// And the standard error descriptor
            "error": 403,
            "code": 4000,
            "message": "Record is not found or not accessible"
        }
    }
]

Response (XML)

<Response>
    <row>
        <id>56</id>
        <status>200</status>
    </row>
    <row>
        <id>57</id>
        <status>403</status>
        <error>
            <error>403</error>
            <code>4000</code>
            <message>Record is not found or not accessible</message>
        </error>
    </row>
</Response>