Import API Mapper

Prev Next
Post
/api/1.0/api-mapper-sets/{envId}/{apiMapperSetId}/mappers

This API call is designed to create or update a single API Mapper within an API Mapper Set.

Notice

Accessing the API call 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 cURL sample before pasting into 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 in the Environment Settings.

    apiMapperSetId
    stringRequired

    The Mapper Set ID can be found in the Identity Workspace Settings under Mappers.

    Query parameters
    authWsId
    string (uuid) Required

    The Authorization Workspace ID can be found in the Authorization Workspace Settings.

    Body parameters
    createMapper
    {
      "mapperId": "marketing_api_mapper",
      "displayName": "Marketing API",
      "isActive": true,
      "matchPattern": "/api/marketing/*",
      "matchType": "WILDCARDS",
      "restMethods": [
        "GET",
        "POST"
      ],
      "priority": 10,
      "isRequireIdentitySourcesFiltering": false,
      "assetTemplates": []
    }
    Expand All
    object
    mapperId
    string Required
    Max length128
    Pattern^[a-zA-Z0-9_:.-]+$
    displayName
    string Required
    Max length100
    description
    string
    Max length200
    isActive
    boolean Required
    matchPattern
    string Required
    matchType
    string Required
    Valid values[ "EXACT", "WILDCARDS", "REGEX" ]
    restMethods
    Array of string Required
    string
    Valid values[ "GET", "POST", "PUT", "PATCH", "DELETE" ]
    priority
    integer Required
    Minimum1
    Maximum9999
    isRequireIdentitySourcesFiltering
    boolean Required
    filteringType
    string
    Valid values[ "INCLUDE", "EXCLUDE" ]
    identitySourceIds
    Array of string
    string (uuid)
    assetTemplates
    Array of object (ManagedAssetTemplateApiMappingDto) Required
    object
    templateId
    string
    attributes
    Array of object (ManagedAssetTemplateAttributeDto)
    object
    attributeId
    string
    source
    string
    Valid values[ "BODY", "HEADER", "PATH", "URI_REGEX", "QUERY" ]
    path
    string
    actions
    Array of object (ManagedAssetTemplateActionDto)
    object
    actionId
    string
    source
    string
    Valid values[ "BODY", "HEADER", "METHOD", "PATH", "URI_REGEX", "QUERY" ]
    value
    string
    path
    string
    Responses
    200

    OK

    createdMapper
    {
      "data": {
        "mapperId": "marketing_api_mapper",
        "displayName": "Marketing API",
        "isActive": true,
        "matchPattern": "/api/marketing/*",
        "matchType": "WILDCARDS",
        "restMethods": [
          "GET",
          "POST"
        ],
        "priority": 10,
        "isRequireIdentitySourcesFiltering": false,
        "assetTemplates": []
      }
    }
    Expand All
    object
    data
    object (ManagedApiMapperDto)
    mapperId
    string
    Max length128
    Pattern^[a-zA-Z0-9_:.-]+$
    displayName
    string
    Max length100
    description
    string
    Max length200
    isActive
    boolean
    matchPattern
    string
    matchType
    string
    Valid values[ "EXACT", "WILDCARDS", "REGEX" ]
    restMethods
    Array of string
    string
    Valid values[ "GET", "POST", "PUT", "PATCH", "DELETE" ]
    priority
    integer
    Minimum1
    Maximum9999
    isRequireIdentitySourcesFiltering
    boolean
    filteringType
    string
    Valid values[ "INCLUDE", "EXCLUDE" ]
    identitySourceIds
    Array of string
    string (uuid)
    assetTemplates
    Array of object (ManagedAssetTemplateApiMappingDto)
    object
    templateId
    string
    attributes
    Array of object (ManagedAssetTemplateAttributeDto)
    object
    attributeId
    string
    source
    string
    Valid values[ "BODY", "HEADER", "PATH", "URI_REGEX", "QUERY" ]
    path
    string
    actions
    Array of object (ManagedAssetTemplateActionDto)
    object
    actionId
    string
    source
    string
    Valid values[ "BODY", "HEADER", "METHOD", "PATH", "URI_REGEX", "QUERY" ]
    value
    string
    path
    string
    400

    Bad Request

    Expand All
    object
    code
    string
    id
    string
    status
    integer
    name
    string
    message
    string
    args
    object
    path
    string
    401

    Unauthorized

    403

    Forbidden

    404

    Not Found

    500

    Internal Server Error