Skip to content
  • There are no suggestions because the search field is empty.

Find the Flow ID and Search for Flows Using the API

There are different ways to find the flow ID from the API. If the API is used to create flows, it is recommended to store the flowId returned for future use. 

Search Through all Flows on the License

Use case: Return a list of all flowIds where marks have been submitted during the last 30 days. 

The POST /flows/search endpoint is used to search for available flows. The data model in the request body is used to filter the results. To filter flows where grades have been submitted only flows that have been concluded should be returned. This will return all flows in the concluded state, to only return flows from the last 30 days, the marking end date can be set as UNIX time. The "hasSubmissionOfAssessment" is set to true, as only flows that have one or more finalised marks should be returned. 

{
  "metadata": {
    "states": [
      "CONCLUDED"
    ],
  },
  "dates": {
    "marking": {
      "end": 1674906482,
      "endComparator": "GREATER_EQUAL"
    }
  },
    "hasSubmissionOfAssessment": true
  }
}

The response will return any flows that match the above request:

{
  "success": true,
  "data": [
    {
      "flowId": 678954,
      "title": "Some Title",
      "subtitle": "",
      "createdAt": 1574906482,
      "type": "FLOWAssign",
      "state": "CONCLUDED",
      "variant": "ORDINARY",
      "purpose": "EXAMINATION",
      "participation": {
        "start": 1674992882,
        "end": 1674992992
      },
      "marking": {
        "start": 1674991457,
        "end": 1674906482
      }
    }
  ],
  "error": {
    "code": 0,
    "message": "message",
    "errors": [
      {
        "reason": "reason",
        "message": "message"
      }
    ]
  },
  "pagination": {
    "limit": 50,
    "offset": 0,
    "total": 200
  }
}

Search for a Flow Using an SIS code

If the SIS code is available (called Flow code on the flow management page), the easiest way is to use the GET license/sis/flows/{sisCode} as this will return a flow with a flowId. Using this endpoint, the SIS code must be URL- and base64 encoded. Before URL- and base64 encoding the sisCode, you have to make sure that it is in the right format using “||” between the parameters. “||*||” can be used as a wildcard.

Example:

The sisCode UNIwise||001||2021 is base64 encoded: VU5Jd2lzZXx8MDAxfHwyMDIx and included in the URL request: https://europe-api.wiseflow.net/v1/license/sis/flows/VU5Jd2lzZXx8MDAxfHwyMDIx.

The response returns a list of flows with a sisCode matching the search:

{
  "flowId": 159,
  "sisCode": "UNIwise||001||2021",
  "creationDate": 1619600218,
  "state": 2,
  "type": 16,
  "variant": 1,
  "purpose": 0,
  "combinedMainFlowId": 0,
  "combinedSubFlowIds": []
}