When interacting with Flowstack, you have the option to send additional metadata with each request. This metadata is sent via HTTP headers and is stored alongside your request data.

How to Send Metadata

Metadata should be added to the HTTP headers of your request in a specific format. The header format to use is Flowstack-Attribute-{AttributeName}. Here, {AttributeName} should be replaced with the specific name of the metadata attribute you’re sending. The value of this attribute will be captured and stored as a key in a JSON object in your metadata storage.

Illustrations of Usage

Here are some examples to illustrate how you can send metadata with your requests:

Example 1: Sending User Information

Suppose you want to send user-related information such as UserID and UserLocation with your request. The headers in your HTTP request would look something like this:

Flowstack-Attribute-UserID: 12345
Flowstack-Attribute-UserLocation: New York

In this example, UserID and UserLocation are the metadata attribute names, and 12345 and New York are their respective values. These will be stored as:

{
  "UserID": "12345",
  "UserLocation": "New York"
}

Example 2: Tracking Request Source

If you want to track the source of the request, such as a specific application or part of your service, you might add a header like this:

Flowstack-Attribute-RequestSource: MobileApp

This would be stored as:

{
  "RequestSource": "MobileApp"
}

Limitations and Considerations

  • Header Size Limits : HTTP headers have size limits, so ensure your metadata does not cause the headers to exceed these limits.