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 Foundation
import ServiceStack

/**
* Returns a single changelog by its id
*/
// @Api(Description="Returns a single changelog by its id")
// @ApiResponse(Description="Success", IsDefaultResponse=true, ResponseType=typeof(ChangeLogDto), StatusCode=200)
public class GetChangeLog : IBaseRequest, IHasId, IHasTenantName, IGet, Codable
{
    /**
    * The unique id of the object
    */
    // @ApiMember(DataType="string", Description="The unique id of the object", Format="guid", IsRequired=true, ParameterType="path")
    public var id:String

    // @ApiMember(DataType="string", IsRequired=true, ParameterType="header")
    // @Validate(Validator="NotEmpty")
    public var tenantName:String

    required public init(){}
}

public class ChangeLogDto : IHasTenantId, Codable
{
    public var id:String
    public var tenantId:String
    public var timeStamp:Date
    public var objectId:String
    public var objectName:String
    public var objectType:ObjectTypes
    public var changeType:ChangeTypes
    public var Description:String
    public var changes:[String:ValueChangeDto] = [:]
    public var modifyUserId:String
    public var modifyUserEmail:String

    required public init(){}
}

public enum ObjectTypes : String, Codable
{
    case None
    case ConfigItem
    case Tenant
    case Collection
    case Resource
    case ComputeNode
    case VirtualMachine
    case PhysicalMachine
    case Disk
    case Subnet
    case IPAddress
    case Job
    case JobEvent
    case FreezePeriod
    case ResourceGroup
    case Deployment
    case ResourceGroupTemplate
    case DeploymentTemplate
    case ResourceProvider
    case GenericResource
    case Role
    case Permission
    case User
    case PatchingWindow
    case Update
    case ReportDefinition
    case TimeSeries
    case DataPoint
    case Action
    case ActionAssignment
    case UserNote
}

public enum ChangeTypes : String, Codable
{
    case Create
    case Update
    case Delete
}

public class ValueChangeDto : Codable
{
    public var oldValue:String
    public var newValue:String

    required public init(){}
}


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