| Requires any of the roles: | Client, Admin, Partner |
| POST | /auth/apikeys/regenerate | ||
|---|---|---|---|
| POST | /auth/apikeys/regenerate/{Environment} |
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class RegenerateApiKeyRequest
{
/**
* Environment type
*/
@ApiMember(Description="Environment type")
public String Environment = null;
public String getEnvironment() { return Environment; }
public RegenerateApiKeyRequest setEnvironment(String value) { this.Environment = 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; }
}
}
Java RegenerateApiKeyRequest 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 /auth/apikeys/regenerate HTTP/1.1
Host: duengageapi.uat.scadsoftware.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
Environment: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Results:
[
{
Key: String,
KeyType: String,
ExpiryDate: 0001-01-01,
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
}
}
}