Skip to content

Gets project's network restrictions
experimental

get/v1/projects/{ref}/network-restrictions

This is an experimental endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.

This endpoint is currently in its Beta stage.

OAuth scopes

  • projects:read

The fine-grained token must include the following permissions to access this endpoint:

  • database_network_restrictions_read

Path parameters

  • ref
    Required
    string

    Project ref

Response codes

  • 200
  • 401
  • 403
  • 429
  • 500

Response (200)

{
"entitlement": "disallowed",
"config": {
"dbAllowedCidrs": [
"203.0.113.0/24"
],
"dbAllowedCidrsV6": [
"2001:db8::/32"
]
},
"old_config": {
"dbAllowedCidrs": [
"203.0.113.0/24"
],
"dbAllowedCidrsV6": [
"2001:db8::/32"
]
},
"status": "stored",
"updated_at": "4404-02-29T04:24Z",
"applied_at": "4404-02-29T04:24Z"
}
{
"type": "object",
"properties": {
"entitlement": {
"type": "string",
"enum": [
"disallowed",
"allowed"
]
},
"config": {
"type": "object",
"properties": {
"dbAllowedCidrs": {
"type": "array",
"items": {
"type": "string"
}
},
"dbAllowedCidrsV6": {
"type": "array",
"items": {
"type": "string"
}
}
},
"example": {
"dbAllowedCidrs": [
"203.0.113.0/24"
],
"dbAllowedCidrsV6": [
"2001:db8::/32"
]
},
"description": "At any given point in time, this is the config that the user has requested be applied to their project. The `status` field indicates if it has been applied to the project, or is pending. When an updated config is received, the applied config is moved to `old_config`."
},
"old_config": {
"description": "Populated when a new config has been received, but not registered as successfully applied to a project.",
"type": "object",
"properties": {
"dbAllowedCidrs": {
"type": "array",
"items": {
"type": "string"
}
},
"dbAllowedCidrsV6": {
"type": "array",
"items": {
"type": "string"
}
}
},
"example": {
"dbAllowedCidrs": [
"203.0.113.0/24"
],
"dbAllowedCidrsV6": [
"2001:db8::/32"
]
}
},
"status": {
"type": "string",
"enum": [
"stored",
"applied"
]
},
"updated_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"applied_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"required": [
"entitlement",
"config",
"status"
]
}