|
730 | 730 | }, |
731 | 731 | "openapi": "3.0.3", |
732 | 732 | "paths": { |
733 | | - "/v1/folder/{folderId}/regions/{regionId}/rules/export": { |
| 733 | + "/v1/folders/{folderId}/children": { |
| 734 | + "get": { |
| 735 | + "description": "Returns a list of containers for a specific folder", |
| 736 | + "operationId": "v1-get-folder-resources", |
| 737 | + "parameters": [ |
| 738 | + { |
| 739 | + "$ref": "#/components/parameters/folderId" |
| 740 | + }, |
| 741 | + { |
| 742 | + "$ref": "#/components/parameters/limit" |
| 743 | + }, |
| 744 | + { |
| 745 | + "$ref": "#/components/parameters/cursor" |
| 746 | + } |
| 747 | + ], |
| 748 | + "responses": { |
| 749 | + "200": { |
| 750 | + "content": { |
| 751 | + "application/json": { |
| 752 | + "schema": { |
| 753 | + "$ref": "#/components/schemas/ListContainersResponse" |
| 754 | + } |
| 755 | + } |
| 756 | + }, |
| 757 | + "description": "Successful response" |
| 758 | + }, |
| 759 | + "400": { |
| 760 | + "content": { |
| 761 | + "application/json": { |
| 762 | + "schema": { |
| 763 | + "$ref": "#/components/schemas/ErrorResponse" |
| 764 | + } |
| 765 | + } |
| 766 | + }, |
| 767 | + "description": "Bad request" |
| 768 | + }, |
| 769 | + "401": { |
| 770 | + "content": { |
| 771 | + "application/json": { |
| 772 | + "schema": { |
| 773 | + "$ref": "#/components/schemas/ErrorResponse" |
| 774 | + } |
| 775 | + } |
| 776 | + }, |
| 777 | + "description": "Unauthorized" |
| 778 | + }, |
| 779 | + "403": { |
| 780 | + "content": { |
| 781 | + "application/json": { |
| 782 | + "schema": { |
| 783 | + "$ref": "#/components/schemas/ErrorResponse" |
| 784 | + } |
| 785 | + } |
| 786 | + }, |
| 787 | + "description": "Forbidden access. You are not allowed to get rules from this project." |
| 788 | + }, |
| 789 | + "404": { |
| 790 | + "content": { |
| 791 | + "application/json": { |
| 792 | + "schema": { |
| 793 | + "$ref": "#/components/schemas/ErrorResponse" |
| 794 | + } |
| 795 | + } |
| 796 | + }, |
| 797 | + "description": "Folder not found." |
| 798 | + }, |
| 799 | + "500": { |
| 800 | + "content": { |
| 801 | + "application/json": { |
| 802 | + "schema": { |
| 803 | + "$ref": "#/components/schemas/ErrorResponse" |
| 804 | + } |
| 805 | + } |
| 806 | + }, |
| 807 | + "description": "Service is not available." |
| 808 | + }, |
| 809 | + "503": { |
| 810 | + "content": { |
| 811 | + "application/json": { |
| 812 | + "schema": { |
| 813 | + "$ref": "#/components/schemas/ErrorResponse" |
| 814 | + } |
| 815 | + } |
| 816 | + }, |
| 817 | + "description": "Service is not available." |
| 818 | + } |
| 819 | + }, |
| 820 | + "security": [ |
| 821 | + { |
| 822 | + "BearerAuth": [] |
| 823 | + } |
| 824 | + ], |
| 825 | + "summary": "Get containers from a folder", |
| 826 | + "x-stackit-authorization": { |
| 827 | + "actions": [ |
| 828 | + "ufw.folder.list" |
| 829 | + ], |
| 830 | + "resource-id": "folderId", |
| 831 | + "resource-id-type": "dynamic", |
| 832 | + "resource-type": "folder" |
| 833 | + } |
| 834 | + } |
| 835 | + }, |
| 836 | + "/v1/folders/{folderId}/regions/{regionId}/rules/export": { |
734 | 837 | "get": { |
735 | 838 | "description": "Returns a CSV file containing the rules for a specific folder", |
736 | 839 | "operationId": "v1-export-folder-rules", |
|
825 | 928 | } |
826 | 929 | } |
827 | 930 | }, |
828 | | - "/v1/folders/{folderId}/children": { |
| 931 | + "/v1/organizations/{organizationId}/children": { |
829 | 932 | "get": { |
830 | | - "description": "Returns a list of containers for a specific folder", |
831 | | - "operationId": "v1-get-folder-resources", |
| 933 | + "description": "Returns a list of containers for a specific organization", |
| 934 | + "operationId": "v1-get-organization-resources", |
832 | 935 | "parameters": [ |
833 | 936 | { |
834 | | - "$ref": "#/components/parameters/folderId" |
| 937 | + "$ref": "#/components/parameters/organizationId" |
835 | 938 | }, |
836 | 939 | { |
837 | 940 | "$ref": "#/components/parameters/limit" |
|
879 | 982 | } |
880 | 983 | } |
881 | 984 | }, |
882 | | - "description": "Forbidden access. You are not allowed to get rules from this project." |
| 985 | + "description": "Forbidden access. You are not allowed to get containers from this folder." |
883 | 986 | }, |
884 | 987 | "404": { |
885 | 988 | "content": { |
|
917 | 1020 | "BearerAuth": [] |
918 | 1021 | } |
919 | 1022 | ], |
920 | | - "summary": "Get containers from a folder", |
| 1023 | + "summary": "Get containers from an organization", |
921 | 1024 | "x-stackit-authorization": { |
922 | 1025 | "actions": [ |
923 | | - "ufw.folder.list" |
| 1026 | + "ufw.organization.list" |
924 | 1027 | ], |
925 | | - "resource-id": "folderId", |
| 1028 | + "resource-id": "organizationId", |
926 | 1029 | "resource-id-type": "dynamic", |
927 | | - "resource-type": "folder" |
| 1030 | + "resource-type": "organization" |
928 | 1031 | } |
929 | 1032 | } |
930 | 1033 | }, |
931 | | - "/v1/organizations/{organizationId}/children": { |
| 1034 | + "/v1/organizations/{organizationId}/regions/{regionId}/rules/export": { |
932 | 1035 | "get": { |
933 | | - "description": "Returns a list of containers for a specific organization", |
934 | | - "operationId": "v1-get-organization-resources", |
| 1036 | + "description": "Returns a CSV file containing the rules for a specific organization", |
| 1037 | + "operationId": "v1-export-organization-rules", |
935 | 1038 | "parameters": [ |
936 | 1039 | { |
937 | 1040 | "$ref": "#/components/parameters/organizationId" |
938 | 1041 | }, |
939 | 1042 | { |
940 | | - "$ref": "#/components/parameters/limit" |
| 1043 | + "$ref": "#/components/parameters/regionId" |
941 | 1044 | }, |
942 | 1045 | { |
943 | | - "$ref": "#/components/parameters/cursor" |
| 1046 | + "$ref": "#/components/parameters/ruleFilters" |
944 | 1047 | } |
945 | 1048 | ], |
946 | 1049 | "responses": { |
947 | 1050 | "200": { |
948 | 1051 | "content": { |
949 | | - "application/json": { |
| 1052 | + "text/csv": { |
950 | 1053 | "schema": { |
951 | | - "$ref": "#/components/schemas/ListContainersResponse" |
| 1054 | + "format": "binary", |
| 1055 | + "type": "string" |
952 | 1056 | } |
953 | 1057 | } |
954 | 1058 | }, |
955 | | - "description": "Successful response" |
| 1059 | + "description": "Successful CSV file download" |
956 | 1060 | }, |
957 | 1061 | "400": { |
958 | 1062 | "content": { |
|
982 | 1086 | } |
983 | 1087 | } |
984 | 1088 | }, |
985 | | - "description": "Forbidden access. You are not allowed to get containers from this folder." |
| 1089 | + "description": "Forbidden access. You are not allowed to get rules from this organization." |
986 | 1090 | }, |
987 | 1091 | "404": { |
988 | 1092 | "content": { |
|
992 | 1096 | } |
993 | 1097 | } |
994 | 1098 | }, |
995 | | - "description": "Folder not found." |
| 1099 | + "description": "Project not found." |
996 | 1100 | }, |
997 | 1101 | "500": { |
998 | 1102 | "content": { |
|
1003 | 1107 | } |
1004 | 1108 | }, |
1005 | 1109 | "description": "Service is not available." |
1006 | | - }, |
1007 | | - "503": { |
1008 | | - "content": { |
1009 | | - "application/json": { |
1010 | | - "schema": { |
1011 | | - "$ref": "#/components/schemas/ErrorResponse" |
1012 | | - } |
1013 | | - } |
1014 | | - }, |
1015 | | - "description": "Service is not available." |
1016 | 1110 | } |
1017 | 1111 | }, |
1018 | 1112 | "security": [ |
1019 | 1113 | { |
1020 | 1114 | "BearerAuth": [] |
1021 | 1115 | } |
1022 | 1116 | ], |
1023 | | - "summary": "Get containers from an organization", |
| 1117 | + "summary": "Export rules for organization as CSV", |
1024 | 1118 | "x-stackit-authorization": { |
1025 | 1119 | "actions": [ |
| 1120 | + "ufw.instance.list", |
1026 | 1121 | "ufw.organization.list" |
1027 | 1122 | ], |
1028 | 1123 | "resource-id": "organizationId", |
|
0 commit comments