| All Verbs | /apikeys/regenerate | ||
|---|---|---|---|
| All Verbs | /apikeys/regenerate/{Environment} |
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
@DataContract
public static class RegenerateApiKeys implements IPost, IMeta
{
@DataMember(Order=1)
public String environment = null;
@DataMember(Order=2)
public HashMap<String,String> meta = null;
public String getEnvironment() { return environment; }
public RegenerateApiKeys setEnvironment(String value) { this.environment = value; return this; }
public HashMap<String,String> getMeta() { return meta; }
public RegenerateApiKeys setMeta(HashMap<String,String> value) { this.meta = value; return this; }
}
@DataContract
public static class RegenerateApiKeysResponse implements IMeta
{
@DataMember(Order=1)
public ArrayList<UserApiKey> results = null;
@DataMember(Order=2)
public HashMap<String,String> meta = null;
@DataMember(Order=3)
public ResponseStatus responseStatus = null;
public ArrayList<UserApiKey> getResults() { return results; }
public RegenerateApiKeysResponse setResults(ArrayList<UserApiKey> value) { this.results = value; return this; }
public HashMap<String,String> getMeta() { return meta; }
public RegenerateApiKeysResponse setMeta(HashMap<String,String> value) { this.meta = value; return this; }
public ResponseStatus getResponseStatus() { return responseStatus; }
public RegenerateApiKeysResponse setResponseStatus(ResponseStatus value) { this.responseStatus = value; return this; }
}
@DataContract
public static class UserApiKey implements IMeta
{
@DataMember(Order=1)
public String key = null;
@DataMember(Order=2)
public String keyType = null;
@DataMember(Order=3)
public Date expiryDate = null;
@DataMember(Order=4)
public HashMap<String,String> meta = null;
public String getKey() { return key; }
public UserApiKey setKey(String value) { this.key = value; return this; }
public String getKeyType() { return keyType; }
public UserApiKey setKeyType(String value) { this.keyType = value; return this; }
public Date getExpiryDate() { return expiryDate; }
public UserApiKey setExpiryDate(Date value) { this.expiryDate = value; return this; }
public HashMap<String,String> getMeta() { return meta; }
public UserApiKey setMeta(HashMap<String,String> value) { this.meta = 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 /apikeys/regenerate HTTP/1.1
Host: milliet.io
Accept: application/json
Content-Type: application/json
Content-Length: length
{"environment":"String","meta":{"String":"String"}}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"results":[{"key":"String","keyType":"String","expiryDate":"0001-01-01T00:00:00.0000000","meta":{"String":"String"}}],"meta":{"String":"String"},"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}