| Required role: | TenantReader |
| GET | /api/actions/{Id}/definition | Returns the action definition | |
|---|---|---|---|
| GET | /actions/{Id}/definition | Returns the action definition |
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
/**
* Returns the definition
*/
@Api(Description="Returns the definition")
@ApiResponse(Description="Success", IsDefaultResponse=true, ResponseType=TemplateDefinitionDto.class, StatusCode=200)
public static class GetActionDefinition implements IGetSingleRequest, IHasTenantName, IGet
{
@ApiMember(DataType="string", Format="guid", IsRequired=true, ParameterType="path")
public UUID id = null;
@ApiMember(DataType="string", IsRequired=true, ParameterType="header")
@Validate(Validator="NotEmpty")
public String tenantName = null;
@ApiMember(IsRequired=true, ParameterType="query")
public TemplateLanguages definitionFormat = 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;
@ApiMember(ParameterType="query", Verb="GET")
public Boolean includeReferencedObjects = null;
public UUID getId() { return id; }
public GetActionDefinition setId(UUID value) { this.id = value; return this; }
public String getTenantName() { return tenantName; }
public GetActionDefinition setTenantName(String value) { this.tenantName = value; return this; }
public TemplateLanguages getDefinitionFormat() { return definitionFormat; }
public GetActionDefinition setDefinitionFormat(TemplateLanguages value) { this.definitionFormat = value; return this; }
public Boolean isIncludeDeleted() { return includeDeleted; }
public GetActionDefinition setIncludeDeleted(Boolean value) { this.includeDeleted = value; return this; }
public Boolean isIncludeReferencedObjects() { return includeReferencedObjects; }
public GetActionDefinition setIncludeReferencedObjects(Boolean value) { this.includeReferencedObjects = value; return this; }
}
public static enum TemplateLanguages
{
Json,
Yaml;
}
public static class TemplateDefinitionDto
{
/**
* The schema version of the attached definition
*/
public Integer schemaVersion = null;
/**
* The template definition/body either as json or yaml
*/
public String definition = null;
public Integer getSchemaVersion() { return schemaVersion; }
public TemplateDefinitionDto setSchemaVersion(Integer value) { this.schemaVersion = value; return this; }
public String getDefinition() { return definition; }
public TemplateDefinitionDto setDefinition(String value) { this.definition = 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/actions/{Id}/definition HTTP/1.1
Host: core.starburst.svc
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"schemaVersion":0,"definition":"String"}