Import Application
  • 24 Nov 2024
  • 2 Minutes to read
  • Dark
    Light
  • PDF

Import Application

  • Dark
    Light
  • PDF

Article summary

Post
/api/1.0/applications/{envId}

This API is designed to support CREATE and UPDATE operations to the indicated Environment. An import operation occurs when a new applicationId is used. An update operation occurs if the applicationId already exists.

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`
  • Cloud PAA - `https://api.plainid.local`

  • 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
    HeaderValuecURL Line
    Accept`text/plain;language=rego``-H "Accept:application/json"`
    Content-Type`text/plain;language=rego``-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. They will then appear in the cURL sample on the bottom of the page 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.

    Query parameters
    authWsId
    string (uuid) Required

    Authorization Workspace ID. This can be found in your Authorization Workspace Settings under Workspace ID.

    Body parameters

    Asset Template to import.

    example
    {
      "applicationId": "accountsApp",
      "displayName": "Bank Accounts Application",
      "description": "This is the Bank's Application for Accounts",
      "logoUrl": "https://logourl.com",
      "colorIndication": "#85574A",
      "assetTemplateIds": [
        "accounts",
        "loans"
      ]
    }
    object

    Application

    applicationId
    string Required

    Unique identifier for the Application.

    Min length1
    Max length128
    Pattern^[a-zA-Z0-9_:.-]+$
    displayName
    string Required

    Application Name

    Min length1
    Max length100
    description
    string

    Application Description

    Max length200
    logoUrl
    string (uri)

    Application Logo URL

    colorIndication
    string

    Application Color

    assetTemplateIds
    Array of string

    List of Asset Templates IDs that are associated with this Application.

    string
    Responses
    201

    Successful operation

    Headers
    x-request-id
    string
    The ID of the request
    example
    {
      "data": {
        "applicationId": "accountsApp",
        "displayName": "Bank Accounts Application",
        "description": "This is the Bank's Application for Accounts",
        "logoUrl": "https://logourl.com",
        "colorIndication": "#85574A",
        "assetTemplateIds": [
          "accounts",
          "loans"
        ]
      }
    }
    Expand All
    object

    Application

    data
    object (Application)

    Application

    applicationId
    string

    Unique identifier for the Application.

    Min length1
    Max length128
    Pattern^[a-zA-Z0-9_:.-]+$
    displayName
    string

    Application Name

    Min length1
    Max length100
    description
    string

    Application Description

    Max length200
    logoUrl
    string (uri)

    Application Logo URL

    colorIndication
    string

    Application Color

    assetTemplateIds
    Array of string

    List of Asset Templates IDs that are associated with this Application.

    string
    400

    Validation Error

    Headers
    x-request-id
    string
    The ID of the request
    validationError
    {
      "errors": [
        {
          "code": "APV-004",
          "args": {
            "0": "appId",
            "path": "$.id"
          },
          "id": "EBS8Z6",
          "status": "400",
          "name": "applicationIdUniquenessError",
          "message": "Application ID: [appId] 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
    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

    Was this article helpful?