General Information
Policy Type
Endpoints
List Policies
Add Policy
Update Policy
Delete Policy
List Policies
Endpoint
Request
Headers
| Header | Value |
|---|---|
| Authorization | Bearer {token} |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
| apiProxyName | string | Yes | API Proxy name |
Response
Success Response (200 OK)
restrictionList may be omitted for brevity.
cURL Example
Add Policy
Endpoint
Request
Headers
| Header | Value |
|---|---|
| Authorization | Bearer {token} |
| Content-Type | application/json |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
| apiProxyName | string | Yes | API Proxy name |
| policyName | string | Yes | Policy name |
Request Body
Full JSON Body Example - Weekday Restriction
Full JSON Body Example - Specific Date Restriction
Request Body Fields
operationMetadata
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| targetScope | string | Yes | - | Policy scope: ALL or ENDPOINT |
| targetEndpoint | string | No* | - | Endpoint path (required if targetScope=ENDPOINT) |
| targetEndpointHTTPMethod | string | No* | - | HTTP method (required if targetScope=ENDPOINT) |
| targetPipeline | string | Yes | - | Pipeline: REQUEST, RESPONSE, or ERROR |
| deploy | boolean | No | true | Whether to deploy after adding policy |
| deployTargetEnvironmentNameList | array | No | [] | List of environment names to deploy to |
| order | integer | No | null | Policy execution order (starts from 1) |
ALL- Policy applies to all endpointsENDPOINT- Policy applies only to specified endpoint
REQUEST- Executes in request pipelineRESPONSE- Executes in response pipelineERROR- Executes in error pipeline
GET,POST,PUT,DELETE,PATCH,OPTIONS,HEAD
policy
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| type | string | Yes | - | Policy type: policy-time-restriction |
| description | string | No | - | Policy description |
| active | boolean | No | true | Whether policy is active |
| actionType | string | Yes | RESTRICT | Action type: ALLOW or RESTRICT |
| zoneId | string | No | ”+03:00” | Time zone ID (e.g., “+03:00”, “Europe/Istanbul”) |
| restrictionList | array | Yes | - | List of time restriction rules (at least one required) |
EnumRestrictionType (actionType)
ALLOW- Allow access during specified time periodsRESTRICT- Restrict access during specified time periods
Zone ID Format
- Offset format:
+03:00,-05:00,+00:00 - Zone name:
Europe/Istanbul,America/New_York,UTC - Must be a valid Java ZoneId
Note
restrictionListmust contain at least one restriction rule.- When
actionType: ALLOW, access is allowed only during specified periods. - When
actionType: RESTRICT, access is blocked during specified periods.
restrictionList
Each restriction is an object with the following fields:| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| hourName | string | No | - | Name for this restriction rule |
| description | string | No | - | Description of the restriction |
| dayType | string | Yes | - | Day type: WEEK or CUSTOM |
| enumWeekDayList | array | No* | - | List of weekdays (required if dayType=WEEK) |
| day | integer | No* | - | Day of month (required if dayType=CUSTOM, 0-31, 0=every day) |
| month | integer | No* | - | Month (required if dayType=CUSTOM, 0-12, 0=every month) |
| wholeDay | boolean | No | false | Whether restriction applies to whole day |
| startHour | integer | No* | - | Start hour (required if wholeDay=false, 0-24) |
| startMinute | integer | No* | - | Start minute (required if wholeDay=false, 0-60) |
| startSecond | integer | No* | - | Start second (required if wholeDay=false, 0-60) |
| endHour | integer | No* | - | End hour (required if wholeDay=false, 0-24) |
| endMinute | integer | No* | - | End minute (required if wholeDay=false, 0-60) |
| endSecond | integer | No* | - | End second (required if wholeDay=false, 0-60) |
EnumDayType (dayType)
WEEK- Restriction applies to specific weekdaysCUSTOM- Restriction applies to specific dates
EnumWeekDays (enumWeekDayList)
MONDAY- MondayTUESDAY- TuesdayWEDNESDAY- WednesdayTHURSDAY- ThursdayFRIDAY- FridaySATURDAY- SaturdaySUNDAY- SundayALL- All days of the week
Day and Month Values
day: 0- Every day of the monthday: 1-31- Specific day of the monthmonth: 0- Every monthmonth: 1-12- Specific month (1=January, 12=December)
Time Values
startHour/endHour: 0-24 (24-hour format)startMinute/endMinute: 0-60startSecond/endSecond: 0-60- Start time must be before end time
Note
- If
dayType: WEEK, provideenumWeekDayList(at least one weekday). - If
dayType: CUSTOM, providedayandmonth. - If
wholeDay: false, provide all time fields (startHour, startMinute, startSecond, endHour, endMinute, endSecond). - If
wholeDay: true, time fields are ignored.
Response
Success Response (200 OK)
cURL Example
Update Policy
Endpoint
Request
Headers
| Header | Value |
|---|---|
| Authorization | Bearer {token} |
| Content-Type | application/json |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
| apiProxyName | string | Yes | API Proxy name |
| policyName | string | Yes | Policy name |
Request Body
Full JSON Body Example
Response
Success Response (200 OK)
cURL Example
Delete Policy
Endpoint
Request
Headers
| Header | Value |
|---|---|
| Authorization | Bearer {token} |
| Content-Type | application/json |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
| apiProxyName | string | Yes | API Proxy name |
| policyName | string | Yes | Policy name |
Request Body
Full JSON Body Example
Request Body Fields
operationMetadata
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| targetScope | string | Yes | - | Policy scope: ALL or ENDPOINT |
| targetPipeline | string | Yes | - | Pipeline: REQUEST, RESPONSE, or ERROR |
| deploy | boolean | No | false | Whether to deploy after deletion |
Response
Success Response (200 OK)
cURL Example
Notes and Warnings
-
Action Type:
ALLOW- Access is allowed only during specified periods (all other times are blocked)RESTRICT- Access is blocked during specified periods (all other times are allowed)
-
Zone ID:
- Use offset format:
+03:00,-05:00,+00:00 - Or zone name:
Europe/Istanbul,America/New_York,UTC - Must be a valid Java ZoneId
- Use offset format:
-
Day Type:
WEEK- UseenumWeekDayListto specify weekdaysCUSTOM- Usedayandmonthto specify dates
-
Day and Month Values:
day: 0- Every day of the monthday: 1-31- Specific daymonth: 0- Every monthmonth: 1-12- Specific month
-
Time Values:
- Hours: 0-24 (24-hour format)
- Minutes/Seconds: 0-60
- Start time must be before end time
-
Whole Day:
- When
wholeDay: true, restriction applies to entire day (time fields ignored) - When
wholeDay: false, provide all time fields
- When
-
Multiple Restrictions:
- Multiple restrictions in the list are evaluated together
- For
ALLOW: Access allowed if any restriction matches - For
RESTRICT: Access blocked if any restriction matches
- Time Zone: All times are evaluated in the specified time zone
-
Deployment: Policy changes require deployment to take effect. Set
deploy: trueor deploy manually.
Related Documentation
- List Policies - List all policies
- Add Policy - General policy addition guide
- Update Policy - General policy update guide
- Delete Policy - General policy deletion guide

