Skip to main content

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 the attributes with changes, only these atrributes will be updated, the rest will maintain the same value.

Request
PATCH http://<your-domain>/soffid/webservice/scim2/v1/GroupUser/1976741Host/1976899

JSON

{
    "Operations": [
        {
            "op": "replace",
            "path": "groupDescription"networkCode",
            "value": "Enterprise engineering team"Lab1"
        },
        {
            "op": "replace"add",
            "path": "group"hostAlias",
            "value": [
                "EngineeringTeam"aliasHost_3",
                "aliasHost_4"
            ]
        }
    ]
}
Response 200 OK
{
    "groupDescription"serialNumber": "Enterprise123456789",
    engineering"os": team""LIN",
    "mail": false,
    "dynamicIp": false,
    "description": "Host billing.dev.lab",
    "office": false,
    "meta": {
        "location": "http://soffid.pat.lab:8080/webservice/scim2/v1/GroupUser/1976741"Host/1976899",
        "resourceType": "GroupUser"Host"
    },
    "networkCode": "Lab1",
    "schemas": [
        "urn:soffid:com.soffid.iam.api.GroupUser"Host"
    ],
    "start"name": "2021-05-11 10:39:23",
    "fullName": "Casey Kelp",
    "disabled": false,
    "attributes": {}billing.dev.lab",
    "id": 1976741,1976899,
    "user"hostAlias": [
        "ckelp"aliasHost_1",
        "primaryGroup"aliasHost_2",
        "aliasHost_3",
        "aliasHost_4"
    ],
    "printersServer": true,
    "group": "EngineeringTeam"false
}

Update all

This operation replace all values in the GroupUser.Hosts.

  • Note that the attribute id is required to confirm that the resource "...GroupUser/Host/<id>" is the same that the JSON GroupUser.Host.
  • Note that all the attributes not included in the request will be cleared in the GroupUserHost 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 see Resource data model page
Request
PUT http://<your-domain>/soffid/webservice/scim2/v1/GroupUser/1976741Host/1976899

JSON

{
    "schemas": [
        "urn:soffid:com.soffid.iam.api.GroupUser"Host"
    ],
    "id": 1976741,1976899,
    "group"name": "it"billing.dev.lab",
    "groupDescription"description": "HelpHost desk support team"billing.dev.lab",
    "user"os": "ckelp"LIN",
    "fullName"mail": false,
    "dynamicIp": false,
    "networkCode": "Casey Kelp"internal",   
    "primaryGroup"printersServer": true,
    "attributes": {}false
}
Response 200 OK
{
    "groupDescription"os": "HelpLIN",
    desk"mail": support team",false,
    "meta": {
        "location": "http://soffid.pat.lab:8080/webservice/scim2/v1/GroupUser/1976741"Host/1976899",
        "resourceType": "GroupUser"Host"
    },
    "networkCode": "internal",
    "schemas": [
        "urn:soffid:com.soffid.iam.api.GroupUser"Host"
    ],
    "fullName"name": "Casey Kelp"billing.dev.lab",
    "disabled"dynamicIp": false,
    "attributes"description": {}"Host billing.dev.lab",
    "id": 1976741,1976899,
    "user"hostAlias": "ckelp"[],
    "primaryGroup"printersServer": true,
    "group": "it"false
}

Delete

Delete a role.host.

Please note after this delete, the account has to be created again to use it in the next examples.

Request
DELETE http://<your-omain>/soffid/webservice/scim2/v1/GroupUser/1976741Host/1976899
Response 204 No Content
204 No Content

Error response

For more infomation about error response visit https://bookstack.soffid.com/link/116#bkmrk-error-response