Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The Flex5 Rest Api is in early access stage and under heavy development & evolution. This is our "private" Api that is being built for the to service our Flex5 Phone, Tablet, & Desktop applications.

It is very likely we will build a "public" Api layer in the future with something like GraphQL. The reason is that this Rest Api is pretty low level with a flat JSON structure. This means you will have to make a lot of Api calls to get all the data that you need.

...

You can find it here: https://docs.google.com/document/d/18m-saxs5foVA0JLp9N_7fmVEqFG1c1spZw8OC9wLEYs/edit

Download that document, sign, and send to roger@flexrentalsolutions.com. Once it's received, you will be provided a special "source" property you will need to get authentication tokens.

...

You can browse the cutting edge Api's from Flex Dev here: https://flex5dev.flexrentalsolutions.com/f5/swagger-ui.html

First, Let's Get an Auth Token By Going Here: https://flex5dev.flexrentalsolutions.com/f5/swagger-ui.html#/Authentication/authenticationRequestUsingPOST

Post a JSON body something like below (substitute in your username/password). Notice the special "source" property, that is a special "key" that prevents unauthorized access to the Api. You will be provided this key in response to receiving the signed terms & conditions document.

...

This will return a JSON response that looks something like below. Notice the "token" property. That is your authentication token.

...

Writing Your Own Code

When you write your code against the Api, the process will be similar'ish. You'll have to post to the auth endpoint to get a token and then send it down in the X-Auth-Token header for all ALL requests.

If you're token is close to expiring the server will kick out a refresh token in the X-Auth-Token-Refreshed header. Our app just sniffs for the refresh token on each request, and if it finds one, it just replaces the current one and starts sending the new one.

Good luck!