Skills
Log in

Preview team security policy

Evaluates a team policy as enabled without saving it. Organization REST preview is not available; organization tokens must select a team through the team-scoped path. Service details are limited to readable projects. Aggregate counts may include inaccessible services; outcome counts sample at most 2,000 matches and compilationErrorCount describes the returned page. Body page/perPage paginate services; pagination.count is the total visible match count. Authentication values are redacted. Existing policies may retain passwords using empty strings.

Required permission

Account > Networking > SecurityPolicies > Read

Request body

  • {object}
    • policyInternalId

      string
      min length
      3
      max length
      100
      pattern
      ^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$
    • spec

      {object} required
    • page

      integer
      min
      1
    • perPage

      integer
      min
      1
      max
      100

Response body

  • {object}
    Response object.
    • data

      {object} required
      Result data.
      • matchedCount

        integer required
      • inaccessibleCount

        integer required
      • excludedCount

        integer required
      • unsupportedCount

        integer required
      • compilationErrorCount

        integer required
      • wouldApplyCount

        integer required
      • shadowedCount

        integer required
      • conflictCount

        integer required
      • outcomesSampled

        boolean required
      • services

        [array] required
        • {object}
          • projectId

            string required
            min length
            24
            max length
            24
          • projectInternalId

            string required
          • serviceId

            string required
            min length
            24
            max length
            24
          • serviceInternalId

            string required
          • serviceType

            string required
            one of
            combined, deployment
          • result

            string required
            one of
            wins, shadowed, conflict
          • winningPathCount

            integer required
          • shadowedPathCount

            integer required
          • noPublicHttpPort

            boolean required
          • compilationError

            boolean required
          • conflict

            {object}
            • priority

              integer required
            • policyInternalIds

              [array] required
              • string
          • compilationIssues

            [array]
            • {object}
              • portName

                string required
              • paths

                [array] required
                • {object}
                  • path

                    string required
                  • routingMode

                    string required
                    one of
                    exact, prefix, regex
                  • priority

                    integer
              • reason

                string required
                one of
                compiledPathEntryLimit, effectiveConfigurationTooLarge, priorityTie
              • policyInternalIds

                [array]
                • string
              • policyIds

                [array]
                • string
                  min length
                  24
                  max length
                  24
          • usage

            [array]
            • {object}
              • portName

                string required
              • compiledPathEntries

                integer required
              • encodedBytes

                integer required
          • teamCandidates

            [array] required
            • {object}
              • policyId

                string required
                min length
                24
                max length
                24
              • policyInternalId

                string required
              • paths

                [array] required
                • {object}
                  • path

                    string required
                    min length
                    1
                  • matchMode

                    string required
                    one of
                    exact, pathPrefix
              • accessMode

                string required
                one of
                protected, unprotected
              • priority

                integer required
          • organizationCandidates

            [array] required
            • {object}
              • policyId

                string required
                min length
                24
                max length
                24
              • policyInternalId

                string required
              • paths

                [array] required
                • {object}
                  • path

                    string required
                    min length
                    1
                  • matchMode

                    string required
                    one of
                    exact, pathPrefix
              • accessMode

                string required
                one of
                protected, unprotected
              • organizationPriority

                integer required
              • inheritanceMode

                string required
                one of
                enforced, default
          • effectivePorts

            [array] required
            • {object}
              • portName

                string required
              • pathRegions

                [array] required
                • {object}
                  • paths

                    [array] required
                    • {object}
                      • path

                        string required
                      • routingMode

                        string required
                        one of
                        exact, prefix, regex
                  • accessMode

                    string required
                    one of
                    protected, unprotected
                  • source

                    {object}
                    • sourceType

                      string required
                      one of
                      organization, team, service, system
                    • sourceEntityId

                      string required
                      min length
                      24
                      max length
                      24
                    • policyId

                      string
                      min length
                      24
                      max length
                      24
                    • policyInternalId

                      string
                  • shadowed

                    [array]
                    • {object}
                      • sourceType

                        string required
                        one of
                        organization, team, service, system
                      • sourceEntityId

                        string required
                        min length
                        24
                        max length
                        24
                      • policyId

                        string
                        min length
                        24
                        max length
                        24
                      • policyInternalId

                        string
                      • reason

                        string required
                        one of
                        lowerPriority, organizationEnforced, teamReplacedOrganizationDefault, defaultOverrodeEnforced, excluded, serviceFallbackShadowed, protectionReduction, compilerFailClosed
                  • securityPolicies

                    {object}
                    • orPolicies

                      {object}
                      • ip

                        [array]
                        • {object}
                          • addresses

                            [array] required
                            • string
                          • action

                            string required
                            one of
                            ALLOW, DENY
                      • headers

                        [array]
                        • {object}
                          • name

                            string required
                          • regexMode

                            boolean
                          • valueConfigured

                            boolean required
                      • credentials

                        [array]
                        • {object}
                          • username

                            string required
                          • type

                            string required
                            one of
                            basic-auth
                          • passwordConfigured

                            boolean required
                      • sso

                        {object}
                        • organizationId

                          string required
                        • directoryGroupIds

                          [array] required
                          • string
                        • allowAnyOrgUsers

                          boolean
                        • validateInternalTraffic

                          boolean
                        • setCookieOnRootDomain

                          boolean
                        • noindexRedirect

                          boolean
                        • allowInternalTrafficViaPublicDns

                          boolean
                    • requiredPolicies

                      {object}
                      • ip

                        [array]
                        • {object}
                          • addresses

                            [array] required
                            • string
                          • action

                            string required
                            one of
                            ALLOW, DENY
                      • headers

                        [array]
                        • {object}
                          • name

                            string required
                          • regexMode

                            boolean
                          • valueConfigured

                            boolean required
                      • credentials

                        [array]
                        • {object}
                          • username

                            string required
                          • type

                            string required
                            one of
                            basic-auth
                          • passwordConfigured

                            boolean required
                      • sso

                        {object}
                        • organizationId

                          string required
                        • directoryGroupIds

                          [array] required
                          • string
                        • allowAnyOrgUsers

                          boolean
                        • validateInternalTraffic

                          boolean
                        • setCookieOnRootDomain

                          boolean
                        • noindexRedirect

                          boolean
                        • allowInternalTrafficViaPublicDns

                          boolean
          • protectionReductions

            [array] required
            • {object}
              • portName

                string required
              • paths

                [array] required
                • {object}
                  • path

                    string required
                  • routingMode

                    string required
                    one of
                    exact, prefix, regex
              • source

                {object}
                • sourceType

                  string required
                  one of
                  organization, team, service, system
                • sourceEntityId

                  string required
                  min length
                  24
                  max length
                  24
                • policyId

                  string
                  min length
                  24
                  max length
                  24
                • policyInternalId

                  string
      • pagination

        {object} required
        • page

          integer required
          min
          1
        • perPage

          integer required
          min
          1
          max
          100
        • count

          integer required

POST /v1/security-policies/preview

POST /v1/teams/{teamId}/security-policies/preview

Example request

Request body
curl --header "Content-Type: application/json" \
  --header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
  --request POST \
  --data '{"spec":{"securityPolicies":{"orPolicies":{"headers":[{"regexMode":false,"name":"headerName","value":"headerValue"}]},"requiredPolicies":{"headers":[{"regexMode":false,"name":"headerName","value":"headerValue"}]}},"enabled":false,"priority":0,"paths":[{"path":"string","matchMode":"exact"}],"accessMode":"protected","targets":{"projects":{"mode":"all","ids":[]},"workloads":{"mode":"all","items":[]},"tags":{"enabled":false,"items":[],"matchCondition":"or"}},"exclusions":{"projects":[],"workloads":[]}}}' \
  https://api.northflank.com/v1/security-policies/preview

Example response

200 OK

Team policy preview with redacted authentication values.

JSON

© 2026 Northflank Ltd. All rights reserved.

northflank.com / Terms / Privacy / feedback@northflank.com