View Source Dealcloud.Data (dealcloud v0.4.0)

The Data APIs are used to minipulate records in the site.

These are the APIs that can be used to perform the following acitons:

  1. Create Entries
  2. Update Entries
  3. Query Entries
  4. Read Entries
  5. Delete Entries

Some of these APIs work with information on a Cells level. These APIs have been grouped under Cells, and they accept inputs are Key-Value, and return responses in the same manner. The cells APIs have a direct equivalent that are marked as rows. These APIs works with entries as a object. Depending on the tooling you're using one of these paradaims may be more beneficial then the other.

Link to this section Summary

Functions

Historical Data API - Retrives data values from the past. This API can be used to retreive data from deleted entries as well as data from fields that have since been updated. We do not keep audits of deleted entries, so for a deleted entry this will always return the value at time of deletion.

Get the records belonging to a view. If supply value later is enabled, this allows you to override the filter

This contains the functions for merging 2 or more entries. You're able to perform up to 100 mergest per call

Link to this section Types

Specs

auth() :: %Dealcloud.Auth{
  access_token: term(),
  client_id: term(),
  client_secret: term(),
  data_url: term(),
  expires_in: term(),
  marketing_url: term(),
  refresh_token: term(),
  schema_url: term(),
  site: term(),
  token_type: term(),
  token_url: term(),
  user_url: term()
}

Specs

history_query() :: %Dealcloud.Data.HistoryQuery{
  entries: term(),
  entryTypeId: term(),
  fields: term(),
  fromDate: term()
}

Specs

merge_request() :: %Dealcloud.Data.MergeRequest{
  entryId: term(),
  mergeEntries: term()
}

Specs

query() :: %Dealcloud.Data.Query{
  isPrivate: term(),
  limit: term(),
  overwriteEmptyValues: term(),
  query: term(),
  resolveReferenceUrls: term(),
  skip: term(),
  wrapIntoArrays: term()
}

Specs

view_filter() :: %Dealcloud.Data.ViewFilter{column: term(), value: term()}

Link to this section Functions

Link to this function

get_historical(body, config)

View Source

Specs

get_historical(history_query(), auth()) :: any()

Historical Data API - Retrives data values from the past. This API can be used to retreive data from deleted entries as well as data from fields that have since been updated. We do not keep audits of deleted entries, so for a deleted entry this will always return the value at time of deletion.

Examples

Dealcloud.Data.get_historical()
Link to this function

get_view_details(viewId, body, query, config)

View Source

Specs

get_view_details(
  integer(),
  [view_filter()],
  query(),
  auth()
) :: any()

Get the records belonging to a view. If supply value later is enabled, this allows you to override the filter

Examples

Dealcloud.Data.get_view_details(1, [], query, %Dealcloud.Auth{})
Link to this function

get_views(query, config)

View Source

Specs

get_views(
  query(),
  auth()
) :: any()

View APIs

Examples

Dealcloud.Data.get_views(%Dealcloud.Data.Query{}, %Dealcloud.Auth{})
Link to this function

merge(type, mergeRequest, config)

View Source

Specs

merge(integer(), [merge_request()], auth()) :: :ok

This contains the functions for merging 2 or more entries. You're able to perform up to 100 mergest per call

Takes the entryType as a integer Take a list of merge Requests Takes query params, must specify if it should overrite blank values Takes authentication

##Examples

alias Dealcloud.Impl.Data.Merge
mergeRequest = %Dealcloud.Data.Merge{entryId: 1, mergeEntries: [1, 2, 3]}
Merge.post(2014,[mergeRequest], %Dealcloud.Data.Query{overwriteEmptyValues: true}, %Auth{})
:ok