OperationRightInfo

Defines the Operation Rights available to a user or group within the context of a given folder/instance

OperationRightInfo this is information about operation rights.

OperationRightInfo Properties

Item -> BaseInfo -> OperationRightInfo

Field Type Inherited from Description
Href String Item Gets or sets the href.
CommonName String BaseInfo Common Name of the resource.The common name of the resource.
InFolderHref String BaseInfo relative path Href value for the containing folderAll objects exist within a folder. Even folders!
InFolderKey String BaseInfo Represents the internal ID of the containing folder
IsGlobal Boolean BaseInfo If set True, the object will be exposed to the entire instance scope in which it resides. Meaning this object will always pass scope wide permissions tests when being queried although other restrictions such as by type will still apply (You need at least Read on the object type to see it regardless where you are in the instance scope). This Attribute is intended for use with AccessLevelInfo objects only. Use with other model objects may cause unexpected behaviors. Particularly this should not be used with ScheduleInfos, HolidayInfos, HolidayDayInfos, or ElevatorAccessLevelInfos. In time more objects will be allowed for use with this attribute but for the time being please only use with AccessLevelInfo Objects.
Key String BaseInfo Represents the internal ID of the object.
Links List<Link> BaseInfo List of related resourcesIt is expected that a resource will have many related resources (i.e. person has many access levels) Consumers of the API are encouraged to iterate through the list of links requesting this additional information as required.
Metadata MetadataItem[] BaseInfo The set of metadata attached to this resourceMetadata is opaque to the server code. Key value pairs are saved as part of a client activity. Users of the Native windows client, are able to design custom forms to display and edit scalar values in the meta data.
Monikers MonikerItem[] BaseInfo the set of Monikers for this object
Notes NoteInfo[] BaseInfo The set of notes attached to this resourceNotes are free form text only that is stored in chronological order. All notes are retrieved as part of an OBJECT get. Notes may be added as one POST but not updated with a PUT of the primary resource. WHen the resource is deleted all the notes are also deleted.
ObjectLinks ObjectLinkItem[] BaseInfo The set of resources that are related to this resourceFrequently resources have a one to one, or one to many relationship with other resources in the system. Use this set of links to discover related resources. 2016/09/29 Href property of the related resource may be null. In which case it’s expected that a set of related objects has already been retrieved by the client and the Key value will be used to index into that set.
Tags String[] BaseInfo the set of tags for this objectTags are used to group objects together for the purposes of selection and assignment of operation rights
Actions String[] OperationRightInfo The Set of actions available to the user/group for the stated system.Supply * as a value to represent all actions that the attached application supports.
Enabled Boolean OperationRightInfo Determines if the operation right is EnabledThe intention of this flag, is to make it very easy to temporarily elevate a user/group permissions by turning on or off a given Operation Right.
GrantType GrantTypes OperationRightInfo Determines the type of Grant (Grant / Deny) for the operation right.Operation Rights marked as Deny will always supersede any other operation rights marked as Grant for the attached user/group.
System String OperationRightInfo The System that this Operation Right applies to.The Permissions system understands a hierarchy of objects (currently only for the Keep Api objects) therefore rights created for a base type will apply to derived members. For example, an Operation Right of Create for MercuryController allow the user/group to create any derived type of MercuryController Supply * as a value to represent all systems (datatpes) that the attached application supports.

JSON Structure of OperationRightInfo

{
   "Href"	:	"String",
   "CommonName"	:	"String",
   "InFolderHref"	:	"String",
   "InFolderKey"	:	"String",
   "IsGlobal"	:	"Boolean",
   "Key"	:	"String",
   "Links"	:	"List\<[Link](/object-model/link)\>",
   "Metadata"	:	"[MetadataItem](/object-model/metadataitem)[]",
   "Monikers"	:	"[MonikerItem](/object-model/monikeritem)[]",
   "Notes"	:	"[NoteInfo](/object-model/noteinfo)[]",
   "ObjectLinks"	:	"[ObjectLinkItem](/object-model/objectlinkitem)[]",
   "Tags"	:	"String[]",
   "Actions"	:	"String[]",
   "Enabled"	:	"Boolean",
   "GrantType"	:	"[GrantTypes](/object-model/granttypes)",
   "System"	:	"String"
}

Add Operation Rights Async

Example in C#

// Returns: OperationRightInfo
var operationRightInfo = await client.AddOperationRightsAsync(FolderInfo folder, String appCode, String credentialKey, OperationRightInfo item, BaseInfo appliesTo)

