Create Role CUDLR API and SDK (#135)

* Implement the Role CRUD API.

* Implement the Role List API.

* Adding Roles SDK.
This commit is contained in:
Todd Knight authored and GitHub committed 2020-06-22 06:56:27 -07:00
1 parent 1023c90729
commit 5b1e4a680d
20 files changed
+3928

No files matched your search

+248
View File
@@ -1791,6 +1791,171 @@
]
}
},
"/v1/orgs/{org_id}/roles": {
"get": {
"summary": "Lists all Roles",
"operationId": "RoleService_ListRoles",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/controller.api.services.v1.ListRolesResponse"
}
}
},
"parameters": [
{
"name": "org_id",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "view",
"in": "query",
"required": false,
"type": "string"
}
],
"tags": [
"controller.api.services.v1.RoleService"
]
},
"post": {
"summary": "Creates a single Role",
"operationId": "RoleService_CreateRole",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/controller.api.resources.roles.v1.Role"
}
}
},
"parameters": [
{
"name": "org_id",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/controller.api.resources.roles.v1.Role"
}
}
],
"tags": [
"controller.api.services.v1.RoleService"
]
}
},
"/v1/orgs/{org_id}/roles/{id}": {
"get": {
"summary": "Gets a single Role",
"operationId": "RoleService_GetRole",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/controller.api.resources.roles.v1.Role"
}
}
},
"parameters": [
{
"name": "org_id",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "view",
"in": "query",
"required": false,
"type": "string"
}
],
"tags": [
"controller.api.services.v1.RoleService"
]
},
"delete": {
"summary": "Deletes a Role",
"operationId": "RoleService_DeleteRole",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/controller.api.services.v1.DeleteRoleResponse"
}
}
},
"parameters": [
{
"name": "org_id",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"controller.api.services.v1.RoleService"
]
},
"patch": {
"summary": "Updates a Role",
"operationId": "RoleService_UpdateRole",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/controller.api.resources.roles.v1.Role"
}
}
},
"parameters": [
{
"name": "org_id",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/controller.api.resources.roles.v1.Role"
}
}
],
"tags": [
"controller.api.services.v1.RoleService"
]
}
},
"/v1/orgs/{org_id}/users": {
"get": {
"summary": "Lists all Users",
@@ -2136,6 +2301,42 @@
},
"title": "HostSet is a collection of Hosts created and managed by a HostCatalog"
},
"controller.api.resources.roles.v1.Role": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The ID of the Role\nOutput only.",
"readOnly": true
},
"name": {
"type": "string",
"title": "Optional name for identification purposes"
},
"description": {
"type": "string",
"title": "Optional user-set description for identification purposes"
},
"created_time": {
"type": "string",
"format": "date-time",
"description": "The time this resource was created\nOutput only.",
"readOnly": true
},
"updated_time": {
"type": "string",
"format": "date-time",
"description": "The time this resource was last updated.\nOutput only.",
"readOnly": true
},
"disabled": {
"type": "boolean",
"format": "boolean",
"title": "Whether the resource is disabled"
}
},
"title": "Role contains all fields related to a Role resource"
},
"controller.api.resources.scopes.v1.Organization": {
"type": "object",
"properties": {
@@ -2297,6 +2498,17 @@
}
}
},
"controller.api.services.v1.CreateRoleResponse": {
"type": "object",
"properties": {
"uri": {
"type": "string"
},
"item": {
"$ref": "#/definitions/controller.api.resources.roles.v1.Role"
}
}
},
"controller.api.services.v1.CreateUserResponse": {
"type": "object",
"properties": {
@@ -2353,6 +2565,15 @@
}
}
},
"controller.api.services.v1.DeleteRoleResponse": {
"type": "object",
"properties": {
"existed": {
"type": "boolean",
"format": "boolean"
}
}
},
"controller.api.services.v1.DeleteUserResponse": {
"type": "object",
"properties": {
@@ -2410,6 +2631,14 @@
}
}
},
"controller.api.services.v1.GetRoleResponse": {
"type": "object",
"properties": {
"item": {
"$ref": "#/definitions/controller.api.resources.roles.v1.Role"
}
}
},
"controller.api.services.v1.GetUserResponse": {
"type": "object",
"properties": {
@@ -2484,6 +2713,17 @@
}
}
},
"controller.api.services.v1.ListRolesResponse": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/controller.api.resources.roles.v1.Role"
}
}
}
},
"controller.api.services.v1.ListUsersResponse": {
"type": "object",
"properties": {
@@ -2538,6 +2778,14 @@
}
}
},
"controller.api.services.v1.UpdateRoleResponse": {
"type": "object",
"properties": {
"item": {
"$ref": "#/definitions/controller.api.resources.roles.v1.Role"
}
}
},
"controller.api.services.v1.UpdateUserResponse": {
"type": "object",
"properties": {