| GET,POST | /{Workspace}/Undelete |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
/**
* Handles undelete of data.
*/
public static class Undelete
{
public String Workspace = null;
public ArrayList<DeletedItem> DeletedItems = null;
public ArrayList<DeletedItem> DeletedItemsToRestore = null;
public String getWorkspace() { return Workspace; }
public Undelete setWorkspace(String value) { this.Workspace = value; return this; }
public ArrayList<DeletedItem> getDeletedItems() { return DeletedItems; }
public Undelete setDeletedItems(ArrayList<DeletedItem> value) { this.DeletedItems = value; return this; }
public ArrayList<DeletedItem> getDeletedItemsToRestore() { return DeletedItemsToRestore; }
public Undelete setDeletedItemsToRestore(ArrayList<DeletedItem> value) { this.DeletedItemsToRestore = value; return this; }
}
public static class DeletedItem
{
public String ObjectId = null;
public String Class = null;
public String Name = null;
public String Type = null;
public String DeletedBy = null;
public String DeletedDate = null;
public String Created = null;
public String LastUpdated = null;
public String getObjectId() { return ObjectId; }
public DeletedItem setObjectId(String value) { this.ObjectId = value; return this; }
public String getClass() { return Class; }
public DeletedItem setClass(String value) { this.Class = value; return this; }
public String getName() { return Name; }
public DeletedItem setName(String value) { this.Name = value; return this; }
public String getType() { return Type; }
public DeletedItem setType(String value) { this.Type = value; return this; }
public String getDeletedBy() { return DeletedBy; }
public DeletedItem setDeletedBy(String value) { this.DeletedBy = value; return this; }
public String getDeletedDate() { return DeletedDate; }
public DeletedItem setDeletedDate(String value) { this.DeletedDate = value; return this; }
public String getCreated() { return Created; }
public DeletedItem setCreated(String value) { this.Created = value; return this; }
public String getLastUpdated() { return LastUpdated; }
public DeletedItem setLastUpdated(String value) { this.LastUpdated = value; return this; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /{Workspace}/Undelete HTTP/1.1
Host: dev.fieldsquared.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<Undelete xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Field2Office.API.Model.Undelete">
<DeletedItems>
<DeletedItem>
<Class>String</Class>
<Created>String</Created>
<DeletedBy>String</DeletedBy>
<DeletedDate>String</DeletedDate>
<LastUpdated>String</LastUpdated>
<Name>String</Name>
<ObjectId>String</ObjectId>
<Type>String</Type>
</DeletedItem>
</DeletedItems>
<DeletedItemsToRestore>
<DeletedItem>
<Class>String</Class>
<Created>String</Created>
<DeletedBy>String</DeletedBy>
<DeletedDate>String</DeletedDate>
<LastUpdated>String</LastUpdated>
<Name>String</Name>
<ObjectId>String</ObjectId>
<Type>String</Type>
</DeletedItem>
</DeletedItemsToRestore>
<Workspace>String</Workspace>
</Undelete>