| Required role: | TenantReader |
| GET | /api/jobevents/{Id} | Returns the jobevent | |
|---|---|---|---|
| GET | /jobevents/{Id} | Returns the jobevent |
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
/**
* Get jobevent
*/
@Api(Description="Get jobevent")
@ApiResponse(Description="The request endend successful", IsDefaultResponse=true, ResponseType=JobEventDto.class, StatusCode=200)
public static class GetJobEvent implements IGetSingleRequest, IHasTenantName, IGet
{
@ApiMember(DataType="string", Format="guid", IsRequired=true, ParameterType="path")
@Validate(Validator="NotEmpty")
public UUID id = null;
@ApiMember(DataType="string", IsRequired=true, ParameterType="header")
@Validate(Validator="NotEmpty")
public String tenantName = null;
/**
* If true, also soft deleted items will be returned
*/
@ApiMember(Description="If true, also soft deleted items will be returned", ParameterType="query")
public Boolean includeDeleted = null;
/**
* Returns all referenced object
*/
@ApiMember(Description="Returns all referenced object", ParameterType="query")
public Boolean includeReferencedObjects = null;
public UUID getId() { return id; }
public GetJobEvent setId(UUID value) { this.id = value; return this; }
public String getTenantName() { return tenantName; }
public GetJobEvent setTenantName(String value) { this.tenantName = value; return this; }
public Boolean isIncludeDeleted() { return includeDeleted; }
public GetJobEvent setIncludeDeleted(Boolean value) { this.includeDeleted = value; return this; }
public Boolean isIncludeReferencedObjects() { return includeReferencedObjects; }
public GetJobEvent setIncludeReferencedObjects(Boolean value) { this.includeReferencedObjects = value; return this; }
}
public static class JobEventDto implements IHasIdName, IHasTenantId, IHasObjectType
{
/**
* The id of the job
*/
public UUID id = null;
/**
* The id of the the tenant
*/
public UUID tenantId = null;
/**
* The id of the parent job
*/
public UUID jobId = null;
/**
* The name of the event. Events will be grouped on the name
*/
public String name = null;
public ObjectTypes objectType = null;
/**
* The current state of the event
*/
public JobEventStates state = null;
/**
* Start time of the event
*/
public Date startTime = null;
/**
* End time of the event (optional)
*/
public Date endTime = null;
/**
* A message with details to the current state
*/
public String message = null;
/**
* Api link pointing to this object
*/
public String selfLink = null;
/**
* The duration (in seconds) of the job event
*/
public Integer duration = null;
public UUID getId() { return id; }
public JobEventDto setId(UUID value) { this.id = value; return this; }
public UUID getTenantId() { return tenantId; }
public JobEventDto setTenantId(UUID value) { this.tenantId = value; return this; }
public UUID getJobId() { return jobId; }
public JobEventDto setJobId(UUID value) { this.jobId = value; return this; }
public String getName() { return name; }
public JobEventDto setName(String value) { this.name = value; return this; }
public ObjectTypes getObjectType() { return objectType; }
public JobEventDto setObjectType(ObjectTypes value) { this.objectType = value; return this; }
public JobEventStates getState() { return state; }
public JobEventDto setState(JobEventStates value) { this.state = value; return this; }
public Date getStartTime() { return startTime; }
public JobEventDto setStartTime(Date value) { this.startTime = value; return this; }
public Date getEndTime() { return endTime; }
public JobEventDto setEndTime(Date value) { this.endTime = value; return this; }
public String getMessage() { return message; }
public JobEventDto setMessage(String value) { this.message = value; return this; }
public String getSelfLink() { return selfLink; }
public JobEventDto setSelfLink(String value) { this.selfLink = value; return this; }
public Integer getDuration() { return duration; }
public JobEventDto setDuration(Integer value) { this.duration = 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 JobEventStates
{
Started,
Skipped,
Completed,
Failed;
}
}
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/jobevents/{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","jobId":"00000000-0000-0000-0000-000000000000","name":"String","objectType":"JobEvent","state":"Started","startTime":"0001-01-01T00:00:00.0000000Z","endTime":"0001-01-01T00:00:00.0000000Z","message":"String","selfLink":"String","duration":0}