Import Identity Sources

Prev Next
Put
/api/1.0/identity-templates/{envId}/{identityTemplateId}/identity-sources

Import Identity Sources for a specific Identity Template in the indicated Environment. This API is designed to support CREATE and UPDATE operations for Identity Sources.

Notice

Accessing the APIs is through a dedicated domain/URL, according to your PlainID Tenant Location
  • United States (US) - `https://api.us1.plainid.io`
  • Canada (CA) - `https://api.ca1.plainid.io`
  • Europe (EU) - `https://api.eu1.plainid.io`

  • Using HTML Encoded Special Characters

    Use HTML encoded patterns when working with values that contain special characters like spaces, dashes, etc. Refer to this HTML URL Encoding Reference for a full list.


    Important note about headers

    Refer to the headers below to modify your cURL sample. Check if the following headers are in the sample, if not, ensure you add it to your API tool.

    Headers

    *Required
    Header Value cURL Line
    Accept `application/json` `-H "Accept:application/json"`
    Content-Type `application/json` `-H "Content-Type:application/json"`

    cURL Sample Guidelines

    In order for the relevant parameters to appear in the cURL sample, you can input the values in the interactive API console on the right in the Try It or Code Sample tabs. You can then copy the cURL sample from the Code Sample tab in the correct format.

    Security
    HTTP
    Type bearer

    For more details about Administration API Authentication, check out the Authentication APIs documentation
    Provide your bearer token in the Authorization header when making requests to protected resources.
    Example: Authorization: Bearer 123

    Path parameters
    envId
    string (uuid) Required

    The Environment ID can be found under the Details Tab in the Environment Settings.

    identityTemplateId
    stringRequired

    The Identity Template ID. This can be found in the Details tab in the Identity Workspace Settings.

    Body parameters

    Identity Sources to import.

    example
    {
      "sources": [
        {
          "sourceId": "REQUEST_INPUT",
          "displayName": "PDP Request",
          "description": null,
          "sourceType": "REQUEST_INPUT",
          "sourceMetaData": {
            "logoUrl": null
          }
        },
        {
          "sourceId": "REQUEST_MAPPERS",
          "displayName": "Request Mappers",
          "description": null,
          "sourceType": "REQUEST_MAPPERS",
          "sourceMetaData": {
            "logoUrl": null
          }
        },
        {
          "sourceId": "ds_users",
          "displayName": "users1",
          "description": null,
          "sourceType": "EXTERNAL_INPUT",
          "sourceMetaData": {
            "logoUrl": null,
            "paaGroupId": "TestPAA",
            "viewName": "v_users"
          }
        },
        {
          "sourceId": "CALCULATED",
          "displayName": "Calculated Functions",
          "description": null,
          "sourceType": "CALCULATED",
          "sourceMetaData": {
            "logoUrl": null
          }
        },
        {
          "sourceId": "s122432",
          "displayName": "Table 1",
          "description": null,
          "sourceType": "EXTERNAL_OUTPUT",
          "sourceMetaData": {
            "logoUrl": null,
            "fqp": "adminDB_public_TABLE1"
          }
        }
      ]
    }
    Expand All
    object

    Request payload for importing Identity Sources

    sources
    Array of object (IdentitySource) Required

    List of Identity Sources to import

    object

    Identity Source

    sourceId
    string Required

    The unique identifier for the Identity Source

    Min length1
    Max length128
    displayName
    string Required

    Display name for the source

    Min length1
    Max length100
    description
    string

    Description of Source

    Max length200
    sourceType
    string Required

    Type of source

    Valid values[ "REQUEST_INPUT", "REQUEST_MAPPERS", "EXTERNAL_INPUT", "CALCULATED", "EXTERNAL_OUTPUT" ]
    sourceMetaData
    object

    Additional metadata for the Identity Source

    logoUrl
    string (uri)

    Source Logo URL

    paaGroupId
    string

    PAAGroup ID associated with the environment or tenant. PAA Groups at the Tenant level have a suffix of _GLOBAL. (for EXTERNAL_INPUT sources)

    Max length128
    viewName
    string

    View associated with the source (for EXTERNAL_INPUT sources)

    fqp
    string

    FQP - Full Qualified Path (e.g. DB.schema.Table) (for EXTERNAL_OUTPUT sources)

    Responses
    201

    Successful operation

    Headers
    x-request-id
    string
    The ID of the request
    example
    {
      "data": {
        "sources": [
          {
            "sourceId": "REQUEST_INPUT",
            "displayName": "PDP Request",
            "description": null,
            "sourceType": "REQUEST_INPUT",
            "sourceMetaData": {
              "logoUrl": null
            }
          },
          {
            "sourceId": "REQUEST_MAPPERS",
            "displayName": "Request Mappers",
            "description": null,
            "sourceType": "REQUEST_MAPPERS",
            "sourceMetaData": {
              "logoUrl": null
            }
          },
          {
            "sourceId": "ds_users",
            "displayName": "users1",
            "description": null,
            "sourceType": "EXTERNAL_INPUT",
            "sourceMetaData": {
              "logoUrl": null,
              "paaGroupId": "TestPAA",
              "viewName": "v_users"
            }
          },
          {
            "sourceId": "CALCULATED",
            "displayName": "Calculated Functions",
            "description": null,
            "sourceType": "CALCULATED",
            "sourceMetaData": {
              "logoUrl": null
            }
          },
          {
            "sourceId": "s122432",
            "displayName": "Table 1",
            "description": null,
            "sourceType": "EXTERNAL_OUTPUT",
            "sourceMetaData": {
              "logoUrl": null,
              "fqp": "adminDB_public_TABLE1"
            }
          }
        ]
      }
    }
    Expand All
    object

    Response payload for Identity Sources operations

    data
    object
    sources
    Array of object (IdentitySource)

    List of Identity Sources

    object

    Identity Source

    sourceId
    string

    The unique identifier for the Identity Source

    Min length1
    Max length128
    displayName
    string

    Display name for the source

    Min length1
    Max length100
    description
    string

    Description of Source

    Max length200
    sourceType
    string

    Type of source

    Valid values[ "REQUEST_INPUT", "REQUEST_MAPPERS", "EXTERNAL_INPUT", "CALCULATED", "EXTERNAL_OUTPUT" ]
    sourceMetaData
    object

    Additional metadata for the Identity Source

    logoUrl
    string (uri)

    Source Logo URL

    paaGroupId
    string

    PAAGroup ID associated with the environment or tenant. PAA Groups at the Tenant level have a suffix of _GLOBAL. (for EXTERNAL_INPUT sources)

    Max length128
    viewName
    string

    View associated with the source (for EXTERNAL_INPUT sources)

    fqp
    string

    FQP - Full Qualified Path (e.g. DB.schema.Table) (for EXTERNAL_OUTPUT sources)

    400

    Validation Error

    Headers
    x-request-id
    string
    The ID of the request
    unimportableSourceTypeError
    {
      "errors": [
        {
          "code": "EMIS-001",
          "id": "EQ7CMX",
          "status": "400",
          "name": "UnimportableSourceTypeError",
          "message": "Cannot import or modify source of unimportable type: [REQUEST_INPUT]"
        }
      ]
    }
    singletonIdentitySourceTypeError
    {
      "errors": [
        {
          "code": "EMIS-002",
          "id": "EQ7CMX",
          "status": "400",
          "name": "SingletonIdentitySourceTypeError",
          "message": "Only one Identity Source of type: [CALCULATED] is allowed per template"
        }
      ]
    }
    uneditableSourceFieldError
    {
      "errors": [
        {
          "code": "EMIS-003",
          "id": "EQ7CMX",
          "status": "400",
          "name": "UneditableSourceFieldError",
          "message": "Cannot modify uneditable source field: [sourceType] for source: [ds_users] of type: [EXTERNAL_INPUT]"
        }
      ]
    }
    invalidSourceTypeValidationMessage
    {
      "errors": [
        {
          "code": "EMIS-004",
          "id": "EQ7CMX",
          "status": "400",
          "name": "InvalidSourceTypeValidationMessage",
          "message": "Invalid source type: [INVALID_TYPE] for source: [ds_users]"
        }
      ]
    }
    identitySourceIDAlreadyExistsError
    {
      "errors": [
        {
          "code": "EMIS-005",
          "id": "EQ7CMX",
          "status": "400",
          "name": "IdentitySourceIDAlreadyExistsError",
          "message": "Identity source with ID [ds_users] already exists in the import payload. ID must be unique."
        }
      ]
    }
    identitySourceDisplayNameAlreadyExistsError
    {
      "errors": [
        {
          "code": "EMIS-006",
          "id": "EQ7CMX",
          "status": "400",
          "name": "IdentitySourceDisplayNameAlreadyExistsError",
          "message": "Identity source with Display Name [Users Table] already exists in the import payload. Display name must be unique."
        }
      ]
    }
    Expand All
    object

    Response object

    errors
    Array of object (Error)
    object
    code
    string
    id
    string
    status
    integer
    name
    string
    message
    string
    args
    object
    path
    string
    401

    Unauthorized

    Headers
    x-request-id
    string
    The ID of the request
    403

    Forbidden

    Headers
    x-request-id
    string
    The ID of the request
    404

    Object not found

    Headers
    x-request-id
    string
    The ID of the request
    environmentNotFoundError
    {
      "errors": [
        {
          "code": "EMIT-003",
          "id": "EQ7CMX",
          "status": "404",
          "name": "EnvironmentNotFoundError",
          "message": "Environment: [2d4a0591-dfe4-45fb-8a69-d183f5c75c0d] doesn't exist"
        }
      ]
    }
    identityTemplateNotFoundError
    {
      "errors": [
        {
          "code": "EMIT-002",
          "id": "EQ7CMX",
          "status": "404",
          "name": "IdentityTemplateNotFoundError",
          "message": "Identity Template: [User1] not found in Environment: [848aa1dd-3516-4dbe-b1bb-c32454302dc4], Hint: did you mean [User, Target]"
        }
      ]
    }
    paaGroupNotFoundError
    {
      "errors": [
        {
          "code": "EMIS-008",
          "id": "EQ7CMX",
          "status": "404",
          "name": "PAAGroupNotFoundError",
          "message": "PAA Group: [TestPAA] not found, Hint: did you mean: [TestPAA1, TestPAA2]"
        }
      ]
    }
    Expand All
    object

    Response object

    errors
    Array of object (Error)
    object
    code
    string
    id
    string
    status
    integer
    name
    string
    message
    string
    args
    object
    path
    string
    422

    Payload Validation Error

    Headers
    x-request-id
    string
    The ID of the request
    500

    Internal Server Error

    Headers
    x-request-id
    string
    The ID of the request