IMBI-API Reference

Version 0.5.2

Overview

IMBICLOUD API uses JWT for authorization.

Access tokens expire after 9 hours. Refresh tokens expire after 9 days. All the endpoints needs for authorization to add in the header the Bearer token, except the login and refresh token endpoints.

For User Manual go to https://web.imbicloud.com/docs

Use HTTPS protocol in your requests to protect the connection.

Errors

All our endpoints return a 200 HTTP status code when everything works as expected, but it returns an error code when there is one. The codes used are the standard codes for HTTP response.

Order by

The records are order by updateAt descendent (the date when the record was updated). Endpoints have query params to specify the column and the order values.

POST Login
https://{{host}}:{{port}}/api/auth/login

Gets a token that is requested giving an email and password.

BODY raw

                                                  
                                                    
{
	"email": "example@imbi.com",
	"password": "password"
}
                                                  
                                              
Example Request
                                                
POST https://api-dot-imbicloud.nw.r.appspot.com:80/api/auth/login
{
	"email": "example@imbi.com",
	"password": "password"
}
                                            
Example Response
200 - OK
POST Refresh Token
https://{{host}}:{{port}}/api/auth/refresh-token

Gets a refresh token.

BODY raw

Example Request
Example Response
200 - OK
GET Me
https://{{host}}:{{port}}/api/auth/me

Gets information about the user logged.

Example Request
                                                
GET https://api-dot-imbicloud.nw.r.appspot.com:80/api/auth/me
                                            
Example Response
200 - OK
GET All
https://{{host}}:{{port}}/api/categories

Gets all the categories and subcategories defined by IMBICLOUD. These are the same in the service for every facility.

Example Request
                                                
GET https://api-dot-imbicloud.nw.r.appspot.com:80/api/categories
                                            
Example Response
200 - OK
GET Unread
https://{{host}}:{{port}}/api/chat-messages/unread?facilityId={{facilityId}}

Gets a number of the messages unread in the facility.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

Example Request
                                                
GET https://api-dot-imbicloud.nw.r.appspot.com:80/api/chat-messages/unread?facilityId=1
                                            
Example Response
200 - OK
                                                    
{
    "count": 94
}
                                                
GET All
https://{{host}}:{{port}}/api/companies?facilityId={{facilityId}}&companyTypeId={{companyTypeId}}

Gets all the companies in IMBICLOUD.

PARAMS

cif
B7

String to filter by CIF.

name
SL

String to filter by name of the company.

facilityId
{{facilityId}}

Number that is the ID of the facility.

companyTypeId
{{companyTypeId}}

Number that is the ID that is 1 for Client and 2 for Maintenance company type.

Example Request
                                                
GET https://api-dot-imbicloud.nw.r.appspot.com:80/api/companies?companyTypeId=2&facilityId=2
                                            
Example Response
200 - OK
GET Not In Facility
https://{{host}}:{{port}}/api/companies/not-in-facility?facilityId={{facilityId}}&companyTypeId={{companyTypeId}}&page=1&limit=10&sortBy=companyType&order=DESC

Gets the companies that are NOT related to the facility. Either as client or maintenance.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

companyTypeId
{{companyTypeId}}

Number that is the ID of the company.

page
1

Number of the page.

limit
10

Number of elements per page.

sortBy
companyType

String that is the name of the field of the table to order by the result.

order
DESC

String that indicates the order or the records DESC or ASC.

name
text

String to filter by name of the company.

cif
text

String to filter by CIF of the company.

Example Request
Example Response
200 - OK
GET In Facility
https://{{host}}:{{port}}/api/companies/in-facility?facilityId={{facilityId}}

Gets the companies that are related to the facility. Either as client or maintenance.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

page
1

Number of the page.

limit
10

Number of elements per page.

sortBy
companyType

String that is the name of the field of the table to order by the result.

order
DESC

String that indicates the order or the records DESC or ASC.

cif
text

String to filter by CIF of the company.

name
text

String to filter by name of the company.

companyTypeId
{{companyTypeId}}

Number that is the ID of the company.

Example Request
                                                
GET https://api-dot-imbicloud.nw.r.appspot.com:80/api/companies/in-facility?facilityId={{facilityId}}
                                            
GET One
https://{{host}}:{{port}}/api/companies/{{companyId}}

Gets the company indicated in the param that is the company ID.

Example Request
                                                
GET https://api-dot-imbicloud.nw.r.appspot.com:80/api/companies/{{companyId}}
                                            
Example Response
200 - OK
POST Create
https://{{host}}:{{port}}/api/companies?facilityId={{facilityId}}

Creates a company and a relation with the facility indicated in the query param.

The typeId of a company could be 1 for client type or 2 for maintenance type.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

BODY raw

Example Request
PATCH Edit
https://{{host}}:{{port}}/api/companies/{{companyId}}?facilityId={{facilityId}}

Updates the information about the company indicated in the param that is the company ID. The user must have a role in the facility indicated in the query param facilityId.

Only an administrator role of the company or a superior role can update a company.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

BODY raw

Example Request
Example Response
200 - OK
Example Response
400 - Bad Request
GET Users
https://{{host}}:{{port}}/api/companies/{{companyId}}/users?roleId={{roleId}}&facilityId={{facilityId}}

Gets all the users of the company that have a role in the facility indicated in the query param.

PARAMS

roleId
{{roleId}}

Number to filter by role id of user.

facilityId
{{facilityId}}

Number that is the ID of the facility.

Example Request
                                                
GET https://api-dot-imbicloud.nw.r.appspot.com:80/api/companies/{{companyId}}/users?roleId={{roleId}}&facilityId={{facilityId}}
                                            
Example Response
200 - OK
GET All
https://{{host}}:{{port}}/api/company-types

Gets the two records about types of company. Client and Maintenance.

Example Request
                                                
GET https://api-dot-imbicloud.nw.r.appspot.com:80/api/company-types
                                            
Example Response
200 - OK
                                                    
[
    {
        "id": 1,
        "name": "CLIENTE"
    },
    {
        "id": 2,
        "name": "MANTENIMIENTO"
    }
]
                                                
GET One (by Id)
https://{{host}}:{{port}}/api/components/{{componentId}}?facilityId={{facilityId}}

Gets the information about the component, also its space, floor, component type, and the number of incidences, service request, scheduled task by componentId as param.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

Example Request
                                                
GET https://api-dot-imbicloud.nw.r.appspot.com:80/api/components/{{componentId}}?facilityId={{facilityId}}
                                            
Example Response
200 - OK
GET One (by externalIdentifier)
https://{{host}}:{{port}}/api/components/{{externalIdentifier}}?facilityId={{facilityId}}

Gets the information about the component, also its space, floor, component type, and the number of incidences, service request, scheduled task by externalIdentifier as param.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

Example Request
                                                
GET https://api-dot-imbicloud.nw.r.appspot.com:80/api/components/{{externalIdentifier}}?facilityId={{facilityId}}
                                            
Example Response
200 - OK
PATCH Edit (by id)
https://{{host}}:{{port}}/api/components/{{componentId}}?facilityId={{facilityId}}

Updates some of the data of a component. Only can be modified assetIdentifier, description, serialNumber, installatedOn, warrantyStartOn and replaceOn.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

BODY raw

Example Request
PATCH Edit (by externalIdentifier)
https://{{host}}:{{port}}/api/components/{{externalIdentifier}}?facilityId={{facilityId}}

Updates some of the data of a component. Only can be modified assetIdentifier, description, serialNumber, installatedOn, warrantyStartOn and replaceOn.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

