FastTrack

From DreamFactory
Jump to: navigation, search
DFEConsoleFastTrack
m
m
Line 21: Line 21:
 
The payload may contain the following properties:
 
The payload may contain the following properties:
  
<source lang="javascript">
+
<source>
 
{
 
{
 
   "redirect":  true|false,
 
   "redirect":  true|false,
Line 36: Line 36:
 
All fields are required except <code>redirect</code>, <code>company</code>, <code>nickname</code> and <code>phone</code>.
 
All fields are required except <code>redirect</code>, <code>company</code>, <code>nickname</code> and <code>phone</code>.
  
If the process is successful and <code>redirect</code> is '''true''', the response will be a 302 HTTP redirect directly to the newly launched instance. Otherwise, a standard DFE Console API response will be returned. The response details are as follows:
+
If the process is successful and <code>redirect</code> is '''true''', the response will be a 302 HTTP redirect directly to the newly launched instance. Otherwise, a standard DFE Console API response will be returned. Responses are detailed in the following sections.
  
<source lang="javascript">
+
==== Success Respose ====
 +
<source>
 
{
 
{
  "user": false|{
+
    "success":    true,
    "id": 123,
+
    "status_code": 200,
    ...
+
    "response": {
  },
+
        "user": {
  "instance-id": "joe@blow.com",
+
            "id": 123,
  "instance":    false|{
+
            ...
    "id": 123
+
        },
    ...
+
        "instance-id": "joe",
  },
+
        "instance":    {
  "instance-initialized": true|false,
+
            "id": 123
  "instance-admin":      true|false,
+
            ...
  "redirect":            false|{
+
        },
    "location":          "redirect-uri",
+
        "instance-initialized": true,
    "status-code":        302,
+
        "instance-admin":      true,
    "payload": {
+
        "redirect":            {
      "fastTrackGuid":    "new user's registration request GUID"
+
            "location":          "redirect-uri",
 +
            "status-code":        302,
 +
            "payload": {
 +
                "fastTrackGuid":    "new user's registration request GUID"
 +
            }
 +
        }
 +
    },
 +
    request: {
 +
        elapsed:    37.3943,
 +
        id:          "102fb7bff406b58eca8f8499f461f64204f62ba1",
 +
        request-uri: "/fast-track",
 +
        signature:  "oofbIbnrWJq04/+4/K/q9eyDzB71UxZ19huyaDVfbMA=",
 +
        start:      "2016-02-25T16:32:08-05:00",
 +
        verb:        "POST"
 +
        version:    "2.0"
 +
    }
 +
}
 +
</source>
 +
 
 +
==== Error Response ====
 +
<source>
 +
{
 +
    success:    false,
 +
    status_code: 400|404|500,
 +
    error: {
 +
        code:    400|404|500,
 +
        message: "I am an error message"
 +
    },
 +
    response: null,
 +
    request: {
 +
        elapsed:    0.1109,
 +
        id:          "664d18cd422c5968f603f8fe8f928524220b5855",
 +
        request-uri: "/fast-track",
 +
        signature:  "noERPor0Lg76mXDWJ1gsmisueBL5psl6fszpsuqE98A=",
 +
        start:      "2016-02-25T16:21:25-05:00",
 +
        verb:        "POST"
 +
        version:    "2.0"
 
     }
 
     }
 
}
 
}
 
</source>
 
</source>

Revision as of 21:35, 25 February 2016

The FastTrack system is intended to provide a one-click entry into a DreamFactory%trade; instance.

Calling this endpoint performs the following operations:

  1. Validates the request
  2. A DFE Dashboard user is created with the provided information
  3. An instance is created named using a portion of the email address
  4. The instance is initialized and the database is created
  5. An instance admin is created on the new instance
  6. The instance admin is logged in and the browser is redirected to the new instance

How to use FastTrack

You must call FastTrack with an HTTP POST with a JSON payload.

The Endpoint

The FastTrack endpoint depends on the domain name of the installation. We'll use dfe.example.com<f/code> as our example installation.

The endpoint to call for this installation is <code>http://console.dfe.example.com/fast-trak.

The Payload

The payload may contain the following properties:

Invalid language.

You need to specify a language like this: <source lang="html4strict">...</source>

Supported languages for syntax highlighting:

4cs, 6502acme, 6502kickass, 6502tasm, 68000devpac, abap, actionscript, actionscript3, ada, aimms, algol68, apache, applescript, arm, asm, asp, asymptote, autoconf, autohotkey, autoit, avisynth, awk, bascomavr, bash, basic4gl, bf, bibtex, blitzbasic, bnf, boo, c, caddcl, cadlisp, cfdg, cfm, chaiscript, chapel, cil, clojure, cmake, cobol, coffeescript, cpp, csharp, css, cuesheet, d, dart, dcl, dcpu16, dcs, delphi, diff, div, dos, dot, e, ecmascript, eiffel, email, epc, erlang, euphoria, ezt, f1, falcon, fo, fortran, freebasic, freeswitch, fsharp, gambas, gdb, genero, genie, gettext, glsl, gml, gnuplot, go, groovy, gwbasic, haskell, haxe, hicest, hq9plus, html4strict, html5, icon, idl, ini, inno, intercal, io, ispfpanel, j, java, java5, javascript, jcl, jquery, kixtart, klonec, klonecpp, latex, lb, ldif, lisp, llvm, locobasic, logtalk, lolcode, lotusformulas, lotusscript, lscript, lsl2, lua, m68k, magiksf, make, mapbasic, matlab, mirc, mmix, modula2, modula3, mpasm, mxml, mysql, nagios, netrexx, newlisp, nginx, nimrod, nsis, oberon2, objc, objeck, ocaml, octave, oobas, oorexx, oracle11, oracle8, oxygene, oz, parasail, parigp, pascal, pcre, per, perl, perl6, pf, php, pic16, pike, pixelbender, pli, plsql, postgresql, postscript, povray, powerbuilder, powershell, proftpd, progress, prolog, properties, providex, purebasic, pycon, pys60, python, q, qbasic, qml, racket, rails, rbs, rebol, reg, rexx, robots, rpmspec, rsplus, ruby, rust, sas, scala, scheme, scilab, scl, sdlbasic, smalltalk, smarty, spark, sparql, sql, standardml, stonescript, systemverilog, tcl, teraterm, text, thinbasic, tsql, typoscript, unicon, upc, urbi, uscript, vala, vb, vbnet, vbscript, vedit, verilog, vhdl, vim, visualfoxpro, visualprolog, whitespace, whois, winbatch, xbasic, xml, xpp, yaml, z80, zxbasic


{
  "redirect":   true|false,
  "email":      "[email protected]",
  "first-name": "Joe",
  "last-name":  "Blow",
  "password":   "gratePassW0rd!",
  "nickname":   "Joe",
  "company":    "",
  "phone":      ""
}

All fields are required except redirect, company, nickname and phone.

If the process is successful and redirect is true, the response will be a 302 HTTP redirect directly to the newly launched instance. Otherwise, a standard DFE Console API response will be returned. Responses are detailed in the following sections.

Success Respose

Invalid language.

You need to specify a language like this: <source lang="html4strict">...</source>

Supported languages for syntax highlighting:

4cs, 6502acme, 6502kickass, 6502tasm, 68000devpac, abap, actionscript, actionscript3, ada, aimms, algol68, apache, applescript, arm, asm, asp, asymptote, autoconf, autohotkey, autoit, avisynth, awk, bascomavr, bash, basic4gl, bf, bibtex, blitzbasic, bnf, boo, c, caddcl, cadlisp, cfdg, cfm, chaiscript, chapel, cil, clojure, cmake, cobol, coffeescript, cpp, csharp, css, cuesheet, d, dart, dcl, dcpu16, dcs, delphi, diff, div, dos, dot, e, ecmascript, eiffel, email, epc, erlang, euphoria, ezt, f1, falcon, fo, fortran, freebasic, freeswitch, fsharp, gambas, gdb, genero, genie, gettext, glsl, gml, gnuplot, go, groovy, gwbasic, haskell, haxe, hicest, hq9plus, html4strict, html5, icon, idl, ini, inno, intercal, io, ispfpanel, j, java, java5, javascript, jcl, jquery, kixtart, klonec, klonecpp, latex, lb, ldif, lisp, llvm, locobasic, logtalk, lolcode, lotusformulas, lotusscript, lscript, lsl2, lua, m68k, magiksf, make, mapbasic, matlab, mirc, mmix, modula2, modula3, mpasm, mxml, mysql, nagios, netrexx, newlisp, nginx, nimrod, nsis, oberon2, objc, objeck, ocaml, octave, oobas, oorexx, oracle11, oracle8, oxygene, oz, parasail, parigp, pascal, pcre, per, perl, perl6, pf, php, pic16, pike, pixelbender, pli, plsql, postgresql, postscript, povray, powerbuilder, powershell, proftpd, progress, prolog, properties, providex, purebasic, pycon, pys60, python, q, qbasic, qml, racket, rails, rbs, rebol, reg, rexx, robots, rpmspec, rsplus, ruby, rust, sas, scala, scheme, scilab, scl, sdlbasic, smalltalk, smarty, spark, sparql, sql, standardml, stonescript, systemverilog, tcl, teraterm, text, thinbasic, tsql, typoscript, unicon, upc, urbi, uscript, vala, vb, vbnet, vbscript, vedit, verilog, vhdl, vim, visualfoxpro, visualprolog, whitespace, whois, winbatch, xbasic, xml, xpp, yaml, z80, zxbasic


{
    "success":     true,
    "status_code": 200,
    "response": {
        "user": {
            "id": 123,
            ...
        },
        "instance-id": "joe",
        "instance":    {
            "id": 123
            ...
        },
        "instance-initialized": true,
        "instance-admin":       true,
        "redirect":             {
            "location":           "redirect-uri",
            "status-code":        302,
            "payload": {
                "fastTrackGuid":    "new user's registration request GUID"
            }
        }
    },
    request: {
        elapsed:     37.3943,
        id:          "102fb7bff406b58eca8f8499f461f64204f62ba1",
        request-uri: "/fast-track",
        signature:   "oofbIbnrWJq04/+4/K/q9eyDzB71UxZ19huyaDVfbMA=",
        start:       "2016-02-25T16:32:08-05:00",
        verb:        "POST"
        version:     "2.0"
    }
}

Error Response

Invalid language.

You need to specify a language like this: <source lang="html4strict">...</source>

Supported languages for syntax highlighting:

4cs, 6502acme, 6502kickass, 6502tasm, 68000devpac, abap, actionscript, actionscript3, ada, aimms, algol68, apache, applescript, arm, asm, asp, asymptote, autoconf, autohotkey, autoit, avisynth, awk, bascomavr, bash, basic4gl, bf, bibtex, blitzbasic, bnf, boo, c, caddcl, cadlisp, cfdg, cfm, chaiscript, chapel, cil, clojure, cmake, cobol, coffeescript, cpp, csharp, css, cuesheet, d, dart, dcl, dcpu16, dcs, delphi, diff, div, dos, dot, e, ecmascript, eiffel, email, epc, erlang, euphoria, ezt, f1, falcon, fo, fortran, freebasic, freeswitch, fsharp, gambas, gdb, genero, genie, gettext, glsl, gml, gnuplot, go, groovy, gwbasic, haskell, haxe, hicest, hq9plus, html4strict, html5, icon, idl, ini, inno, intercal, io, ispfpanel, j, java, java5, javascript, jcl, jquery, kixtart, klonec, klonecpp, latex, lb, ldif, lisp, llvm, locobasic, logtalk, lolcode, lotusformulas, lotusscript, lscript, lsl2, lua, m68k, magiksf, make, mapbasic, matlab, mirc, mmix, modula2, modula3, mpasm, mxml, mysql, nagios, netrexx, newlisp, nginx, nimrod, nsis, oberon2, objc, objeck, ocaml, octave, oobas, oorexx, oracle11, oracle8, oxygene, oz, parasail, parigp, pascal, pcre, per, perl, perl6, pf, php, pic16, pike, pixelbender, pli, plsql, postgresql, postscript, povray, powerbuilder, powershell, proftpd, progress, prolog, properties, providex, purebasic, pycon, pys60, python, q, qbasic, qml, racket, rails, rbs, rebol, reg, rexx, robots, rpmspec, rsplus, ruby, rust, sas, scala, scheme, scilab, scl, sdlbasic, smalltalk, smarty, spark, sparql, sql, standardml, stonescript, systemverilog, tcl, teraterm, text, thinbasic, tsql, typoscript, unicon, upc, urbi, uscript, vala, vb, vbnet, vbscript, vedit, verilog, vhdl, vim, visualfoxpro, visualprolog, whitespace, whois, winbatch, xbasic, xml, xpp, yaml, z80, zxbasic


{
    success:     false,
    status_code: 400|404|500,
    error: {
        code:    400|404|500,
        message: "I am an error message"
    },
    response: null,
    request: {
        elapsed:     0.1109,
        id:          "664d18cd422c5968f603f8fe8f928524220b5855",
        request-uri: "/fast-track",
        signature:   "noERPor0Lg76mXDWJ1gsmisueBL5psl6fszpsuqE98A=",
        start:       "2016-02-25T16:21:25-05:00",
        verb:        "POST"
        version:     "2.0"
    }
}