Update a Permission
Update a permission given their permissionId
.
caution
This endpoint has been deprecated and will be phased out at the end of 2023. Please update any existing usages of it to use the Update Object endpoint instead.
Endpoint
PUT /v1/permissions/:permissionId
Parameters
Parameter | Description | Type | Required |
---|---|---|---|
permissionId | The id of the permission to update. Note that id cannot be changed. | URL param | yes |
name | An optional, display-friendly name for the permission. | JSON body | no |
description | An optional description of the permission. A useful description might include a summary of the functionality the permission grants. | JSON body | no |
Note: Optional fields that are omitted will clear existing values.
Request
- cURL
- Go
- Java
- Node.js
- Python
- Ruby
- PHP
- CLI
curl "https://api.warrant.dev/v1/permissions/view-contact-info" \
-X PUT \
-H "Authorization: ApiKey YOUR_KEY" \
--data-raw \
'{ "name": "View Contact Info", description: "Grant user access to view customer contact info" }'
updatedPermission, err := permission.Update("view-contact-info", &permission.PermissionParams{
Name: "View Contact Info",
Description: "Grant user access to view customer contact info",
})
Permission updatedPermission = client.updatePermission("view-contact-info", new Permission("view-contact-info", "View Contact Info", "Grant user access to view customer contact info"));
const updatedPermission = await warrantClient.Permission.update(
"view-contact-info",
{
name: "view Contact Info",
description: "Grant user access to view customer contact info",
}
);
permission = warrant.Permission.get("view-contact-info")
permission.update(name="View Contact Info", description="Grant user access to view customer contact info")
Response
{
"permissionId": "view-contact-info",
"name": "View Contact Info",
"description": "Grant user access to view customer contact info"
}