Understanding API Dependencies
Traceable enables you to define an application’s dependency graph, ensuring accurate reachability testing during DAST scans. Many APIs depend on prerequisite calls; for example, an order must be created before it can be retrieved. By defining these dependencies, you ensure that Traceable executes APIs in the correct sequence and supplies valid data to dependent requests. Before running reachability tests, Traceable evaluates and normalizes the execution order, automatically resolving missing APIs, reordering calls to satisfy producer–consumer relationships, and applying fallback or transformed values when required. This approach enables reliable testing even when workflows involve authentication, resource creation, or partially defined execution orders.
Components of a dependency graph
The dependency graph supports the following components:

order
Defines the sequence in which Traceable should invoke the APIs. This is useful for workflows that involve authentication, resource creation, and subsequent retrieval or modification.
dependency
Defines the producer-consumer relationship between APIs:
producersspecify the APIs that generate values, such as IDs, tokens, or user attributes.consumersspecify the APIs that utilize the above values.You can define the
producersorconsumersparameter dependencies using the exact keys (resource_fqn) or regular expressions (resource_regex).
transform_params
Defines the rules to modify request parameters before execution. These rules can perform either of the following operations:
Inject static values
Substitute values from a store
Override extracted values
values_store
Defines the fallback or test values that Traceable can use during reachability testing:
single_choice_storeprovides one value at a time from the list.group_choice_storeprovides logically grouped values that must be applied together.You can also define static key-value pairs for direct substitution.
Order normalization and dependency resolution
Before executing reachability tests, Traceable evaluates and normalizes the order section to ensure that all declared dependencies are satisfied.
During this process, Traceable:
Analyzes the
dependencysection to identify producer–consumer relationships between APIs.Reorders APIs when a
consumerappears before itsproducer, ensuring theproducerexecutes first.Automatically adds APIs to the execution order if they are referenced in the
dependencysection, but are not included in the order list.
As a result, the final execution order always ensures that:
All
producerAPIs execute before their dependentconsumers.All required APIs participate in reachability testing, even if they were not explicitly listed in the order section.
This normalization keeps reachability testing reliable even when:
The initial execution order is incomplete.
The order does not fully reflect data dependencies.
The dependency graph is only partially defined.
Sample dependency graph and execution
The following sample dependency graph defines each component:
Using the above dependency graph, Traceable executes the reachability test as follows:
Traceable detects that the API
POST /identity/api/auth/signupis required by the dependency graph, but is missing from the execution order. Because this API produces values needed byPOST /identity/api/auth/login, Traceable automatically inserts it into the execution order.Traceable also inserts all the APIs from the specification that are missing in the provided order, based on the heuristics.
In the order you provided, the consumer (
GET /workshop/api/order/{order-id}) appears before one of its producers (GET /workshop/api/order), which violates the dependency requirement. Traceable automatically reorders the APIs to ensure that all producers execute before their consumers.After inserting any missing APIs and resolving ordering conflicts, Traceable executes the reachability test in the following sequence:
Traceable prepares and executes the
POST /identity/api/auth/signupAPI in the following manner:Selects a grouped value for
http.request.body.firstnameandhttp.request.body.lastnamefrom thegroup_choice_store($GROUP_NAME_VALUE).Substitutes
http.request.body.emailwith a value from thesingle_choice_store($SINGLE_ROLE).Applies the defined transform rules and executes the API request.
Extracts and stores the producer values defined in the dependency section for the
http.request.body.emailandhttp.request.body.passwordkeys.
Traceable prepares and executes the
POST /identity/api/auth/loginAPI in the following manner:Uses the defined
producer–consumerrelationship to substitute the samehttp.request.body.emailandhttp.request.body.passwordvalues.Applies any defined transform rules.
Executes the API request.
Using the same approach, Traceable executes the
POST /workshop/api/orderAPI and extractshttp.response.body.order.id. Traceable caches this value for downstream consumers.Traceable executes the
GET /workshop/api/orderAPI to optionally extract additional order IDs using regex-based matching.Traceable executes the
GET /workshop/api/order/{order-id}API, substituting the resolved order IDs into the path and request body parameters.Traceable continues this process until it executes all APIs in the defined order.
Last updated
Was this helpful?