Required permission
Account > Networking > SecurityPolicies > Read
Request body
- {object}
policyInternalId
stringmin length3max length100pattern^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$spec
{object} requiredpage
integermin1perPage
integermin1max100
Response body
- {object}Response object.
data
{object} requiredResult data.matchedCount
integer requiredinaccessibleCount
integer requiredexcludedCount
integer requiredunsupportedCount
integer requiredcompilationErrorCount
integer requiredwouldApplyCount
integer requiredshadowedCount
integer requiredconflictCount
integer requiredoutcomesSampled
boolean requiredservices
[array] required- {object}
projectId
string requiredmin length24max length24projectInternalId
string requiredserviceId
string requiredmin length24max length24serviceInternalId
string requiredserviceType
string requiredone ofcombined, deploymentresult
string requiredone ofwins, shadowed, conflictwinningPathCount
integer requiredshadowedPathCount
integer requirednoPublicHttpPort
boolean requiredcompilationError
boolean requiredconflict
{object}priority
integer requiredpolicyInternalIds
[array] required- string
compilationIssues
[array]- {object}
portName
string requiredpaths
[array] required- {object}
path
string requiredroutingMode
string requiredone ofexact, prefix, regexpriority
integerreason
string requiredone ofcompiledPathEntryLimit, effectiveConfigurationTooLarge, priorityTiepolicyInternalIds
[array]- string
policyIds
[array]- stringmin length24max length24
usage
[array]- {object}
portName
string requiredcompiledPathEntries
integer requiredencodedBytes
integer requiredteamCandidates
[array] required- {object}
policyId
string requiredmin length24max length24policyInternalId
string requiredpaths
[array] required- {object}
path
string requiredmin length1matchMode
string requiredone ofexact, pathPrefixaccessMode
string requiredone ofprotected, unprotectedpriority
integer requiredorganizationCandidates
[array] required- {object}
policyId
string requiredmin length24max length24policyInternalId
string requiredpaths
[array] required- {object}
path
string requiredmin length1matchMode
string requiredone ofexact, pathPrefixaccessMode
string requiredone ofprotected, unprotectedorganizationPriority
integer requiredinheritanceMode
string requiredone ofenforced, defaulteffectivePorts
[array] required- {object}
portName
string requiredpathRegions
[array] required- {object}
paths
[array] required- {object}
path
string requiredroutingMode
string requiredone ofexact, prefix, regexaccessMode
string requiredone ofprotected, unprotectedsource
{object}sourceType
string requiredone oforganization, team, service, systemsourceEntityId
string requiredmin length24max length24policyId
stringmin length24max length24policyInternalId
stringshadowed
[array]- {object}
sourceType
string requiredone oforganization, team, service, systemsourceEntityId
string requiredmin length24max length24policyId
stringmin length24max length24policyInternalId
stringreason
string requiredone oflowerPriority, organizationEnforced, teamReplacedOrganizationDefault, defaultOverrodeEnforced, excluded, serviceFallbackShadowed, protectionReduction, compilerFailClosedsecurityPolicies
{object}orPolicies
{object}ip
[array]- {object}
addresses
[array] required- string
action
string requiredone ofALLOW, DENYheaders
[array]- {object}
name
string requiredregexMode
booleanvalueConfigured
boolean requiredcredentials
[array]- {object}
username
string requiredtype
string requiredone ofbasic-authpasswordConfigured
boolean requiredsso
{object}organizationId
string requireddirectoryGroupIds
[array] required- string
allowAnyOrgUsers
booleanvalidateInternalTraffic
booleansetCookieOnRootDomain
booleannoindexRedirect
booleanallowInternalTrafficViaPublicDns
booleanrequiredPolicies
{object}ip
[array]- {object}
addresses
[array] required- string
action
string requiredone ofALLOW, DENYheaders
[array]- {object}
name
string requiredregexMode
booleanvalueConfigured
boolean requiredcredentials
[array]- {object}
username
string requiredtype
string requiredone ofbasic-authpasswordConfigured
boolean requiredsso
{object}organizationId
string requireddirectoryGroupIds
[array] required- string
allowAnyOrgUsers
booleanvalidateInternalTraffic
booleansetCookieOnRootDomain
booleannoindexRedirect
booleanallowInternalTrafficViaPublicDns
booleanprotectionReductions
[array] required- {object}
portName
string requiredpaths
[array] required- {object}
path
string requiredroutingMode
string requiredone ofexact, prefix, regexsource
{object}sourceType
string requiredone oforganization, team, service, systemsourceEntityId
string requiredmin length24max length24policyId
stringmin length24max length24policyInternalId
stringpagination
{object} requiredpage
integer requiredmin1perPage
integer requiredmin1max100count
integer required
POST /v1/security-policies/preview
POST /v1/teams/{teamId}/security-policies/preview
Example request
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/previewExample response
200 OK
JSON