Pipeliner CRM Hybrid API

The Pipeliner API for C# supports the .NET framework 4.0 and above. It is also possible to use it in Mono. Querying in the C# library is the same as in our Rest Services.

Download

Dependencies

Methods

Method Description
deleteEntities Deletes entities with given primary key.
deleteEntity Deletes entity with given primary key.
getCollections Retrieves list of collections in the pipeline.
getEntities Retrieves list of entities in Hash.
getEntityPublic Retrieves hash of public entities.
getErrorCodes Retrieves the hash of API error codes.
getFields Returns list of fields for specific entity.
getServerAPIUtcDateTime Retrieves the current server’s UTC datetime for queried team space.
getTeamPipelineUrl Retrieves the datacenter URL for team space.
setCredentials API Password obtained from API Access in customers portal.
setEntities Creates a new entities. If ID is provided in data, then update is performed for existing entity.
setEntity Creates a new entity in collection. If ID is provided in data, then update is performed for existing entity.

deleteEntities Method

Syntax

Copy to Clipboard

Parameters

Parameter Type Required Description
teamPipeline java.lang.String M Name of team space to be used.
entity java.lang.String M Name of object.
data java.lang.String[] M Array with IDs to delete.
flag java.lang.Integer O The processing of command can be modified by combination of flags:
FLAG_ROLLBACK_ON_ERROR[0] – if any error is occurred no entity will be processed ,entire batch will be rollbacked and exception thrown.
FLAG_IGNORE_ON_ERROR[1] – it any error occures for an entity , this entity is ignored and system continues with the next one.
FLAG_GET_NO_DELETED_ID[4] – The method returns list of ID, which cannot be deleted. Could be used with combination with FLAG_IGNORE_ON_ERROR.
FLAG_IGNORE_AND_RETURN_ERRORS[8] – if any error occurs for an entity, this entity is ignored and system continues with the next one.
FLAG_VALIDATE_ONLY_UPDATED_FIELDS[256] – flag will validate only updated fields in entity instead of all fields.

Return value

Array of result for deleted entities.

Remarks

Deletes entities by provided keys.

Throws

HTTPErrorException Raises on HTTP error code from server with API error message.

Example

Copy to Clipboard

deleteEntity Method

Syntax

Copy to Clipboard

Parameters

Parameter Type Required Description
teamPipeline java.lang.String M Name of team space to be used.
entity java.lang.String M Name of object.
id java.lang.String M The unique identificator of entity.

Return value

ID of deleted entity.

Remarks

Deletes entity with given primary key.

Throws

HTTPErrorException Raises on HTTP error code from server with API error message.

Example

Copy to Clipboard

getCollections Method

Syntax

Copy to Clipboard

Parameters

Parameter Type Required Description
teamPipeline java.lang.String M Name of team space to be used.

Return value

String array of collections.

Remarks

Retrieves list of collections in the pipeline.

Throws

HTTPErrorException Raises on HTTP error code from server with API error message.

Example

Copy to Clipboard

getEntities Method

Syntax

Copy to Clipboard

Parameters

Parameter Type Required Description
teamPipeline java.lang.String M Name of team space to be used.
entityName java.lang.String M Name of object.
query java.lang.String O Params for requested entity. Query is equal to params followed after ‘?’.

Return value

JSONArray with response body.

Remarks

Retrieves list of entities in string.

Throws

HTTPErrorException Raises on HTTP error code from server with API error message.

Example

Copy to Clipboard

getEntityPublic Method

Syntax

Copy to Clipboard

Parameters

Parameter Type Required Description
teamPipeline java.lang.String M Name of team space to be used.

Return value

JSONObject with server API collections as keys and entity names as values.

Remarks

Retrieves the JSONObject list of public entities.

Throws

HTTPErrorException Raises on HTTP error code from server with API error message.

Example

Copy to Clipboard

getErrorCodes Method

Syntax

Copy to Clipboard

Parameters

Parameter Type Required Description
teamPipeline java.lang.String M Name of team space to be used.

Return value

JSONObject with server API errors as keys and string of API error codes as values.

Remarks

Retrieves the JSONOBject list of API error codes.

Throws

HTTPErrorException Raises on HTTP error code from server with API error message.

Example

Copy to Clipboard

getFields Method

Syntax

Copy to Clipboard

Parameters

