| Required role: | TenantReader |
| GET | /api/actions/{Id}/definition | Returns the action definition | |
|---|---|---|---|
| GET | /actions/{Id}/definition | Returns the action definition |
import Foundation
import ServiceStack
/**
* Returns the definition
*/
// @Api(Description="Returns the definition")
// @ApiResponse(Description="Success", IsDefaultResponse=true, ResponseType=typeof(TemplateDefinitionDto), StatusCode=200)
public class GetActionDefinition : IGetSingleRequest, IHasTenantName, IGet, Codable
{
// @ApiMember(DataType="string", Format="guid", IsRequired=true, ParameterType="path")
public var id:String
// @ApiMember(DataType="string", IsRequired=true, ParameterType="header")
// @Validate(Validator="NotEmpty")
public var tenantName:String
// @ApiMember(IsRequired=true, ParameterType="query")
public var definitionFormat:TemplateLanguages
/**
* If true, also soft deleted items will be returned
*/
// @ApiMember(Description="If true, also soft deleted items will be returned", ParameterType="query")
public var includeDeleted:Bool?
// @ApiMember(ParameterType="query", Verb="GET")
public var includeReferencedObjects:Bool?
required public init(){}
}
public enum TemplateLanguages : String, Codable
{
case Json
case Yaml
}
public class TemplateDefinitionDto : Codable
{
/**
* The schema version of the attached definition
*/
public var schemaVersion:Int
/**
* The template definition/body either as json or yaml
*/
public var definition:String
required public init(){}
}
Swift GetActionDefinition 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
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"}