|
| 1 | +openapi: 3.1.0 |
| 2 | +info: |
| 3 | + title: WordLift Graph KPI API |
| 4 | + description: Historical graph KPI ancillary service backed by MongoDB, Postgres, |
| 5 | + helper Mongo, and wordlift_sdk. |
| 6 | + version: 0.1.1 |
| 7 | +paths: |
| 8 | + /kpis/graphs/{graph_id}/snapshots: |
| 9 | + get: |
| 10 | + tags: |
| 11 | + - snapshots |
| 12 | + summary: List Snapshots |
| 13 | + operationId: list_snapshots_kpis_graphs__graph_id__snapshots_get |
| 14 | + parameters: |
| 15 | + - name: graph_id |
| 16 | + in: path |
| 17 | + required: true |
| 18 | + schema: |
| 19 | + type: string |
| 20 | + title: Graph Id |
| 21 | + - name: date_from |
| 22 | + in: query |
| 23 | + required: false |
| 24 | + schema: |
| 25 | + anyOf: |
| 26 | + - type: string |
| 27 | + - type: 'null' |
| 28 | + title: Date From |
| 29 | + - name: date_to |
| 30 | + in: query |
| 31 | + required: false |
| 32 | + schema: |
| 33 | + anyOf: |
| 34 | + - type: string |
| 35 | + - type: 'null' |
| 36 | + title: Date To |
| 37 | + - name: limit |
| 38 | + in: query |
| 39 | + required: false |
| 40 | + schema: |
| 41 | + anyOf: |
| 42 | + - type: integer |
| 43 | + - type: 'null' |
| 44 | + title: Limit |
| 45 | + - name: metrics |
| 46 | + in: query |
| 47 | + required: false |
| 48 | + schema: |
| 49 | + anyOf: |
| 50 | + - type: string |
| 51 | + - type: 'null' |
| 52 | + title: Metrics |
| 53 | + responses: |
| 54 | + '200': |
| 55 | + description: Successful Response |
| 56 | + content: |
| 57 | + application/json: |
| 58 | + schema: |
| 59 | + type: object |
| 60 | + additionalProperties: true |
| 61 | + title: Response List Snapshots Kpis Graphs Graph Id Snapshots Get |
| 62 | + '422': |
| 63 | + description: Validation Error |
| 64 | + content: |
| 65 | + application/json: |
| 66 | + schema: |
| 67 | + $ref: '#/components/schemas/HTTPValidationError' |
| 68 | + /kpis/graphs/{graph_id}/snapshots/{date}: |
| 69 | + get: |
| 70 | + tags: |
| 71 | + - snapshots |
| 72 | + summary: Get Snapshot |
| 73 | + operationId: get_snapshot_kpis_graphs__graph_id__snapshots__date__get |
| 74 | + parameters: |
| 75 | + - name: graph_id |
| 76 | + in: path |
| 77 | + required: true |
| 78 | + schema: |
| 79 | + type: string |
| 80 | + title: Graph Id |
| 81 | + - name: date |
| 82 | + in: path |
| 83 | + required: true |
| 84 | + schema: |
| 85 | + type: string |
| 86 | + title: Date |
| 87 | + responses: |
| 88 | + '200': |
| 89 | + description: Successful Response |
| 90 | + content: |
| 91 | + application/json: |
| 92 | + schema: |
| 93 | + type: object |
| 94 | + additionalProperties: true |
| 95 | + title: Response Get Snapshot Kpis Graphs Graph Id Snapshots Date Get |
| 96 | + '422': |
| 97 | + description: Validation Error |
| 98 | + content: |
| 99 | + application/json: |
| 100 | + schema: |
| 101 | + $ref: '#/components/schemas/HTTPValidationError' |
| 102 | + /kpis/graphs/{graph_id}/jobs: |
| 103 | + post: |
| 104 | + tags: |
| 105 | + - jobs |
| 106 | + summary: Create Job |
| 107 | + operationId: create_job_kpis_graphs__graph_id__jobs_post |
| 108 | + parameters: |
| 109 | + - name: graph_id |
| 110 | + in: path |
| 111 | + required: true |
| 112 | + schema: |
| 113 | + type: string |
| 114 | + title: Graph Id |
| 115 | + - name: X-Ng-Dataset-Id |
| 116 | + in: header |
| 117 | + required: false |
| 118 | + schema: |
| 119 | + anyOf: |
| 120 | + - type: string |
| 121 | + - type: 'null' |
| 122 | + title: X-Ng-Dataset-Id |
| 123 | + requestBody: |
| 124 | + required: true |
| 125 | + content: |
| 126 | + application/json: |
| 127 | + schema: |
| 128 | + $ref: '#/components/schemas/SubmitJobBody' |
| 129 | + responses: |
| 130 | + '202': |
| 131 | + description: Successful Response |
| 132 | + content: |
| 133 | + application/json: |
| 134 | + schema: |
| 135 | + type: object |
| 136 | + additionalProperties: true |
| 137 | + title: Response Create Job Kpis Graphs Graph Id Jobs Post |
| 138 | + '422': |
| 139 | + description: Validation Error |
| 140 | + content: |
| 141 | + application/json: |
| 142 | + schema: |
| 143 | + $ref: '#/components/schemas/HTTPValidationError' |
| 144 | + /kpis/graphs/{graph_id}/jobs/{job_id}: |
| 145 | + get: |
| 146 | + tags: |
| 147 | + - jobs |
| 148 | + summary: Get Job |
| 149 | + operationId: get_job_kpis_graphs__graph_id__jobs__job_id__get |
| 150 | + parameters: |
| 151 | + - name: graph_id |
| 152 | + in: path |
| 153 | + required: true |
| 154 | + schema: |
| 155 | + type: string |
| 156 | + title: Graph Id |
| 157 | + - name: job_id |
| 158 | + in: path |
| 159 | + required: true |
| 160 | + schema: |
| 161 | + type: string |
| 162 | + title: Job Id |
| 163 | + responses: |
| 164 | + '200': |
| 165 | + description: Successful Response |
| 166 | + content: |
| 167 | + application/json: |
| 168 | + schema: |
| 169 | + type: object |
| 170 | + additionalProperties: true |
| 171 | + title: Response Get Job Kpis Graphs Graph Id Jobs Job Id Get |
| 172 | + '422': |
| 173 | + description: Validation Error |
| 174 | + content: |
| 175 | + application/json: |
| 176 | + schema: |
| 177 | + $ref: '#/components/schemas/HTTPValidationError' |
| 178 | +components: |
| 179 | + schemas: |
| 180 | + HTTPValidationError: |
| 181 | + properties: |
| 182 | + detail: |
| 183 | + items: |
| 184 | + $ref: '#/components/schemas/ValidationError' |
| 185 | + type: array |
| 186 | + title: Detail |
| 187 | + type: object |
| 188 | + title: HTTPValidationError |
| 189 | + SubmitJobBody: |
| 190 | + properties: |
| 191 | + snapshot_date: |
| 192 | + type: string |
| 193 | + title: Snapshot Date |
| 194 | + force_rerun: |
| 195 | + type: boolean |
| 196 | + title: Force Rerun |
| 197 | + default: false |
| 198 | + stage_retries: |
| 199 | + type: integer |
| 200 | + title: Stage Retries |
| 201 | + default: 1 |
| 202 | + limit_documents: |
| 203 | + anyOf: |
| 204 | + - type: integer |
| 205 | + - type: 'null' |
| 206 | + title: Limit Documents |
| 207 | + limit_urls: |
| 208 | + anyOf: |
| 209 | + - type: integer |
| 210 | + - type: 'null' |
| 211 | + title: Limit Urls |
| 212 | + skip_validation: |
| 213 | + type: boolean |
| 214 | + title: Skip Validation |
| 215 | + default: false |
| 216 | + replace_validation: |
| 217 | + type: boolean |
| 218 | + title: Replace Validation |
| 219 | + default: false |
| 220 | + additionalProperties: false |
| 221 | + type: object |
| 222 | + required: |
| 223 | + - snapshot_date |
| 224 | + title: SubmitJobBody |
| 225 | + ValidationError: |
| 226 | + properties: |
| 227 | + loc: |
| 228 | + items: |
| 229 | + anyOf: |
| 230 | + - type: string |
| 231 | + - type: integer |
| 232 | + type: array |
| 233 | + title: Location |
| 234 | + msg: |
| 235 | + type: string |
| 236 | + title: Message |
| 237 | + type: |
| 238 | + type: string |
| 239 | + title: Error Type |
| 240 | + input: |
| 241 | + title: Input |
| 242 | + ctx: |
| 243 | + type: object |
| 244 | + title: Context |
| 245 | + type: object |
| 246 | + required: |
| 247 | + - loc |
| 248 | + - msg |
| 249 | + - type |
| 250 | + title: ValidationError |
| 251 | + Problem: |
| 252 | + type: object |
| 253 | + required: |
| 254 | + - type |
| 255 | + - title |
| 256 | + - status |
| 257 | + - detail |
| 258 | + properties: |
| 259 | + type: |
| 260 | + type: string |
| 261 | + example: about:blank |
| 262 | + title: |
| 263 | + type: string |
| 264 | + example: Forbidden |
| 265 | + status: |
| 266 | + type: integer |
| 267 | + example: 403 |
| 268 | + detail: |
| 269 | + type: string |
| 270 | + example: Administrator access is required for this endpoint. |
| 271 | + securitySchemes: |
| 272 | + ApiKey: |
| 273 | + type: apiKey |
| 274 | + in: header |
| 275 | + name: Authorization |
| 276 | + description: '`Key {your key}`' |
| 277 | + security_oauth2: |
| 278 | + type: oauth2 |
| 279 | + flows: |
| 280 | + authorizationCode: |
| 281 | + authorizationUrl: https://s.wordlift.io/oauth/authorize/ |
| 282 | + tokenUrl: https://s.wordlift.io/oauth/token/ |
| 283 | + scopes: |
| 284 | + basic: basic scope |
| 285 | +servers: |
| 286 | +- url: https://api.wordlift.io |
| 287 | +security: |
| 288 | +- ApiKey: [] |
| 289 | +- security_oauth2: |
| 290 | + - basic |
0 commit comments