Example in CURL



           curl -X POST \
               https://keepapi.feenicshosting.com/api/f/INSTANCE.KEY/operationrights?appCode=AppCode&credentialKey=CredentialKey   \
               -H 'Authorization: Bearer TOKEN_GOES_HERE' \
               -H 'Content-Type: application/json' \
               -d '{
                       "$type":"Feenics.Keep.WebApi.Model.OperationRightInfo, Feenics.Keep.WebApi.Model",
                       "System":null,
                       "Actions":null,
                       "GrantType":0,
                       "Enabled":false,
                       "Key":null,
                       "CommonName":"OperationRightInfo",
                       "InFolderHref":null,
                       "InFolderKey":null,
                       "Links":[],
                       "ObjectLinks":[],
                       "Metadata":null,
                       "Notes":null,
                       "Tags":null,
                       "Monikers":null,
                       "Href":null
                   }'
            

Delete Operation Rights Async

Example in C#

// Returns: nothing
await client.DeleteOperationRightsAsync(OperationRightInfo item)

Example in CURL



           curl -X DELETE \
               https://keepapi.feenicshosting.com/api/f/INSTANCE.KEY/operationrights/OPERATIONRIGHT.KEY \
               -H 'Authorization: Bearer TOKEN_GOES_HERE' 
            

Get Operation Rights Async

Example in C#

// Returns: IEnumerable<OperationRightInfo>
var operationRightInfo = await client.GetOperationRightsAsync(FolderInfo folder)

Example in CURL



           curl -X GET \
               https://keepapi.feenicshosting.com/api/f/INSTANCE.KEY/operationrights \
               -H 'Authorization: Bearer TOKEN_GOES_HERE'
            

Update Operation Rights Async

Example in C#

// Returns: nothing
await client.UpdateOperationRightsAsync(OperationRightInfo item)

