---
id: object/codeunit/3061
type: object
title: Codeunit 3061 "Uri Builder"
summary: Codeunit 3061 "Uri Builder" in System Application (System.Utilities). 27 public procedures. Present since at least BC23, still in BC30, changed in BC24, BC26.
tier: official
language: en
tags:
  - codeunit
  - system application
versions:
  introduced: null
  last_changed: "26"
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: d47a4e97642db3ca0cb9f574d5b7ff82bc5328059145e32a109405e780b575b9
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/System%20Application/App/URI/src/UriBuilder.Codeunit.al
    title: src/System Application/App/URI/src/UriBuilder.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: codeunit
object_id: 3061
name: Uri Builder
namespace: System.Utilities
app: System Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "24"
  - "26"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 27
  events: 0
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 1
  called_by: 16
  implements: 0
---

# Codeunit 3061 "Uri Builder"

> Codeunit 3061 "Uri Builder" in System Application (System.Utilities). 27 public procedures. Present since at least BC23, still in BC30, changed in BC24, BC26.

System Application · System.Utilities · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/System%20Application/App/URI/src/UriBuilder.Codeunit.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| Access | Public |

## Procedures

- `Init(Uri: Text)`: Initializes a new instance of the UriBuilder class with the specified URI.
- `SetScheme(Scheme: Text)`: Sets the scheme name of the URI.
- `GetScheme(): Text`: Gets the scheme name of the URI.
- `SetHost(Host: Text)`: Sets the host name of the URI.
- `GetHost(): Text`: Gets the host name of the URI.
- `SetPort(Port: Integer)`: Sets the port number of the URI.
- `GetPort(): Integer`: Gets the port number of the URI.
- `SetPath(Path: Text)`: Sets the path to the resource referenced by the URI.
- `GetPath(): Text`: Gets the path to the resource referenced by the URI.
- `SetQuery(Query: Text)`: Sets any query information included in the URI.
- `GetQuery(): Text`: Gets the query information included in the URI.
- `SetFragment(Fragment: Text)`: Sets the fragment portion of the URI.
- `GetFragment(): Text`: Gets the fragment portion of the URI.
- `GetUri(var Uri: Codeunit Uri)`: Gets the Uri instance constructed by the specified "Uri Builder" instance.
- `AddQueryFlag(Flag: Text; DuplicateAction: Enum "Uri Query Duplicate Behaviour")`: Adds a flag to the query string of this UriBuilder. In case the same query flag exists already, the action in is taken.
- `AddQueryFlag(Flag: Text)`: Adds a flag to the query string of this UriBuilder. In case the same query flag exists already, only one occurrence is kept.
- `AddQueryParameter(ParameterKey: Text; ParameterValue: Text; DuplicateAction: Enum "Uri Query Duplicate Behaviour")`: Adds a parameter key-value pair to the query string of this UriBuilder (in the form ParameterKey=ParameterValue ). In case the same query key exists already, the action in is taken.
- `AddQueryParameter(ParameterKey: Text; ParameterValue: Text)`: Adds a parameter key-value pair to the query string of this UriBuilder (in the form ParameterKey=ParameterValue ). In case the same query key exists already, its value is overwritten.
- `AddODataQueryParameter(ParameterKey: Text; ParameterValue: Text)`: Adds an OData parameter key-value pair to the query string of this UriBuilder (in the form ParameterKey=ParameterValue ), preserving the "$" sign in unencoded form. In case the same query key exists already, its value is overwritten.
- `RemoveQueryFlag(Flag: Text; DuplicateAction: Enum "Uri Query Duplicate Behaviour")`: Removes a flag from the query string of this UriBuilder. In case the same query flag exists already, the action in is taken.
- `RemoveQueryFlag(Flag: Text)`: Removes a flag from the query string of this UriBuilder. In case the same query flag exists already, only one occurrence is kept.
- `RemoveQueryParameter(ParameterKey: Text; ParameterValue: Text; DuplicateAction: Enum "Uri Query Duplicate Behaviour")`: Removes a parameter key-value pair from the query string of this UriBuilder (in the form ParameterKey=ParameterValue ). In case the same query key exists already, the action in is taken.
- `RemoveQueryParameter(ParameterKey: Text; ParameterValue: Text)`: Removes a parameter key-value pair from the query string of this UriBuilder (in the form ParameterKey=ParameterValue ). In case the same query key exists already, its value is overwritten.
- `RemoveQueryParameters()`: Removes a parameter key-value pair from the query string of this UriBuilder (in the form ParameterKey=ParameterValue ). In case the same query key exists already, the action in is taken.
- `GetQueryFlags(): List of [Text]`: Gets the flags in the query string of this UriBuilder.
- `GetQueryParameters(): Dictionary of [Text, List of [Text]]`: Gets the parameters in the query string of this UriBuilder.
- `GetQueryParameter(ParameterKey: Text): List of [Text]`: Gets the value of the specified query parameter.

