Demand
Questi contenuti non sono ancora disponibili nella tua lingua.
Manage demands, which represent requirements or requests for resources, actions, or compliance.
You can create, update, delete, and search for demands with advanced filtering and pagination.
- Version
- 2.0.0
- OpenAPI version
- 3.0.0
Operations
Sezione intitolata “Operations” POST /v2/demand/index
Returns a paginated and filterable list of demands.
Use POST to allow complex filters via JSON payload.
Request Body
Sezione intitolata “Request Body ”Parameters for searching demands
object
object
Additional data
The field of the model to sort the list for, use a minus to revert the sort. Es -name is to require the sort in reverse order
The field establishes whether to also include historized elements that are no longer active in the results. If you leave this parameter empty the response returns only actual entries.
Example
{ "filter": { "action_type": "TRAINING", "resource_type": "WORK_ENVIRONMENT" }, "per-page": 20, "page": 1, "sort": "action_name"}
Responses
Sezione intitolata “ Responses ”List of demands
object
Additional data
Example
{ "demand_id": "dem-1", "action_id": "act-1", "action_type": "TRAINING", "resource_id": "res-1", "resource_type": "WORK_ENVIRONMENT", "office_id": "off-1", "project_id": "proj-1", "action_name": "Safety Training", "resource_name": "Main Room"}
Headers
Sezione intitolata “Headers ”Current page
Total number of pages
Number of items per page
Total number of items
POST /v2/demand/create
Create a new demand by providing the required details.
Request Body required
Sezione intitolata “Request Body required ”Demand object to be created
object
Additional data
Example
{ "action_id": "act-1", "action_type": "TRAINING", "resource_id": "res-1", "resource_type": "WORK_ENVIRONMENT"}
Responses
Sezione intitolata “ Responses ”Demand created successfully
object
Additional data
Example
{ "demand_id": "dem-2", "action_id": "act-1", "action_type": "TRAINING", "resource_id": "res-1", "resource_type": "WORK_ENVIRONMENT"}
GET /v2/demand/view/{id}
Retrieve a demand by its unique ID.
Path Parameters
Sezione intitolata “Path Parameters ”ID of the demand to retrieve
Responses
Sezione intitolata “ Responses ”Demand found
object
Additional data
Example
{ "demand_id": "dem-1", "action_id": "act-1", "action_type": "TRAINING", "resource_id": "res-1", "resource_type": "WORK_ENVIRONMENT", "office_id": "off-1", "project_id": "proj-1", "action_name": "Safety Training", "resource_name": "Main Room"}
Demand not found
DELETE /v2/demand/delete/{id}
Delete a demand by its unique ID.
If force=true, all related entities will also be deleted.
Path Parameters
Sezione intitolata “Path Parameters ”ID of the demand to delete
Query Parameters
Sezione intitolata “Query Parameters ”Force the deletion of the entity and all related entities
Responses
Sezione intitolata “ Responses ”Demand deleted successfully
If force=false, the operation is interrupted and the list of connected entities that will be deleted in case of confirmation (force=true) is returned
PUT /v2/demand/update/{id}
Update an existing demand by its unique ID.
Path Parameters
Sezione intitolata “Path Parameters ”ID of the demand to update
Request Body required
Sezione intitolata “Request Body required ”Demand object with updated data
object
Additional data
Example
{ "resource_type": "WORK_ENVIRONMENT"}
Responses
Sezione intitolata “ Responses ”Demand updated successfully
object
Additional data
Example
{ "demand_id": "dem-1", "resource_type": "WORK_ENVIRONMENT"}
Demand not found