TechStacks!

<back to all web services

GetOrganizationAdmin

Organization
Requires Authentication
The following routes are available for this service:
GET/orgs/{Id}/admin
import Foundation
import ServiceStack

public class GetOrganizationAdmin : IGet, Codable
{
    public var id:Int

    required public init(){}
}

public class GetOrganizationAdminResponse : Codable
{
    public var labels:[OrganizationLabel]
    public var members:[OrganizationMember]
    public var memberInvites:[OrganizationMemberInvite]
    public var reportedPosts:[PostReportInfo]
    public var reportedPostComments:[PostCommentReportInfo]
    public var responseStatus:ResponseStatus

    required public init(){}
}

public class OrganizationLabel : Codable
{
    public var slug:String
    public var organizationId:Int
    public var Description:String
    public var color:String

    required public init(){}
}

public class OrganizationMember : Codable
{
    public var id:Int
    public var organizationId:Int
    public var userId:Int
    public var userName:String
    public var isOwner:Bool
    public var isModerator:Bool
    public var denyAll:Bool
    public var denyPosts:Bool
    public var denyComments:Bool
    public var notes:String

    required public init(){}
}

public class OrganizationMemberInvite : Codable
{
    public var id:Int
    public var organizationId:Int
    public var userId:Int
    public var userName:String
    public var dismissed:Date?

    required public init(){}
}

public class PostReportInfo : Codable
{
    public var id:Int
    public var organizationId:Int
    public var postId:Int
    public var userId:Int
    public var userName:String
    public var flagType:FlagType
    public var reportNotes:String
    public var created:Date
    public var acknowledged:Date?
    public var acknowledgedBy:String
    public var dismissed:Date?
    public var dismissedBy:String
    public var title:String
    public var reportCount:Int
    public var createdBy:String

    required public init(){}
}

public enum FlagType : String, Codable
{
    case Violation
    case Spam
    case Abusive
    case Confidential
    case OffTopic
    case Other
}

public class PostCommentReportInfo : Codable
{
    public var id:Int
    public var organizationId:Int
    public var postId:Int
    public var postCommentId:Int
    public var userId:Int
    public var userName:String
    public var flagType:FlagType
    public var reportNotes:String
    public var created:Date
    public var acknowledged:Date?
    public var acknowledgedBy:String
    public var dismissed:Date?
    public var dismissedBy:String
    public var contentHtml:String
    public var reportCount:Int
    public var createdBy:String

    required public init(){}
}


Swift GetOrganizationAdmin DTOs

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

HTTP + JSV

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

GET /orgs/{Id}/admin HTTP/1.1 
Host: techstacks.io 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	labels: 
	[
		{
			slug: String,
			organizationId: 0,
			description: String,
			color: String
		}
	],
	members: 
	[
		{
			id: 0,
			organizationId: 0,
			userId: 0,
			userName: String,
			isOwner: False,
			isModerator: False,
			denyAll: False,
			denyPosts: False,
			denyComments: False,
			notes: String
		}
	],
	memberInvites: 
	[
		{
			id: 0,
			organizationId: 0,
			userId: 0,
			userName: String,
			dismissed: 0001-01-01
		}
	],
	reportedPosts: 
	[
		{
			id: 0,
			organizationId: 0,
			postId: 0,
			userId: 0,
			userName: String,
			flagType: Violation,
			reportNotes: String,
			created: 0001-01-01,
			acknowledged: 0001-01-01,
			acknowledgedBy: String,
			dismissed: 0001-01-01,
			dismissedBy: String,
			title: String,
			reportCount: 0,
			createdBy: String
		}
	],
	reportedPostComments: 
	[
		{
			id: 0,
			organizationId: 0,
			postId: 0,
			postCommentId: 0,
			userId: 0,
			userName: String,
			flagType: Violation,
			reportNotes: String,
			created: 0001-01-01,
			acknowledged: 0001-01-01,
			acknowledgedBy: String,
			dismissed: 0001-01-01,
			dismissedBy: String,
			contentHtml: String,
			reportCount: 0,
			createdBy: String
		}
	],
	responseStatus: 
	{
		errorCode: String,
		message: String,
		stackTrace: String,
		errors: 
		[
			{
				errorCode: String,
				fieldName: String,
				message: String,
				meta: 
				{
					String: String
				}
			}
		],
		meta: 
		{
			String: String
		}
	}
}