Parameter Type Required Description
teamPipeline java.lang.String M Name of team space to be used.
entityName java.lang.String M Name of entity class or entity collection.
query java.lang.String O REST query string for filtering (e.g. “filter=CUSTOM::TRUE”)

Return value

JSONArray of JSONObjects which contains information about fields:

  • API_NAME – field name used in API as key.
  • CALC_FORMULA – calculated formula for autocalculated fields, or None if not set.
  • CHOICES – if dropdown or radio button, then dictionary is set with IDs of datasets as keys and their names as values, otherwise None is set.
  • CUSTOM – true if custom field, false if system field.
  • DEFAULT – default value for field. If not set, then None.
  • DESCRIPTION – description of field.
  • ID – unique identificator of field. Used as ID_FIELD in Data entity.
  • MAX_VALUE – max allowed value. For decimal types, it is maximal number, for unicode types it is maximal length of string.
  • MIN_VALUE – min allowed value for decimal an datetime types.
  • NAME – field name shown in Pipeliner.
  • PL_TYPE – Pipeliner field type.
  • READONLY – true if field is readonly, otherwise false.
  • REQUIRED – true if field is required, otherwise false.
  • TYPE – Type of field. Supported types – [string, unicode, datetime, long, Decimal, list]

Remarks

Returns list of fields for specific entity.

Throws

HTTPErrorException Raises on HTTP error code from server with API error message.

Example

Copy to Clipboard

getServerAPIUtcDateTime Method

Syntax

Copy to Clipboard

Parameters

Parameter Type Required Description
teamPipeline string M Name of team space to be used.

Return value

Datacenter URL for current team space.

Remarks

Retrieves the datacenter URL for team space.

Throws

HTTPErrorException Raises on HTTP error code from server with API error message.

Example

Copy to Clipboard

getTeamPipelineUrl Method

Syntax

Copy to Clipboard

Parameters

Parameter Type Required Description
class=”inline-code”>teamPipeline class=”inline-code”>string class=”inline-code”>M Name of team space to be used.

Return value

Datacenter URL for current team space.

Remarks

Retrieves the datacenter URL for team space.

Throws

HTTPErrorException Raises on HTTP error code from server with API error message.

Example

Copy to Clipboard

setCredentials Method

Syntax

Copy to Clipboard

Parameters

Parameter Type Required Description
username java.lang.String M API Token obtained from API Access in customers portal.
password java.lang.String M API Password obtained from API Access in customers portal.

Remarks

Sets username and password for connection.

Example

Copy to Clipboard

setEntities Method

Syntax

Copy to Clipboard

Parameters

Parameter Type Required Description
teamPipeline java.lang.String M Name of team space to be used.
entity java.lang.String M Name of object.
data java.lang.String[] M String array with serialized JSON strings as batch entities.
flag java.lang.Integer O The processing of command can be modified by combination of flags:
FLAG_ROLLBACK_ON_ERROR[0] – if any error is occurred no entity will be processed ,entire batch will be rollbacked and exception thrown.
FLAG_IGNORE_ON_ERROR[1] – it any error occures for an entity , this entity is ignored and system continues with the next one.
FLAG_GET_NO_DELETED_ID[4] – The method returns list of ID, which cannot be deleted. Could be used with combination with FLAG_IGNORE_ON_ERROR.
FLAG_IGNORE_AND_RETURN_ERRORS[8] – if any error occurs for an entity, this entity is ignored and system continues with the next one.
FLAG_VALIDATE_ONLY_UPDATED_FIELDS[256] – flag will validate only updated fields in entity instead of all fields.

Return value

Array of results for requested entities.

Remarks

Creates a new entities. If ID is provided in data, then update is performed for existing entity.

Throws

HTTPErrorException Raises on HTTP error code from server with API error message.

Example

Copy to Clipboard

setEntity Method

Syntax

Copy to Clipboard

Parameters

Parameter Type Required Description
teamPipeline java.lang.String M Name of team space to be used.
entity java.lang.String M Name of object.
data java.lang.String M Serialized JSON string with created or updated fields.

Return value

ID of created or updated entity.

Remarks

Creates a new entity in collection. If ID is provided in data, then update is performed for existing entity.

Throws

HTTPErrorException Raises on HTTP error code from server with API error message.

Example

Copy to Clipboard