BODY raw

Example Request
PATCH Edit (Upload CSV)
https://{{host}}:{{port}}/api/components/csv?facilityId={{facilityId}}

Only can be modified assetIdentifier, description, serialNumber, installatedOn, warrantyStartOn and replaceOn. The rest of the fields will be ignored. It is necessary to indicate the ID of the component.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

BODY formdata

file
None

Path of the CSV file to update the components.

Example Request
                                                
PATCH https://api-dot-imbicloud.nw.r.appspot.com:80/api/components/csv?facilityId={{facilityId}}
                                            
POST Filter
https://{{host}}:{{port}}/api/components/filter?facilityId={{facilityId}}&page=1&limit=10

Gets a list of components that match the filter in the request body using inclusive and exclusive conditions. For every field you can use an array of values. And the fields that are allowed to use are:

  • assetIdentifier to filter by a String that match the assetIdentifier field.
  • name to filter by a String that match the component name.
  • floor to filter by a String that match the name of the floor where the component is located.
  • space to filter by a String that match the name of the space where the component is located.
  • type to filter by a String that match the name of the component type.

The values must be nested in the inclusiveFilters or exclusiveFilters clauses inside the request body.

inclusiveFilters means that the filter searches for the rows that match the criteria, whereas exclusiveFilters excludes the rows that match the criteria. Between fields there is used an AND condition whereas between the values in the array of the field is used an OR condition.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

page
1

Number of the page.

limit
10

Number of elements per page.

BODY raw

Example Request
Example Response
200 - OK
POST Filtered
https://{{host}}:{{port}}/api/components/filtered?facilityId={{facilityId}}&page=1&limit=10

Gets a list of components that are paginated and filter by the request body.

The filter are specified in the body. The fields for filtering are:

  • floors, to filter by a String that match the floor name.
  • spaces, to filter by a String that match the space name.
  • types, to filter by a String that match the name of the component type.
  • names, to filter by a String that match the component name.
  • assetIdentifier, to filter by a String that match the assetIdentifier (also referred as code) or the externalIdentifier.

Fields in the filter body have arrays of Strings that are treated as OR conditions if it is about the same field but as AND condition if it is about a different field.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

page
1

Number of the page.

limit
10

Number of elements per page.

sortBy
floorName

String that could be floorName, spaceName, componentTypeName, facilityName, ids, or any name of a field of the component structure.

order
DESC

String that indicates the order or the records DESC or ASC.

BODY raw

                                                  
                                                    
{
    "floors": ["sotano"],
    "spaces": ["ascensor"],
    "types": [],
    "names": [],
    "assetIdentifiers": ["00A", "BB"]
}
                                                  
                                              
Example Request
Example Response
200 - OK
POST Filtered (CSV)
https://{{host}}:{{port}}/api/components/filtered/csv?facilityId={{facilityId}}

Gets a list of components that are in a tabular format separated by commas.

The filter are specified in the request body. The fields for filtering are:

  • floors, to filter by a String that match the floor name.
  • spaces, to filter by a String that match the space name.
  • types, to filter by a String that match the name of the component type.
  • names, to filter by a String that match the component name.
  • assetIdentifier, to filter by a String that match the assetIdentifier (also referred as code) or the externalIdentifier.

Fields in the filter body have arrays of Strings that are treated as OR conditions if it is about the same field but as AND condition if it is about a different field.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

BODY raw

                                                  
                                                    
{
    "floors": [],
    "spaces": [],
    "types": [],
    "names": ["mesa"],
    "assetIdentifiers": []
}
                                                  
                                              
Example Request
Example Response
200 - OK
POST Extended Search
https://{{host}}:{{port}}/api/components/extended-search?returnProperty=assetIdentifiers&facilityId={{facilityId}}

Gets a list of elements that are indicated in the returnProperty query param filter by the fields indicated in the request body.

The fields for filtering are:

  • floors, to filter by a String that match the floor name.
  • spaces, to filter by a String that match the space name.
  • types, to filter by a String that match the name of the component type.
  • names, to filter by a String that match the component name.
  • assetIdentifier, to filter by a String that match the assetIdentifier (also referred as code) or the externalIdentifier.

Fields in the request body have arrays of Strings that are treated as OR conditions if it is about the same field, but as AND condition if it is about a different field.

PARAMS

returnProperty
assetIdentifiers

String that indicates what the result should be. ids, assetIdentifiers, types, floors, spaces. By default component name.

facilityId
{{facilityId}}

Number that is the ID of the facility.

limit
number

Number that is the maximum number of elements to return.

BODY raw

                                                  
                                                    
{
    "floors": [],
    "spaces": ["aula"],
    "types": [],
    "names": [],
    "assetIdentifiers": []
}
                                                  
                                              
Example Request
Example Response
200 - OK
                                                    
[
    "Planta Baja",
    "Planta +1"
]
                                                
GET All
https://{{host}}:{{port}}/api/component-types?facilityId={{facilityId}}&page=1&limit=10&company=text&sortBy=components&order=DESC

Gets a list of component types paginated and filtered by the query params.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

page
1

Number of the page.

limit
10

Number of elements per page.

id
text

Number to filter by ID of the component type.

name
text

String to filter by name of the component type.

modelNumber
text

String to filter by model.

company
text

String to filter by trademark.

sortBy
components

String to indicates the field by which the rows are ordered. Use \"components\" to order by the count of component of the component type, and use \"company\" to order by the trademark.

order
DESC

String to indicates the order ASC or DESC.

Example Request
                                                
GET https://api-dot-imbicloud.nw.r.appspot.com:80/api/component-types?facilityId={{facilityId}}&page=1&limit=10&company=MARCA&sortBy=components&order=DESC
                                            
Example Response
200 - OK
GET All (CSV)
https://{{host}}:{{port}}/api/component-types/csv?facilityId={{facilityId}}&company=text
PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

id
number

Number to filter by ID of the component type.

name
text

String to filter by name of the component type.

modelNumber
text

String to filter by model.

company
text

String to filter by trademark.

sortBy
components

String to indicates the field by which the rows are ordered. Use \"components\" to order by the count of component of the component type, and use \"company\" to order by the trademark.

order
DESC

String to indicates the order ASC or DESC.

Example Request
                                                
GET https://api-dot-imbicloud.nw.r.appspot.com:80/api/component-types/csv?facilityId={{facilityId}}&company=text
                                            
Example Response
200 - OK
GET One
https://{{host}}:{{port}}/api/component-types/{{componentTypeId}}?facilityId={{facilityId}}

Gets information about the component indicated in the path param.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

Example Request
                                                
GET https://api-dot-imbicloud.nw.r.appspot.com:80/api/component-types/{{componentTypeId}}?facilityId={{facilityId}}
                                            
Example Response
200 - OK
PATCH Edit
https://{{host}}:{{port}}/api/component-types/{{componentTypeId}}?facilityId={{facilityId}}

Updates the information about a component type indicated as path param.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

BODY raw

Example Request
PATCH Edit (CSV)
https://{{host}}:{{port}}/api/component-types/csv?facilityId={{facilityId}}

Updates the information about the component types indicates in the CSV file indicated in the param body.

The reference to identify the component type is its ID.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

BODY formdata

file
None

CSV file to upload to update the information.

Example Request
                                                
PATCH https://api-dot-imbicloud.nw.r.appspot.com:80/api/component-types/csv?facilityId={{facilityId}}
                                            
POST Upload Document
https://{{host}}:{{port}}/api/component-types/{{componentTypeId}}/document?facilityId={{facilityId}}

