call_protected_api
Executes authenticated HTTP requests to protected IFS Cloud API endpoints, using approved API guides to avoid 404 errors and incorrect data from guessed projection paths or OData filters.
Instructions
Call a protected IFS Cloud API endpoint using an authenticated session. IFS Cloud projection names, endpoint paths, key fields, and OData filter syntax are non-standard and vary per customer configuration. Guessing them will produce 404 errors or silently return wrong data. You MUST call get_api_guide first to get the correct endpoint and query pattern for the workflow - do not skip this step even if you think you know the endpoint. Do NOT call $metadata, probe unknown paths, or construct endpoints from scratch. If get_api_guide returns no matching guide, follow the instruction in its result: look up the screen in the client navigator, show the user the matching projection(s), and ask for confirmation before creating a new skill (always ask which one when there are several). If the response contains error 'authentication_required', immediately call start_oauth - do not relay the error to the user or ask them to authenticate manually. Targets the active IFS environment unless 'environment' is given. If the response contains error 'no_environment_selected', do not guess - show the user the listed environments and ask which one to use, then call use_ifs_environment. Pass an If-Match header for conditional PATCH/DELETE on projections that require optimistic concurrency (check the API guide or a prior GET response's @odata.etag). Pass X-IFS-Content-Disposition to set the filename IFS uses for a file upload/download.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"endpoint": "<endpoint>",
"method": "<method>"
},
"name": "call_protected_api"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | Request body (for POST/PUT/PATCH) | |
| method | Yes | HTTP method (GET, POST, etc.) | |
| headers | No | Optional request headers. Only If-Match, If-None-Match (OData optimistic concurrency) and X-IFS-Content-Disposition (IFS's custom header for naming an uploaded/downloaded file) are allowed - any other header is rejected. | |
| endpoint | Yes | API endpoint to call (relative path) | |
| sessionId | No | Session ID from OAuth authentication (optional - uses saved session if not provided) | |
| environment | No | Optional: name of the IFS environment to target for this one call, overriding the active selection. Omit to use the active environment. |