<back to all web services

AddonMessage

The following routes are available for this service:
GET POST/RestApi/Sitefinity/packaging/add-on
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class AddonMessage:
    id: Optional[str] = None
    include_content: bool = False
    deactivate: bool = False


class AddOnEntryType(str, Enum):
    CONTENT = 'Content'
    TEMPLATE = 'Template'
    CUSTOM = 'Custom'
    MODULE = 'Module'
    FORM = 'Form'
    CLASSIFICATION = 'Classification'
    WEB_SERVICE = 'WebService'


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class AddOnEntry:
    display_name: Optional[str] = None
    count: int = 0
    addon_entry_type: Optional[AddOnEntryType] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class AddonInfo:
    id: Optional[str] = None
    name: Optional[str] = None
    is_active: bool = False
    description: Optional[str] = None
    is_data_imported: bool = False
    version: Optional[str] = None
    author: Optional[str] = None
    data_imported_to_site_name: Optional[str] = None
    entries: Optional[List[AddOnEntry]] = None
    has_errors_on_content_import: bool = False
    has_errors_on_structure_import: bool = False
    has_errors_on_activate: bool = False

Python AddonMessage DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /RestApi/Sitefinity/packaging/add-on HTTP/1.1 
Host: www.asg.com.au 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"IncludeContent":false,"Deactivate":false}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"Name":"String","IsActive":false,"Description":"String","IsDataImported":false,"Version":"String","Author":"String","DataImportedToSiteName":"String","HasErrorsOnContentImport":false,"HasErrorsOnStructureImport":false,"HasErrorsOnActivate":false}