| Required role: | TenantAdmin |
| GET | /api/changelogs/{Id} | Returns a changelog | |
|---|---|---|---|
| GET | /changelogs/{Id} | Returns a changelog |
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
/**
* Returns a single changelog by its id
*/
@Api(Description="Returns a single changelog by its id")
@ApiResponse(Description="Success", IsDefaultResponse=true, ResponseType=ChangeLogDto.class, StatusCode=200)
public static class GetChangeLog implements IBaseRequest, IHasId, IHasTenantName, IGet
{
/**
* The unique id of the object
*/
@ApiMember(DataType="string", Description="The unique id of the object", Format="guid", IsRequired=true, ParameterType="path")
public UUID id = null;
@ApiMember(DataType="string", IsRequired=true, ParameterType="header")
@Validate(Validator="NotEmpty")
public String tenantName = null;
public UUID getId() { return id; }
public GetChangeLog setId(UUID value) { this.id = value; return this; }
public String getTenantName() { return tenantName; }
public GetChangeLog setTenantName(String value) { this.tenantName = value; return this; }
}
public static class ChangeLogDto implements IHasTenantId
{
public UUID id = null;
public UUID tenantId = null;
public Date timeStamp = null;
public String objectId = null;
public String objectName = null;
public ObjectTypes objectType = null;
public ChangeTypes changeType = null;
public String description = null;
public HashMap<String,ValueChangeDto> changes = new HashMap<String,ValueChangeDto>();
public String modifyUserId = null;
public String modifyUserEmail = null;
public UUID getId() { return id; }
public ChangeLogDto setId(UUID value) { this.id = value; return this; }
public UUID getTenantId() { return tenantId; }
public ChangeLogDto setTenantId(UUID value) { this.tenantId = value; return this; }
public Date getTimeStamp() { return timeStamp; }
public ChangeLogDto setTimeStamp(Date value) { this.timeStamp = value; return this; }
public String getObjectId() { return objectId; }
public ChangeLogDto setObjectId(String value) { this.objectId = value; return this; }
public String getObjectName() { return objectName; }
public ChangeLogDto setObjectName(String value) { this.objectName = value; return this; }
public ObjectTypes getObjectType() { return objectType; }
public ChangeLogDto setObjectType(ObjectTypes value) { this.objectType = value; return this; }
public ChangeTypes getChangeType() { return changeType; }
public ChangeLogDto setChangeType(ChangeTypes value) { this.changeType = value; return this; }
public String getDescription() { return description; }
public ChangeLogDto setDescription(String value) { this.description = value; return this; }
public HashMap<String,ValueChangeDto> getChanges() { return changes; }
public ChangeLogDto setChanges(HashMap<String,ValueChangeDto> value) { this.changes = value; return this; }
public String getModifyUserId() { return modifyUserId; }
public ChangeLogDto setModifyUserId(String value) { this.modifyUserId = value; return this; }
public String getModifyUserEmail() { return modifyUserEmail; }
public ChangeLogDto setModifyUserEmail(String value) { this.modifyUserEmail = value; return this; }
}
public static enum ObjectTypes
{
None,
ConfigItem,
Tenant,
Collection,
Resource,
ComputeNode,
VirtualMachine,
PhysicalMachine,
Disk,
Subnet,
IpAddress,
Job,
JobEvent,
FreezePeriod,
ResourceGroup,
Deployment,
ResourceGroupTemplate,
DeploymentTemplate,
ResourceProvider,
GenericResource,
Role,
Permission,
User,
PatchingWindow,
Update,
ReportDefinition,
TimeSeries,
DataPoint,
Action,
ActionAssignment,
UserNote;
}
public static enum ChangeTypes
{
Create,
Update,
Delete;
}
public static class ValueChangeDto
{
public String oldValue = null;
public String newValue = null;
public String getOldValue() { return oldValue; }
public ValueChangeDto setOldValue(String value) { this.oldValue = value; return this; }
public String getNewValue() { return newValue; }
public ValueChangeDto setNewValue(String value) { this.newValue = 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.
GET /api/changelogs/{Id} HTTP/1.1
Host: core.starburst.svc
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"id":"00000000-0000-0000-0000-000000000000","tenantId":"00000000-0000-0000-0000-000000000000","timeStamp":"0001-01-01T00:00:00.0000000Z","objectId":"String","objectName":"String","objectType":"None","changeType":"Create","description":"String","changes":{"String":{"oldValue":"String","newValue":"String"}},"modifyUserId":"String","modifyUserEmail":"String"}