|
339 | 339 | } |
340 | 340 | } |
341 | 341 | }, |
342 | | - "/project": { |
343 | | - "get": { |
344 | | - "tags": [ |
345 | | - "Projects" |
346 | | - ], |
347 | | - "summary": "Get current project", |
348 | | - "description": "Get the current project based on the API key project scope.", |
349 | | - "operationId": "getCurrentProject", |
350 | | - "responses": { |
351 | | - "200": { |
352 | | - "description": "Success, current project retrieved", |
353 | | - "content": { |
354 | | - "application/json": { |
355 | | - "schema": { |
356 | | - "$ref": "#/components/schemas/Platform.Project.Resource" |
357 | | - } |
358 | | - } |
359 | | - } |
360 | | - }, |
361 | | - "401": { |
362 | | - "$ref": "#/components/responses/401" |
363 | | - }, |
364 | | - "403": { |
365 | | - "$ref": "#/components/responses/403" |
366 | | - } |
367 | | - }, |
368 | | - "parameters": [ |
369 | | - { |
370 | | - "$ref": "#/components/parameters/page" |
371 | | - }, |
372 | | - { |
373 | | - "$ref": "#/components/parameters/per_page" |
374 | | - }, |
375 | | - { |
376 | | - "$ref": "#/components/parameters/header_project_id" |
377 | | - }, |
378 | | - { |
379 | | - "$ref": "#/components/parameters/header_project_slug" |
380 | | - } |
381 | | - ] |
382 | | - }, |
383 | | - "post": { |
384 | | - "tags": [ |
385 | | - "Projects" |
386 | | - ], |
387 | | - "summary": "Update current project", |
388 | | - "description": "Update the current project based on the API key project scope.", |
389 | | - "operationId": "updateCurrentProject", |
390 | | - "requestBody": { |
391 | | - "description": "Project request", |
392 | | - "required": true, |
393 | | - "content": { |
394 | | - "application/json": { |
395 | | - "schema": { |
396 | | - "$ref": "#/components/schemas/Platform.Project.Request" |
397 | | - } |
398 | | - } |
399 | | - } |
400 | | - }, |
401 | | - "responses": { |
402 | | - "200": { |
403 | | - "description": "Success, current project updated", |
404 | | - "content": { |
405 | | - "application/json": { |
406 | | - "schema": { |
407 | | - "$ref": "#/components/schemas/Platform.Project.Resource" |
408 | | - } |
409 | | - } |
410 | | - } |
411 | | - }, |
412 | | - "401": { |
413 | | - "$ref": "#/components/responses/401" |
414 | | - }, |
415 | | - "403": { |
416 | | - "$ref": "#/components/responses/403" |
417 | | - }, |
418 | | - "422": { |
419 | | - "$ref": "#/components/responses/422" |
420 | | - } |
421 | | - }, |
422 | | - "parameters": [ |
423 | | - { |
424 | | - "$ref": "#/components/parameters/header_project_id" |
425 | | - }, |
426 | | - { |
427 | | - "$ref": "#/components/parameters/header_project_slug" |
428 | | - } |
429 | | - ] |
430 | | - } |
431 | | - }, |
432 | 342 | "/projects": { |
433 | 343 | "get": { |
434 | 344 | "tags": [ |
|
648 | 558 | } |
649 | 559 | } |
650 | 560 | }, |
| 561 | + "/users": { |
| 562 | + "get": { |
| 563 | + "tags": [ |
| 564 | + "Users" |
| 565 | + ], |
| 566 | + "summary": "List users", |
| 567 | + "description": "Get a paginated list of users.", |
| 568 | + "operationId": "getUsers", |
| 569 | + "parameters": [ |
| 570 | + { |
| 571 | + "name": "email", |
| 572 | + "in": "query", |
| 573 | + "description": "Filter users by email. Use a comma-separated list to specify multiple email addresses.", |
| 574 | + "required": false, |
| 575 | + "schema": { |
| 576 | + "type": "string" |
| 577 | + } |
| 578 | + }, |
| 579 | + { |
| 580 | + "$ref": "#/components/parameters/page" |
| 581 | + }, |
| 582 | + { |
| 583 | + "$ref": "#/components/parameters/per_page" |
| 584 | + }, |
| 585 | + { |
| 586 | + "$ref": "#/components/parameters/header_project_id" |
| 587 | + }, |
| 588 | + { |
| 589 | + "$ref": "#/components/parameters/header_project_slug" |
| 590 | + } |
| 591 | + ], |
| 592 | + "responses": { |
| 593 | + "200": { |
| 594 | + "description": "Success, users retrieved", |
| 595 | + "content": { |
| 596 | + "application/json": { |
| 597 | + "schema": { |
| 598 | + "properties": { |
| 599 | + "data": { |
| 600 | + "items": { |
| 601 | + "$ref": "#/components/schemas/Platform.User.Resource" |
| 602 | + } |
| 603 | + }, |
| 604 | + "meta": { |
| 605 | + "$ref": "#/components/schemas/meta" |
| 606 | + }, |
| 607 | + "links": { |
| 608 | + "$ref": "#/components/schemas/links" |
| 609 | + } |
| 610 | + }, |
| 611 | + "type": "object" |
| 612 | + } |
| 613 | + } |
| 614 | + } |
| 615 | + }, |
| 616 | + "401": { |
| 617 | + "$ref": "#/components/responses/401" |
| 618 | + }, |
| 619 | + "403": { |
| 620 | + "$ref": "#/components/responses/403" |
| 621 | + } |
| 622 | + } |
| 623 | + } |
| 624 | + }, |
| 625 | + "/users/{userId}": { |
| 626 | + "get": { |
| 627 | + "tags": [ |
| 628 | + "Users" |
| 629 | + ], |
| 630 | + "summary": "Get a user", |
| 631 | + "description": "Get a user by ID", |
| 632 | + "operationId": "getUser", |
| 633 | + "parameters": [ |
| 634 | + { |
| 635 | + "name": "userId", |
| 636 | + "in": "path", |
| 637 | + "description": "ID of the user to show", |
| 638 | + "required": true, |
| 639 | + "schema": { |
| 640 | + "type": "integer" |
| 641 | + } |
| 642 | + }, |
| 643 | + { |
| 644 | + "$ref": "#/components/parameters/header_project_id" |
| 645 | + }, |
| 646 | + { |
| 647 | + "$ref": "#/components/parameters/header_project_slug" |
| 648 | + } |
| 649 | + ], |
| 650 | + "responses": { |
| 651 | + "200": { |
| 652 | + "description": "Success, user retrieved", |
| 653 | + "content": { |
| 654 | + "application/json": { |
| 655 | + "schema": { |
| 656 | + "$ref": "#/components/schemas/Platform.User.Resource" |
| 657 | + } |
| 658 | + } |
| 659 | + } |
| 660 | + }, |
| 661 | + "401": { |
| 662 | + "$ref": "#/components/responses/401" |
| 663 | + }, |
| 664 | + "403": { |
| 665 | + "$ref": "#/components/responses/403" |
| 666 | + }, |
| 667 | + "404": { |
| 668 | + "$ref": "#/components/responses/404" |
| 669 | + } |
| 670 | + } |
| 671 | + } |
| 672 | + }, |
651 | 673 | "/uptime/incidents": { |
652 | 674 | "get": { |
653 | 675 | "tags": [ |
|
2544 | 2566 | } |
2545 | 2567 | } |
2546 | 2568 | }, |
| 2569 | + "Platform.User.Resource": { |
| 2570 | + "properties": { |
| 2571 | + "id": { |
| 2572 | + "description": "User ID", |
| 2573 | + "type": "number", |
| 2574 | + "example": 1 |
| 2575 | + }, |
| 2576 | + "role": { |
| 2577 | + "$ref": "#/components/schemas/Phare.User.UserRoleEnum" |
| 2578 | + }, |
| 2579 | + "email": { |
| 2580 | + "description": "User email", |
| 2581 | + "type": "string", |
| 2582 | + "example": "nicolas@phare.io" |
| 2583 | + }, |
| 2584 | + "created_at": { |
| 2585 | + "description": "Date of creation for the entity", |
| 2586 | + "type": "string", |
| 2587 | + "format": "date-time" |
| 2588 | + }, |
| 2589 | + "updated_at": { |
| 2590 | + "description": "Date of last update for the entity", |
| 2591 | + "type": "string", |
| 2592 | + "format": "date-time" |
| 2593 | + } |
| 2594 | + }, |
| 2595 | + "type": "object" |
| 2596 | + }, |
2547 | 2597 | "Platform.AlertRule": { |
2548 | 2598 | "required": [ |
2549 | 2599 | "event", |
|
3176 | 3226 | "uptime.incident_update.published" |
3177 | 3227 | ] |
3178 | 3228 | }, |
| 3229 | + "Phare.User.UserRoleEnum": { |
| 3230 | + "type": "string", |
| 3231 | + "enum": [ |
| 3232 | + "member", |
| 3233 | + "admin" |
| 3234 | + ] |
| 3235 | + }, |
3179 | 3236 | "Uptime.Incident.ImpactEnum": { |
3180 | 3237 | "type": "string", |
3181 | 3238 | "enum": [ |
|
3402 | 3459 | } |
3403 | 3460 | ], |
3404 | 3461 | "tags": [ |
| 3462 | + { |
| 3463 | + "name": "Users", |
| 3464 | + "description": "Users" |
| 3465 | + }, |
3405 | 3466 | { |
3406 | 3467 | "name": "Projects", |
3407 | 3468 | "description": "Projects" |
|
3431 | 3492 | { |
3432 | 3493 | "name": "Phare platform", |
3433 | 3494 | "tags": [ |
| 3495 | + "Users", |
3434 | 3496 | "Projects", |
3435 | 3497 | "Alert Rules" |
3436 | 3498 | ] |
|
0 commit comments