Resource Permissions

Prev Next
Note:
The showOrigCreds field is set to True by default if there are no response templates associated with the permission. On associating a response template with the permission, you can set the showOrigCreds to False or True as desired.


1. Manage Resource Permissions

This POST method is used to manage resource permissions.

POST{{url}}/api/resource-manager/permissions

Request Example

curl --location --request POST '{{url}/api/resource-manager/permissions' \
--header 'Authorization: TOKEN {{token}}' \
--data-raw '
{
  "permissionId": "string",
  "name": "string",
  "version": "string",
  "resourceTypeId": "string",
  "resourceTypeName": "string",
  "description": "string",
  "checkinURL": "string",
  "checkoutURL": "string",
  "checkinFileName": "string",
  "checkinTimeLimit": 0,
  "checkoutTimeLimit": 0,
  "checkoutFileName": "string",
  "isDraft": false,
  "inlineFileExists": false,
  "editorType": "string",
  "variables": [
    "string"
  ],
  "responseTemplates": [
    {
      "templateId": "string",
      "name": "string"
    }
  ],
  "showOrigCreds": false,
  "createdBy": "string",
  "updatedBy": "string",
  "createdOn": "string",
  "updatedOn": "string"
}

Response Example 

Status: 201 Created
{
  "permissionId": "string",
  "name": "string",
  "version": "string",
  "resourceTypeId": "string",
  "resourceTypeName": "string",
  "description": "string",
  "checkinURL": "string",
  "checkoutURL": "string",
  "checkinFileName": "string",
  "checkinTimeLimit": 0,
  "checkoutTimeLimit": 0,
  "checkoutFileName": "string",
  "isDraft": false,
  "inlineFileExists": false,
  "editorType": "string",
  "variables": [
    "string"
  ],
  "responseTemplates": [
    {
      "templateId": "string",
      "name": "string"
    }
  ],
  "showOrigCreds": false,
  "createdBy": "string",
  "updatedBy": "string",
  "createdOn": "string",
  "updatedOn": "string"
}

2. Get All Resource Permissions for resource Id

This GET method is used to retrieve a list of all resource permissions

GET{{url}}/api/resource-manager/resource-types/{resourceTypeId}/permissions

Request Parameters

The request parameters used in this method are shown in the following table:

ParameterDescriptionData TypeRequired
resourceTypeIdResource type of permission ID.StringMandatory
searchTextFilter profiles by searching text.StringOptional

Request Example

curl --location -g --request GET '{{url}}/api/resource-manager/resource-types/{resourceTypeId}/permissions' \
--header 'Authorization: TOKEN {{token}}'

Response Example 

Status: 200 OK
{
  "count": 0,
  "page": 0,
  "size": 0,
  "sort": "string",
  "data": [
    {
      "permissionId": "string",
      "name": "string",
      "resourceTypeName": "string",
      "isDraft": false,
      "createdOn": "string",
      "versionCount": 0,
      "version": "string"
    }
  ]
}

3. Get Resource Permission by ID

This GET method is used to get resource permissions specified by ID.

GET{{url}}/api/resource-manager/permissions/{id}

Request Parameters

The request parameters used in this method are shown in the following table:

ParameterDescriptionData TypeRequired
idResource permission ID.StringMandatory

Request Example

curl --location -g --request GET '{{url}}/api/resource-manager/permissions/{id}' \
--header 'Authorization: TOKEN {{token}}'

Response Example 

Status: 200 OK
[
  {
    "permissionId": "string",
    "name": "string",
    "version": "string",
    "createdOn": "string",
    "isDraft": false
  }
]

4. Update Resource Permission

The PUT method allows you to update resource permission.

PUT{{url}}/api/resource-manager/permissions/{id}

Request Parameters

The request parameters used in this method are shown in the following table:

ParameterDescriptionData TypeRequired
idID of the resource permission to partially update.StringMandatory

Request Example

curl --location --request PUT '{{url}}/api/resource-manager/permissions/{id}' \
--header 'Authorization: TOKEN {{token}}' \
--data-raw 
{
  "permissionId": "string",
  "name": "string",
  "version": "string",
  "resourceTypeId": "string",
  "resourceTypeName": "string",
  "description": "string",
  "checkinURL": "string",
  "checkoutURL": "string",
  "checkinFileName": "string",
  "checkinTimeLimit": 0,
  "checkoutTimeLimit": 0,
  "checkoutFileName": "string",
  "isDraft": false,
  "inlineFileExists": false,
  "editorType": "string",
  "variables": [
    "string"
  ],
  "responseTemplates": [
    {
      "templateId": "string",
      "name": "string"
    }
  ],
  "showOrigCreds": false,
  "createdBy": "string",
  "updatedBy": "string",
  "createdOn": "string",
  "updatedOn": "string"
}