Save a document related to the component type.

The maximum size permitted is 30MiB.

Formats accepted: jpg, jpeg, png, pdf, docx, xlsx, pptx.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

BODY formdata

document
None

File to upload.

Example Request
                                                
POST https://api-dot-imbicloud.nw.r.appspot.com:80/api/component-types/{{componentTypeId}}/document?facilityId={{facilityId}}
                                            
DELETE Delete Document
https://{{host}}:{{port}}/api/component-types/{{componentTypeId}}/document/{{documentName}}?facilityId={{facilityId}}

Deletes the file related to the component type.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

Example Request
                                                
DELETE https://api-dot-imbicloud.nw.r.appspot.com:80/api/component-types/{{componentTypeId}}/document/{{documentName}}?facilityId={{facilityId}}
                                            
GET All
https://{{host}}:{{port}}/api/criticality-levels?facilityId={{facilityId}}

Gets the criticality levels set for the facility indicated as query param.

time is in minutes.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

Example Request
                                                
GET https://api-dot-imbicloud.nw.r.appspot.com:80/api/criticality-levels?facilityId={{facilityId}}
                                            
Example Response
200 - OK
POST Create
https://{{host}}:{{port}}/api/criticality-levels?facilityId={{facilityId}}

Creates a criticality level related to the facility indicated as query param.

You must have to indicate as param body name and time.

name is a String that is used as label.

time is a Number that is stored as minutes.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

BODY raw

                                                  
                                                    
{
	"name": "Urgent",
	"time": 120
}
                                                  
                                              
Example Request
                                                
POST https://api-dot-imbicloud.nw.r.appspot.com:80/api/criticality-levels?facilityId={{facilityId}}

{
	"name": "Urgent",
	"time": 120
}
                                            
PATCH Edit
https://{{host}}:{{port}}/api/criticality-levels/{{criticalityLevelId}}?facilityId={{facilityId}}

Updates the name or time of the criticality level indicated as path param.

time must be in minutes.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

BODY raw

                                                  
                                                    
{
	"name": "Urgent_",
	"time": 2
}
                                                  
                                              
Example Request
                                                
PATCH https://api-dot-imbicloud.nw.r.appspot.com:80/api/criticality-levels/{{criticalityLevelId}}?facilityId={{facilityId}}

{
	"name": "Urgent_",
	"time": 2
}
                                            
DELETE Delete
https://{{host}}:{{port}}/api/criticality-levels/{{criticalityLevelId}}?facilityId={{facilityId}}

Deletes a criticality level indicated as path param. Only is possible if it is not related to a work order.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

Example Request
                                                
DELETE https://api-dot-imbicloud.nw.r.appspot.com:80/api/criticality-levels/{{criticalityLevelId}}?facilityId={{facilityId}}
                                            
GET Dashboard
https://{{host}}:{{port}}/api/dashboard?facilityId={{facilityId}}&from=2020-02-01&to=2020-02-07&secondFrom=2020-02-08&secondTo=2020-02-14

(Deprecated)

Gets a lists of objects used in the dashboard to give insight about the state of the facility.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

from
2020-02-01

Date in format YYYY-MM-DD

to
2020-02-07

Date in format YYYY-MM-DD

secondFrom
2020-02-08

Date in format YYYY-MM-DD

secondTo
2020-02-14

Date in format YYYY-MM-DD

Example Request
                                                
GET https://api-dot-imbicloud.nw.r.appspot.com:80/api/dashboard?facilityId={{facilityId}}&from=2020-02-01&to=2020-02-07&secondFrom=2020-02-08&secondTo=2020-02-14
                                            
Example Response
200 - OK
GET Dashboard By Name
https://{{host}}:{{port}}/api/dashboard/{{dashboardMetric}}?facilityId={{facilityId}}&from=2020-02-01&to=2020-02-07&secondFrom=2020-02-08&secondTo=2020-02-14

Gets a metric that is used in the dashboard of IMBICLOUD. The metric could be simple (a single number) or series (a series of number to the period of time indicated in the query params)

For series it will be:

  • days when the period of time is less or equal to 12 weeks.
  • weeks when the period of time is less or equal to 48 weeks.
  • months when the period of time is less or equal to 576 weeks.
  • years when the period of time is greater than 576 weeks.

Metrics to every user:

  • myActiveIncidences, number of incidences created by the user who asks.
  • myUnreviewedIncidences, number of incidences ready to set a rate but there is no evaluation yet.

Metrics only to Administrators and Owners

  • unstartedIncidences, number of incidences in a Created status.
  • unassignedIncidences, number of incidences in an Opened status.
  • unfinishedIncidences, number of incidences in In Progress status.
  • unclosedIncidences, number of incidences in Finished status.
  • countTypeIncidences, series of numbers of incidences.
  • countTypePetitions, series of numbers of service request (also referred as petitions).

Metrics only to Owners

  • incidenceCost, series of numbers about the cost of incidences.
  • petitionCost, series of numbers about the cost of service requests.

Metrics only to Administrators, Maintenance Administrators, and Owners.

  • waitingOrders, number of work orders in a Created status.
  • inProgressOrders, number of work orders in In progress status.
  • unassignedOrders, number of work orders that do not have assigned a user to do the work.
  • ordersOverTime, number of work orders that overlap the time to be finished according to the time of the criticality level.
  • ordersCount, series of numbers of work orders.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

from
2020-02-01

Date in format YYYY-MM-DD

to
2020-02-07

Date in format YYYY-MM-DD

secondFrom
2020-02-08

Date in format YYYY-MM-DD

secondTo
2020-02-14

Date in format YYYY-MM-DD

Example Request
Example Response
200 - OK
GET All
https://{{host}}:{{port}}/api/facilities?page=1&limit=10

Gets a list of facilities that the user can access.

PARAMS

page
1

Number of the page.

limit
10

Number of elements per page.

Example Request
                                                
GET https://api-dot-imbicloud.nw.r.appspot.com:80/api/facilities?page=1&limit=10
                                            
Example Response
200 - OK
GET One
https://{{host}}:{{port}}/api/facilities/{{facilityId}}

Gets the information about the facility. Also the relations with the companies and the users.

Example Request
                                                
GET https://api-dot-imbicloud.nw.r.appspot.com:80/api/facilities/{{facilityId}}
                                            
Example Response
200 - OK
GET Floors
https://{{host}}:{{port}}/api/facilities/{{facilityId}}/floors

Gets a list of the floors of the facility.

Example Request
                                                
GET https://api-dot-imbicloud.nw.r.appspot.com:80/api/facilities/{{facilityId}}/floors
                                            
Example Response
200 - OK
GET Chats
https://{{host}}:{{port}}/api/facilities/{{facilityId}}/chats

Gets a list of the incidences with the messages unread.

Example Request
                                                
GET https://api-dot-imbicloud.nw.r.appspot.com:80/api/facilities/{{facilityId}}/chats
                                            
Example Response
200 - OK
PUT Add Company
https://{{host}}:{{port}}/api/facilities/{{facilityId}}/company

Relates a company with the facility indicated as path param. In the params body it must be companyId and companyTypeIds.

BODY raw

                                                  
                                                    
{
	"companyId": 2,
	"companyTypeIds": [1, 2]
}
                                                  
                                              
Example Request
                                                
PUT https://api-dot-imbicloud.nw.r.appspot.com:80/api/facilities/{{facilityId}}/company

{
	"companyId": 2,
	"companyTypeIds": [1, 2]
}
                                            
