FastTrack
JerryAblan (Talk | contribs) m |
JerryAblan (Talk | contribs) m |
||
Line 38: | Line 38: | ||
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. | 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. | ||
− | ==== Success | + | ==== Success Respose ==== |
+ | |||
<source lang="javascript"> | <source lang="javascript"> | ||
{ | { | ||
Line 63: | Line 64: | ||
} | } | ||
}, | }, | ||
− | request: { | + | "request": { |
− | elapsed: 37.3943, | + | "elapsed": 37.3943, |
− | id: "102fb7bff406b58eca8f8499f461f64204f62ba1", | + | "id": "102fb7bff406b58eca8f8499f461f64204f62ba1", |
− | request-uri: "/fast-track", | + | "request-uri": "/fast-track", |
− | signature: "oofbIbnrWJq04/+4/K/q9eyDzB71UxZ19huyaDVfbMA=", | + | "signature": "oofbIbnrWJq04/+4/K/q9eyDzB71UxZ19huyaDVfbMA=", |
− | start: "2016-02-25T16:32:08-05:00", | + | "start": "2016-02-25T16:32:08-05:00", |
− | verb: "POST" | + | "verb": "POST" |
− | version: "2.0" | + | "version": "2.0" |
} | } | ||
} | } | ||
Line 76: | Line 77: | ||
==== Error Response ==== | ==== Error Response ==== | ||
+ | |||
<source lang="javascript"> | <source lang="javascript"> | ||
{ | { | ||
− | success: false, | + | "success": false, |
− | status_code: 400|404|500, | + | "status_code": 400|404|500, |
− | error: { | + | "error": { |
− | code: 400|404|500, | + | "code": 400|404|500, |
− | message: "I am an error message" | + | "message": "I am an error message" |
}, | }, | ||
− | response: null, | + | "response": null, |
− | request: { | + | "request": { |
− | elapsed: 0.1109, | + | "elapsed": 0.1109, |
− | id: "664d18cd422c5968f603f8fe8f928524220b5855", | + | "id": "664d18cd422c5968f603f8fe8f928524220b5855", |
− | request-uri: "/fast-track", | + | "request-uri": "/fast-track", |
− | signature: "noERPor0Lg76mXDWJ1gsmisueBL5psl6fszpsuqE98A=", | + | "signature": "noERPor0Lg76mXDWJ1gsmisueBL5psl6fszpsuqE98A=", |
− | start: "2016-02-25T16:21:25-05:00", | + | "start": "2016-02-25T16:21:25-05:00", |
− | verb: "POST" | + | "verb": "POST" |
− | version: "2.0" | + | "version": "2.0" |
} | } | ||
} | } | ||
</source> | </source> |
Revision as of 21:37, 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:
- Validates the request
- A DFE Dashboard user is created with the provided information
- An instance is created named using a portion of the email address
- The instance is initialized and the database is created
- An instance admin is created on the new instance
- The instance admin is logged in and the browser is redirected to the new instance
Contents
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:
{ "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
{ "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
{ "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" } }