Response Example 

Status: 200 OK
{
  "permissionId": "string",
  "name": "string",
  "version": "string",
  "resourceTypeId": "string",
  "resourceTypeName": "string",
  "description": "string",
  "checkinURL": "string",
  "checkoutURL": "string",
  "checkinFileName": "string",
  "checkinTimeLimit": 0,
  "checkoutTimeLimit": 0,
  "checkoutFileName": "string",
  "isDraft": false,
  "inlineFileExists": false,
  "editorType": "string",
  "variables": [
    "string"
  ],
  "responseTemplates": [
    {
      "templateId": "string",
      "name": "string"
    }
  ],
  "showOrigCreds": false,
  "createdBy": "string",
  "updatedBy": "string",
  "createdOn": "string",
  "updatedOn": "string"
}

5. Delete Resource Permission

The DELETE method allows you to delete the resource permission.

DELETE{{url}}/api/resource-manager/permissions/{id}

Request Parameters

The request parameters used in this method are shown in the following table:

ParameterDescriptionData TypeRequired
idID of the resource permission to delete.StringMandatory

Request Example

curl --location --request DELETE '{{url}}/api/resource-manager/permissions/{id}' \
--header 'Authorization: TOKEN {{token}}'

Response Example 

The resource permission is deleted.

Status: 204 No Content

6. Get Permission for given Version ID

This GET method is used to retrieve the permissions for a specified version.

GET{{url}}/api/resource-manager/permissions/{id}/{version}

Request Parameters

The request parameters used in this method are shown in the following table:

ParameterDescriptionData TypeRequired
idResource permission ID.StringMandatory
versionVersion id of the resource permission to get.StringMandatory

Request Example

curl --location --request GET '{{url}}/api/resource-manager/permissions/{id}/{version}?' \
--header 'Authorization: TOKEN {{token}}'

Response Example 

Status: 200 OK
{
  "permissionId": "string",
  "name": "string",
  "version": "string",
  "resourceTypeId": "string",
  "resourceTypeName": "string",
  "description": "string",
  "checkinURL": "string",
  "checkoutURL": "string",
  "checkinFileName": "string",
  "checkinTimeLimit": 0,
  "checkoutTimeLimit": 0,
  "checkoutFileName": "string",
  "isDraft": false,
  "inlineFileExists": false,
  "editorType": "string",
  "variables": [
    "string"
  ],
  "responseTemplates": [
    {
      "templateId": "string",
      "name": "string"
    }
  ],
  "showOrigCreds": false,
  "createdBy": "string",
  "updatedBy": "string",
  "createdOn": "string",
  "updatedOn": "string"
}

7. Delete Resource Permission

The DELETE method allows you to delete resource permission for a specified version.

DELETE{{url}}/api/resource-manager/permissions/{id}/{version}

Request Parameters

The request parameters used in this method are shown in the following table:

ParameterDescriptionData TypeRequired
IdID of the resource permission to deleteStringMandatory
versionID of the resource permission version to deleteStringMandatory

Request Example

curl --location --request DELETE '{/api/resource-manager/permissions/{id}/{version}' \
--header 'Authorization: TOKEN {{token}}' 

Response Example 

Status: 204 No Content

8. Get pre signed URLs for checkin/checkout

This GET method retrieves a list of pre signed URLs for checkin/checkout.

GET{{url}}/api/resource-manager/permissions/get-urls/{id}

Request Parameters

The request parameters used in this method are shown in the following table:

ParameterDescriptionData TypeRequired
IdID of the resource permission to get URLs for.StringMandatory

Request Example

curl --location --request GET 'api/resource-manager/permissions/get-urls/{id}' \
--header 'Authorization: TOKEN {{token}}'

Response Example 

Status: 200 OK
{
  "permissionId": "string",
  "name": "string",
  "version": "string",
  "resourceTypeId": "string",
  "resourceTypeName": "string",
  "description": "string",
  "checkinURL": "string",
  "checkoutURL": "string",
  "checkinFileName": "string",
  "checkinTimeLimit": 0,
  "checkoutTimeLimit": 0,
  "checkoutFileName": "string",
  "isDraft": false,
  "inlineFileExists": false,
  "editorType": "string",
  "variables": [
    "string"
  ],
  "responseTemplates": [
    {
      "templateId": "string",
      "name": "string"
    }
  ],
  "showOrigCreds": false,
  "createdBy": "string",
  "updatedBy": "string",
  "createdOn": "string",
  "updatedOn": "string"
}