Utility-methods

Method: Add external identity mapping

POST api/publicapi/AddExternalIdentityMapping

{

                "providerId": "oid:nilexoid",

                "providerSubjectId": "dzenan@nilex",

                "providerClaim": "userPrincipalName",

                "nspUserEmail":"sadmin@nilex.se"

}

Using this method in API you will have possibility to insert automatic mapping of NSP account to external account in your identity like ADFS, Office365, etc, using different providers WsFederation, SAML or OpenId. Without mapping first time when user log in to NSP, NSP will open page to register new NSP account or map to existing. Using this API method you can add predefined mapping.

ProviderId – is field you can find in external identity provider in NSP application when you add the provider.

ProviderSubjectId – is value the identity server will send to NSP.

ProviderClaim – is field containing value for ProviderSubjectID for example userPrincipalName, Email or other unique value.

NspUserEmail – is email for existing user in NSP, new mapping will be added to this account.

Method: Get entity type list

GET api/publicapi/getallentitytypes

Will return a list of all entity types. If you want to find out which fields exist on an entity type, use next method:

Method: Get entity type metadata

In order to find out which fields exist on an entity, call this method with entity name as parameter:

GET api/publicapi/getentitytypeinfo?entityType=Ticket

 

Response json for entity type “Ticket” – some fields have been removed for brevity:

{

  "Data": {

    "Namespace": "dbo",

    "Id": 112,

    "Name": "Ticket",

    "DisplayName": "IT Request",

    "Columns": [

    {

      "Id": 1,

      "Name": "Type",

      "DisplayName": "Type",

      "DataType": "int",

      "ReferenceType": "SysTable",

      "IsReference": true,

      "MaxLength": null

    },

    {

      "Id": 3,

      "Name": "Version",

      "DisplayName": "Version",

      "DataType": "int",

      "ReferenceType": null,

      "IsReference": false,

      "MaxLength": null

    },

    {

      "Id": 865,

      "Name": "CreatedDate",

      "DisplayName": "Created Date",

      "DataType": "datetime",

      "ReferenceType": null,

      "IsReference": false,

      "MaxLength": null

    },

    {

      "Id": 1249,

      "Name": "Priority",

      "DisplayName": "Priority",

      "DataType": "int",

      "ReferenceType": "SysPriority",

      "IsReference": true,

      "MaxLength": null

    },

    {

      "Id": 1250,

      "Name": "Category",

      "DisplayName": "Category",

      "DataType": "int",

      "ReferenceType": "SysDefCategory",

      "IsReference": true,

      "MaxLength": null

    },

    {

      "Id": 858,

      "Name": "BaseEndUser",

      "DisplayName": "Requester",

      "DataType": "int",

      "ReferenceType": "Person",

      "IsReference": true,

      "MaxLength": null

    },

    {

      "Id": 859,

      "Name": "BaseAgent",

      "DisplayName": "Assignee",

      "DataType": "int",

      "ReferenceType": "Person",

      "IsReference": true,

      "MaxLength": null

    },

    {

      "Id": 860,

      "Name": "BaseHeader",

      "DisplayName": "Subject",

      "DataType": "string",

      "ReferenceType": null,

      "IsReference": false,

      "MaxLength": 500

    },

    {

      "Id": 861,

      "Name": "BaseDescription",

      "DisplayName": "Description",

      "DataType": "string",

      "ReferenceType": null,

      "IsReference": false,

      "MaxLength": null

    }

   ]

  },

  "Errors": null,

  "IsError": false

}