GET All
https://{{host}}:{{port}}/api/facility-groups?facilityId={{facilityId}}&page=1&limit=10

Gets a list of groups in the facility.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

page
1

Number of the page.

limit
10

Number of elements per page.

name
Grocery

String to filter by name of the group.

id
1

Number to filter by id of the grouop.

sortBy
creatorId

String to indicates by whick filed to order.

order
DESC

String to indicates the order ASC or DESC.

Example Request
                                                
GET https://api-dot-imbicloud.nw.r.appspot.com:80/api/facility-groups?facilityId={{facilityId}}&page=1&limit=10
                                            
Example Response
200 - OK
GET One
https://{{host}}:{{port}}/api/facility-groups/{{facilityGroupId}}?facilityId={{facilityId}}

Gets the information about the facility groups and the users of the group.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

Example Request
                                                
GET https://api-dot-imbicloud.nw.r.appspot.com:80/api/facility-groups/{{facilityGroupId}}?facilityId={{facilityId}}
                                            
Example Response
200 - OK
POST Create
https://{{host}}:{{port}}/api/facility-groups?facilityId={{facilityId}}

Creates a facility group with the name and users IDs indicates in the body.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

BODY raw

                                                  
                                                    
{
	"name": "My group",
	"users": [26, 42]
}
                                                  
                                              
Example Request
                                                
POST https://api-dot-imbicloud.nw.r.appspot.com:80/api/facility-groups?facilityId={{facilityId}}

{
	"name": "My group",
	"users": [26, 42]
}
                                            
PATCH Edit
https://{{host}}:{{port}}/api/facility-groups/{{facilityGroupId}}?facilityId={{facilityId}}

Updates either the name of the group or its members.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

BODY raw

                                                  
                                                    
{
	"name": "Sports2",
	"users": [36]
}
                                                  
                                              
Example Request
                                                
PATCH https://api-dot-imbicloud.nw.r.appspot.com:80/api/facility-groups/{{facilityGroupId}}?facilityId={{facilityId}}

{
	"name": "Sports2",
	"users": [36]
}
                                            
DELETE Delete
https://{{host}}:{{port}}/api/facility-groups/{{facilityGroupId}}?facilityId={{facilityId}}

Deletes the facility group only if it has no members.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

Example Request
                                                
DELETE https://api-dot-imbicloud.nw.r.appspot.com:80/api/facility-groups/{{facilityGroupId}}?facilityId={{facilityId}}
                                            
GET One
https://{{host}}:{{port}}/api/floors/{{floorId}}

Gets information about the floor.

Example Request
                                                
GET https://api-dot-imbicloud.nw.r.appspot.com:80/api/floors/1
                                            
Example Response
200 - OK
GET Spaces
https://{{host}}:{{port}}/api/floors/{{floorId}}/spaces

Gets the spaces of the floor.

Example Request
                                                
GET https://api-dot-imbicloud.nw.r.appspot.com:80/api/floors/{{floorId}}/spaces
                                            
Example Response
200 - OK
POST Filtered
https://{{host}}:{{port}}/api/floors/filtered?facilityId={{facilityId}}&page=1&limit=10

Gets information of the floors that match the filters in the body.

The filter are specified in the body. The fields for filtering are:

  • floors, to filter by a String that match the floor name.
  • spaces, to filter by a String that match the space name.
  • types, to filter by a String that match the name of the component type.
  • names, to filter by a String that match the component name.
  • assetIdentifier, to filter by a String that match the assetIdentifier (also referred as code).

Fields in the filter body have arrays of Strings that are treated as OR conditions if it is about the same field but as AND condition if it is about a different field.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

page
1

Number of the page.

limit
10

Number of the elements per page.

BODY raw

                                                  
                                                    
{
    "floors": [],
    "spaces": [],
    "types": [],
    "names": ["mesa"],
    "assetIdentifiers": []
}
                                                  
                                              
Example Request
Example Response
200 - OK
GET All
https://{{host}}:{{port}}/api/incidences/1/chat-messages?facilityId={{facilityId}}

Gets all messages related to an incidence.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

Example Request
                                                
GET https://api-dot-imbicloud.nw.r.appspot.com:80/api/incidences/{{incidenceId}}/chat-messages?facilityId={{facilityId}}
                                            
Example Response
200 - OK
POST Create
https://{{host}}:{{port}}/api/incidences/{{incidenceId}}/chat-messages?facilityId={{facilityId}}

Creates a message by the user logged.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

BODY raw

                                                  
                                                    
{
	"text": "admite 🤪"
}
                                                  
                                              
Example Request
                                                
POST https://api-dot-imbicloud.nw.r.appspot.com:80/api/incidences/{{incidenceId}}/chat-messages?facilityId={{facilityId}}
{
	"text": "admite 🤪"
}
                                            
Example Response
400 - Bad Request
                                                    
{
    "name": "BadRequestError",
    "message": "You cannot write new messages in closed incidences",
    "code": "INC018"
}
                                                
GET All
https://{{host}}:{{port}}/api/incidences/{{incidenceId}}/work-orders?facilityId={{facilityId}}

Gets a list of work orders related to the incidence.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

Example Request
                                                
GET https://api-dot-imbicloud.nw.r.appspot.com:80/api/incidences/{{incidenceId}}/work-orders?facilityId={{facilityId}}
                                            
Example Response
200 - OK
POST Create
https://{{host}}:{{port}}/api/incidences/{{incidenceId}}/work-orders?facilityId={{facilityId}}

Creates a work order related to the incidence.

The assignedCompenyId and the problemTypeId must be related to the categoryId to be able to create the work order.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

BODY raw

Example Request
GET All
https://{{host}}:{{port}}/api/incidences?facilityId={{facilityId}}&page=1&limit=2

Gets all the incidences in the facility indicated.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

ids
[]

Array of numbers that are ids of incidences.

typeIds
[]

Array of number that are 1 for incidence and 2 for service requests.

topic
text

String to filter by subject of the incidence.

description
text

String to filter by text in the description that matches.

statusIds
[]

Array of numbers to filter by status of the incidence.

categoryIds
[]

Array of numbers to filter by categories of the work orders.

creator
text

String to filter by text that matches the name, surname or email of the creator.

fromCreation
2020-02-01

Date in format YYYY-MM-DD

toCreation
2020-02-07

Date in format YYYY-MM-DD

fromClose

Date in format YYYY-MM-DD

toClose

Date in format YYYY-MM-DD

page
1

Number of the page.

limit
2

Number of the elaments per page.

Example Request
                                                
GET https://api-dot-imbicloud.nw.r.appspot.com:80/api/incidences?facilityId={{facilityId}}&page=1&limit=2
                                            
Example Response
200 - OK
GET All (by component id)
https://{{host}}:{{port}}/api/incidences/component/{{componentId}}?facilityId={{facilityId}}&page=1&limit=10

Gets a list of incidences related to the component identified by its id.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

page
1

Number that is the page.

limit
10

Number that is the elements per page.

typeIds
[0]

Array of numbers to indicates (1) incidence (2) service request (0) null.

Example Request
                                                
GET https://api-dot-imbicloud.nw.r.appspot.com:80/api/incidences/component/{{componentId}}?facilityId={{facilityId}}&page=1&limit=10&typeIds=[0]
                                            
Example Response
200 - OK
GET All (by component externalIdentifier)
https://{{host}}:{{port}}/api/incidences/component/{{externalIdentifier}}?facilityId=1&page=1&limit=10

