SAML Role Mappings

Get SAML Role Mappings

Returns a list of all SAML role mappings.

GET /api/v2/sso/saml/role-mappings/

GET /api/v2/sso/saml/role-mappings/ HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"

{
    "results": [
        {
            "sde_role": "UR1",
            "id": 15,
            "last_modified": "2023-02-28T18:29:06.318772Z",
            "saml_role": "12345"
        },
        {
            "sde_role": "UR2",
            "id": 7,
            "last_modified": "2023-02-28T16:56:10.133151Z",
            "saml_role": "bob"
        }
    ]
}

Expand Filters

See the Expand Parameters section for more details.

Parameter Description
sde_role sde_role fields are expanded to include the sde_role name

GET /api/v2/sso/saml/role-mappings/?expand=sde_role HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
HTTP/1.1 200 OK
Content-Type: application/json

{
    "results": [
        {
            "sde_role": {
              "id": "UR1",
              "name": "role_1"
            },
            "id": 15,
            "last_modified": "2023-02-28T18:29:06.318772Z",
            "saml_role": "12345"
        },
        {
            "sde_role": {
              "id": "UR4",
              "name": "role_4"
            },
            "id": 7,
            "last_modified": "2023-02-28T16:56:10.133151Z",
            "saml_role": "bob"
        }
    ]
}

Query Parameters

Use the following parameters to filter the query resources in the response.

Parameter Description
search Filter search queries by one or more of saml_role and sde_role__name.

Delete a SAML Role Mapping

This endpoint deletes a single SAML role mapping resource, as specified by the id parameter.

DELETE /api/v2/sso/saml/role-mappings/{saml-role-mapping-id}/

DELETE /api/v2/sso/saml/role-mappings/1/ HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"

HTTP/1.1 204 NO Content

Create a SAML Role Mapping

Creates a SAML role mapping resource.

POST /api/v2/sso/saml/role-mappings/

Fields Required Description
saml_role Yes The value of the idp role.
sde_role Yes The ID of the SDE role that the SAML role maps to.

POST /api/v2/sso/saml/role-mappings/ HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"

{
  "saml_role": ["developer", "architect"],
  "sde_role": "UR1"
}
HTTP/1.1 201 CREATED
Content-Type: application/json

{
  "sde_role": "UR1",
  "id": 1,
  "last_modified": "2023-02-28T16:27:46.216296-05:00",
  "saml_role": ["developer", "architect"]
}

Update a specific SAML Role Mapping

Updates a specific SAML role mapping resource.

PUT /api/v2/sso/saml/role-mappings/{saml-role-mapping-id}/

Fields Required Description
saml_role Yes The name of the SAML role.
sde_role Yes The ID of the SDE role that the SAML role maps to.

PUT /api/v2/sso/saml/role-mappings/1/ HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"

{
  "saml_role": "developer",
  "sde_role": "UR1"
}
HTTP/1.1 200 OK
Content-Type: application/json

{
  "sde_role": "UR1",
  "id": 1,
  "last_modified": "2023-02-28T16:27:46.216296-05:00",
  "saml_role": "developer"
}

results matching ""

    No results matching ""