Flowsparks Api V1-collection

Number of APIs: 12

In order for this collection to work, you must select the GS-GenApiv1-test environment in Qodex.

This collection of Qodex requests goes alongside our online API specification.

Set authentication credentials

You may request from us the following data, to be set at the corresponding Qodex environment variables, indicated by an [ask-us] placeholder :

  • an access token (with an expiry date)

  • a TP-number, a unique identifier for you in our systems

You need to have valid values in order for this collection to work.

Live example Runners

Some of the APIs have been enhanced to showcase often-used design patterns that you can study and re-use. These patterns are made of combinations of calls that you can test yourself by creating a Runner in Qodex; see below. To make this work, many requests in this collection have test scripts, that poke values into Qodex environment variables. These must be altered with great care or the live examples may break. The only environment variables you should edit are the two authentication credentials named above.

If there are any parameters that are commonly changed in production setting, the description of the individual API will mention this. Please doublecheck with the Help endpoint as well.

Example design patterns

webshop

In this scenario you manage a website that has users who buy/order/register/subscribe to a course that exists in Flowsparks. You handle this proces on your website but as a final step you want to log your individual user into Flowsparks so they can launch their course; this should be as transparant as possible to the user.

In Flowsparks parlance you want to create a Person, make this Person a member of a certain Persongroup (so that they will be authorized to launch the wanted course), and then get a temporary single sign-on URL for the Person.

Take these steps:

  1. Select the GS-GenApiV1-test environment

  2. Run retrieve Persongroups once, this populates the environment with the Persongroup ID so you can assign Persons to those

  3. Create a Qodex runner (this is optional but convenient) and include the following calls in this order:

    1. create Person
    2. create Groupmembership
    3. create personal SSO URL
    4. do not include any other calls
  4. Open the Qodex console and run the Runner once

  5. The SSO url will be logged to the console where you can copy it

If you have access to the Person Manager widget, log into the application GUI and you can witness the creation of your Persons.

In a webshop-like scenario the SSO url is typically presented to your end user via a link or a button that allows them to lauch a Flowsparks course right from your own application.

  1. Activitygroups GET {{base_url}}/V1/activitygroups

  2. ActivitygroupMemberships GET {{base_url}}/V1/activitygroupmemberships

  3. PersongroupMemberships GET {{base_url}}/V1/persongroupmemberships

  4. ActivityStructures GET {{base_url}}/V1/activitystructures

  5. Schemas (help) GET {{base_url}}/V1/schemas

  6. retrieve Persongroups GET {{base_url}}/V1/persongroups

  7. create Person POST {{base_url}}/V1/persons

  8. create PersonGroupmembership POST {{base_url}}/v1/persongroupmemberships

  9. create personal SSO URL POST {{base_url}}/V1/persons/{{TESTPERSON}}/.createsinglesignonurl

  10. list Groupmembership (by single Person) GET {{base_url}}/V1/persongroupmemberships?filter=Member eq '{{TESTPERSON}}'