Example in CURL



           curl -X PUT \
               https://keepapi.feenicshosting.com/api/f/INSTANCE.KEY/operationrights/OPERATIONRIGHT.KEY   \
               -H 'Authorization: Bearer TOKEN_GOES_HERE' \
               -H 'Content-Type: application/json' \
               -d '{
                       "$type":"Feenics.Keep.WebApi.Model.OperationRightInfo, Feenics.Keep.WebApi.Model",
                       "System":"*",
                       "Actions":["Read","Update","Publish","AddLink:*","RemoveLink:*"],
                       "GrantType":0,
                       "Enabled":true,
                       "Key":"OPERATIONRIGHT.KEY ",
                       "CommonName":"Rights for Managers *",
                       "InFolderHref":"/api/f/INSTANCE.KEY",
                       "InFolderKey":"INSTANCE.KEY",
                       "Links":
                       [
                           {
                               "$type":"Feenics.Keep.WebApi.Model.Link, Feenics.Keep.WebApi.Model",
                               "Relation":"Meta",
                               "Anchor":
                               {
                                   "$type":"Feenics.Keep.WebApi.Model.Anchor, Feenics.Keep.WebApi.Model",
                                   "Href":"meta",
                                   "Text":"Metadata"
                               }
                           },
                           {
                               "$type":"Feenics.Keep.WebApi.Model.Link, Feenics.Keep.WebApi.Model",
                               "Relation":"Monikers",
                               "Anchor":
                               {
                                   "$type":"Feenics.Keep.WebApi.Model.Anchor, Feenics.Keep.WebApi.Model",
                                   "Href":"monikers",
                                   "Text":"Monikers"
                               }
                           },
                           {
                               "$type":"Feenics.Keep.WebApi.Model.Link, Feenics.Keep.WebApi.Model",
                               "Relation":"CommonName",
                               "Anchor":
                               {
                                   "$type":"Feenics.Keep.WebApi.Model.Anchor, Feenics.Keep.WebApi.Model",
                                   "Href":"commonname",
                                   "Text":"Common Name"
                               }
                           },
                           {
                               "$type":"Feenics.Keep.WebApi.Model.Link, Feenics.Keep.WebApi.Model",
                               "Relation":"Images",
                               "Anchor":
                               {
                                   "$type":"Feenics.Keep.WebApi.Model.Anchor, Feenics.Keep.WebApi.Model",
                                   "Href":"images",
                                   "Text":"Images"
                               }
                           },
                           {
                               "$type":"Feenics.Keep.WebApi.Model.Link, Feenics.Keep.WebApi.Model",
                               "Relation":"TakeOwnership",
                               "Anchor":
                               {
                                   "$type":"Feenics.Keep.WebApi.Model.Anchor, Feenics.Keep.WebApi.Model",
                                   "Href":"takeownership",
                                   "Text":"Take Ownership"
                               }
                           },
                           {
                               "$type":"Feenics.Keep.WebApi.Model.Link, Feenics.Keep.WebApi.Model",
                               "Relation":"Connections",
                               "Anchor":
                               {
                                   "$type":"Feenics.Keep.WebApi.Model.Anchor, Feenics.Keep.WebApi.Model",
                                   "Href":"connections",
                                   "Text":"Connected Objects"
                               }
                           },
                           {
                               "$type":"Feenics.Keep.WebApi.Model.Link, Feenics.Keep.WebApi.Model",
                               "Relation":"References",
                               "Anchor":
                               {
                                   "$type":"Feenics.Keep.WebApi.Model.Anchor, Feenics.Keep.WebApi.Model",
                                   "Href":"references",
                                   "Text":"Referencing Objects"
                               }
                           },
                           {
                               "$type":"Feenics.Keep.WebApi.Model.Link, Feenics.Keep.WebApi.Model",
                               "Relation":"Notes",
                               "Anchor":
                               {
                                   "$type":"Feenics.Keep.WebApi.Model.Anchor, Feenics.Keep.WebApi.Model",
                                   "Href":"notes",
                                   "Text":"Notes"
                               }
                           }
                       ],
                       "ObjectLinks":
                       [
                           {
                               "$type":"Feenics.Keep.WebApi.Model.ObjectLinkItem, Feenics.Keep.WebApi.Model",
                               "Href":null,
                               "LinkedObjectKey":"APPLICATION.KEY",
                               "CommonName":"APPLICATION_NAME",
                               "Relation":"Application",
                               "MetaDataBson":
                               {
                                   "$type":"System.Byte[], mscorlib",
                                   "$value":""
                               }
                           },
                           {
                               "$type":"Feenics.Keep.WebApi.Model.ObjectLinkItem, Feenics.Keep.WebApi.Model",
                               "Href":null,
                               "LinkedObjectKey":"CREDENTIAL.KEY",
                               "CommonName":"CREDENTIAL_NAME",
                               "Relation":"Credential",
                               "MetaDataBson":
                               {
                                   "$type":"System.Byte[], mscorlib",
                                   "$value":""
                               }
                           },
                           {
                               "$type":"Feenics.Keep.WebApi.Model.ObjectLinkItem, Feenics.Keep.WebApi.Model",
                               "Href":null,
                               "LinkedObjectKey":"INSTANCE.KEY",
                               "CommonName":"INSTANCE_NAME",
                               "Relation":"InInstance",
                               "MetaDataBson":
                               {
                                   "$type":"System.Byte[], mscorlib",
                                   "$value":""
                               }
                           },
                           {
                               "$type":"Feenics.Keep.WebApi.Model.ObjectLinkItem, Feenics.Keep.WebApi.Model",
                               "Href":null,
                               "LinkedObjectKey":"INSTANCE.KEY",
                               "CommonName":"INSTANCE_NAME",
                               "Relation":"InstanceScope",
                               "MetaDataBson":
                               {
                                   "$type":"System.Byte[], mscorlib",
                                   "$value":""
                               }
                           }
                       ],
                       "Metadata":[],
                       "Notes":[],
                       "Tags":[],
                       "Monikers":[],
                       "Href":"/api/f/INSTANCE.KEY/operationrights/OPERATIONRIGHTS.KEY"
                   }'
            

Verify Operation Rights Async

Example in C#

// Returns: IEnumerable<VerifytRightsResponse>
var verifytRightsResponse = await client.VerifyOperationRightsAsync(FolderInfo folder, VerifyRightsRequest request)

Example in CURL



           curl -X POST \
               https://keepapi.feenicshosting.com/api/f/INSTANCE.KEY/operationrights/verify \
               -H 'Authorization: Bearer TOKEN_GOES_HERE' \
               -H 'Content-Type: application/json' \
               -d '[
                       {
                           "$type":"Feenics.Keep.WebApi.Model.VerifyRightsRequest, Feenics.Keep.WebApi.Model",
                           "AppKey":null,
                           "System":"SYSTEM_VALUE_HERE",
                           "Action":"Read",
                           "AppliesToKey":null,
                           "IncludeChildren":false
                       }
                   ]'