| 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 .jsv suffix or ?format=jsv
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: text/jsv
Content-Type: text/jsv
Content-Length: length
{
Workspace: String,
DeletedItems:
[
{
ObjectId: String,
Class: String,
Name: String,
Type: String,
DeletedBy: String,
DeletedDate: String,
Created: String,
LastUpdated: String
}
],
DeletedItemsToRestore:
[
{
ObjectId: String,
Class: String,
Name: String,
Type: String,
DeletedBy: String,
DeletedDate: String,
Created: String,
LastUpdated: String
}
]
}