Upsert a Permission
PUT/user-svc/permission/:permissionId
Creates or updates a permission.
The permission ID must be prefixed by the callers username (email).
Eg. if the owner's email/username is petstore-svc
the permission should look like petstore-svc:pet:edit
.
Requires the user-svc:permission:create
permission.
Request
Path Parameters
permissionId stringrequired
Permission ID
- application/json
Body
required
Permission Details
permission
object
createdAt string
description string
id string
eg. "user.viewer"
name string
eg. "User Viewer"
ownerId string
Service who owns the permission
updatedAt string
Responses
- 200
- 400
- 401
- 500
OK
- application/json
- Schema
- Example (from schema)
Schema
object
{}
Bad Request: Invalid JSON or Bad Namespace
- application/json
- Schema
Schema
string
Unauthorized
- application/json
- Schema
Schema
string
Internal Server Error
- application/json
- Schema
Schema
string
Loading...