Skip to main content

SCIM CustomObject examples

Operations

This page shows the operations that can be performed for the CustomObjects object

List all

Request
GET http://<your-domain>/soffid/webservice/scim2/v1/CustomObject
Response 200 OK
{
    "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:ListResponse"
    ],
    "totalResults": 6,
    "startIndex": 1,
    "Resources": [
        {
            "meta": {
                "location": "http://soffid.pat.lab:8080/webservice/scim2/v1/CustomObject/848157",
                "resourceType": "CustomObject"
            },
            "schemas": [
                "urn:soffid:com.soffid.iam.api.CustomObject"
            ],
            "name": "aa",
            "description": "aaa",
            "attributes": {
                "address": "2"
            },
            "id": 848157,
            "type": "building"
        },
        {
            "meta": {
                "location": "http://soffid.pat.lab:8080/soffid/webservice/scim2/v1/CustomObject/1510208",
                "resourceType": "CustomObject"
            },
            "schemas": [
                "urn:soffid:com.soffid.iam.api.CustomObject"
            ],
            "name": "ES",
            "description": "Spain",
            "attributes": {
                "language": "English"
            },
            "id": 1510208,
            "type": "country"
        },
      ..........
    ]
}

List by filter

List all CustomObjects with a filter expression.

It is allowed to use pagination and sort the information, for more information visit the Sorting and Pagination information.

Request
GET http://<your-domain>/soffid/webservice/scim2/v1/CustomObject?filter=description eq Spain
Response 200 OK
{
    "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:ListResponse"
    ],
    "totalResults": 1,
    "startIndex": 1,
    "Resources": [
        {
            "meta": {
                "location": "http://soffid.pat.lab:8080/soffid/webservice/scim2/v1/CustomObject/1510208",
                "resourceType": "CustomObject"
            },
            "schemas": [
                "urn:soffid:com.soffid.iam.api.CustomObject"
            ],
            "name": "ES",
            "description": "Spain",
            "attributes": {
                "language": "English"
            },
            "id": 1510208,
            "type": "country"
        }
    ]
}

Query by id

Query a CustomObject by its id (primary key). 

Request
GET http://<your-domain>/soffid/webservice/scim2/v1/CustomObject/848062
Response 200 OK
{
    "meta": {
        "location": "http://soffid.pat.lab:8080/soffid/webservice/scim2/v1/CustomObject/848062",
        "resourceType": "CustomObject"
    },
    "schemas": [
        "urn:soffid:com.soffid.iam.api.CustomObject"
    ],
    "name": "HQ",
    "description": "Headquarters",
    "attributes": {
        "address": "1"
    },
    "id": 848062,
    "type": "building"
}

Create

Request

POST http://<your-domain>/soffid/webservice/scim2/v1/CustomObject

JSON

{
    "schemas": [
        "urn:soffid:com.soffid.iam.api.CustomObject"
    ],
    "name": "IT",
    "description": "Italy",
    "type": "country",
    "attributes": {
        "language": "English"
    }
}
Response 201 Created
{
    "meta": {
        "location": "http://soffid.pat.lab:8080/soffid/webservice/scim2/v1/CustomObject/1977187",
        "resourceType": "CustomObject"
    },
    "schemas": [
        "urn:soffid:com.soffid.iam.api.CustomObject"
    ],
    "name": "IT",
    "description": "Italy",
    "attributes": {
        "language": "English"
    },
    "id": 1977187,
    "type": "country"
}

Update partial

Only attributes with changes will be updated, the other will maintain the same value.

Request
PATCH http://<your-domain>/soffid/webservice/scim2/v1/CustomObject/1977187

JSON

{
    "Operations": [
        {
            "op": "replace",
            "path": "attributes",
            "value": {
                "language": "German"
            }
        }
    ]
}
Response 200 OK
{
    "meta": {
        "location": "http://soffid.pat.lab:8080/soffid/webservice/scim2/v1/CustomObject/1977187",
        "resourceType": "CustomObject"
    },
    "schemas": [
        "urn:soffid:com.soffid.iam.api.CustomObject"
    ],
    "name": "IT",
    "description": "Italy",
    "attributes": {
        "language": "German"
    },
    "id": 1977187,
    "type": "country"
}

Update all

This operation replaces all values in the CustomObject.

  • Note that the attribute id is required to confirm that the resource "...CustomObject/<id>" is the same that the JSON CustomObject.
  • Note that all the attributes not included in the request will be cleared in the CustomObject 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/CustomObject/1977187

JSON

{
    "schemas": [
        "urn:soffid:com.soffid.iam.api.CustomObject"
    ],
    "id": 1977187,
    "name": "IT",
    "description": "Italy",
    "type": "country",
    "attributes": {
        "language": "English"
    }
}
Response 200 OK
{
    "meta": {
        "location": "http://soffid.pat.lab:8080/soffid/webservice/scim2/v1/CustomObject/1977187",
        "resourceType": "CustomObject"
    },
    "schemas": [
        "urn:soffid:com.soffid.iam.api.CustomObject"
    ],
    "name": "IT",
    "description": "Italy",
    "attributes": {
        "language": "English"
    },
    "id": 1977187,
    "type": "country"
}

Delete

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

Request
DELETE http://<your-omain>/soffid/webservice/scim2/v1/CustomObject/1977187
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