CoreService

<back to all web services

GetChangeLog

ChangeLog - CRUD

Returns a single changelog by its id

Requires Authentication
Required role:TenantAdmin
The following routes are available for this service:
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.*


/**
* 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)
open class GetChangeLog : 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")
    override var id:UUID? = null

    @ApiMember(DataType="string", IsRequired=true, ParameterType="header")
    @Validate(Validator="NotEmpty")
    override var tenantName:String? = null
}

open class ChangeLogDto : IHasTenantId
{
    open var id:UUID? = null
    override var tenantId:UUID? = null
    open var timeStamp:Date? = null
    open var objectId:String? = null
    open var objectName:String? = null
    open var objectType:ObjectTypes? = null
    open var changeType:ChangeTypes? = null
    open var description:String? = null
    open var changes:HashMap<String,ValueChangeDto> = HashMap<String,ValueChangeDto>()
    open var modifyUserId:String? = null
    open var modifyUserEmail:String? = null
}

enum class 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,
}

enum class ChangeTypes
{
    Create,
    Update,
    Delete,
}

open class ValueChangeDto
{
    open var oldValue:String? = null
    open var newValue:String? = null
}

Kotlin GetChangeLog DTOs

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

HTTP + JSON

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"}