Gets a list of incidences related to the component indicated by its externalIdentifier.

PARAMS

facilityId
1

Number that is the ID of the facility.

page
1

Number that is the page.

limit
10

Number that is the elements per page.

Example Request
                                                
GET https://api-dot-imbicloud.nw.r.appspot.com:80/api/incidences/component/{{externalIdentifier}}?facilityId=1&page=1&limit=10
                                            
Example Response
200 - OK
GET One
https://{{host}}:{{port}}/api/incidences/{{incidenceId}}?facilityId={{facilityId}}

Gets information about an incidence.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

Example Request
                                                
GET https://api-dot-imbicloud.nw.r.appspot.com:80/api/incidences/{{incidenceId}}?facilityId={{facilityId}}
                                            
Example Response
200 - OK
POST Create
https://{{host}}:{{port}}/api/incidences?facilityId={{facilityId}}

Creates an incidence.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

BODY raw

Example Request
Example Response
200 - OK
PATCH Edit
https://{{host}}:{{port}}/api/incidences/{{incidenceId}}?facilityId={{facilityId}}

Updates information of an incidence.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

BODY raw

Example Request
PATCH Open
https://{{host}}:{{port}}/api/incidences/{{incidenceId}}/open?facilityId={{facilityId}}
PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

Example Request
                                                
PATCH https://api-dot-imbicloud.nw.r.appspot.com:80/api/incidences/{{incidenceId}}/open?facilityId={{facilityId}}

                                            
Example Response
200 - OK
PATCH Finish
https://{{host}}:{{port}}/api/incidences/{{incidenceId}}/finish?facilityId={{facilityId}}

Change the status of an incidence from ASSIGNED to FINISHED.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

Example Request
                                                
PATCH https://api-dot-imbicloud.nw.r.appspot.com:80/api/incidences/{{incidenceId}}/finish?facilityId={{facilityId}}
                                            
PATCH Close
https://{{host}}:{{port}}/api/incidences/{{incidenceId}}/close?facilityId={{facilityId}}

Changes the status of an incidence from CREATED, OPENED, FINISHED to CLOSED.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

Example Request
                                                
PATCH https://api-dot-imbicloud.nw.r.appspot.com:80/api/incidences/{{incidenceId}}/close?facilityId={{facilityId}}
                                            
PATCH Review
https://{{host}}:{{port}}/api/incidences/{{incidenceId}}/review?facilityId={{facilityId}}

Set a score and description to the incidence by the creator. Score must be a number between 1 and 5.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

BODY raw

                                                  
                                                    
{
	"score": 3,
	"description": "Fuck yeah!"
}
                                                  
                                              
Example Request
                                                
PATCH https://api-dot-imbicloud.nw.r.appspot.com:80/api/incidences/{{incidenceId}}/review?facilityId={{facilityId}}
{
	"score": 3999,
	"description": "Fuck yeah!"
}
                                            
Example Response
400 - Bad Request
                                                    
{
    "name": "BadRequestError",
    "message": "Incidence must be finished or closed in order to be reviewed",
    "code": "INC011"
}
                                                
                                                
PATCH https://api-dot-imbicloud.nw.r.appspot.com:80/api/incidences/{{incidenceId}}/review?facilityId={{facilityId}}
{
	"score": 3999,
	"description": "Fuck yeah!"
}
                                            
Example Response
403 - Forbidden
                                                    
{
    "name": "ForbiddenError",
    "message": "Incidence can only be reviewed by its creator",
    "code": "INC012"
}
                                                
POST Upload Photo
https://{{host}}:{{port}}/api/incidences/photo

Upload a file in the cloud storage and return de url.

Front manages to edit the incidence and give the url of the file.

BODY formdata

photo
None

File to upload.

Example Request
                                                
POST https://api-dot-imbicloud.nw.r.appspot.com:80/api/incidences/photo

                                            
Example Response
200 - OK
                                                    
{
    "url": "https://imbicloud.appspot.com.storage.googleapis.com/1671730596494-12e3067d9314c495953598ad44946292-tortoise-turtle-strength.jpg"
}
                                                
GET Search
https://{{host}}:{{port}}/api/materials?search=text

Gets list of materials.

PARAMS

search
text

String to filter by name of the material.

Example Request
                                                
GET https://api-dot-imbicloud.nw.r.appspot.com:80/api/materials?search=cable
                                            
Example Response
200 - OK
GET All
https://{{host}}:{{port}}/api/problem-types?facilityId={{facilityId}}&categoryId=17&page=1&limit=3

Gets a list of problem types.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

categoryId
17

Number that is the ID of the category.

page
1

Number of the page.

limit
3

Number of elements per page.

Example Request
                                                
GET https://api-dot-imbicloud.nw.r.appspot.com:80/api/problem-types?facilityId={{facilityId}}&categoryId=17&page=1&limit=3
                                            
Example Response
200 - OK
GET All (CSV)
https://{{host}}:{{port}}/api/problem-types/csv?facilityId={{facilityId}}

Gets the list of problem types setting in the facility in tabular format.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

Example Request
                                                
GET https://api-dot-imbicloud.nw.r.appspot.com:80/api/problem-types/csv?facilityId={{facilityId}}
                                            
Example Response
200 - OK
GET One
https://{{host}}:{{port}}/api/problem-types/{{problemTypeId}}?facilityId={{facilityId}}

Get the problem type indicated in the path param.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

Example Request
                                                
GET https://api-dot-imbicloud.nw.r.appspot.com:80/api/problem-types/1?facilityId={{facilityId}}
                                            
Example Response
200 - OK
POST Create
https://{{host}}:{{port}}/api/problem-types?facilityId={{facilityId}}

Creates a new problem type related to the category indicated in the param body.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

BODY raw

                                                  
                                                    
{
	"text": "A new problem type",
	"categoryId": 17
}
                                                  
                                              
Example Request
                                                
POST https://api-dot-imbicloud.nw.r.appspot.com:80/api/problem-types?facilityId={{facilityId}}
{
	"text": "A new problem type",
	"categoryId": 17
}
                                            
Example Response
200 - OK
PATCH Edit
https://{{host}}:{{port}}/api/problem-types/{{problemTypeId}}?facilityId={{facilityId}}

Updates a problem type.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

BODY raw

                                                  
                                                    
{
	"text": "A problem type edited",
	"categoryId": 17
}
                                                  
                                              
Example Request
                                                
PATCH https://api-dot-imbicloud.nw.r.appspot.com:80/api/problem-types/{{problemTypeId}}?facilityId={{facilityId}}

{
	"text": "A problem type edited",
	"categoryId": 17
}
                                            
PATCH Edit (Upload CSV)
https://{{host}}:{{port}}/api/problem-types/csv?facilityId={{facilityId}}

Uploads problem types from CSV file.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

BODY formdata

file
None

CSV file to upload problem types.

Example Request
                                                
PATCH https://api-dot-imbicloud.nw.r.appspot.com:80/api/problem-types/csv?facilityId={{facilityId}}
                                            
DELETE Delete
https://{{host}}:{{port}}/api/problem-types/{{problemTypeId}}?facilityId={{facilityId}}

Deletes a problem type only if it is not related to a work order.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

Example Request
                                                
DELETE https://api-dot-imbicloud.nw.r.appspot.com:80/api/problem-types/{{problemTypeId}}?facilityId={{facilityId}}
                                            
GET Report By Name
https://{{host}}:{{port}}/api/report/{{reportName}}?from=2020-01-01&to=2020-06-30&facilitiesId=[1]&secondFrom=2020-07-01&secondTo=2020-12-31&typesId=[1,2]&companiesId=[1]

