Delinea SecretPermissions API
View and maintain secret permissions
View and maintain secret permissions
openapi: 3.0.0
info:
title: Secret Server Rest Activations SecretPermissions 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 <a href="../OAuth/">authentication document</a> for more information. The <a href="swagger.json">Swagger specification</a> 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: SecretPermissions
description: View and maintain secret permissions
paths:
/v1/secret-permissions/{id}:
get:
tags:
- SecretPermissions
summary: Get Secret Permission
description: Get a single secret permission by ID
operationId: SecretPermissionsService_Get
parameters:
- name: includeInactive
in: query
description: Whether to include inactive permissions in the results
required: false
schema:
type: boolean
- name: id
in: path
description: Secret permission ID
required: true
schema:
type: integer
format: int32
responses:
'200':
description: Secret permission object
content:
application/json:
schema:
$ref: '#/components/schemas/SecretPermissionModel'
'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:
- SecretPermissions
summary: Update Secret Permission
description: Update a single secret permission by ID
operationId: SecretPermissionsService_UpdateSecretPermission
parameters:
- name: id
in: path
description: Secret permission ID
required: true
schema:
type: integer
format: int32
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SecretPermissionUpdateArgs'
description: Secret permission update options
responses:
'200':
description: Secret permission object
content:
application/json:
schema:
$ref: '#/components/schemas/SecretPermissionModel'
'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
delete:
tags:
- SecretPermissions
summary: Delete Secret Permission
description: Delete a secret permission by ID
operationId: SecretPermissionsService_Delete
parameters:
- name: id
in: path
description: Secret permission ID
required: true
schema:
type: integer
format: int32
responses:
'200':
description: Object deletion result
content:
application/json:
schema:
$ref: '#/components/schemas/DeletedModel'
'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/secret-permissions:
get:
tags:
- SecretPermissions
summary: Search Secret Permissions
description: Search, filter, sort, and page secret permissions
operationId: SecretPermissionsService_SearchSecretPermissions
parameters:
- name: filter.domainId
in: query
description: DomainId
required: false
x-nullable: true
schema:
type: integer
format: int32
- name: filter.domainName
in: query
description: DomainName
required: false
schema:
type: string
- name: filter.groupId
in: query
description: Filter by group ID
required: false
x-nullable: true
schema:
type: integer
format: int32
- name: filter.groupName
in: query
description: GroupName
required: false
schema:
type: string
- name: filter.searchText
in: query
description: SearchText
required: false
schema:
type: string
- name: filter.secretId
in: query
description: Filter by secret ID
required: false
x-nullable: true
schema:
type: integer
format: int32
- name: filter.userId
in: query
description: Filter by user ID
required: false
x-nullable: true
schema:
type: integer
format: int32
- name: filter.userName
in: query
description: UserName
required: false
schema:
type: string
- 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: Secret permissions search result object
content:
application/json:
schema:
$ref: '#/components/schemas/PagingOfSecretPermissionSummary'
'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:
- SecretPermissions
summary: Create Secret Permission
description: Create a new secret permission
operationId: SecretPermissionsService_AddSecretPermission
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SecretPermissionCreateArgs'
description: Secret permission creation options
responses:
'200':
description: Secret permission object
content:
application/json:
schema:
$ref: '#/components/schemas/SecretPermissionModel'
'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/secret-permissions/stub:
get:
tags:
- SecretPermissions
summary: Get Secret Permission Stub
description: Return the default values for a new secret permission
operationId: SecretPermissionsService_Stub
parameters:
- name: secretId
in: query
description: Options for generating a secret permission stub
required: true
schema:
type: integer
format: int32
minimum: 1
responses:
'200':
description: Secret permission object
content:
application/json:
schema:
$ref: '#/components/schemas/SecretPermissionModel'
'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/secret-permissions/role-options:
get:
tags:
- SecretPermissions
summary: Gets the possible role options for a secret
description: Gets the possible role options for a secret
operationId: SecretPermissionsService_SecretRoleOptions
responses:
'200':
description: Secret role options
content:
application/json:
schema:
$ref: '#/components/schemas/SecretRoleOptionsResponseModel'
'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/secret-permissions/platform-permission:
get:
tags:
- SecretPermissions
summary: Get Secret Permission for Platform Service User
description: Gets a value indicating whether access is granted to a designated platform service user
operationId: SecretPermissionsService_GetPlatformPermission
parameters:
- name: aclRoleName
in: query
description: ACL Role name of role to check or assign to secret.
required: false
schema:
type: string
- name: secretId
in: query
description: Secret Id to check or assign role for a user.
required: false
schema:
type: integer
format: int32
- name: userName
in: query
description: Username of user to check or assign role on secret.
required: false
schema:
type: string
responses:
'200':
description: Secret platform permission result object
content:
application/json:
schema:
$ref: '#/components/schemas/SecretPlatformPermissionsModel'
'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:
- SecretPermissions
summary: Grants level of access for a platform service account on a secret
description: Grants level of access for a platform service account on a secret
operationId: SecretPermissionsService_AssignPlatformPermission
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SecretPlatformPermissionsRequest'
description: args
responses:
'200':
description: Secret platform permission result object
content:
application/json:
schema:
$ref: '#/components/schemas/SecretPlatformPermissionsModel'
'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/secrets/{secretId}/share:
patch:
tags:
- SecretPermissions
summary: Update Secret share inherit
description: Update a single secret for share inheritance
operationId: SecretPermissionsService_UpdateSecretShare
parameters:
- name: secretId
in: path
description: Secret ID
required: true
schema:
type: integer
format: int32
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SecretShareUpdateArgs'
description: Secret share update options
responses:
'200':
description: Secret share inheritance result
content:
application/json:
schema:
$ref: '#/components/schemas/SecretShareModel'
'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/secret-permissions/is-current-user-secret-owner:
post:
tags:
- SecretPermissions
summary: Check Current User is Owner
description: Check if the current user is a Secret Owner using the submitted Permissions.
operationId: SecretPermissionsService_IsCurrentUserSecretOwner
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SecretPermissionsIsCurrentUserSecretOwnerArgs'
description: args
responses:
'200':
description: SecretPermissionsCurrentUserIsOwnerModel object
content:
application/json:
schema:
$ref: '#/components/schemas/SecretPermissionsIsCurrentUserSecretOwnerResponseModel'
'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
SecretShareModel:
description: Share permissions for a specific Secret. Currently only inherits
properties:
inheritPermissions:
description: Whether or not this secret inherits permissions from the folder that contains it.
type: boolean
secretId:
description: The secret to which the share permissions apply
type: integer
format: int32
type: object
PagingOfSecretPermissionSummary:
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/SecretPermissionSummary'
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
SortDirection:
description: Sort direction
properties: {}
type: string
enum:
- None
- Asc
- Desc
SecretPermissionCreateArgs:
description: Secret permission create options
properties:
domainName:
description: Domain Name
type: string
groupId:
description: Group ID being granted permission. Leave empty if granting to a user
type: integer
format: int32
nullable: true
groupName:
description: Group Name
type: string
secretAccessRoleName:
description: Role name being granted
type: string
secretId:
description: Secret ID
type: integer
format: int32
userId:
description: User ID being granted permission. Leave empty if granting to a group
type: integer
format: int32
nullable: true
userName:
description: User Name
type: string
type: object
Severity:
description: Error severity level
properties: {}
type: string
enum:
- None
- Retry
- Warn
- Critical
- Fatal
SecretRoleOptionsResponseModel:
description: Secret role option reponse
properties:
roleOptions:
description: Array of role options that a secret can use.
items:
$ref: '#/components/schemas/SecretRoleOption'
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
SecretPermissionsIsCurrentUserSecretOwnerResponseModel:
description: SecretPermissionsIsCurrentUserSecretOwner ResponseModel
properties:
isCurrentUserSecretOwner:
description: True if the current user is a Secret Owner given the supplied Secret Permission Models.
type: boolean
type: object
SecretPermissionUpdateArgs:
description: Secret permission update options
required:
- id
- secretId
- secretAccessRoleName
properties:
id:
description: Secret permission ID. Must match ID in path
type: integer
format: int32
secretAccessRoleName:
description: Granted role name
type: string
secretId:
description: Secret ID
type: integer
format: int32
type: object
SecretRoleOption:
description: Secret role option
properties:
id:
description: The id of the role.
type: integer
format: int32
isDefault:
description: Whether the role is the default.
type: boolean
name:
description: Name of the role.
type: string
type: object
DeletedModel:
description: Information about an object that was deleted
properties:
id:
description: ID of the deleted object
type: integer
format: int32
objectType:
description: Type of the deleted object
type: string
responseCodes:
description: List of response codes from the delete operation
items:
type: string
type: array
type: object
SecretShareUpdateArgs:
description: SecretShareUpdateArgs
properties:
data:
$ref: '#/components/schemas/SecretShareUpdateModel'
type: object
SecretShareUpdateModel:
description: Share permissions for a specific Secret. Currently only inherits
properties:
inheritPermissions:
$ref: '#/components/schemas/UpdateFieldValueOfBoolean'
type: object
SecretPlatformPermissionsRequest:
description: Represents a request to check or assign ACL role for a user on a specified secret.
properties:
aclRoleName:
description: ACL Role name of role to check or assign to secret.
type: string
secretId:
description: Secret Id to check or assign role for a user.
type: integer
format: int32
userName:
description: Username of user to check or assign role on secret.
type: string
type: object
SecretPermissionsGroupSecretAccessRoleModel:
description: Group Id and SecretAccessRole Id
properties:
groupId:
description: Id of Group
type: integer
format: int32
secretAccessRoleId:
description: Id of SecretAccessRole
type: integer
format: int32
type: object
AuthenticationFailedResponse:
description: Response object for authentication failures
required:
- message
properties:
message:
description: Error message
type: string
type: object
SecretPermissionsIsCurrentUserSecretOwnerArgs:
description: SecretPermissionsIsCurrentUserSecretOwnerArgs
properties:
data:
$ref: '#/components/schemas/SecretPermissionsIsCurrentUserSecretOwnerModel'
type: object
SecretPlatformPermissionsModel:
description: Secret platform permission model representing a check for whether a user has an ACL Role on a secret.
properties:
hasRequestedAclRole:
description: Whether requested User has ACL Role permission on a secret.
type: boolean
message:
description: Response Message
type: string
success:
description: Whether or not request was processed successfully
type: boolean
type: object
SecretPermissionSummary:
description: Secret permission summary
properties:
domainName:
description: The domain of this user or group
type: string
groupId:
description: Group ID
type: integer
format: int32
nullable: true
groupName:
description: Group name
type: string
id:
description: Secret permission ID
type: integer
format: int32
knownAs:
description: A qualified name for the item including domain if available
type: string
secretAccessRoleId:
description: Granted role ID
type: integer
format: int32
nullable: true
secretAccessRoleName:
description: Granted role name
type: string
secretId:
description: Secret ID
type: integer
format: int32
userId:
description: User ID
type: integer
format: int32
nullable: true
userName:
description: User name
type: string
type: object
SecretPermissionModel:
description: Secret permission
properties:
groupId:
description: Group ID
type: integer
format: int32
groupName:
description: Group name
type: string
id:
description: Secret permission ID
type: integer
format: int32
knownAs:
description: KnownAs
type: string
secretAccessRoleId:
description: Granted role ID
type: integer
format: int32
nullable: true
secretAccessRoleName:
description: Granted role name
type: string
secretId:
description: Secret ID
type: integer
format: int32
userId:
description: User ID
type: integer
format: int32
userName:
description: User name
type: string
type: object
SecretPermissionsIsCurrentUserSecretOwnerModel:
description: SecretPermissionsIsCurrentUserSecretOwnerModel options
properties:
groupSecretAccessRoles:
description: GroupSecretAccessRoleModels to check current user is Secret Owner against.
items:
$ref: '#/components/schemas/SecretPermissionsGroupSecretAccessRoleModel'
type: array
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 <em>token</em>''. The token remains valid for a time period returned in the ''expires_in'' property (in seconds). For details, see the <a href="../OAuth/">token request documentation</a>.'
name: Authorization
in: header