SCIM Host examples
Operations
List all
List all Hosts.
Request
GET http://<your-domain>/soffid/webservice/scim2/v1/Host
Response 200 OK
{
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:ListResponse"
],
"totalResults": 12,
"startIndex": 1,
"Resources": [
{
"serialNumber": "soffid.bubu.lab:192.168.133.1",
"os": "ALT",
"mail": false,
"ip": "192.168.133.1",
"dynamicIp": true,
"description": "Autocreated on 12/13/20 6:49:34 PM",
"office": false,
"lastSeen": "2020-12-13 18:49:34",
"meta": {
"location": "http://soffid.pat.lab:8080/webservice/scim2/v1/Host/1039055",
"resourceType": "Host"
},
"networkCode": "internal",
"schemas": [
"urn:soffid:com.soffid.iam.api.Host"
],
"name": "soffid.bubu.lab",
"id": 1039055,
"hostAlias": [],
"printersServer": false
},
{
"os": "ALT",
"mail": false,
"ip": "10.129.120.4",
"dynamicIp": false,
"description": "Discovered host iam.soffid.com",
"office": false,
"lastSeen": "2021-04-05 20:06:19",
"meta": {
"location": "http://soffid.pat.lab:8080/webservice/scim2/v1/Host/1793093",
"resourceType": "Host"
},
"networkCode": "lab1",
"schemas": [
"urn:soffid:com.soffid.iam.api.Host"
],
"name": "iam.soffid.com",
"id": 1793093,
"hostAlias": [],
"printersServer": false
},
........
]
}
List by filter
List all Hosts with a filter expression.
It is allowed to use pagination and sort the information, for more information visit the Sorting and Pagination information.
Request
List all Hosts with a filter expression.
GET http://<your-domain>/soffid/webservice/scim2/v1/Host?filter=os eq LIN and name co archiva
Response 200 OK
{
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:ListResponse"
],
"totalResults": 1,
"startIndex": 1,
"Resources": [
{
"os": "LIN",
"mail": false,
"ip": "10.129.120.2",
"dynamicIp": false,
"description": "Discovered host archiva.dev.lab",
"office": false,
"lastSeen": "2021-04-05 20:04:49",
"meta": {
"location": "http://soffid.pat.lab:8080/webservice/scim2/v1/Host/1793026",
"resourceType": "Host"
},
"networkCode": "lab1",
"schemas": [
"urn:soffid:com.soffid.iam.api.Host"
],
"name": "archiva.dev.lab",
"id": 1793026,
"hostAlias": [],
"printersServer": false
}
]
}
Query by id
Query a Host by its id (primary key).
Request
GET http://<your-domain>/soffid/webservice/scim2/v1/Host/1793093
Response 200 OK
{
"os": "ALT",
"mail": false,
"ip": "10.129.120.4",
"dynamicIp": false,
"description": "Discovered host iam.soffid.com",
"office": false,
"lastSeen": "2021-04-05 20:06:19",
"meta": {
"location": "http://soffid.pat.lab:8080/webservice/scim2/v1/Host/1793093",
"resourceType": "Host"
},
"networkCode": "lab1",
"schemas": [
"urn:soffid:com.soffid.iam.api.Host"
],
"name": "iam.soffid.com",
"id": 1793093,
"hostAlias": [],
"printersServer": false
}
Create
To create a Host.
Request
POST http://<your-domain>/soffid/webservice/scim2/v1/Host
JSON
{
"schemas": [
"urn:soffid:com.soffid.iam.api.Host"
],
"name": "billing.dev.lab",
"description": "Host billing.dev.lab",
"os": "LIN",
"mail": false,
"dynamicIp": false,
"networkCode": "internal",
"hostAlias": [
"aliasHost_1",
"aliasHost_2"
],
"serialNumber": "123456789",
"printersServer": false
}
Response 201 Created
{
"serialNumber": "123456789",
"os": "LIN",
"mail": false,
"dynamicIp": false,
"description": "Host billing.dev.lab",
"office": false,
"meta": {
"location": "http://soffid.pat.lab:8080/webservice/scim2/v1/Host/1976899",
"resourceType": "Host"
},
"networkCode": "internal",
"schemas": [
"urn:soffid:com.soffid.iam.api.Host"
],
"name": "billing.dev.lab",
"id": 1976899,
"hostAlias": [
"aliasHost_1",
"aliasHost_2"
],
"printersServer": false
}
Update partial
Update only of theOnly attributes with changes, only these atrributeschanges will be updated, the restother will maintainmantain the same value.
Request
PATCH http://<your-domain>/soffid/webservice/scim2/v1/Host/1976899
JSON
{
"Operations": [
{
"op": "replace",
"path": "networkCode",
"value": "Lab1"
},
{
"op": "add",
"path": "hostAlias",
"value": [
"aliasHost_3",
"aliasHost_4"
]
}
]
}
Response 200 OK
{
"serialNumber": "123456789",
"os": "LIN",
"mail": false,
"dynamicIp": false,
"description": "Host billing.dev.lab",
"office": false,
"meta": {
"location": "http://soffid.pat.lab:8080/webservice/scim2/v1/Host/1976899",
"resourceType": "Host"
},
"networkCode": "Lab1",
"schemas": [
"urn:soffid:com.soffid.iam.api.Host"
],
"name": "billing.dev.lab",
"id": 1976899,
"hostAlias": [
"aliasHost_1",
"aliasHost_2",
"aliasHost_3",
"aliasHost_4"
],
"printersServer": false
}
Update all
This operation replaces all values in the Hosts.
- Note that the attribute id is required to confirm that the resource "...Host/<id>" is the same that the JSON Host.
- Note that all the attributes not included in the request will be cleared in the Host type and their data will be lost.
- Note that not all the attributes are updatable, for example, tag meta, avoid these tags. For more information visit Resource data model page
Request
PUT http://<your-domain>/soffid/webservice/scim2/v1/Host/1976899
JSON
{
"schemas": [
"urn:soffid:com.soffid.iam.api.Host"
],
"id": 1976899,
"name": "billing.dev.lab",
"description": "Host billing.dev.lab",
"os": "LIN",
"mail": false,
"dynamicIp": false,
"networkCode": "internal",
"printersServer": false
}
Response 200 OK
{
"os": "LIN",
"mail": false,
"meta": {
"location": "http://soffid.pat.lab:8080/webservice/scim2/v1/Host/1976899",
"resourceType": "Host"
},
"networkCode": "internal",
"schemas": [
"urn:soffid:com.soffid.iam.api.Host"
],
"name": "billing.dev.lab",
"dynamicIp": false,
"description": "Host billing.dev.lab",
"id": 1976899,
"hostAlias": [],
"printersServer": false
}
Delete
Delete a host.
Please note after this delete, the host has to be created again to use it in the next examples.
Request
DELETE http://<your-omain>/soffid/webservice/scim2/v1/Host/1976899
Response 204 No Content
204 No Content
Error response
For more information about error response visit https://bookstack.soffid.com/link/116#bkmrk-error-response