Interface DataConnectionsAPI

interface DataConnectionsAPI {
    clearCache: () => void;
    createDataConnection: (
        body: ConnectionCreate | DcaasConnectionCreate,
        options?: ApiCallOptions,
    ) => Promise<CreateDataConnectionHttpResponse>;
    deleteDataConnection: (
        qID: string,
        query: { spaceId?: string; type?: "connectionname" },
        options?: ApiCallOptions,
    ) => Promise<DeleteDataConnectionHttpResponse>;
    deleteDataConnections: (
        body: ActionDeleteRequest,
        options?: ApiCallOptions,
    ) => Promise<DeleteDataConnectionsHttpResponse>;
    duplicateDataAConnection: (
        body: ActionDuplicateRequest,
        options?: ApiCallOptions,
    ) => Promise<DuplicateDataAConnectionHttpResponse>;
    getDataConnection: (
        qID: string,
        query: {
            byCredentialName?: boolean;
            credentialId?: string;
            extended?: boolean;
            noCache?: boolean;
            parseConnection?: boolean;
            spaceId?: string;
            type?: "connectionname";
        },
        options?: ApiCallOptions,
    ) => Promise<GetDataConnectionHttpResponse>;
    getDataConnections: (
        query: {
            caseinsensitive?: boolean;
            dataName?: string;
            extended?: boolean;
            filter?: string;
            includeQris?: boolean;
            limit?: number;
            locale?: string;
            noDatafiles?: boolean;
            ownedByMe?: boolean;
            owner?: string;
            page?: string;
            personal?: boolean;
            sort?: string;
            spaceId?: string;
            userId?: string;
        },
        options?: ApiCallOptions,
    ) => Promise<GetDataConnectionsHttpResponse>;
    patchDataConnection: (
        qID: string,
        query: { type?: "connectionname" },
        body: PatchRequest,
        options?: ApiCallOptions,
    ) => Promise<PatchDataConnectionHttpResponse>;
    updateDataConnection: (
        qID: string,
        query: { spaceId?: string; type?: "connectionname" },
        body: ConnectionUpdate,
        options?: ApiCallOptions,
    ) => Promise<UpdateDataConnectionHttpResponse>;
    updateDataConnections: (
        body: ActionUpdateRequest,
        options?: ApiCallOptions,
    ) => Promise<UpdateDataConnectionsHttpResponse>;
}
Index

Properties

clearCache: () => void

Clears the cache for data-connections api requests.

Type declaration

    • (): void
    • Clears the cache for data-connections api requests.

      Returns void

createDataConnection: (
    body: ConnectionCreate | DcaasConnectionCreate,
    options?: ApiCallOptions,
) => Promise<CreateDataConnectionHttpResponse>

Creates a new connection. Depending on the fields defined in the request body, credentials embedded (or associated) in the connection can be updated or created.

Type declaration

an object with the body content

CreateDataConnectionHttpError

deleteDataConnection: (
    qID: string,
    query: { spaceId?: string; type?: "connectionname" },
    options?: ApiCallOptions,
) => Promise<DeleteDataConnectionHttpResponse>

Deletes the specified data connection by ID (or by name when type=connectionname is set in query)

Type declaration

    • (
          qID: string,
          query: { spaceId?: string; type?: "connectionname" },
          options?: ApiCallOptions,
      ): Promise<DeleteDataConnectionHttpResponse>
    • Deletes the specified data connection by ID (or by name when type=connectionname is set in query)

      Parameters

      • qID: string

        Connection ID

      • query: { spaceId?: string; type?: "connectionname" }

        an object with query parameters

        • OptionalspaceId?: string

          Filtering on connections by space ID

        • Optionaltype?: "connectionname"

          The connection ID in the path becomes a connection name when this query parameter is set.

      • Optionaloptions: ApiCallOptions

      Returns Promise<DeleteDataConnectionHttpResponse>

      deleteDataConnection(
      "82ee7b44-0c4d-491b-bd38-82640c0430a5",
      {
      type: "connectionname",
      spaceId: "611bcebaeec1203d88211ac4"
      }
      )

      DeleteDataConnectionHttpError

