Update Views

Prev Next
Put
/api/1.0/paa-groups/{envId}/{paaGroup}/views

This API is designed to directly update a PAA Group's Views.

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 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. They will then appear in the cURL sample on the bottom of the page in the correct format.


    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.


    '
    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.

    paaGroup
    stringRequired

    The PAA Group Name

    Query parameters
    append
    boolean

    False overwrites the Views. True adds the text parts to the existing text sections - appending the texts without overwriting them.

    Defaultfalse
    Body parameters

    Update Views Request Body

    example
    [
      {
        "type": "DDL",
        "text": "CREATE view \"post_accounts\" OPTIONS (UPDATABLE 'false') as select * from postmodel.accounts;"
      },
      {
        "type": "DDL",
        "paaId": "PAA3QK1UON1BOXS",
        "text": ""
      }
    ]
    Array of object
    object
    type
    string
    paaId
    string
    text
    string
    Responses
    200

    View Updated

    Headers
    x-request-id
    string
    Views Updated 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
    object
    type
    string
    paaId
    string
    text
    string
    meta
    object

    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

    Headers
    x-request-id
    string
    401

    Unauthorized

    Headers
    x-request-id
    string
    500

    Internal Server Error

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