Skip to content

Commit c195dd4

Browse files
committed
added method for functions
1 parent 8096615 commit c195dd4

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

graph/patterns/operations.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ You can consider related patterns such as [long running operations](./long-runni
2121

2222
## Issues and considerations
2323

24-
- Microsoft Graph does NOT support unbound actions or functions. Bound actions and functions are invoked on resources matching the type of the binding parameter. The binding parameter can be of any type, and it MAY be Nullable. For Microsoft Graph, actions and functions must have the `isBound="true"` attribute. The first parameter is the binding parameter.
24+
- Microsoft Graph does NOT support unbound actions or functions. Bound actions and functions are invoked on resources matching the type of the binding parameter. The binding parameter can be of any type, and parameter value MAY be Nullable.
25+
For Microsoft Graph, actions and functions must have the `isBound="true"` attribute. The first parameter is the binding parameter.
2526

2627
- Both actions and functions support overloading, meaning a schema might contain multiple actions or functions with the same name. The overload rules as per the OData [standard](http://docs.oasis-open.org/odata/odata-csdl-xml/v4.01/odata-csdl-xml-v4.01.html#sec_FunctionOverloads) apply when adding parameters to actions and functions.
2728

@@ -33,33 +34,34 @@ You can consider related patterns such as [long running operations](./long-runni
3334

3435
- Microsoft Graph supports the use of optional parameters. The optional parameter annotation can be used instead of creating function or action overloads when unnecessary.
3536

36-
- API designer **MUST** use POST to call operations on resources.
37+
- API designer **MUST** use POST to call actions on resources.
38+
- API designer **MUST** use GET to call functions on resources.
3739

3840
- The addition of a new mandatory not-nullable parameter to an existing action or function is a breaking change and is not allowed without proper versioning.
3941

4042
## Example
4143

4244
```
43-
<Action Name="createUploadSession" IsBound="true" ags:EnabledForPassthrough="true" ags:OwnerService="Microsoft.Exchange">
45+
<Action Name="createUploadSession" IsBound="true" ags:EnabledForPassthrough="true" ags:OwnerService="Microsoft.Exchange">
4446
<Parameter Name="bindingParameter" Type="Collection(graph.attachment)" />
4547
<Parameter Name="AttachmentItem" Type="graph.attachmentItem" Nullable="false" />
4648
<ReturnType Type="graph.uploadSession" />
47-
</Action>
49+
</Action>
4850
4951
<Action Name="deprovision" IsBound="true" ags:OwnerService="Microsoft.Intune.Devices">
5052
<Parameter Name="bindingParameter" Type="graph.managedDevice" />
5153
<Parameter Name="deprovisionReason" Type="Edm.String" Nullable="false" Unicode="false" />
5254
</Action>
5355
54-
<Function Name="additionalAccess" IsBound="true" ags:OwnerService="Microsoft.IGAELM">
56+
<Function Name="additionalAccess" IsBound="true" ags:OwnerService="Microsoft.IGAELM">
5557
<Parameter Name="bindingParameter" Type="Collection(graph.accessPackageAssignment)" />
5658
<ReturnType Type="Collection(graph.accessPackageAssignment)" />
57-
</Function>
59+
</Function>
5860
59-
<Function Name="compare" IsBound="true" ags:OwnerService="Microsoft.Intune.DeviceIntent">
61+
<Function Name="compare" IsBound="true" ags:OwnerService="Microsoft.Intune.DeviceIntent">
6062
<Parameter Name="bindingParameter" Type="graph.deviceManagementIntent" />
6163
<Parameter Name="templateId" Type="Edm.String" Unicode="false" />
6264
<ReturnType Type="Collection(graph.deviceManagementSettingComparison)" />
63-
</Function>
65+
</Function>
6466
6567
```

0 commit comments

Comments
 (0)