Gets data about the reportName indicated in the path param.

  • evolutionIncidencesByCategory, series of numbers that are the number of incidences by category.
  • totalIncidencesByCategory, sum of the incidences by category.
  • costsByCategory, sum of the cost by category.
  • costsByFacility, sum of the cost by facility.
  • materialCostsBrakeDown, detail of the material costs.
  • costsByProblemType, count of problem types and its cost.
  • costsByCompany, count of work orders by company.

PARAMS

from
2020-01-01

Date in format YYYY-MM-DD

to
2020-06-30

Date in format YYYY-MM-DD

page
1

Number that is the page. Only for tables.

limit
3

Number of elements per page. Only for tables.

facilitiesId
[1]

Array of numbers that are IDs of facilities.

secondFrom
2020-07-01

Date in format YYYY-MM-DD. To compare to a second period of time.

secondTo
2020-12-31

Date in format YYYY-MM-DD. To compare to a second period of time.

typesId
[1,2]

Array of numbers that are companyTypeIds

companiesId
[1]

Array of numbers that are companyIds.

Example Request
                                                
GET https://api-dot-imbicloud.nw.r.appspot.com:80/api/report/{{reportName}}?from=2020-01-01&to=2020-06-30&facilitiesId=[1]&secondFrom=2020-07-01&secondTo=2020-12-31
                                            
Example Response
200 - OK
                                                
GET https://api-dot-imbicloud.nw.r.appspot.com:80/api/report/{{reportName}}?from=2020-01-01&to=2020-06-30&facilitiesId=[1]&secondFrom=2020-07-01&secondTo=2020-12-31
                                            
Example Response
200 - OK
                                                
GET https://api-dot-imbicloud.nw.r.appspot.com:80/api/report/{{reportName}}?from=2020-01-01&to=2020-06-30&facilitiesId=[1]&secondFrom=2020-07-01&secondTo=2020-12-31
                                            
Example Response
200 - OK
                                                
GET https://api-dot-imbicloud.nw.r.appspot.com:80/api/report/{{reportName}}?from=2020-01-01&to=2020-06-30&page=1&limit=3&facilitiesId=[1]&secondFrom=2020-07-01&secondTo=2020-12-31
                                            
Example Response
200 - OK
                                                
GET https://api-dot-imbicloud.nw.r.appspot.com:80/api/report/{{reportName}}?from=2020-01-01&to=2020-06-30&facilitiesId=[1]&secondFrom=2020-07-01&secondTo=2020-12-31
                                            
Example Response
200 - OK
                                                
GET https://api-dot-imbicloud.nw.r.appspot.com:80/api/report/{{reportName}}?from=2020-01-01&to=2020-06-30&facilitiesId=[1]&secondFrom=2020-07-01&secondTo=2020-12-31
                                            
Example Response
200 - OK
GET Report CSV
https://{{host}}:{{port}}/api/report/{{reportName}}/csv?from=2020-01-01&to=2020-12-31&facilitiesId=[1]

Gets report in tabular format.

Only available for materialCostsBrakeDown.

PARAMS

from
2020-01-01

Date in format YYYY-MM-DD

to
2020-12-31

Date in format YYYY-MM-DD

facilitiesId
[1]

Array of numbers that are facilityIds

Example Request
                                                
GET https://api-dot-imbicloud.nw.r.appspot.com:80/api/report/{{reportName}}/csv?from=2020-01-01&to=2020-12-31&facilitiesId=[1]
                                            
Example Response
200 - OK
GET All
https://{{host}}:{{port}}/api/roles

Gets list of roles in IMBICLOUD.

Example Request
                                                
GET https://api-dot-imbicloud.nw.r.appspot.com:80/api/roles
                                            
Example Response
200 - OK
GET All
https://{{host}}:{{port}}/api/scheduled-tasks?facilityId={{facilityId}}&from=2022-03-01T04:57:30.000Z&to=2022-03-30T04:57:30.000Z&view=calendar&statusIds=[1,2]

Gets a list of scheduled task.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

from
2022-03-01T04:57:30.000Z

Date in timezone format

to
2022-03-30T04:57:30.000Z

Date in timezone format

sortBy
text

String to indicate the field to order the rows of a table.

order
DESC

String that indicates the order ASC or DESC.

id
4

Number to filter by ID of the scheduled task in database.

name
text

String to filter by name of the scheduled task.

frequencyQuantity
2

Number to filter by frequency of the scheduled task.

frequencyUnit
days

String to filter by frequency of the scheduled task.

company
text

String to filter by company name.

category
text

String to filter by category name.

parent
text

String to filter by id seeing by user.

page
1

Number of page.

limit
10

Number of element per page in a table.

view
calendar

String that indicates the type of view: list, calendar, scheduled.

statusIds
[1,2]

Array of numbers to filter by statusId of the scheduled task.

Example Request
Example Response
200 - OK
GET All (by component id)
https://{{host}}:{{port}}/api/scheduled-tasks/component/{{componentId}}?facilityId={{facilityId}}&page=1&limit=10&view=list

Gets a list of scheduled task related to a component searched by its ID.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

from
2020-08-01T04:57:30.000Z

Date in timezone format

to
2020-09-01T04:57:30.000Z

Date in timezone format

sortBy
text

String to indicate the field to order the rows of a table.

order
DESC

String that indicates the order ASC or DESC.

id
4

Number to filter by ID of the scheduled task in database.

name
text

String to filter by name of the scheduled task.

frequencyQuantity
2

Number to filter by frequency of the scheduled task.

frequencyUnit
days

String to filter by frequency of the scheduled task.

company
text

String to filter by company name.

category
text

String to filter by category name.

parent
text

String to filter by id seeing by user.

page
1

Number of page.

limit
10

Number of element per page in a table.

view
list

String that indicates the type of view: list, calendar, scheduled.

statusIds
[2]

Array of numbers to filter by statusId of the scheduled task.

Example Request
                                                
GET https://api-dot-imbicloud.nw.r.appspot.com:80/api/scheduled-tasks/component/{{componentId}}?facilityId={{facilityId}}&page=1&limit=10&view=list
                                            
GET All (by component externalIdentifier)
https://{{host}}:{{port}}/api/scheduled-tasks/component/{{externalIdentifier}}?facilityId={{facilityId}}&page=1&limit=10&view=list&statusIds=[2]

Gets a list of scheduled task related to a component searched by its externalIdentifier.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

from
2020-08-01T04:57:30.000Z

Date in timezone format

to
2020-09-01T04:57:30.000Z

Date in timezone format

sortBy
text

String to indicate the field to order the rows of a table.

order
DESC

String that indicates the order ASC or DESC.

id
4

Number to filter by ID of the scheduled task in database.

name
text

String to filter by name of the scheduled task.

frequencyQuantity
2

Number to filter by frequency of the scheduled task.

frequencyUnit
days

String to filter by frequency of the scheduled task.

company
text

String to filter by company name.

category
text

String to filter by category name.

parent
text

String to filter by id seeing by user.

page
1

Number of page.

limit
10

Number of element per page in a table.

view
list

String that indicates the type of view: list, calendar, scheduled.

statusIds
[2]

Array of numbers to filter by statusId of the scheduled task.

Example Request
                                                
GET https://api-dot-imbicloud.nw.r.appspot.com:80/api/scheduled-tasks/component/{{externalIdentifier}}?facilityId={{facilityId}}&page=1&limit=10&view=list&statusIds=[2]
                                            
