POST | /users/register/machine |
---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class RegisterMachineUserRequest extends PostOperationUnTenanted<RegisterMachineUserResponse>
{
public String name = null;
public String timezone = null;
public String getName() { return name; }
public RegisterMachineUserRequest setName(String value) { this.name = value; return this; }
public String getTimezone() { return timezone; }
public RegisterMachineUserRequest setTimezone(String value) { this.timezone = value; return this; }
}
public static class PostOperationUnTenanted<TResponse> implements IPost
{
}
public static class RegisterMachineUserResponse
{
public ResponseStatus responseStatus = null;
public String userId = null;
public String apiKey = null;
public ResponseStatus getResponseStatus() { return responseStatus; }
public RegisterMachineUserResponse setResponseStatus(ResponseStatus value) { this.responseStatus = value; return this; }
public String getUserId() { return userId; }
public RegisterMachineUserResponse setUserId(String value) { this.userId = value; return this; }
public String getApiKey() { return apiKey; }
public RegisterMachineUserResponse setApiKey(String value) { this.apiKey = value; return this; }
}
}
Java RegisterMachineUserRequest DTOs
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 /users/register/machine HTTP/1.1
Host: foundrystage-api-app.azurewebsites.net
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
name: String,
timezone: String
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { responseStatus: { errorCode: String, message: String, stackTrace: String, errors: [ { errorCode: String, fieldName: String, message: String, meta: { String: String } } ], meta: { String: String } }, userId: String, apiKey: String }