Get Views

Prev Next
Get
/api/1.0/paa-groups/{envId}/{paaGroupId}/views

This API call is designed to retrieve the Views (the virtual model) of a PAA Group. The response has one item without paaId, which holds the Views for all of the PAAs in the group, and one item for each PAA in the group (with its paaId).

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"`

    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
    stringRequired

    The Environment ID (a UUID). You can find it in the Details tab of the Environment Settings. If your PAA is installed on the Tenant level, use - as the envId.

    Example2d4a0591-dfe4-45fb-8a69-d183f5c75c0d
    paaGroupId
    stringRequired

    The PAA Group ID, as the List PAA Groups API returns it in id.

    Examplepaa1
    Responses
    200

    Views Retrieved

    Headers
    x-request-id
    string
    The ID of the request. Give it to PlainID Support when you report a problem.
    Views Retrieved Successfully
    {
      "data": [
        {
          "type": "DDL",
          "text": "CREATE view \"post_accounts\" OPTIONS (UPDATABLE 'false') as select * from postmodel.accounts;"
        },
        {
          "type": "DDL",
          "paaId": "PAA3QK1UON1BOXS",
          "text": ""
        }
      ],
      "meta": {
        "total": 2,
        "limit": 2,
        "offset": 0
      }
    }
    Expand All
    object
    data
    Array of object (PaaView)
    object
    type
    string

    The Teiid metadata type of text. The Views are DDL. The Update Views API ignores this value.

    Valid values[ "DDL", "NATIVE", "DDL-FILE", "UDF" ]
    Default"DDL"
    paaId
    string

    Add your Agent ID from your PAA card. See the PAA Cards section for more information

    Pattern^PAA[0-9A-Z]{11,13}$
    ExamplePAA3QK1UON1BOXS
    text
    string

    The Views as Teiid DDL, for example CREATE VIEW "post_accounts" OPTIONS (UPDATABLE 'false') AS SELECT * FROM postmodel.accounts;. An empty string means no Views.

    Max length1000000
    meta
    object (meta)

    Response Meta

    total
    integer

    Total number of records

    limit
    integer

    Limit the number of records returned

    offset
    integer

    The starting point for return of records

    400

    Bad Request. The request is not valid, or the PAAs could not deploy the change.

    Headers
    x-request-id
    string
    The ID of the request. Give it to PlainID Support when you report a problem.
    Source name already exists
    {
      "errors": [
        {
          "code": "PIP-019",
          "id": "EQ7CMX",
          "status": 400,
          "name": "BaseError",
          "message": "Source with name mockrest already exists"
        }
      ]
    }
    Body sourceId on create
    {
      "errors": [
        {
          "code": "",
          "id": "EQ7CMX",
          "status": 400,
          "name": "BadRequestError",
          "message": "sourceId must be null"
        }
      ]
    }
    PAA not in the PAA Group
    {
      "errors": [
        {
          "code": "",
          "id": "EQ7CMX",
          "status": 400,
          "name": "BaseError",
          "message": "paaId: PAA3QK1UON1BOXS is not belong to paaGroupId: PAG1WMX530NXUKG"
        }
      ]
    }
    Views count mismatch
    {
      "errors": [
        {
          "code": "",
          "id": "EQ7CMX",
          "status": 400,
          "name": "BadRequestError",
          "message": "Metadata count mismatch"
        }
      ]
    }
    Expand All
    object
    errors
    Array of object (Error)
    object
    code
    string
    id
    string
    status
    integer
    name
    string
    message
    string
    args
    object
    path
    string
    401

    The bearer token or the Client ID and Client Secret are missing or not valid.

    Headers
    WWW-Authenticate
    string
    InvalidToken

    Missing or invalid bearer token

    {
      "message": "Invalid or missing authentication token"
    }
    object

    The error returned by AuthZen endpoints, with a single message describing what went wrong. AuthZen endpoints use this format instead of the errors array returned by other Runtime APIs.

    message
    string

    The error message

    ExampleMissing mandatory field: resource
    403

    Forbidden. The access token does not have the permission for this operation on the Environment (or on the Tenant, when envId is -).

    Headers
    x-request-id
    string
    The ID of the request. Give it to PlainID Support when you report a problem.
    Expand All
    object
    errors
    Array of object (Error)
    object
    code
    string
    id
    string
    status
    integer
    name
    string
    message
    string
    args
    object
    path
    string
    404

    Not Found. The Environment, the PAA Group, the Source, the Views or the translator type does not exist.

    Headers
    x-request-id
    string
    The ID of the request. Give it to PlainID Support when you report a problem.
    PAA Group not found
    {
      "errors": [
        {
          "code": "HBC-021",
          "id": "EQ7CMX",
          "status": 404,
          "name": "PaaGroupNotFoundError",
          "message": "PAA Group does not exist"
        }
      ]
    }
    Environment not found
    {
      "errors": [
        {
          "code": "APIV-022",
          "id": "EQ7CMX",
          "status": 404,
          "name": "EnvironmentNotExistError",
          "message": "Environment ID: [not-a-uuid] does not exist"
        }
      ]
    }
    Source not found
    {
      "errors": [
        {
          "code": "",
          "id": "EQ7CMX",
          "status": 404,
          "name": "NotFoundError",
          "message": "source not found"
        }
      ]
    }
    Expand All
    object
    errors
    Array of object (Error)
    object
    code
    string
    id
    string
    status
    integer
    name
    string
    message
    string
    args
    object
    path
    string
    500

    An internal error occurred, or a dependency such as the cache or an Identity Source failed while processing the request.

    CacheUnavailable

    Cache unavailable

    {
      "message": "Unable to connect to Redis cache service"
    }
    IdentitySourceUnavailable

    Identity Source unavailable

    {
      "message": "PIP unreachable"
    }
    InternalError

    Internal error

    {
      "message": "Internal error while evaluating the request"
    }
    object

    The error returned by AuthZen endpoints, with a single message describing what went wrong. AuthZen endpoints use this format instead of the errors array returned by other Runtime APIs.

    message
    string

    The error message

    ExampleMissing mandatory field: resource

    © 2024 PlainID LTD. All rights reserved.