GET One
https://{{host}}:{{port}}/api/scheduled-tasks/{{scheduledTaskId}}?facilityId={{facilityId}}

Gets information about a scheduled task.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

Example Request
                                                
GET https://api-dot-imbicloud.nw.r.appspot.com:80/api/scheduled-tasks/{{scheduledTaskId}}?facilityId={{facilityId}}
                                            
Example Response
200 - OK
GET Subtasks All
https://{{host}}:{{port}}/api/scheduled-tasks/{{scheduledTaskId}}/components/subtasks?facilityId={{facilityId}}

Gets a list of subtasks for each component of the scheduled task.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

Example Request
                                                
GET https://api-dot-imbicloud.nw.r.appspot.com:80/api/scheduled-tasks/{{scheduledTaskId}}/components/subtasks?facilityId={{facilityId}}
                                            
Example Response
200 - OK
                                                
GET https://api-dot-imbicloud.nw.r.appspot.com:80/api/scheduled-tasks/{{scheduledTaskId}}/components/subtasks?facilityId={{facilityId}}
                                            
Example Response
200 - OK
POST Create
https://{{host}}:{{port}}/api/scheduled-tasks?facilityId={{facilityId}}

Creates a scheduled task.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

BODY raw

Example Request
PATCH Edit
https://{{host}}:{{port}}/api/scheduled-tasks/{{scheduledTaskId}}?facilityId={{facilityId}}&editNext=true

Updates the information about a scheduled task.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

editNext
true

Boolean that indicates it only updates the current scheduled task or next too.

BODY raw

Example Request
PATCH Finish
https://{{host}}:{{port}}/api/scheduled-tasks/{{scheduledTaskId}}/finish?facilityId={{facilityId}}

Finishes a scheduled task only if there is no component unchecked. And it is needed to validate with an email of an habitan of the facility and the time spent (minutes).

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

BODY raw

                                                  
                                                    
{
    "validatorEmail": "serviciosgenerales2f2@propiedadsl.com",
    "spentTime": 200
}
                                                  
                                              
Example Request
DELETE Delete
https://{{host}}:{{port}}/api/scheduled-tasks/{{scheduledTaskId}}?facilityId={{facilityId}}&deleteNext=false
PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

deleteNext
false

Boolean that indicates it only deletes the current scheduled task or next too.

Example Request
                                                
DELETE https://api-dot-imbicloud.nw.r.appspot.com:80/api/scheduled-tasks/{{scheduledTaskId}}?facilityId={{facilityId}}&deleteNext=false
                                            
POST One, with components filter.
https://{{host}}:{{port}}/api/scheduled-tasks/{{scheduledTaskId}}/components?facilityId={{facilityId}}&page=1&limit=10

Gets information about a scheduled task and its components with a filter by componentName, assetIdentifier, typeName, spaceName, floorName.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

page
1

Number of page.

limit
10

Number of elements per page.

BODY raw

                                                  
                                                    
{
    "componentName": "",
    "assetIdentifier": "",
    "typeName": "",
    "spaceName": "",
    "floorName": ""
}
                                                  
                                              
Example Request
Example Response
200 - OK
GET One, by components ids, common and uncommon subtasks
https://{{host}}:{{port}}/api/scheduled-tasks/{{scheduledTaskId}}/components/common-uncommon-subtasks?componentsIds=[1, 2, 3]&facilityId={{facilityId}}

Gets the common and uncommon subtask by components indicated as query param.

PARAMS

componentsIds
[1, 2, 3]

Array of number that are IDs of components.

facilityId
{{facilityId}}

Number that is the ID of the facility.

Example Request
                                                
GET https://api-dot-imbicloud.nw.r.appspot.com:80/api/scheduled-tasks/{{scheduledTaskId}}/components/common-uncommon-subtasks?componentsIds=[1, 2, 3]&facilityId={{facilityId}}
                                            
GET One, with components and subtasks
https://{{host}}:{{port}}/api/scheduled-tasks/{{scheduledTaskId}}/components/subtasks?facilityId=1&page=1&limit=10

Gets information about a scheduled task its components and its subtasks.

PARAMS

facilityId
1

Number that is the ID of the facility.

page
1

Number of the page.

limit
10

Number of elements per page.

Example Request
                                                
GET https://api-dot-imbicloud.nw.r.appspot.com:80/api/scheduled-tasks/{{scheduledTaskId}}/components/subtasks?facilityId=1&page=1&limit=10
                                            
Example Response
200 - OK
PATCH Finish all subtasks, by scheduled-task-component id
https://{{host}}:{{port}}/api/scheduled-tasks/component/{{componentId}}/finish-all?facilityId={{facilityId}}&checkedOption=true

Set the same option (true, false, null) to all the subtask of a component in a scheduled task.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

checkedOption
true

Boolean to indicate the check option of all subtask to the component: true, false, null.

Example Request
                                                
PATCH https://api-dot-imbicloud.nw.r.appspot.com:80/api/scheduled-tasks/component/{{componentId}}/finish-all?facilityId={{facilityId}}&checkedOption=true
                                            
PATCH Finish scheduled-task-component
https://{{host}}:{{port}}/api/scheduled-tasks/component/{{scheduledTaskComponentSubtaskId}}/finish?facilityId={{facilityId}}&checkedOption=true

Set true, false or null to a subtask of a component in a scheduled task.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

checkedOption
true

Boolean to indicate if the option of the subtask in the component.

Example Request
                                                
PATCH https://api-dot-imbicloud.nw.r.appspot.com:80/api/scheduled-tasks/component/{{scheduledTaskComponentSubtaskId}}/finish?facilityId={{facilityId}}&checkedOption=true
                                            
POST Create
https://{{host}}:{{port}}/api/scheduled-tasks-components-subtask?facilityId={{facilityId}}&next=true

Creates a subtask related to the components in the scheduled task.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

next
true

Boolean to indicate if only afect to the current scheduled task or next too.

BODY raw

Example Request
DELETE Delete
https://{{host}}:{{port}}/api/scheduled-tasks-components-subtask?facilityId={{facilityId}}&next=true

Deletes the subtask related to the components in the scheduled task indicated.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

next
true

Boolean to indicate if the action is only to the current scheduled task or next too.

BODY raw

                                                  
                                                    
{
    "code": "subtask2",
    "componentsIds": [1, 3, 5, 11],
    "scheduledTaskId": 1
}
                                                  
                                              
Example Request
PATCH Finish
https://{{host}}:{{port}}/api/scheduled-tasks-components-subtask/{{scheduledTaskComponentSubtaskId}}/finish?facilityId={{facilityId}}&checkedOption=null
PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

checkedOption
null

Option to indicated true, false or null at the subtask of the component.

Example Request
                                                
PATCH https://api-dot-imbicloud.nw.r.appspot.com:80/api/scheduled-tasks-components-subtask/{{scheduledTaskComponentSubtaskId}}/finish?facilityId={{facilityId}}&checkedOption=null
                                            
GET One
https://{{host}}:{{port}}/api/spaces/{{spaceId}}

Gets information about the space.

Example Request
                                                
GET https://api-dot-imbicloud.nw.r.appspot.com:80/api/spaces/1
                                            
Example Response
200 - OK
GET Components
https://{{host}}:{{port}}/api/spaces/{{spaceId}}/components

Gets componentes information of the space.

Example Request
                                                
GET https://api-dot-imbicloud.nw.r.appspot.com:80/api/spaces/{{spaceId}}/components
                                            
