CoreService

<back to all web services

GetActionDefinitions

Action - CRUD

Returns action definitions

Requires Authentication
Required role:TenantReader
The following routes are available for this service:
GET/api/actions/definitionsReturns action definitions
GET/actions/definitionsReturns action definitions
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using CoreService.ServiceModel.Dtos.Actions.Crud;
using CoreService.ServiceModel.Enums;
using YCO.Dune.Models.Dtos.Common.Responses;
using CoreService.ServiceModel.Dtos.Base.Responses;

namespace CoreService.ServiceModel.Dtos.Actions.Crud
{
    ///<summary>
    ///Returns action definitions
    ///</summary>
    [Api(Description="Returns action definitions")]
    [ApiResponse(Description="Success", IsDefaultResponse=true, ResponseType=typeof(YCO.Dune.Models.Dtos.Common.Responses.ItemsResponse`1[[CoreService.ServiceModel.Dtos.Base.Responses.TemplateDefinitionDto, CoreService.ServiceModel, Version=0.15.14.0, Culture=neutral, PublicKeyToken=null]]), StatusCode=200)]
    public partial class GetActionDefinitions
        : IGetMultipleRequest, IHasTenantName, IGet
    {
        [ApiMember(DataType="string", IsRequired=true, ParameterType="header")]
        [Validate("NotEmpty")]
        public virtual string TenantName { get; set; }

        [ApiMember(IsRequired=true, ParameterType="query")]
        public virtual TemplateLanguages DefinitionFormat { get; set; }

        ///<summary>
        ///The action name
        ///</summary>
        [ApiMember(DataType="string", Description="The action name", ParameterType="query")]
        [Validate("NotEmpty")]
        public virtual string Name { get; set; }

        ///<summary>
        ///If true, also soft deleted items will be returned
        ///</summary>
        [ApiMember(Description="If true, also soft deleted items will be returned", ParameterType="query")]
        public virtual bool? IncludeDeleted { get; set; }
    }

}

namespace CoreService.ServiceModel.Dtos.Base.Responses
{
    public partial class VariableDto
    {
        public virtual string Name { get; set; }
        ///<summary>
        ///Value in form of a json string (e.g. Number = 1234, String = "foo", Boolean = false, List = [1,2,3,4]). Note: string values need extra quotes
        ///</summary>
        public virtual string Value { get; set; }
        ///<summary>
        ///The data type of the value property
        ///</summary>
        public virtual ValueDataType Type { get; set; }
        public virtual string? Description { get; set; }
        public virtual bool IsInherited { get; set; }
        public virtual Environments? Environment { get; set; }
    }

}

namespace CoreService.ServiceModel.Enums
{
    public enum Environments
    {
        Lab,
        Poc,
        Dev,
        Test,
        Int,
        Uat,
        Prod,
    }

    public enum TemplateLanguages
    {
        Json,
        Yaml,
    }

    public enum ValueDataType
    {
        String,
        Number,
        Boolean,
        List,
    }

}

namespace YCO.Dune.Models.Dtos.Common.Responses
{
    public partial class ItemsResponse<T>
    {
        public virtual IList<VariableDto> Items { get; set; }
        public virtual int Offset { get; set; }
        public virtual int Total { get; set; }
        public virtual bool IsGrouped { get; set; }
        public virtual ResponseStatus? ResponseStatus { get; set; }
        public virtual Dictionary<string, string>? Meta { get; set; }
    }

}

C# GetActionDefinitions 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/actions/definitions HTTP/1.1 
Host: core.starburst.svc 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"items":null,"offset":0,"total":0,"isGrouped":false,"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}},"meta":{"String":"String"}}