| Required roles: | Administrator, Administrator, Administrator |
| GET,PUT,OPTIONS | /v1/NewAgent/{AgentId} | ||
|---|---|---|---|
| GET,POST,OPTIONS | /v1/NewAgent |
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class NewAgentRequest
{
public Integer AgentId = null;
public ArrayList<NewAgent> NewAgent = new ArrayList<NewAgent>();
public Integer getAgentId() { return AgentId; }
public NewAgentRequest setAgentId(Integer value) { this.AgentId = value; return this; }
public ArrayList<NewAgent> getNewAgent() { return NewAgent; }
public NewAgentRequest setNewAgent(ArrayList<NewAgent> value) { this.NewAgent = value; return this; }
}
public static class NewAgent
{
public Integer AgentId = null;
public String FirstName = null;
public String LastName = null;
public String UserName = null;
public String Email = null;
public Boolean IsAdmin = null;
public Integer getAgentId() { return AgentId; }
public NewAgent setAgentId(Integer value) { this.AgentId = value; return this; }
public String getFirstName() { return FirstName; }
public NewAgent setFirstName(String value) { this.FirstName = value; return this; }
public String getLastName() { return LastName; }
public NewAgent setLastName(String value) { this.LastName = value; return this; }
public String getUserName() { return UserName; }
public NewAgent setUserName(String value) { this.UserName = value; return this; }
public String getEmail() { return Email; }
public NewAgent setEmail(String value) { this.Email = value; return this; }
public Boolean getIsAdmin() { return IsAdmin; }
public NewAgent setIsAdmin(Boolean value) { this.IsAdmin = value; return this; }
}
public static class NewAgentResponse
{
public ResponseStatus ResponseStatus = null;
public ArrayList<NewAgent> NewAgent = new ArrayList<NewAgent>();
public ResponseStatus getResponseStatus() { return ResponseStatus; }
public NewAgentResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
public ArrayList<NewAgent> getNewAgent() { return NewAgent; }
public NewAgentResponse setNewAgent(ArrayList<NewAgent> value) { this.NewAgent = value; return this; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/NewAgent HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"AgentId":0,"NewAgent":[{"AgentId":0,"FirstName":"String","LastName":"String","UserName":"String","Email":"String","IsAdmin":false}]}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"NewAgent":[{"AgentId":0,"FirstName":"String","LastName":"String","UserName":"String","Email":"String","IsAdmin":false}]}