## Calls

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an `Object::"Name"` argument. Interface dispatch and calls through events are not counted, so the list is not complete.

- [Codeunit 3062 "Uri Builder Impl."](../codeunit/3062.md) (23 calls: `AddODataQueryParameter → AddODataQueryParameter`, `AddQueryFlag → AddQueryFlag`, `AddQueryParameter → AddQueryParameter`, …)

## Called by

- [Codeunit 8333 "VS Code Integration Impl."](../codeunit/8333.md) (13 calls: `GetAbsoluteUri → GetUri`, `NavigateToObjectDefinitionInVSCode → AddQueryParameter`, `NavigateToObjectDefinitionInVSCode → GetQuery`, …)
- [Codeunit 2023 "Image Analysis Wrapper V3.2"](../codeunit/2023.md) (6 calls: `BuildUri → AddQueryParameter`, `BuildUri → GetUri`, `BuildUri → Init`, …)
- [Codeunit 2515 "AppSource Product Manager"](../codeunit/2515.md) (4 calls: `ConstructProductListUri → AddODataQueryParameter`, `ConstructProductListUri → AddQueryParameter`, `ConstructProductListUri → GetUri`, …)
- [Codeunit 4359 "Custom Agent Profile Mgt"](../codeunit/4359.md) (4 calls: `GetProfileConfigurationUrlForWeb → AddQueryFlag`, `GetProfileConfigurationUrlForWeb → AddQueryParameter`, `GetProfileConfigurationUrlForWeb → GetUri`, …)
- [Codeunit 8955 "AFS Format Helper"](../codeunit/8955.md) (4 calls: `AppendToUri → AddQueryFlag`, `AppendToUri → AddQueryParameter`, `AppendToUri → GetUri`, …)
- [Codeunit 9061 "Stor. Serv. Auth. SAS"](../codeunit/9061.md) (4 calls: `Authorize → GetQuery`, `Authorize → GetUri`, `Authorize → Init`, …)
- [Codeunit 9088 "Stor. Serv. Auth. Ready SAS"](../codeunit/9088.md) (4 calls: `Authorize → GetQuery`, `Authorize → GetUri`, `Authorize → Init`, …)
- [Codeunit 9120 "SharePoint Graph Client Impl."](../codeunit/9120.md) (4 calls: `ExtractHostName → GetHost`, `ExtractHostName → Init`, `ExtractRelativePath → GetPath`, …)
- [Codeunit 9121 "SharePoint Graph Uri Builder"](../codeunit/9121.md) (4 calls: `AddOptionalParametersToEndpoint → AddODataQueryParameter`, `AddOptionalParametersToEndpoint → AddQueryParameter`, `AddOptionalParametersToEndpoint → GetUri`, …)
- [Codeunit 9170 "Conf./Personalization Mgt."](../codeunit/9170.md) (4 calls: `GetProfileConfigurationUrlForWeb → AddQueryFlag`, `GetProfileConfigurationUrlForWeb → AddQueryParameter`, `GetProfileConfigurationUrlForWeb → GetUri`, …)
- [Codeunit 7801 "Azure Functions Code Auth"](../codeunit/7801.md) (3 calls: `Authenticate → AddQueryParameter`, `Authenticate → GetUri`, `Authenticate → Init`)
- [Codeunit 7802 "Azure Functions OAuth2"](../codeunit/7802.md) (3 calls: `Authenticate → AddQueryParameter`, `Authenticate → GetUri`, `Authenticate → Init`)
- [Codeunit 7803 "Azure Functions Impl"](../codeunit/7803.md) (3 calls: `Send → AddQueryParameter`, `Send → GetUri`, `Send → Init`)
- [Codeunit 7807 "Azure Functions OAuth2 Cert"](../codeunit/7807.md) (3 calls: `Authenticate → AddQueryParameter`, `Authenticate → GetUri`, `Authenticate → Init`)
- [Codeunit 9064 "Stor. Serv. Auth. Shared Key"](../codeunit/9064.md) (2 calls: `GetCanonicalizedResource → GetQuery`, `GetCanonicalizedResource → Init`)
- [Codeunit 9510 "Document Service Management"](../codeunit/9510.md) (2 calls: `GetDefaultLocation → GetHost`, `GetDefaultLocation → Init`)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC24, BC26

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: `bcatlas_resolve_node(object_type: "codeunit", object_name: "Uri Builder")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