deleteDataConnection(
"82ee7b44-0c4d-491b-bd38-82640c0430a5",
{
type: "connectionname",
spaceId: "611bcebaeec1203d88211ac4"
}
)

Connection ID

an object with query parameters

DeleteDataConnectionHttpError

deleteDataConnections: (
    body: ActionDeleteRequest,
    options?: ApiCallOptions,
) => Promise<DeleteDataConnectionsHttpResponse>

Delete multiple connections, only available to Admin

Type declaration

an object with the body content

DeleteDataConnectionsHttpError

duplicateDataAConnection: (
    body: ActionDuplicateRequest,
    options?: ApiCallOptions,
) => Promise<DuplicateDataAConnectionHttpResponse>

Duplicate a connection

Type declaration

an object with the body content

DuplicateDataAConnectionHttpError

getDataConnection: (
    qID: string,
    query: {
        byCredentialName?: boolean;
        credentialId?: string;
        extended?: boolean;
        noCache?: boolean;
        parseConnection?: boolean;
        spaceId?: string;
        type?: "connectionname";
    },
    options?: ApiCallOptions,
) => Promise<GetDataConnectionHttpResponse>

Retrieves a connection by connection ID, or by name when the query parameter "type" is set to "connectionname."

Type declaration

    • (
          qID: string,
          query: {
              byCredentialName?: boolean;
              credentialId?: string;
              extended?: boolean;
              noCache?: boolean;
              parseConnection?: boolean;
              spaceId?: string;
              type?: "connectionname";
          },
          options?: ApiCallOptions,
      ): Promise<GetDataConnectionHttpResponse>
    • Retrieves a connection by connection ID, or by name when the query parameter "type" is set to "connectionname."

      Parameters

      • qID: string

        Connection ID

      • query: {
            byCredentialName?: boolean;
            credentialId?: string;
            extended?: boolean;
            noCache?: boolean;
            parseConnection?: boolean;
            spaceId?: string;
            type?: "connectionname";
        }

        an object with query parameters

        • OptionalbyCredentialName?: boolean

          If set to true, credentialId in the query will be interpreted as credential's name

        • OptionalcredentialId?: string

          Credential ID

        • Optionalextended?: boolean

          Returns extended list of properties (e.g. encrypted credential string) when set to true.

        • OptionalnoCache?: boolean

          datafiles connections will be returned from cache by default (if data-connections is configured to use cache), this query parameter is used disable this default behavior, e.g. return an update-to-date datafiles connection if the query is set to true

        • OptionalparseConnection?: boolean

          List of connection properties shall be returned when the query is set to true, default is false

        • OptionalspaceId?: string

          Filtering on connections by space ID

        • Optionaltype?: "connectionname"

          The connection ID in the path becomes a connection name when this query parameter is set.

      • Optionaloptions: ApiCallOptions

      Returns Promise<GetDataConnectionHttpResponse>

      getDataConnection(
      "82ee7b44-0c4d-491b-bd38-82640c0430a5",
      {
      extended: false,
      type: "connectionname",
      credentialId: "22379dc5-076e-4fec-ae20-5529a8a57dc2",
      byCredentialName: false,
      spaceId: "611bcebaeec1203d88211ac4",
      noCache: false,
      parseConnection: true
      }
      )

      GetDataConnectionHttpError

getDataConnection(
"82ee7b44-0c4d-491b-bd38-82640c0430a5",
{
extended: false,
type: "connectionname",
credentialId: "22379dc5-076e-4fec-ae20-5529a8a57dc2",
byCredentialName: false,
spaceId: "611bcebaeec1203d88211ac4",
noCache: false,
parseConnection: true
}
)

Connection ID

