TechStacks!

<back to all web services

GetUserOrganizations

Posts
Requires Authentication
The following routes are available for this service:
All Verbs/user/organizations
namespace TechStacks.ServiceModel

open System
open System.IO
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    [<AllowNullLiteral>]
    type OrganizationMember() = 
        member val Id:Int32 = new Int32() with get,set
        member val OrganizationId:Int32 = new Int32() with get,set
        member val UserId:Int32 = new Int32() with get,set
        member val UserName:String = null with get,set
        member val IsOwner:Boolean = new Boolean() with get,set
        member val IsModerator:Boolean = new Boolean() with get,set
        member val DenyAll:Boolean = new Boolean() with get,set
        member val DenyPosts:Boolean = new Boolean() with get,set
        member val DenyComments:Boolean = new Boolean() with get,set
        member val Notes:String = null with get,set

    [<AllowNullLiteral>]
    type OrganizationMemberInvite() = 
        member val Id:Int32 = new Int32() with get,set
        member val OrganizationId:Int32 = new Int32() with get,set
        member val UserId:Int32 = new Int32() with get,set
        member val UserName:String = null with get,set
        member val Dismissed:Nullable<DateTime> = new Nullable<DateTime>() with get,set

    [<AllowNullLiteral>]
    type OrganizationSubscription() = 
        member val Id:Int64 = new Int64() with get,set
        member val OrganizationId:Int32 = new Int32() with get,set
        member val UserId:Int32 = new Int32() with get,set
        member val UserName:String = null with get,set
        member val PostTypes:String[] = null with get,set
        member val FrequencyDays:Nullable<Int32> = new Nullable<Int32>() with get,set
        member val LastSyncedId:Nullable<Int64> = new Nullable<Int64>() with get,set
        member val LastSynced:Nullable<DateTime> = new Nullable<DateTime>() with get,set
        member val Created:DateTime = new DateTime() with get,set

    [<AllowNullLiteral>]
    type GetUserOrganizationsResponse() = 
        member val Members:ResizeArray<OrganizationMember> = null with get,set
        member val MemberInvites:ResizeArray<OrganizationMemberInvite> = null with get,set
        member val Subscriptions:ResizeArray<OrganizationSubscription> = null with get,set

    [<AllowNullLiteral>]
    type GetUserOrganizations() = 
        interface IGet

F# GetUserOrganizations DTOs

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

HTTP + CSV

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

POST /user/organizations HTTP/1.1 
Host: techstacks.io 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"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-01T00:00:00.0000000"}],"subscriptions":[{"id":0,"organizationId":0,"userId":0,"userName":"String","postTypes":["String"],"frequencyDays":0,"lastSyncedId":0,"lastSynced":"0001-01-01T00:00:00.0000000","created":"0001-01-01T00:00:00.0000000"}]}