elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 1 | .. This work is licensed under a Creative Commons Attribution 4.0 International License. |
| 2 | .. SPDX-License-Identifier: CC-BY-4.0 |
| 3 | .. Copyright (C) 2020 Nordix |
| 4 | |
| 5 | .. _simulator-api: |
| 6 | |
| 7 | ============= |
| 8 | Simulator API |
| 9 | ============= |
| 10 | |
| 11 | This document describes the API used to manage policy types and manipulate the simulator. |
| 12 | |
maximesson | 59e2b2a | 2021-06-02 12:45:34 +0200 | [diff] [blame] | 13 | The simulator supports different versions of the A1 interface. Some functions are common for all versions, and some are |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 14 | specific for a certain version. |
| 15 | |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 16 | Common Functions |
| 17 | ================ |
| 18 | |
| 19 | Health Check |
| 20 | ------------ |
| 21 | |
| 22 | The status of the simulator. |
| 23 | |
| 24 | / |
| 25 | ~~ |
| 26 | |
| 27 | GET |
| 28 | +++ |
| 29 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 30 | Returns the status of the simulator. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 31 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 32 | **URL path:** |
| 33 | / |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 34 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 35 | **Parameters:** |
| 36 | None. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 37 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 38 | **Responses:** |
| 39 | 200: |
| 40 | Simulator is living. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 41 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 42 | **Examples:** |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 43 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 44 | **Call**: :: |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 45 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 46 | curl -X GET "http://localhost:8085/" |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 47 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 48 | **Result**: |
| 49 | |
| 50 | 200: :: |
| 51 | |
| 52 | Simulator is living (OSC_2.1.0 responds OK) |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 53 | |
| 54 | Supported Interfaces |
| 55 | -------------------- |
| 56 | |
| 57 | The simulator can support different versions of the A1 interface. With this API the supported versions can be listed. |
| 58 | |
| 59 | /container_interfaces |
| 60 | ~~~~~~~~~~~~~~~~~~~~~ |
| 61 | |
| 62 | GET |
| 63 | +++ |
| 64 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 65 | Returns the status of the simulator. (Not available for A1 Standard 1.1.3) |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 66 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 67 | **URL path:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 68 | |
| 69 | /container_interfaces |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 70 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 71 | **Parameters:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 72 | |
| 73 | None. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 74 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 75 | **Responses:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 76 | |
| 77 | 200: |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 78 | List of supported interfaces. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 79 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 80 | **Examples:** |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 81 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 82 | **Call**: :: |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 83 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 84 | curl -X GET "http://localhost:8085/container_interfaces" |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 85 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 86 | |
| 87 | **Result**: |
| 88 | |
| 89 | 200: :: |
| 90 | |
| 91 | 1.1.x-alpha.2 OSC_2.1.0 STD_1.1.3 |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 92 | |
| 93 | Counters |
| 94 | -------- |
| 95 | |
| 96 | The simulator keeps counts of different things that can be accessed. |
| 97 | |
| 98 | /counter |
| 99 | ~~~~~~~~ |
| 100 | |
| 101 | GET |
| 102 | +++ |
| 103 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 104 | Get a counter. Counter-name can be one of the following: 'num_instances', 'num_types' or 'interface'. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 105 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 106 | **URL path:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 107 | |
| 108 | /counter/{counter-name} |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 109 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 110 | **Parameters:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 111 | |
| 112 | None. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 113 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 114 | **Responses:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 115 | |
| 116 | 200: |
| 117 | |
| 118 | The counter value for the given counter. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 119 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 120 | **Examples:** |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 121 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 122 | **Call**: :: |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 123 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 124 | curl -X GET "http://localhost:8085/counter/num_instances" |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 125 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 126 | **Result**: |
| 127 | |
| 128 | 200: :: |
| 129 | |
| 130 | 10 |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 131 | |
| 132 | Version Specific Functions |
| 133 | ========================== |
| 134 | |
| 135 | The methods available to control the simulator depends on the version of the A1 API the simulator is simulating. |
| 136 | |
| 137 | OSC_2.1.0 |
| 138 | --------- |
| 139 | |
elinuxhenrik | b11c353 | 2020-04-22 11:01:08 +0200 | [diff] [blame] | 140 | This section describes the available administrative functions for the OSC_2.1.0 version of A1. |
| 141 | |
| 142 | To see the A1 functions for this version, see `OSC_2.1.0 API`_. |
| 143 | |
| 144 | .. _OSC_2.1.0 API: https://gerrit.o-ran-sc.org/r/gitweb?p=sim/a1-interface.git;a=blob;f=near-rt-ric-simulator/api/OSC_2.1.0/openapi.yaml |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 145 | |
| 146 | /deleteinstances |
| 147 | ~~~~~~~~~~~~~~~~ |
| 148 | |
| 149 | POST |
| 150 | ++++ |
| 151 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 152 | Delete all policy instances. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 153 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 154 | **URL path:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 155 | |
| 156 | /deleteinstances |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 157 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 158 | **Parameters:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 159 | |
| 160 | None. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 161 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 162 | **Responses:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 163 | |
| 164 | 200: |
| 165 | |
| 166 | All policy instances deleted. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 167 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 168 | **Examples:** |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 169 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 170 | **Call**: :: |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 171 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 172 | curl -X POST "http://localhost:8085/deleteinstances" |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 173 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 174 | **Result**: |
| 175 | |
| 176 | 200: :: |
| 177 | |
| 178 | All policy instances deleted. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 179 | |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 180 | /deleteall |
| 181 | ~~~~~~~~~~~~~~~~ |
| 182 | |
| 183 | POST |
| 184 | ++++ |
| 185 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 186 | Full reset. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 187 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 188 | **URL path:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 189 | |
| 190 | /deleteall |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 191 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 192 | **Parameters:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 193 | |
| 194 | None. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 195 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 196 | **Responses:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 197 | |
| 198 | 200: |
| 199 | |
| 200 | All policy instances and types deleted. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 201 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 202 | **Examples:** |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 203 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 204 | **Call**: :: |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 205 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 206 | curl -X POST "http://localhost:8085/deleteall" |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 207 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 208 | **Result**: |
| 209 | |
| 210 | 200: :: |
| 211 | |
| 212 | All policy instances and types deleted. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 213 | |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 214 | /policytype |
| 215 | ~~~~~~~~~~~ |
| 216 | |
| 217 | PUT |
| 218 | +++ |
| 219 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 220 | Create a policy type. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 221 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 222 | **URL path:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 223 | |
| 224 | /policytype?id=<policy-type-id> |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 225 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 226 | **Parameters:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 227 | |
| 228 | id: (*Required*) |
| 229 | |
| 230 | The ID of the policy type. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 231 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 232 | **Body:** (*Required*) |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 233 | |
| 234 | A JSON object containing the schema for the type. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 235 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 236 | **Responses:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 237 | |
| 238 | 200: |
| 239 | |
| 240 | Policy type <policy-type-id> is OK. |
| 241 | |
| 242 | 201: |
| 243 | |
| 244 | Policy type <policy-type-id> is OK. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 245 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 246 | **Examples:** |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 247 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 248 | **Call**: :: |
| 249 | |
| 250 | curl -X PUT "http://localhost:8085/policytype?id=Policy%201&ric=ric1&service=Service%201&type=STD_PolicyModelUnconstrained_0.2.0" |
| 251 | -H "Content-Type: application/json" |
| 252 | -d '{ |
| 253 | "$schema": "http://json-schema.org/draft-07/schema#", |
| 254 | "title": "STD_PolicyModelUnconstrained_0.2.0", |
| 255 | "description": "Standard model of a policy with unconstrained scope id combinations", |
| 256 | "type": "object", |
| 257 | "properties": { |
| 258 | "scope": { |
| 259 | "type": "object", |
| 260 | "properties": { |
| 261 | "ueId": {"type": "string"}, |
| 262 | "groupId": {"type": "string"}, |
| 263 | "sliceId": {"type": "string"}, |
| 264 | "qosId": {"type": "string"}, |
| 265 | "cellId": {"type": "string"} |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 266 | }, |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 267 | "minProperties": 1, |
| 268 | "additionalProperties": false |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 269 | }, |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 270 | "qosObjectives": { |
| 271 | "type": "object", |
| 272 | "properties": { |
| 273 | "gfbr": {"type": "number"}, |
| 274 | "mfbr": {"type": "number"}, |
| 275 | "priorityLevel": {"type": "number"}, |
| 276 | "pdb": {"type": "number"} |
| 277 | }, |
| 278 | "additionalProperties": false |
| 279 | }, |
| 280 | "qoeObjectives": { |
| 281 | "type": "object", |
| 282 | "properties": { |
| 283 | "qoeScore": {"type": "number"}, |
| 284 | "initialBuffering": {"type": "number"}, |
| 285 | "reBuffFreq": {"type": "number"}, |
| 286 | "stallRatio": {"type": "number"} |
| 287 | }, |
| 288 | "additionalProperties": false |
| 289 | }, |
| 290 | "resources": { |
| 291 | "type": "array", |
| 292 | "items": { |
| 293 | "type": "object", |
| 294 | "properties": { |
| 295 | "cellIdList": { |
| 296 | "type": "array", |
| 297 | "minItems": 1, |
| 298 | "uniqueItems": true, |
| 299 | "items": { |
| 300 | "type": "string" |
| 301 | } |
| 302 | }, |
| 303 | "preference": { |
| 304 | "type": "string", |
| 305 | "enum": [ |
| 306 | "SHALL", |
| 307 | "PREFER", |
| 308 | "AVOID", |
| 309 | "FORBID" |
| 310 | ] |
| 311 | }, |
| 312 | "primary": {"type": "boolean"} |
| 313 | }, |
| 314 | "additionalProperties": false, |
| 315 | "required": ["cellIdList", "preference"] |
| 316 | } |
| 317 | } |
| 318 | }, |
| 319 | "minProperties": 2, |
| 320 | "additionalProperties": false, |
| 321 | "required": ["scope"] |
| 322 | }' |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 323 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 324 | **Result**: |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 325 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 326 | 201: :: |
| 327 | |
| 328 | Policy type STD_PolicyModelUnconstrained_0.2.0 is OK |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 329 | |
| 330 | DELETE |
| 331 | ++++++ |
| 332 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 333 | Delete a policy type. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 334 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 335 | **URL path:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 336 | |
| 337 | /policytype?id=<policy-type-id> |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 338 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 339 | **Parameters:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 340 | |
| 341 | id: (*Required*) |
| 342 | |
| 343 | The ID of the policy type. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 344 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 345 | **Responses:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 346 | |
| 347 | 204: |
| 348 | |
| 349 | Policy type <policy-type-id> is OK. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 350 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 351 | **Examples:** |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 352 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 353 | **Call**: :: |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 354 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 355 | curl -X DELETE "http://localhost:8085/policytype?id=Policy%201&ric=ric1&service=Service%201&type=STD_PolicyModelUnconstrained_0.2.0" |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 356 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 357 | **Result**: |
| 358 | |
| 359 | 204: :: |
| 360 | |
| 361 | Policy type STD_PolicyModelUnconstrained_0.2.0 is OK |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 362 | |
| 363 | /policytypes |
| 364 | ~~~~~~~~~~~~ |
| 365 | |
| 366 | GET |
| 367 | +++ |
| 368 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 369 | Get a list of policy types. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 370 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 371 | **URL path:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 372 | |
| 373 | /policytypes |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 374 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 375 | **Parameters:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 376 | |
| 377 | None. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 378 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 379 | **Responses:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 380 | |
| 381 | 200: |
| 382 | |
| 383 | A list of policy types. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 384 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 385 | **Examples:** |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 386 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 387 | **Call**: :: |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 388 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 389 | curl -X GET "http://localhost:8085/policytypes" |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 390 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 391 | **Result**: |
| 392 | |
| 393 | 200: :: |
| 394 | |
| 395 | STD_PolicyModelUnconstrained_0.2.0 |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 396 | |
| 397 | /forceresponse |
| 398 | ~~~~~~~~~~~~~~ |
| 399 | |
| 400 | POST |
| 401 | ++++ |
| 402 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 403 | Force a specific response code for an A1 operation. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 404 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 405 | **URL path:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 406 | |
| 407 | /forceresponse?responsecode=<http-response-code> |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 408 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 409 | **Parameters:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 410 | |
| 411 | responsecode: (*Required*) |
| 412 | |
| 413 | The HTTP response code to return. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 414 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 415 | **Responses:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 416 | |
| 417 | 200: |
| 418 | |
| 419 | Force response code: <expected code> set for one single A1 response |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 420 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 421 | **Examples:** |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 422 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 423 | **Call**: :: |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 424 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 425 | curl -X POST "http://localhost:8085/forceresponse?responsecode=400" |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 426 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 427 | **Result**: |
| 428 | |
| 429 | 200: :: |
| 430 | |
| 431 | Force response code: 400 set for one single A1 response |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 432 | |
| 433 | /forcedelay |
| 434 | ~~~~~~~~~~~ |
| 435 | |
| 436 | POST |
| 437 | ++++ |
| 438 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 439 | Force delayed response of all A1 operations. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 440 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 441 | **URL path:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 442 | |
| 443 | /forcedelay?delay=<delay-time-seconds> |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 444 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 445 | **Parameters:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 446 | |
| 447 | delay: (*Required*) |
| 448 | |
| 449 | The time in seconds to delay all responses. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 450 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 451 | **Responses:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 452 | |
| 453 | 200: |
| 454 | |
| 455 | Force delay: <expected delay> sec set for all A1 responses |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 456 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 457 | **Examples:** |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 458 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 459 | **Call**: :: |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 460 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 461 | curl -X POST "http://localhost:8085/forcedelay?delay=2" |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 462 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 463 | **Result**: |
| 464 | |
| 465 | 200: :: |
| 466 | |
| 467 | Force delay: 2 sec set for all A1 responses |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 468 | |
| 469 | /status |
| 470 | ~~~~~~~ |
| 471 | |
| 472 | PUT |
| 473 | +++ |
| 474 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 475 | Set status and optional reason, delete and time stamp. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 476 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 477 | **URL path:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 478 | |
| 479 | /status?policyid=<policyid>&status=<status>&deleted=<value>&created_at=<time-stamp> |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 480 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 481 | **Parameters:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 482 | |
| 483 | policyid: (*Required*) |
| 484 | |
| 485 | The ID of a policy. |
| 486 | |
| 487 | status: (*Required*) |
| 488 | |
| 489 | The status of a policy. |
| 490 | |
| 491 | deleted: (*Optional*) |
| 492 | |
| 493 | True or false for real values, but accepts anything for error testing. |
| 494 | |
| 495 | created_at: (*Optional*) |
| 496 | |
| 497 | Time stamp for the status. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 498 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 499 | **Responses:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 500 | |
| 501 | 200: |
| 502 | |
| 503 | Status set to <status> for policy <policy-id> |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 504 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 505 | **Examples:** |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 506 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 507 | **Call**: :: |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 508 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 509 | curl -X PUT "http://localhost:8085/policyid=Policy1&status?status=Accepted |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 510 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 511 | **Result**: |
| 512 | |
| 513 | 200: :: |
| 514 | |
| 515 | Status set to Accepted for policy Policy1. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 516 | |
| 517 | A1 Standard 1.1.3 |
| 518 | ----------------- |
| 519 | |
elinuxhenrik | b11c353 | 2020-04-22 11:01:08 +0200 | [diff] [blame] | 520 | This section describes the available administrative functions for the A1 Standard 1.1.3 version of A1. |
| 521 | |
| 522 | To see the A1 functions for this version, see `A1 Standard 1.1.3 API`_. |
| 523 | |
| 524 | .. _A1 Standard 1.1.3 API: https://gerrit.o-ran-sc.org/r/gitweb?p=sim/a1-interface.git;a=blob;f=near-rt-ric-simulator/api/STD_1.1.3/STD_A1.yaml |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 525 | |
| 526 | /deleteinstances |
| 527 | ~~~~~~~~~~~~~~~~ |
| 528 | |
| 529 | POST |
| 530 | ++++ |
| 531 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 532 | Delete all policy instances. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 533 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 534 | **URL path:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 535 | |
| 536 | /deleteinstances |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 537 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 538 | **Parameters:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 539 | |
| 540 | None. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 541 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 542 | **Responses:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 543 | |
| 544 | 200: |
| 545 | |
| 546 | All policy instances deleted. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 547 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 548 | **Examples:** |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 549 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 550 | **Call**: :: |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 551 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 552 | curl -X POST "http://localhost:8085/deleteinstances" |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 553 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 554 | **Result**: |
| 555 | |
| 556 | 200: :: |
| 557 | |
| 558 | All policy instances deleted. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 559 | |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 560 | /deleteall |
| 561 | ~~~~~~~~~~ |
| 562 | |
| 563 | POST |
| 564 | ++++ |
| 565 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 566 | Full reset. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 567 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 568 | **URL path:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 569 | |
| 570 | /deleteinstances |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 571 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 572 | **Parameters:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 573 | |
| 574 | None. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 575 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 576 | **Responses:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 577 | |
| 578 | 200: |
| 579 | |
| 580 | All policy instances deleted. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 581 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 582 | **Examples:** |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 583 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 584 | **Call**: :: |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 585 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 586 | curl -X POST "http://localhost:8085/deleteall" |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 587 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 588 | **Result**: |
| 589 | |
| 590 | 200: :: |
| 591 | |
| 592 | All policy instances deleted. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 593 | |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 594 | /forceresponse |
| 595 | ~~~~~~~~~~~~~~ |
| 596 | |
| 597 | POST |
| 598 | ++++ |
| 599 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 600 | Force a specific response code for an A1 operation. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 601 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 602 | **URL path:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 603 | |
| 604 | /forceresponse?responsecode=<http-response-code> |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 605 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 606 | **Parameters:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 607 | |
| 608 | responsecode: (*Required*) |
| 609 | |
| 610 | The HTTP response code to return. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 611 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 612 | **Responses:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 613 | |
| 614 | 200: |
| 615 | |
| 616 | Force response code: <expected code> set for one single A1 response |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 617 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 618 | **Examples:** |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 619 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 620 | **Call**: :: |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 621 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 622 | curl -X POST "http://localhost:8085/forceresponse?responsecode=400" |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 623 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 624 | **Result**: |
| 625 | |
| 626 | 200: :: |
| 627 | |
| 628 | Force response code: 400 set for one single A1 response |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 629 | |
| 630 | /forcedelay |
| 631 | ~~~~~~~~~~~ |
| 632 | |
| 633 | POST |
| 634 | ++++ |
| 635 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 636 | Force delayed response of all A1 operations. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 637 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 638 | **URL path:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 639 | |
| 640 | /forcedelay?delay=<delay-time-seconds> |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 641 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 642 | **Parameters:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 643 | |
| 644 | delay: (*Required*) |
| 645 | |
| 646 | The time in seconds to delay all responses. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 647 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 648 | **Responses:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 649 | |
| 650 | 200: |
| 651 | |
| 652 | Force delay: <expected delay> sec set for all A1 responses |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 653 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 654 | **Examples:** |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 655 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 656 | **Call**: :: |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 657 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 658 | curl -X POST "http://localhost:8085/forcedelay?delay=2" |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 659 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 660 | **Result**: |
| 661 | |
| 662 | 200: :: |
| 663 | |
| 664 | Force delay: 2 sec set for all A1 responses |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 665 | |
| 666 | /status |
| 667 | ~~~~~~~ |
| 668 | |
| 669 | PUT |
| 670 | +++ |
| 671 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 672 | Set status and optional reason, delete and time stamp. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 673 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 674 | **URL path:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 675 | |
| 676 | /status?policyid=<policyid>&status=<status>&reason=<reason> |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 677 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 678 | **Parameters:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 679 | |
| 680 | policyid: (*Required*) |
| 681 | |
| 682 | The ID of a policy. |
| 683 | |
| 684 | status: (*Required*) |
| 685 | |
| 686 | The status of a policy. |
| 687 | |
| 688 | reason: (*Optional*) |
| 689 | |
| 690 | The reason for the status. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 691 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 692 | **Responses:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 693 | |
| 694 | 200: |
| 695 | |
| 696 | Status set to <status> for policy <policy-id> |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 697 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 698 | **Examples:** |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 699 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 700 | **Call**: :: |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 701 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 702 | curl -X PUT "http://localhost:8085/status?policyid=Policy1&status=Accepted |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 703 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 704 | **Result**: |
| 705 | |
| 706 | 200: :: |
| 707 | |
| 708 | Status set to Accepted for policy Policy1 |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 709 | |
| 710 | /sendstatus |
| 711 | ~~~~~~~~~~~ |
| 712 | |
| 713 | POST |
| 714 | ++++ |
| 715 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 716 | Send status for policy. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 717 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 718 | **URL path:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 719 | |
| 720 | /sendstatus?policyid=<policy-id> |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 721 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 722 | **Parameters:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 723 | |
| 724 | policyid: (*Required*) |
| 725 | |
| 726 | The ID of the policy to send status for. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 727 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 728 | **Responses:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 729 | |
| 730 | 200: |
| 731 | |
| 732 | Is a JSON with the response of the actual post request to the callback server, whatever that is. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 733 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 734 | **Examples:** |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 735 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 736 | **Call**: :: |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 737 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 738 | curl -X POST "http://localhost:8085/sendstatus?policyid=Policy2" |
| 739 | |
| 740 | **Result**: |
| 741 | |
| 742 | 200 |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 743 | |
| 744 | 1.1.x-alpha.2 |
| 745 | ------------- |
| 746 | |
elinuxhenrik | b11c353 | 2020-04-22 11:01:08 +0200 | [diff] [blame] | 747 | This section describes the available administrative functions for the 1.1.x-alpha.2 version of A1. |
| 748 | |
| 749 | To see the A1 functions for this version, see `1.1.x-alpha.2 API`_. |
| 750 | |
| 751 | .. _1.1.x-alpha.2 API: https://gerrit.o-ran-sc.org/r/gitweb?p=sim/a1-interface.git;a=blob;f=near-rt-ric-simulator/api/1.1.x-alpha.2/a1-openapi.yaml |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 752 | |
| 753 | /deleteinstances |
| 754 | ~~~~~~~~~~~~~~~~ |
| 755 | |
| 756 | DELETE |
| 757 | ++++++ |
| 758 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 759 | Delete all policy instances. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 760 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 761 | **URL path:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 762 | |
| 763 | /deleteinstances |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 764 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 765 | **Parameters:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 766 | |
| 767 | None. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 768 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 769 | **Responses:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 770 | |
| 771 | 200: |
| 772 | |
| 773 | All policy instances deleted. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 774 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 775 | **Examples:** |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 776 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 777 | **Call**: :: |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 778 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 779 | curl -X DELETE "http://localhost:8085/deleteinstances" |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 780 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 781 | **Result**: |
| 782 | |
| 783 | 200: :: |
| 784 | |
| 785 | All policy instances deleted. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 786 | |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 787 | /deletetypes |
| 788 | ~~~~~~~~~~~~ |
| 789 | |
| 790 | DELETE |
| 791 | ++++++ |
| 792 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 793 | Delete all policy types. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 794 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 795 | **URL path:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 796 | |
| 797 | /deletetypes |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 798 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 799 | **Parameters:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 800 | |
| 801 | None. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 802 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 803 | **Responses:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 804 | |
| 805 | 200: |
| 806 | |
| 807 | All policy types deleted. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 808 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 809 | **Examples:** |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 810 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 811 | **Call**: :: |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 812 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 813 | curl -X DELETE "http://localhost:8085/deletetypes" |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 814 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 815 | **Result**: |
| 816 | |
| 817 | 200: :: |
| 818 | |
| 819 | All policy types deleted. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 820 | |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 821 | /policytypes |
| 822 | ~~~~~~~~~~~~ |
| 823 | |
| 824 | PUT |
| 825 | +++ |
| 826 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 827 | Create or update a policy type. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 828 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 829 | **URL path:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 830 | |
| 831 | /policytypes/{policy-type-id} |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 832 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 833 | **Parameters:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 834 | |
| 835 | None. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 836 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 837 | **Body:** (*Required*) |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 838 | |
| 839 | A JSON object containing the schema for the type. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 840 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 841 | **Responses:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 842 | |
| 843 | 200: |
| 844 | |
| 845 | The policy type was either created or updated for policy type id: <policy-type-id> |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 846 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 847 | **Examples:** |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 848 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 849 | **Call**: :: |
| 850 | |
| 851 | curl -X PUT "http://localhost:8085/policytype/Policy%201&ric=ric1&service=Service%201&type=STD_PolicyModelUnconstrained_0.2.0" |
| 852 | -H "Content-Type: application/json" |
| 853 | -d '{ |
| 854 | "$schema": "http://json-schema.org/draft-07/schema#", |
| 855 | "title": "STD_PolicyModelUnconstrained_0.2.0", |
| 856 | "description": "Standard model of a policy with unconstrained scope id combinations", |
| 857 | "type": "object", |
| 858 | "properties": { |
| 859 | "scope": { |
| 860 | "type": "object", |
| 861 | "properties": { |
| 862 | "ueId": {"type": "string"}, |
| 863 | "groupId": {"type": "string"}, |
| 864 | "sliceId": {"type": "string"}, |
| 865 | "qosId": {"type": "string"}, |
| 866 | "cellId": {"type": "string"} |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 867 | }, |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 868 | "minProperties": 1, |
| 869 | "additionalProperties": false |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 870 | }, |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 871 | "qosObjectives": { |
| 872 | "type": "object", |
| 873 | "properties": { |
| 874 | "gfbr": {"type": "number"}, |
| 875 | "mfbr": {"type": "number"}, |
| 876 | "priorityLevel": {"type": "number"}, |
| 877 | "pdb": {"type": "number"} |
| 878 | }, |
| 879 | "additionalProperties": false |
| 880 | }, |
| 881 | "qoeObjectives": { |
| 882 | "type": "object", |
| 883 | "properties": { |
| 884 | "qoeScore": {"type": "number"}, |
| 885 | "initialBuffering": {"type": "number"}, |
| 886 | "reBuffFreq": {"type": "number"}, |
| 887 | "stallRatio": {"type": "number"} |
| 888 | }, |
| 889 | "additionalProperties": false |
| 890 | }, |
| 891 | "resources": { |
| 892 | "type": "array", |
| 893 | "items": { |
| 894 | "type": "object", |
| 895 | "properties": { |
| 896 | "cellIdList": { |
| 897 | "type": "array", |
| 898 | "minItems": 1, |
| 899 | "uniqueItems": true, |
| 900 | "items": { |
| 901 | "type": "string" |
| 902 | } |
| 903 | }, |
| 904 | "preference": { |
| 905 | "type": "string", |
| 906 | "enum": [ |
| 907 | "SHALL", |
| 908 | "PREFER", |
| 909 | "AVOID", |
| 910 | "FORBID" |
| 911 | ] |
| 912 | }, |
| 913 | "primary": {"type": "boolean"} |
| 914 | }, |
| 915 | "additionalProperties": false, |
| 916 | "required": ["cellIdList", "preference"] |
| 917 | } |
| 918 | } |
| 919 | }, |
| 920 | "minProperties": 2, |
| 921 | "additionalProperties": false, |
| 922 | "required": ["scope"] |
| 923 | }' |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 924 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 925 | **Result**: |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 926 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 927 | 200: :: |
| 928 | |
| 929 | The policy type was either created or updated for policy type id: STD_PolicyModelUnconstrained_0.2.0 |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 930 | |
| 931 | DELETE |
| 932 | ++++++ |
| 933 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 934 | Delete a policy type. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 935 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 936 | **URL path:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 937 | |
| 938 | /policytypes/{policy-type-id} |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 939 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 940 | **Parameters:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 941 | |
| 942 | None. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 943 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 944 | **Responses:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 945 | |
| 946 | 200: |
| 947 | |
| 948 | policy type successfully deleted for policy type id: <policy-type-id> |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 949 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 950 | **Examples:** |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 951 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 952 | **Call**: :: |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 953 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 954 | curl -X DELETE "http://localhost:8085/policytype?id=Policy%201&ric=ric1&service=Service%201&type=STD_PolicyModelUnconstrained_0.2.0" |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 955 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 956 | **Result**: |
| 957 | |
| 958 | 200: :: |
| 959 | |
| 960 | policy type successfully deleted for policy type id: STD_PolicyModelUnconstrained_0.2.0 |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 961 | |
| 962 | /{policyId}/{enforceStatus} |
| 963 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 964 | |
| 965 | PUT |
| 966 | +++ |
| 967 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 968 | Set a status to a policy instance with an enforceStatus parameter only. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 969 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 970 | **URL path:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 971 | |
| 972 | /{policyId}/{enforceStatus} |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 973 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 974 | **Parameters:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 975 | |
| 976 | None. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 977 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 978 | **Responses:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 979 | |
| 980 | 200: |
| 981 | |
| 982 | Status updated for policy: <policyId> |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 983 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 984 | **Examples:** |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 985 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 986 | **Call**: :: |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 987 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 988 | curl -X PUT "http://localhost:8085/Policy1/ENFORCED |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 989 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 990 | **Result**: |
| 991 | |
| 992 | 200: :: |
| 993 | |
| 994 | Status updated for policy: Policy1 |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 995 | |
| 996 | /{policyId}/{enforceStatus}/{enforceReason} |
| 997 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 998 | |
| 999 | PUT |
| 1000 | ++++ |
| 1001 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 1002 | Send a status to a policy instance with both enforceStatus and enforceReason. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 1003 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 1004 | **URL path:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 1005 | |
| 1006 | /{policyId}/{enforceStatus}/{enforceReason} |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 1007 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 1008 | **Parameters:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 1009 | |
| 1010 | None. |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 1011 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 1012 | **Responses:** |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 1013 | |
| 1014 | 200: |
| 1015 | |
| 1016 | Status updated for policy: <policyId> |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 1017 | |
elinuxhenrik | c67ef9d | 2020-04-20 17:05:00 +0200 | [diff] [blame] | 1018 | **Examples:** |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 1019 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 1020 | **Call**: :: |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 1021 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 1022 | curl -X PUT "http://localhost:8085/Policy1/NOT_ENFORCED/100" |
elinuxhenrik | 93f015a | 2020-04-08 11:23:55 +0200 | [diff] [blame] | 1023 | |
elinuxhenrik | 83a40db | 2020-04-23 07:47:44 +0200 | [diff] [blame] | 1024 | **Result**: |
| 1025 | |
| 1026 | 200: :: |
| 1027 | |
| 1028 | Status updated for policy: Policy1 |