External Link objects represent links between an external service and a Pathwright user.

Attributes

  • id: The unique ID for this webhook.
  • link_type: The type of link, either external or saml2. Only external links can currently be deleted via this API.
  • external_id: The external ID identifying this relationship. For SAML2, this is the user’s NameID as provided by the identity provider.
  • lastexternalupdate: The datetime of the last update to this user via this link. Note that an update is made to the user on each SSO login.
{
    "id": 123,
    "link_type": "saml2",
    "external_id": "some_account@gsuite.example.com",
    "last_external_update": "2017-10-09T21:36:40.707776Z"
}

API Endpoints

Endpoint: https://yourschool.pathwright.com/api/public/link/

Method: GET

Gives a list of all active external links in your school.

Example Output

{
    "count": 2,
    "next": null,
    "previous": null,
    "results": [
        {
            "id": 1,
            "user": 123,
            "link_type": "saml2",
            "external_id": "saml2.user@example.com",
            "last_external_update": "2017-10-09T21:36:40.707776Z"
        },
        {
            "id": 2,
            "user": 456,
            "link_type": "external",
            "external_id": "my_external_id",
            "last_external_update": "2017-10-09T21:36:40.707776Z"
        }
    ]
}

Endpoint: https://yourschool.pathwright.com/api/public/link/

Method: POST

Links a school member to an external ID of some sort.

Arguments

  • user_id: The user’s ID number for their Pathwright account.
  • external_id: The external ID to associate with this user.

Returns

Returns the link object, representing all profile information visible and updatable via this API.

Example Output

{
    "id": 123,
    "link_type": "external",
    "external_id": "some_external_user_id_123",
    "last_external_update": "2017-10-19T21:36:40.707776Z"
}

[//]: <> (TODO: Add retrieve/update)

Endpoint: https://yourschool.pathwright.com/api/public/link/{link_id}/

Method: DELETE

Removes an external link for a school member.

Currently disallowed for SAML2.

[//]: <> (TODO: Spec, implement, and document SAML2 revocation)

URL Parameters

  • link_id: The ID number of the external link to delete for a member.

Result

204 No Content