openapi: 3.0.0 info: title: Secret Server Rest Activations Roles API description: REST API documentation for Secret Server. This document describes how to use the REST API. All requests require an authentication token; please see the authentication document for more information. The Swagger specification for this API is also available. termsOfService: https://delinea.com/eula contact: name: Support url: https://delinea.com version: 11.7.2 servers: - url: /SecretServer/api security: - BearerToken: [] tags: - name: Roles description: View and maintain User Roles paths: /v1/roles/{id}: get: tags: - Roles summary: Get Role description: Get Role by Role ID operationId: RolesService_Get parameters: - name: id in: path description: id required: true schema: type: integer format: int32 responses: '200': description: Role model result object content: application/json: schema: $ref: '#/components/schemas/RoleModel' '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/BadRequestResponse' '403': description: Authentication failed content: application/json: schema: $ref: '#/components/schemas/AuthenticationFailedResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorResponse' deprecated: false patch: tags: - Roles summary: Update Role description: Update a single Role by ID operationId: RolesService_Update parameters: - name: id in: path description: Role ID required: true schema: type: integer format: int32 requestBody: content: application/json: schema: $ref: '#/components/schemas/RolePatchArgs' description: Role update options responses: '200': description: Role object content: application/json: schema: $ref: '#/components/schemas/RoleModel' '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/BadRequestResponse' '403': description: Authentication failed content: application/json: schema: $ref: '#/components/schemas/AuthenticationFailedResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorResponse' deprecated: false /v1/roles: get: tags: - Roles summary: Search Roles description: Search, filter, sort, and page Roles operationId: RolesService_GetAll parameters: - name: filter.groupId in: query description: Only return roles assigned to this group id. Will be ignored if UserId is set required: false x-nullable: true schema: type: integer format: int32 - name: filter.includeInactive in: query description: Whether to include inactive Roles in the results required: false schema: type: boolean - name: filter.userId in: query description: Only return roles assigned to this user id. Will supercede GroupId if set required: false x-nullable: true schema: type: integer format: int32 - name: skip in: query description: Number of records to skip before taking results required: false schema: type: integer format: int32 - name: sortBy[0].direction in: query description: Sort direction required: false schema: type: string - name: sortBy[0].name in: query description: Sort field name required: false schema: type: string - name: sortBy[0].priority in: query description: Priority index. Sorts with lower values are executed earlier required: false schema: type: integer format: int32 - name: take in: query description: Maximum number of records to include in results required: false schema: type: integer format: int32 responses: '200': description: Role search result object content: application/json: schema: $ref: '#/components/schemas/PagingOfRoleModel' '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/BadRequestResponse' '403': description: Authentication failed content: application/json: schema: $ref: '#/components/schemas/AuthenticationFailedResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorResponse' deprecated: false post: tags: - Roles summary: Create Role description: Create a new Role operationId: RolesService_Create requestBody: content: application/json: schema: $ref: '#/components/schemas/RoleCreateArgs' description: args responses: '200': description: Role object content: application/json: schema: $ref: '#/components/schemas/RoleModel' '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/BadRequestResponse' '403': description: Authentication failed content: application/json: schema: $ref: '#/components/schemas/AuthenticationFailedResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorResponse' deprecated: false /v1/roles/{id}/groups: get: tags: - Roles summary: Get Role Groups description: Get assigned Groups by RoleId operationId: RolesService_GetRoleGroups parameters: - name: id in: path description: id required: true schema: type: integer format: int32 - name: filter.includeInactiveUsersForGroup in: query description: Whether to include inactive users in the results required: false schema: type: boolean - name: filter.userDomainId in: query description: Filter only users in a specific domain required: false x-nullable: true schema: type: integer format: int32 - name: skip in: query description: Number of records to skip before taking results required: false schema: type: integer format: int32 - name: sortBy[0].direction in: query description: Sort direction required: false schema: type: string - name: sortBy[0].name in: query description: Sort field name required: false schema: type: string - name: sortBy[0].priority in: query description: Priority index. Sorts with lower values are executed earlier required: false schema: type: integer format: int32 - name: take in: query description: Maximum number of records to include in results required: false schema: type: integer format: int32 responses: '200': description: Role Group summary result object content: application/json: schema: $ref: '#/components/schemas/PagingOfRoleGroupSummaryAndGroupMembershipFilter' '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/BadRequestResponse' '403': description: Authentication failed content: application/json: schema: $ref: '#/components/schemas/AuthenticationFailedResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorResponse' deprecated: false /v1/roles/{id}/permissions: get: tags: - Roles summary: Get Assigned Role Permissions description: Get Permissions assigned to a single Role by Role ID operationId: RolesService_GetRolePermissions parameters: - name: id in: path description: id required: true schema: type: integer format: int32 - name: skip in: query description: Number of records to skip before taking results required: false schema: type: integer format: int32 - name: sortBy[0].direction in: query description: Sort direction required: false schema: type: string - name: sortBy[0].name in: query description: Sort field name required: false schema: type: string - name: sortBy[0].priority in: query description: Priority index. Sorts with lower values are executed earlier required: false schema: type: integer format: int32 - name: take in: query description: Maximum number of records to include in results required: false schema: type: integer format: int32 responses: '200': description: Role Permission model result object content: application/json: schema: $ref: '#/components/schemas/PagingOfRolePermissionModel' '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/BadRequestResponse' '403': description: Authentication failed content: application/json: schema: $ref: '#/components/schemas/AuthenticationFailedResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorResponse' deprecated: false put: tags: - Roles summary: Update Role Permission Assignments description: Update all Permissions assigned to Role operationId: RolesService_UpdatePermissions parameters: - name: id in: path description: id required: true schema: type: integer format: int32 requestBody: content: application/json: schema: $ref: '#/components/schemas/RolePermissionsAssignmentRequest' description: args responses: '200': description: Success / Fail content: application/json: schema: $ref: '#/components/schemas/RolePermissionsAssignmentResponse' '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/BadRequestResponse' '403': description: Authentication failed content: application/json: schema: $ref: '#/components/schemas/AuthenticationFailedResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorResponse' deprecated: false /v1/roles/{id}/permissions/unassigned: get: tags: - Roles summary: Get Unassigned Role Permissions description: Get unassigned Role Permissions matching the type of a specific Role by Role ID operationId: RolesService_GetAllRolePermissionsByType parameters: - name: id in: path description: id required: true schema: type: integer format: int32 - name: skip in: query description: Number of records to skip before taking results required: false schema: type: integer format: int32 - name: sortBy[0].direction in: query description: Sort direction required: false schema: type: string - name: sortBy[0].name in: query description: Sort field name required: false schema: type: string - name: sortBy[0].priority in: query description: Priority index. Sorts with lower values are executed earlier required: false schema: type: integer format: int32 - name: take in: query description: Maximum number of records to include in results required: false schema: type: integer format: int32 responses: '200': description: Role model result object content: application/json: schema: $ref: '#/components/schemas/PagingOfRolePermissionModel' '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/BadRequestResponse' '403': description: Authentication failed content: application/json: schema: $ref: '#/components/schemas/AuthenticationFailedResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorResponse' deprecated: false /v1/roles/stub: get: tags: - Roles summary: Get Role Stub description: Return the default values for a new Role operationId: RolesService_Stub responses: '200': description: Role object content: application/json: schema: $ref: '#/components/schemas/RoleModel' '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/BadRequestResponse' '403': description: Authentication failed content: application/json: schema: $ref: '#/components/schemas/AuthenticationFailedResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorResponse' deprecated: false /v1/roles/{roleId}/groups: patch: tags: - Roles summary: Patch Role Group Assignments description: Update Groups assigned to a Role by sending list(s) of Group IDs to add/remove operationId: RolesService_PatchGroups parameters: - name: roleId in: path description: Role ID required: true schema: type: integer format: int32 requestBody: content: application/json: schema: $ref: '#/components/schemas/RoleGroupsPatchArgs' description: Role Groups update options responses: '200': description: Role object content: application/json: schema: $ref: '#/components/schemas/RoleGroupsPatchResult' '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/BadRequestResponse' '403': description: Authentication failed content: application/json: schema: $ref: '#/components/schemas/AuthenticationFailedResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorResponse' deprecated: false components: schemas: Sort: description: Sort options. Multiple sort options can be provided in the query string. required: - name - direction properties: direction: $ref: '#/components/schemas/SortDirection' name: description: Sort field name type: string priority: description: Priority index. Sorts with lower values are executed earlier type: integer format: int32 type: object UpdateFieldValueOfBoolean: description: Active properties: dirty: description: Dirty type: boolean value: description: Value type: boolean type: object SortDirection: description: Sort direction properties: {} type: string enum: - None - Asc - Desc Severity: description: Error severity level properties: {} type: string enum: - None - Retry - Warn - Critical - Fatal RoleModel: description: Role properties: created: description: Created type: string format: date-time enabled: description: Enabled type: boolean id: description: Role Id type: integer format: int32 isSystem: description: Is System Role type: boolean name: description: Name type: string type: object RoleGroupsPatchModel: description: Data properties: groupIdsToAdd: $ref: '#/components/schemas/UpdateFieldValueOfInt32Array' groupIdsToRemove: $ref: '#/components/schemas/UpdateFieldValueOfInt32Array' type: object UpdateFieldValueOfInt32Array: description: FolderIds properties: dirty: description: Dirty type: boolean value: description: Value items: type: integer format: int32 type: array type: object InternalServerErrorResponse: description: Response object for internal server errors required: - message - exceptionMessage - exceptionType - stackTrace properties: message: description: Error message type: string exceptionMessage: description: Error message from exception type: string exceptionType: description: Exception type type: string stackTrace: description: Exception stack trace type: string type: object BadRequestResponse: description: Response object for invalid requests required: - message properties: message: description: Error message type: string messageDetail: description: Error message detail type: string errorCode: description: Error message code type: string modelState: description: An object describing validation errors type: object type: object RolePermissionsAssignmentResponse: description: The status of the Role Permissions change action. properties: success: description: The success or failure of the Role Permissions action. type: boolean type: object RolePermissionModel: description: Role Permission properties: name: description: Role Name type: string rolePermissionId: description: Role Permission ID type: integer format: int32 roleType: $ref: '#/components/schemas/RoleTypes' type: object RolePermissionsAssignmentRequest: description: RolePermissionsAssignmentRequest properties: rolePermissionIds: description: This list will be the exact RolePermissions for the Role items: type: integer format: int32 type: array type: object RoleCreateArgs: description: Role create options required: - name - enabled properties: enabled: description: Whether the Role is active type: boolean name: description: Role name type: string type: object RoleTypes: description: Role Type properties: {} type: string enum: - GlobalRoleType - FolderRoleType - SecretRoleType - SecretTemplateRoleType - ReportRoleType - ReportCategoryRoleType RolePatchArgs: description: RolePatchArgs properties: data: $ref: '#/components/schemas/RolePatchModel' type: object RolePatchModel: description: Patch Role properties: enabled: $ref: '#/components/schemas/UpdateFieldValueOfBoolean' name: $ref: '#/components/schemas/UpdateFieldValueOfString' type: object RoleGroupsPatchResult: description: RoleGroupsPatchResult properties: success: description: Success type: boolean type: object PagingOfRoleGroupSummaryAndGroupMembershipFilter: description: Specify filtering, paging, sorting options for querying records and returning results properties: batchCount: description: Number of result batches available with current query options type: integer format: int32 currentPage: description: Index of current result page type: integer format: int32 filter: $ref: '#/components/schemas/GroupMembershipFilter' hasNext: description: Whether there are any results in additional pages type: boolean hasPrev: description: Whether there are any results in previous pages type: boolean nextSkip: description: Correct value of 'skip' for the next page of results type: integer format: int32 pageCount: description: Number of result pages available with current query options type: integer format: int32 prevSkip: description: Correct value of 'skip' for the previous page of results type: integer format: int32 records: description: Query results items: $ref: '#/components/schemas/RoleGroupSummary' type: array severity: $ref: '#/components/schemas/Severity' skip: description: Number of records to skip before taking results type: integer format: int32 sortBy: description: List of sort properties items: $ref: '#/components/schemas/Sort' type: array success: description: Whether the query executed successfully type: boolean take: description: Maximum number of records to include in results type: integer format: int32 total: description: Total number of results available type: integer format: int32 type: object AuthenticationFailedResponse: description: Response object for authentication failures required: - message properties: message: description: Error message type: string type: object RoleGroupSummary: description: Group properties: created: description: Created Date type: string format: date-time displayName: description: Group display name type: string domainName: description: Active Directory domain name type: string enabled: description: Whether the group is active type: boolean groupId: description: Group ID type: integer format: int32 name: description: Group name type: string personal: description: Whether the group is for a single user type: boolean type: object UpdateFieldValueOfString: description: Description properties: dirty: description: Dirty type: boolean value: description: Value type: string type: object PagingOfRoleModel: description: Specify paging and sorting options for querying records and returning results properties: batchCount: description: Number of result batches available with current query options type: integer format: int32 currentPage: description: Index of current result page type: integer format: int32 hasNext: description: Whether there are any results in additional pages type: boolean hasPrev: description: Whether there are any results in previous pages type: boolean nextSkip: description: Correct value of 'skip' for the next page of results type: integer format: int32 pageCount: description: Number of result pages available with current query options type: integer format: int32 prevSkip: description: Correct value of 'skip' for the previous page of results type: integer format: int32 records: description: Query results items: $ref: '#/components/schemas/RoleModel' type: array severity: $ref: '#/components/schemas/Severity' skip: description: Number of records to skip before taking results type: integer format: int32 sortBy: description: List of sort properties items: $ref: '#/components/schemas/Sort' type: array success: description: Whether the query executed successfully type: boolean take: description: Maximum number of records to include in results type: integer format: int32 total: description: Total number of results available type: integer format: int32 type: object RoleGroupsPatchArgs: description: RoleGroupsPatchArgs properties: data: $ref: '#/components/schemas/RoleGroupsPatchModel' type: object PagingOfRolePermissionModel: description: Specify paging and sorting options for querying records and returning results properties: batchCount: description: Number of result batches available with current query options type: integer format: int32 currentPage: description: Index of current result page type: integer format: int32 hasNext: description: Whether there are any results in additional pages type: boolean hasPrev: description: Whether there are any results in previous pages type: boolean nextSkip: description: Correct value of 'skip' for the next page of results type: integer format: int32 pageCount: description: Number of result pages available with current query options type: integer format: int32 prevSkip: description: Correct value of 'skip' for the previous page of results type: integer format: int32 records: description: Query results items: $ref: '#/components/schemas/RolePermissionModel' type: array severity: $ref: '#/components/schemas/Severity' skip: description: Number of records to skip before taking results type: integer format: int32 sortBy: description: List of sort properties items: $ref: '#/components/schemas/Sort' type: array success: description: Whether the query executed successfully type: boolean take: description: Maximum number of records to include in results type: integer format: int32 total: description: Total number of results available type: integer format: int32 type: object GroupMembershipFilter: description: Group membership filter properties: includeInactiveUsersForGroup: description: Whether to include inactive users in the results type: boolean userDomainId: description: Filter only users in a specific domain type: integer format: int32 nullable: true type: object securitySchemes: BearerToken: type: apiKey description: 'Perform a POST request to `/oauth2/token`. It should include three form data parameters - `username`, `password`, and `grant_type`.The `grant_type` parameter should always have the value `password`.The access token returned should be included in the header of subsequent requests, like ''Authorization: Bearer token''. The token remains valid for a time period returned in the ''expires_in'' property (in seconds). For details, see the token request documentation.' name: Authorization in: header