latestOpenAPI 3.0.12026-08-103995881.2 MB

053edab62415

flows

Create a flow

post/app/v1/flows

Request body

namestring
typestring

Use id value of any index in GET /v1/flow_types

status'active' | 'inactive'
product_categorystring

Use id value of any index in GET /v1/product_categories

product_typestring

Use id value of any index in GET /v1/product_types

custom_attributesCustomAttributes
associated_facility_idstring uuid
associated_equipment_idstring uuid
upstream_flow_idsstring[]
downstream_flow_idsstring[]
upstream_flows_countinteger
downstream_flows_countinteger
upstream_facility_idstring uuid
downstream_facility_idstring uuid
upstream_equipment_idstring uuid
downstream_equipment_idstring uuid

Example request

{
  "custom_attributes": {
    "attribute1": 12345,
    "attribute2": "value1"
  },
  "start_date": "min",
  "end_date": "max",
  "associated_facility_filter": {
    "custom_attributes.hint": "View schema for all supported fields",
    "custom_attributes.operator": "bob",
    "name": {
      "$like": "wind"
    }
  },
  "upstream_facility_filter": {
    "custom_attributes.hint": "View schema for all supported fields",
    "custom_attributes.operator": "bob",
    "name": {
      "$like": "wind"
    }
  },
  "downstream_facility_filter": {
    "custom_attributes.hint": "View schema for all supported fields",
    "custom_attributes.operator": "bob",
    "name": {
      "$like": "wind"
    }
  }
}

Response

A successful operation

OR
OR
OR

Example response

{
  "custom_attributes": {
    "attribute1": 12345,
    "attribute2": "value1"
  },
  "upstream_flows": [
    {
      "custom_attributes": {
        "attribute1": 12345,
        "attribute2": "value1"
      }
    }
  ],
  "downstream_flows": [
    {
      "custom_attributes": {
        "attribute1": 12345,
        "attribute2": "value1"
      }
    }
  ],
  "upstream_equipment": {
    "custom_attributes": {
      "attribute1": 12345,
      "attribute2": "value1"
    },
    "effective_date": "2022-01-01",
    "latitude": 51,
    "longitude": -114
  },
  "downstream_equipment": {
    "custom_attributes": {
      "attribute1": 12345,
      "attribute2": "value1"
    },
    "effective_date": "2022-01-01",
    "latitude": 51,
    "longitude": -114
  }
}