an object with query parameters

GetDataConnectionHttpError

getDataConnections: (
    query: {
        caseinsensitive?: boolean;
        dataName?: string;
        extended?: boolean;
        filter?: string;
        includeQris?: boolean;
        limit?: number;
        locale?: string;
        noDatafiles?: boolean;
        ownedByMe?: boolean;
        owner?: string;
        page?: string;
        personal?: boolean;
        sort?: string;
        spaceId?: string;
        userId?: string;
    },
    options?: ApiCallOptions,
) => Promise<GetDataConnectionsHttpResponse>

Gets a list of connections

Type declaration

    • (
          query: {
              caseinsensitive?: boolean;
              dataName?: string;
              extended?: boolean;
              filter?: string;
              includeQris?: boolean;
              limit?: number;
              locale?: string;
              noDatafiles?: boolean;
              ownedByMe?: boolean;
              owner?: string;
              page?: string;
              personal?: boolean;
              sort?: string;
              spaceId?: string;
              userId?: string;
          },
          options?: ApiCallOptions,
      ): Promise<GetDataConnectionsHttpResponse>
    • Gets a list of connections

      Parameters

      • query: {
            caseinsensitive?: boolean;
            dataName?: string;
            extended?: boolean;
            filter?: string;
            includeQris?: boolean;
            limit?: number;
            locale?: string;
            noDatafiles?: boolean;
            ownedByMe?: boolean;
            owner?: string;
            page?: string;
            personal?: boolean;
            sort?: string;
            spaceId?: string;
            userId?: string;
        }

        an object with query parameters

        • Optionalcaseinsensitive?: boolean

          Sort results will be returned in case insensitive order if set to true (Only used along with sort query)

        • OptionaldataName?: string

          Provides an alternate name to be used for data[] element in GET response.

        • Optionalextended?: boolean

          Returns extended list of properties (e.g. encrypted credential string) when set to true.

        • Optionalfilter?: string

          Filtering resources by properties (filterable properties only) using SCIM filter string. Note the filter string only applies to connections managed by data-connections service, i.e. filtering doesn't apply to DataFile connections. When filtering on datetime property (e.g. created, updated), datetime should be in RFC3339 format.

        • OptionalincludeQris?: boolean

          Base Qri (encrypted) will be returned when the query is set to true, default is false

        • Optionallimit?: number

          Number of resources to be returned (between 1 and 100)

        • Optionallocale?: string

          ICU locale ID, used only when caseinsensitive is set to true, default to 'en' if undefined

        • OptionalnoDatafiles?: boolean

          Datafiles connections will not be returned if set to true

        • OptionalownedByMe?: boolean

          Filtering on connections, return connections owned by the caller if set to true (doesn't apply to datafiles connections)

        • Optionalowner?: string

          Filtering on datafile connections by owner (i.e. app) ID.

        • Optionalpage?: string

          Pagination cursor string, which is generated automatically in previous pagination query.

        • Optionalpersonal?: boolean

          Filtering on personal connections, ignored if spaceId is defined in same request

        • Optionalsort?: string

          Name of field sort on for pagination, with prefix with + or - indicating ascending or descending order. When used for data-connections, sort field only applies to non-datafiles connections. Whatever sorting order is, datafiles connections will be returned after all regular connections being returned.

        • OptionalspaceId?: string

          Filtering on connections by space ID

        • OptionaluserId?: string

          Filtering on userId. Requires admin role if specified userId doesn't match that is defined in JWT.

      • Optionaloptions: ApiCallOptions

      Returns Promise<GetDataConnectionsHttpResponse>

      getDataConnections(
      {
      dataName: "data",
      extended: false,
      spaceId: "611bcebaeec1203d88211ac4",
      personal: false,
      owner: "928e2a66-01ba-4678-aa32-e74c213896fa",
      ownedByMe: true,
      limit: 30,
      sort: "+qName",
      page: "page=JwAAAAljcmVhdGVkAPfQ-sx0AQAAB19pZABfb93nZcM4SN1M0e8A",
      noDatafiles: true,
      userId: "6K9xjsItDexffolu5vg1oWYkY8x7f-0G",
      caseinsensitive: true,
      locale: "en",
      includeQris: true
      }
      )

      GetDataConnectionsHttpError

getDataConnections(
{
dataName: "data",
extended: false,
spaceId: "611bcebaeec1203d88211ac4",
personal: false,
owner: "928e2a66-01ba-4678-aa32-e74c213896fa",
ownedByMe: true,
limit: 30,
sort: "+qName",
page: "page=JwAAAAljcmVhdGVkAPfQ-sx0AQAAB19pZABfb93nZcM4SN1M0e8A",
noDatafiles: true,
userId: "6K9xjsItDexffolu5vg1oWYkY8x7f-0G",
caseinsensitive: true,
locale: "en",
includeQris: true
}
)

an object with query parameters

GetDataConnectionsHttpError

patchDataConnection: (
    qID: string,
    query: { type?: "connectionname" },
    body: PatchRequest,
    options?: ApiCallOptions,
) => Promise<PatchDataConnectionHttpResponse>

Patches a connection specified by connection ID (or by name when type=connectionname is set in query).

Type declaration

    • (
          qID: string,
          query: { type?: "connectionname" },
          body: PatchRequest,
          options?: ApiCallOptions,
      ): Promise<PatchDataConnectionHttpResponse>
    • Patches a connection specified by connection ID (or by name when type=connectionname is set in query).

      Parameters

      • qID: string

        Connection ID

      • query: { type?: "connectionname" }

        an object with query parameters

        • Optionaltype?: "connectionname"

          The connection ID in the path becomes a connection name when this query parameter is set.

      • body: PatchRequest

        an object with the body content

      • Optionaloptions: ApiCallOptions

      Returns Promise<PatchDataConnectionHttpResponse>

      PatchDataConnectionHttpError

Connection ID

an object with query parameters

an object with the body content

PatchDataConnectionHttpError

updateDataConnection: (
    qID: string,
    query: { spaceId?: string; type?: "connectionname" },
    body: ConnectionUpdate,
    options?: ApiCallOptions,
) => Promise<UpdateDataConnectionHttpResponse>

Updates a connection specified by connection ID (or by name when type=connectionname is set in query). Depends on the fields defined in the request body, credentials embedded (or associated) in the connection can be updated or created.

Type declaration

    • (
          qID: string,
          query: { spaceId?: string; type?: "connectionname" },
          body: ConnectionUpdate,
          options?: ApiCallOptions,
      ): Promise<UpdateDataConnectionHttpResponse>
    • Updates a connection specified by connection ID (or by name when type=connectionname is set in query). Depends on the fields defined in the request body, credentials embedded (or associated) in the connection can be updated or created.

      Parameters

      • qID: string

        Connection ID

      • query: { spaceId?: string; type?: "connectionname" }

        an object with query parameters

        • OptionalspaceId?: string

          Filtering on connections by space ID

        • Optionaltype?: "connectionname"

          The connection ID in the path becomes a connection name when this query parameter is set.

      • body: ConnectionUpdate

        an object with the body content

      • Optionaloptions: ApiCallOptions

      Returns Promise<UpdateDataConnectionHttpResponse>

      UpdateDataConnectionHttpError

Connection ID

an object with query parameters

an object with the body content

UpdateDataConnectionHttpError

updateDataConnections: (
    body: ActionUpdateRequest,
    options?: ApiCallOptions,
) => Promise<UpdateDataConnectionsHttpResponse>

Update multiple connections, only available to Admin. When update is to change ownership of a connection, the credentials associated with the connection will NOT be transferred to the new owner, and new owner is expected to provide their own credentials for the connection.

Type declaration

an object with the body content

UpdateDataConnectionsHttpError