Test

<back to all web services

UpdateSession

The following routes are available for this service:
All Verbs/session/edit/{CustomName}
"use strict";
export class AuthUserSession {
    /** @param {{referrerUrl?:string,id?:string,userAuthId?:string,userAuthName?:string,userName?:string,twitterUserId?:string,twitterScreenName?:string,facebookUserId?:string,facebookUserName?:string,firstName?:string,lastName?:string,displayName?:string,company?:string,email?:string,primaryEmail?:string,phoneNumber?:string,birthDate?:string,birthDateRaw?:string,address?:string,address2?:string,city?:string,state?:string,country?:string,culture?:string,fullName?:string,gender?:string,language?:string,mailAddress?:string,nickname?:string,postalCode?:string,timeZone?:string,requestTokenSecret?:string,createdAt?:string,lastModified?:string,roles?:string[],permissions?:string[],isAuthenticated?:boolean,fromToken?:boolean,profileUrl?:string,sequence?:string,tag?:number,authProvider?:string,providerOAuthAccess?:IAuthTokens[],meta?:{ [index: string]: string; },audiences?:string[],scopes?:string[],dns?:string,rsa?:string,sid?:string,hash?:string,homePhone?:string,mobilePhone?:string,webpage?:string,emailConfirmed?:boolean,phoneNumberConfirmed?:boolean,twoFactorEnabled?:boolean,securityStamp?:string,type?:string,recoveryToken?:string,refId?:number,refIdStr?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    referrerUrl;
    /** @type {string} */
    id;
    /** @type {string} */
    userAuthId;
    /** @type {string} */
    userAuthName;
    /** @type {string} */
    userName;
    /** @type {string} */
    twitterUserId;
    /** @type {string} */
    twitterScreenName;
    /** @type {string} */
    facebookUserId;
    /** @type {string} */
    facebookUserName;
    /** @type {string} */
    firstName;
    /** @type {string} */
    lastName;
    /** @type {string} */
    displayName;
    /** @type {string} */
    company;
    /** @type {string} */
    email;
    /** @type {string} */
    primaryEmail;
    /** @type {string} */
    phoneNumber;
    /** @type {?string} */
    birthDate;
    /** @type {string} */
    birthDateRaw;
    /** @type {string} */
    address;
    /** @type {string} */
    address2;
    /** @type {string} */
    city;
    /** @type {string} */
    state;
    /** @type {string} */
    country;
    /** @type {string} */
    culture;
    /** @type {string} */
    fullName;
    /** @type {string} */
    gender;
    /** @type {string} */
    language;
    /** @type {string} */
    mailAddress;
    /** @type {string} */
    nickname;
    /** @type {string} */
    postalCode;
    /** @type {string} */
    timeZone;
    /** @type {string} */
    requestTokenSecret;
    /** @type {string} */
    createdAt;
    /** @type {string} */
    lastModified;
    /** @type {string[]} */
    roles;
    /** @type {string[]} */
    permissions;
    /** @type {boolean} */
    isAuthenticated;
    /** @type {boolean} */
    fromToken;
    /** @type {string} */
    profileUrl;
    /** @type {string} */
    sequence;
    /** @type {number} */
    tag;
    /** @type {string} */
    authProvider;
    /** @type {IAuthTokens[]} */
    providerOAuthAccess;
    /** @type {{ [index: string]: string; }} */
    meta;
    /** @type {string[]} */
    audiences;
    /** @type {string[]} */
    scopes;
    /** @type {string} */
    dns;
    /** @type {string} */
    rsa;
    /** @type {string} */
    sid;
    /** @type {string} */
    hash;
    /** @type {string} */
    homePhone;
    /** @type {string} */
    mobilePhone;
    /** @type {string} */
    webpage;
    /** @type {?boolean} */
    emailConfirmed;
    /** @type {?boolean} */
    phoneNumberConfirmed;
    /** @type {?boolean} */
    twoFactorEnabled;
    /** @type {string} */
    securityStamp;
    /** @type {string} */
    type;
    /** @type {string} */
    recoveryToken;
    /** @type {?number} */
    refId;
    /** @type {string} */
    refIdStr;
}
export class CustomUserSession extends AuthUserSession {
    /** @param {{customName?:string,customInfo?:string,referrerUrl?:string,id?:string,userAuthId?:string,userAuthName?:string,userName?:string,twitterUserId?:string,twitterScreenName?:string,facebookUserId?:string,facebookUserName?:string,firstName?:string,lastName?:string,displayName?:string,company?:string,email?:string,primaryEmail?:string,phoneNumber?:string,birthDate?:string,birthDateRaw?:string,address?:string,address2?:string,city?:string,state?:string,country?:string,culture?:string,fullName?:string,gender?:string,language?:string,mailAddress?:string,nickname?:string,postalCode?:string,timeZone?:string,requestTokenSecret?:string,createdAt?:string,lastModified?:string,roles?:string[],permissions?:string[],isAuthenticated?:boolean,fromToken?:boolean,profileUrl?:string,sequence?:string,tag?:number,authProvider?:string,providerOAuthAccess?:IAuthTokens[],meta?:{ [index: string]: string; },audiences?:string[],scopes?:string[],dns?:string,rsa?:string,sid?:string,hash?:string,homePhone?:string,mobilePhone?:string,webpage?:string,emailConfirmed?:boolean,phoneNumberConfirmed?:boolean,twoFactorEnabled?:boolean,securityStamp?:string,type?:string,recoveryToken?:string,refId?:number,refIdStr?:string}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /** @type {string} */
    customName;
    /** @type {string} */
    customInfo;
}
export class UnAuthInfo {
    /** @param {{customInfo?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    customInfo;
}
export class GetSessionResponse {
    /** @param {{result?:CustomUserSession,unAuthInfo?:UnAuthInfo,responseStatus?:ResponseStatus}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {CustomUserSession} */
    result;
    /** @type {UnAuthInfo} */
    unAuthInfo;
    /** @type {ResponseStatus} */
    responseStatus;
}
export class UpdateSession {
    /** @param {{customName?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    customName;
}

JavaScript UpdateSession DTOs

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

HTTP + XML

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

POST /session/edit/{CustomName} HTTP/1.1 
Host: test.servicestack.net 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<UpdateSession xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Test.ServiceInterface">
  <CustomName>String</CustomName>
</UpdateSession>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<GetSessionResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Test.ServiceInterface">
  <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
    <d2p1:ErrorCode>String</d2p1:ErrorCode>
    <d2p1:Message>String</d2p1:Message>
    <d2p1:StackTrace>String</d2p1:StackTrace>
    <d2p1:Errors>
      <d2p1:ResponseError>
        <d2p1:ErrorCode>String</d2p1:ErrorCode>
        <d2p1:FieldName>String</d2p1:FieldName>
        <d2p1:Message>String</d2p1:Message>
        <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </d2p1:Meta>
      </d2p1:ResponseError>
    </d2p1:Errors>
    <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </d2p1:Meta>
  </ResponseStatus>
  <Result>
    <ReferrerUrl xmlns="http://schemas.servicestack.net/types">String</ReferrerUrl>
    <Id xmlns="http://schemas.servicestack.net/types">String</Id>
    <UserAuthId xmlns="http://schemas.servicestack.net/types">String</UserAuthId>
    <UserAuthName xmlns="http://schemas.servicestack.net/types">String</UserAuthName>
    <UserName xmlns="http://schemas.servicestack.net/types">String</UserName>
    <TwitterUserId xmlns="http://schemas.servicestack.net/types">String</TwitterUserId>
    <TwitterScreenName xmlns="http://schemas.servicestack.net/types">String</TwitterScreenName>
    <FacebookUserId xmlns="http://schemas.servicestack.net/types">String</FacebookUserId>
    <FacebookUserName xmlns="http://schemas.servicestack.net/types">String</FacebookUserName>
    <FirstName xmlns="http://schemas.servicestack.net/types">String</FirstName>
    <LastName xmlns="http://schemas.servicestack.net/types">String</LastName>
    <DisplayName xmlns="http://schemas.servicestack.net/types">String</DisplayName>
    <Company xmlns="http://schemas.servicestack.net/types">String</Company>
    <Email xmlns="http://schemas.servicestack.net/types">String</Email>
    <PrimaryEmail xmlns="http://schemas.servicestack.net/types">String</PrimaryEmail>
    <PhoneNumber xmlns="http://schemas.servicestack.net/types">String</PhoneNumber>
    <BirthDate xmlns="http://schemas.servicestack.net/types">0001-01-01T00:00:00</BirthDate>
    <BirthDateRaw xmlns="http://schemas.servicestack.net/types">String</BirthDateRaw>
    <Address xmlns="http://schemas.servicestack.net/types">String</Address>
    <Address2 xmlns="http://schemas.servicestack.net/types">String</Address2>
    <City xmlns="http://schemas.servicestack.net/types">String</City>
    <State xmlns="http://schemas.servicestack.net/types">String</State>
    <Country xmlns="http://schemas.servicestack.net/types">String</Country>
    <Culture xmlns="http://schemas.servicestack.net/types">String</Culture>
    <FullName xmlns="http://schemas.servicestack.net/types">String</FullName>
    <Gender xmlns="http://schemas.servicestack.net/types">String</Gender>
    <Language xmlns="http://schemas.servicestack.net/types">String</Language>
    <MailAddress xmlns="http://schemas.servicestack.net/types">String</MailAddress>
    <Nickname xmlns="http://schemas.servicestack.net/types">String</Nickname>
    <PostalCode xmlns="http://schemas.servicestack.net/types">String</PostalCode>
    <TimeZone xmlns="http://schemas.servicestack.net/types">String</TimeZone>
    <RequestTokenSecret xmlns="http://schemas.servicestack.net/types">String</RequestTokenSecret>
    <CreatedAt xmlns="http://schemas.servicestack.net/types">0001-01-01T00:00:00</CreatedAt>
    <LastModified xmlns="http://schemas.servicestack.net/types">0001-01-01T00:00:00</LastModified>
    <Roles xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns="http://schemas.servicestack.net/types">
      <d3p1:string>String</d3p1:string>
    </Roles>
    <Permissions xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns="http://schemas.servicestack.net/types">
      <d3p1:string>String</d3p1:string>
    </Permissions>
    <IsAuthenticated xmlns="http://schemas.servicestack.net/types">false</IsAuthenticated>
    <FromToken xmlns="http://schemas.servicestack.net/types">false</FromToken>
    <ProfileUrl xmlns="http://schemas.servicestack.net/types">String</ProfileUrl>
    <Sequence xmlns="http://schemas.servicestack.net/types">String</Sequence>
    <Tag xmlns="http://schemas.servicestack.net/types">0</Tag>
    <AuthProvider xmlns="http://schemas.servicestack.net/types">String</AuthProvider>
    <ProviderOAuthAccess xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns="http://schemas.servicestack.net/types">
      <d3p1:anyType i:nil="true" />
    </ProviderOAuthAccess>
    <Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns="http://schemas.servicestack.net/types">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </Meta>
    <Audiences xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns="http://schemas.servicestack.net/types">
      <d3p1:string>String</d3p1:string>
    </Audiences>
    <Scopes xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns="http://schemas.servicestack.net/types">
      <d3p1:string>String</d3p1:string>
    </Scopes>
    <Dns xmlns="http://schemas.servicestack.net/types">String</Dns>
    <Rsa xmlns="http://schemas.servicestack.net/types">String</Rsa>
    <Sid xmlns="http://schemas.servicestack.net/types">String</Sid>
    <Hash xmlns="http://schemas.servicestack.net/types">String</Hash>
    <HomePhone xmlns="http://schemas.servicestack.net/types">String</HomePhone>
    <MobilePhone xmlns="http://schemas.servicestack.net/types">String</MobilePhone>
    <Webpage xmlns="http://schemas.servicestack.net/types">String</Webpage>
    <EmailConfirmed xmlns="http://schemas.servicestack.net/types">false</EmailConfirmed>
    <PhoneNumberConfirmed xmlns="http://schemas.servicestack.net/types">false</PhoneNumberConfirmed>
    <TwoFactorEnabled xmlns="http://schemas.servicestack.net/types">false</TwoFactorEnabled>
    <SecurityStamp xmlns="http://schemas.servicestack.net/types">String</SecurityStamp>
    <Type xmlns="http://schemas.servicestack.net/types">String</Type>
    <RecoveryToken xmlns="http://schemas.servicestack.net/types">String</RecoveryToken>
    <RefId xmlns="http://schemas.servicestack.net/types">0</RefId>
    <RefIdStr xmlns="http://schemas.servicestack.net/types">String</RefIdStr>
    <CustomInfo>String</CustomInfo>
    <CustomName>String</CustomName>
  </Result>
  <UnAuthInfo>
    <CustomInfo>String</CustomInfo>
  </UnAuthInfo>
</GetSessionResponse>