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
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
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/jsv
Content-Type: text/jsv
Content-Length: length
{
IncludeContent: False,
Deactivate: False
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { Name: String, IsActive: False, Description: String, IsDataImported: False, Version: String, Author: String, DataImportedToSiteName: String, HasErrorsOnContentImport: False, HasErrorsOnStructureImport: False, HasErrorsOnActivate: False }