Example Response
200 - OK
POST Filtered
https://{{host}}:{{port}}/api/spaces/filtered?facilityId={{facilityId}}&page=1&limit=2

Gets a list of spaces that match the filter in the param body.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

page
1

Number of page.

limit
2

Number of elements per page.

BODY raw

                                                  
                                                    
{
    "floors": [],
    "spaces": [],
    "types": [],
    "names": ["mesa"],
    "assetIdentifiers": []
}
                                                  
                                              
Example Request
Example Response
200 - OK
GET All
https://{{host}}:{{port}}/api/users?facilityId={{facilityId}}&page=1&limit=2

Gets a list of users.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

page
1

Number of page.

limit
2

Number of elements per page.

sortBy
text

String to indicate the name of the field to order.

order
DESC

String to indicate the order ASC or DESC.

name
text

String to filter by name of the user.

surname
text

String to filter by surname of the user.

email
text

String to filter by email of the user.

mobile
text

String to filter by mobile of the user.

rolesId
[1,2]

Array of numbers to filter by roleId

company
text

String to filter by name of the company.

Example Request
                                                
GET https://api-dot-imbicloud.nw.r.appspot.com:80/api/users?facilityId={{facilityId}}&page=1&limit=2
                                            
Example Response
200 - OK
GET One
https://{{host}}:{{port}}/api/users/{{userId}}?facilityId={{facilityId}}
PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

Example Request
                                                
GET https://api-dot-imbicloud.nw.r.appspot.com:80/api/users/{{userId}}?facilityId={{facilityId}}
                                            
Example Response
200 - OK
POST Create
https://{{host}}:{{port}}/api/users?facilityId={{facilityId}}

Creates a user.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

BODY raw

Example Request
PATCH Edit
https://{{host}}:{{port}}/api/users/{{userId}}?facilityId={{facilityId}}

Updates the information of a user.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

BODY raw

Example Request
POST Create
https://{{host}}:{{port}}/api/work-orders/{{workOrderId}}/components/{{externalIdentifier}}?facilityId={{facilityId}}

Adds a component to a work order.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

Example Request
                                                
POST https://api-dot-imbicloud.nw.r.appspot.com:80/api/work-orders/{{workOrderId}}/components/{{externalIdentifier}}?facilityId={{facilityId}}
                                            
DELETE Delete
https://{{host}}:{{port}}/api/work-orders/{{workOrderId}}/components/{{componentId}}?facilityId={{facilityId}}

Delete a component from a work order.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

force
true

Boolean that indicates to delete the component and material related to it.

Example Request
                                                
DELETE https://api-dot-imbicloud.nw.r.appspot.com:80/api/work-orders/{{workOrderId}}/components/{{componentId}}?facilityId={{facilityId}}
                                            
POST Create
https://{{host}}:{{port}}/api/work-orders/{{workOrderId}}/materials?facilityId={{facilityId}}

Creates a material related to a workOrderComponentId relationship.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

BODY raw

Example Request
PATCH Edit
https://{{host}}:{{port}}/api/work-orders/{{workOrderId}}/materials/{{materialId}}?facilityId={{facilityId}}

Updates the information of a material.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

BODY raw

Example Request
DELETE Delete
https://{{host}}:{{port}}/api/work-orders/{{workOrderId}}/materials/{{materialId}}?facilityId={{facilityId}}

Deletes a material.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

Example Request
                                                
DELETE https://api-dot-imbicloud.nw.r.appspot.com:80/api/work-orders/{{workOrderId}}/materials/{{materialId}}?facilityId={{facilityId}}
                                            
GET All
https://{{host}}:{{port}}/api/work-orders?page=1&limit=2
PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

ids
[1496, 22]

Array of numbers to filter by workOrderId.

problemType
text

String to filter by subject of the problem type.

description
text

String to filter by description.

facilityName
text

String to filter by facility name.

companyName
text

String to filter by company name.

criticalityLevelIds
[]

Array of numbers to filter by criticalityLevelId.

workOrderStateIds
[]

Array of numbers to filter by workOrderStateId.

assignedUser
{{userId}}

Number to filter by userId assigned to the work order.

fromCreation
2020-06-28T22:00:00.000Z

Date in timezone format.

toCreation
2020-08-28T21:59:59.999Z

Date in timezone format.

fromInProgress
2020-04-30T22:00:00.000Z

Date in timezone format.

toInProgress
2020-08-31T21:00:00.000Z

Date in timezone format.

fromFinish
2020-08-31T21:00:00.000Z

Date in timezone format.

toFinish
2020-08-31T21:00:00.000Z

Date in timezone format.

fromClose
2020-08-31T21:00:00.000Z

Date in timezone format.

toClose
2020-08-31T21:00:00.000Z

Date in timezone format.

categoryName
text

String to filter by category name.

expired
false

Boolean to indicated if it does not finish on time.

fromStartedAt
2020-08-31T21:00:00.000Z

Date in timezone format.

toStartedAt
2020-08-31T21:00:00.000Z

Date in timezone format.

page
1

Number that is the page.

limit
2

Number of elements per page.

Example Request
                                                
GET https://api-dot-imbicloud.nw.r.appspot.com:80/api/work-orders?page=1&limit=2
                                            
Example Response
200 - OK
GET One
https://{{host}}:{{port}}/api/work-orders/{{workOrderId}}?facilityId={{facilityId}}

Gets information about a work order.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

Example Request
                                                
GET https://api-dot-imbicloud.nw.r.appspot.com:80/api/work-orders/{{workOrderId}}?facilityId={{facilityId}}
                                            
Example Response
200 - OK
GET All (Available Parents)
https://{{host}}:{{port}}/api/work-orders/{{workOrderId}}/available-parents?facilityId={{facilityId}}

Gets the work orders that can be setting as previous.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

Example Request
                                                
GET https://api-dot-imbicloud.nw.r.appspot.com:80/api/work-orders/{{workOrderId}}/available-parents?facilityId={{facilityId}}
                                            
PATCH Edit
https://{{host}}:{{port}}/api/work-orders/{{workOrderId}}?facilityId={{facilityId}}

Updates the information of the work order.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

BODY raw

Example Request
PATCH Start
https://{{host}}:{{port}}/api/work-orders/{{workOrderId}}/start?facilityId={{facilityId}}

Change the status of the work order from CREATED to IN_PROGRESS or BLOCKED (if it has a previous pending to finishes)

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

Example Request
                                                
PATCH https://api-dot-imbicloud.nw.r.appspot.com:80/api/work-orders/{{workOrderId}}/start?facilityId={{facilityId}}
                                            
PATCH Finish
https://{{host}}:{{port}}/api/work-orders/{{workOrderId}}/finish/{{email}}?facilityId={{facilityId}}

Finishes the work order with an email that represents the validator of the work order.

The email must be of a user rol 1, 2, 3, 6.

All components must have their materials, and workingTime cannot be null.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

Example Request
                                                
PATCH https://api-dot-imbicloud.nw.r.appspot.com:80/api/work-orders/{{workOrderId}}/finish/{{email}}?facilityId={{facilityId}}
                                            
PATCH Close
https://{{host}}:{{port}}/api/work-orders/{{workOrderId}}/close?facilityId={{facilityId}}

Change the status of a work order to CLOSED.

PARAMS

facilityId
{{facilityId}}

Number that is the ID of the facility.

Example Request
                                                
PATCH https://api-dot-imbicloud.nw.r.appspot.com:80/api/work-orders/{{workOrderId}}/close?facilityId={{facilityId}}