Skip to main content

Content Items

Once you have defined a content type, you can add items of that type - the so called content items.

The fields of a content type in Swagger

The JSON of a content item depends on its content type. To see which fields a content type has, open the Swagger UI and authenticate with an access token: it then lists the operations for items of a specific type once more for every content type (e.g. /api/content/building), together with a model <contenttypename>ContentItemDto of its fields. See Operations and models per content type.

1. Querying content items​

Gets the content items of all inspectable content types (content types with "canBeInspected": true), regardless of their type. Items of other content types are not returned by this endpoint; use the endpoint for a specific type for them.

Required permission: ContentItems.List

Example:

GET https://dev.iclportal.com/api/content?$inlinecount=allpages&$top=20 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept-Encoding: gzip, deflate
Authorization: Bearer ..the auth_token...

The response is a JSON array of content items:

{
"result": {
"__count": 2932,
"results": [
{
"bezeichnung": "Wien, Hansonstrasse 23",
"adresse": "Hansonstrasse 23",
"ort": "Wien",
"nummer": "GB-00012",
"plz": "1100",
"contentItemId": "18c7a93c-0865-4922-af34-31d112e4d2ac",
"externalId": "OPTI-Q1",
"lastModificationTime": "2020-10-09T13:19:29.673Z",
"isDeleted": false,
"creatorUserId": null,
"creatorUser": null,
"lastModifierUserId": 2,
"lastModifierUser": "Antoine Gadget",
"title": "Wien, Hansonstrasse 23"
},
...
]
},
"targetUrl": null,
"success": true,
"error": null,
"unAuthorizedRequest": false,
"__abp": true
}

You can page through the results using the OData v3 options $top, $skip and $inlinecount. As this endpoint delivers items of all types, filtering is very limited. Only a single filter expression is supported:

  • substringof, startswith or endswith on Title or ExternalId - all three return the items whose title or external id contains the given text
  • Id eq '<contentItemId>' to get the item with that contentItemId

Any other filter expression (other fields, combinations using and/or) is silently ignored. Custom fields, while being returned by the endpoint, cannot be used to filter. A query that cannot be parsed returns 400 Bad Request.

Example:

GET https://dev.iclportal.com/api/content?$filter=substringof('hansonstrasse',tolower(Title))&$inlinecount=allpages&$top=20 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept-Encoding: gzip, deflate
Authorization: Bearer ..the auth_token...
Uppercased attribute names

Note that the property Title is uppercased in the query string. This is an OData v3 requirement.

The response is a JSON array of content items:

{
"result": {
"__count": 1,
"results": [
{
"bezeichnung": "Wien, Hansonstrasse 23",
"adresse": "Hansonstrasse 23",
"ort": "Wien",
"nummer": "GB-00012",
"plz": "1100",
"contentItemId": "18c7a93c-0865-4922-af34-31d112e4d2ac",
"externalId": "OPTI-Q1",
"lastModificationTime": "2020-10-09T13:19:29.673Z",
"isDeleted": false,
"creatorUserId": null,
"creatorUser": null,
"lastModifierUserId": 2,
"lastModifierUser": "Antoine Gadget",
"title": "Wien, Hansonstrasse 23"
}
]
},
"targetUrl": null,
"success": true,
"error": null,
"unAuthorizedRequest": false,
"__abp": true
}

2. Querying content items of a specific type​

Gets all content items of a specific type.

Required permission: ContentItems.List

Example:

GET https://dev.iclportal.com/api/content/building?$inlinecount=allpages&$top=20 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept-Encoding: gzip, deflate
Authorization: Bearer ..the auth_token...

The response is a JSON array of content items:

{
"result": {
"__count": 2932,
"results": [
{
"bezeichnung": "Wien, Hansonstrasse 23",
"adresse": "Hansonstrasse 23",
"ort": "Wien",
"nummer": "GB-00012",
"plz": "1100",
"contentItemId": "18c7a93c-0865-4922-af34-31d112e4d2ac",
"externalId": "OPTI-Q1",
"lastModificationTime": "2020-10-09T13:19:29.673Z",
"isDeleted": false,
"creatorUserId": null,
"creatorUser": null,
"lastModifierUserId": 2,
"lastModifierUser": "Antoine Gadget",
"title": "Wien, Hansonstrasse 23"
},
...
]
},
"targetUrl": null,
"success": true,
"error": null,
"unAuthorizedRequest": false,
"__abp": true
}

You can query the API using OData v3 query syntax ($filter, $orderby, $top, $skip, $inlinecount). You can filter and sort by the custom fields of the content type as well as by the internal fields ContentItemId, ExternalId, IsDeleted, LastModificationTime and InspectionId. Title can only be used if the content type defines a field named title. A query that cannot be parsed or uses an unknown field or an unsupported operator returns 400 Bad Request.

Index the fields you filter or sort by

Queries that filter or sort by custom fields that are not indexed (i.e. without "isIndexed": true) are rate limited: once the same query has been sent a certain number of times, it is refused with an error. See Rate limit on queries of non-indexed fields.

Example:

GET https://dev.iclportal.com/api/content/building?$filter=substringof('hansonstrasse',tolower(Adresse))&$inlinecount=allpages&$top=20 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept-Encoding: gzip, deflate
Authorization: Bearer ..the auth_token...
Uppercased attribute names

Note that the property Adresse is uppercased in the query string even though it must be defined lowercased in the content type. This is an OData v3 requirement.

The response is a JSON array of content items:

{
"result": {
"__count": 1,
"results": [
{
"bezeichnung": "Wien, Hansonstrasse 23",
"adresse": "Hansonstrasse 23",
"ort": "Wien",
"nummer": "GB-00012",
"plz": "1100",
"contentItemId": "18c7a93c-0865-4922-af34-31d112e4d2ac",
"externalId": "OPTI-Q1",
"lastModificationTime": "2020-10-09T13:19:29.673Z",
"isDeleted": false,
"creatorUserId": null,
"creatorUser": null,
"lastModifierUserId": 2,
"lastModifierUser": "Antoine Gadget",
"title": "Wien, Hansonstrasse 23"
}
]
},
"targetUrl": null,
"success": true,
"error": null,
"unAuthorizedRequest": false,
"__abp": true
}
use Portal UI to create query

To create the query, you can simply use the iCL Portal data grid of the given content type and specify the sorts and filters there. Then, use your browsers development tools to look at the created request in the network tab:

3. Creating a content item​

Creates a new content item. Note that only required fields need to be specified, and the title field of the content type is always required. If you create an item that references another one using a content field of type ContentItem (e.g. you create a building that belongs to some site), you can specify that site either by its contentItemId or externalId. You can also specify the contentItemId of the new item yourself. If an item with that contentItemId already exists, the request fails.

Required permission: ContentItems.Create

Example

POST https://dev.iclportal.com/api/content/building
Content-Type: application/json;charset=UTF-8
Accept-Encoding: gzip, deflate
Authorization: Bearer ..the auth_token...

{
"externalId":"HG",
"buildingname":"HG10223",
"strasse":"Hansongasse 23",
"stiege":"1",
"stock":4,
"topnr":"43",
"plz":"1010",
"ort":"Wien"
}

The response has the status code 201 Created; its Location header contains the URL of the new item (e.g. https://dev.iclportal.com/api/content/building/39d83715-b7d0-4a1e-88a7-bed24d5ab8a0). The response body is the posted json object, completed with the internal fields.

{
"buildingname":"HG10223",
"strasse":"Hansongasse 23",
"stiege":"1",
"stock":4,
"topnr":"43",
"plz":"1010",
"ort":"Wien",
"contentItemId":"39d83715-b7d0-4a1e-88a7-bed24d5ab8a0",
"_id":"a8218840-e764-46b7-a289-9e52b65cff66",
"externalId":"HG",
"lastModificationTime":"2023-03-14T12:42:41.1951367Z",
"isDeleted":false,
"creatorUserId":2,
"creatorUser":"Antoine Gadget",
"lastModifierUserId":null,
"lastModifierUser":null
}

If the item is invalid (e.g. the title field is missing, an attribute has no corresponding field in the content type, or the externalId is already used by another item), nothing is stored and the response is an error object ("success": false, HTTP status 500) that describes the problem in error.message.

4. Getting a content item​

By specifying the items internal _id, contentItemId or externalId, you can retrieve an item.

Required permission: ContentItems.View

The following requests all return the same result:

Example: using the internal _id

GET https://dev.iclportal.com/api/content/building/a8218840-e764-46b7-a289-9e52b65cff66
Content-Type: application/json;charset=UTF-8
Accept-Encoding: gzip, deflate
Authorization: Bearer ..the auth_token...

Example: using the contentItemId

GET https://dev.iclportal.com/api/content/building/39d83715-b7d0-4a1e-88a7-bed24d5ab8a0
Content-Type: application/json;charset=UTF-8
Accept-Encoding: gzip, deflate
Authorization: Bearer ..the auth_token...

Example: using the externalId

GET https://dev.iclportal.com/api/content/building/HG
Content-Type: application/json;charset=UTF-8
Accept-Encoding: gzip, deflate
Authorization: Bearer ..the auth_token...

Return:

{
"buildingname":"HG10223",
"strasse":"Hansongasse 23",
"stiege":"1",
"stock":4,
"topnr":"43",
"plz":"1010",
"ort":"Wien",
"contentItemId":"39d83715-b7d0-4a1e-88a7-bed24d5ab8a0",
"_id":"a8218840-e764-46b7-a289-9e52b65cff66",
"externalId":"HG",
"lastModificationTime":"2023-03-14T12:42:41.1951367Z",
"isDeleted":false,
"creatorUserId":2,
"creatorUser":"Antoine Gadget",
"lastModifierUserId":null,
"lastModifierUser":null
}

If no item matches, the response is 404 Not Found. If the id matches more than one item (e.g. the same externalId is used by several items), the response is 400 Bad Request and lists the matching items; use their contentItemId or _id instead.

5. Replacing a content item​

Replaces an existing content item with the provided data. All fields must be included in the request — any field that is omitted will be removed from the item. If you create an item that references another one using a content field of type ContentItem (e.g. you create a building that belongs to some site), you can specify that site either by its contentItemId or externalId. You can use the items internal _id, contentItemId or externalId to identify an item.

Required permission: ContentItems.Edit

PUT replaces all data

This is a full replacement operation. Any attributes that are not included in the request will be deleted from the item! If you only want to update specific fields, use the PATCH endpoint instead.

Example - using externalId but omitting the field strasse

PUT https://dev.iclportal.com/api/content/building/HG
Content-Type: application/json;charset=UTF-8
Accept-Encoding: gzip, deflate
Authorization: Bearer ..the auth_token...

{
"externalId":"HG",
"buildingname":"HG10223",
"stiege":"1",
"stock":4,
"topnr":"43",
"plz":"1010",
"ort":"Wien"
}

On success, the response is 200 OK with an empty body. 404 Not Found is returned if the item does not exist; an invalid item results in an error object as described for creating an item. Note that the field strasse was omitted in the request and therefore is removed from the item. Getting the item afterwards returns:

{
"buildingname":"HG10223",
"stiege":"1",
"stock":4,
"topnr":"43",
"plz":"1010",
"ort":"Wien",
"contentItemId":"39d83715-b7d0-4a1e-88a7-bed24d5ab8a0",
"_id":"a8218840-e764-46b7-a289-9e52b65cff66",
"externalId":"HG",
"lastModificationTime":"2023-03-14T12:42:41.1951367Z",
"isDeleted":false,
"creatorUserId":2,
"creatorUser":"Antoine Gadget",
"lastModifierUserId":null,
"lastModifierUser":null
}

6. Partially updating a content item​

Updates only the specified fields of an existing content item. Any fields not included in the request are left unchanged. You can use the items internal _id, contentItemId or externalId to identify an item.

Required permission: ContentItems.Edit

Use PATCH instead of PUT when updating single fields

Unlike PUT, which replaces the entire item, PATCH only modifies the fields you send. This makes it ideal for updating one or a few fields without having to resend the complete item.

Example - using externalId to update only the field strasse

PATCH https://dev.iclportal.com/api/content/building/HG
Content-Type: application/json;charset=UTF-8
Accept-Encoding: gzip, deflate
Authorization: Bearer ..the auth_token...

{
"strasse":"Karlsplatz 1"
}

The field strasse is updated to the new value. All other fields remain unchanged.

To clear a field, set it explicitly to null:

PATCH https://dev.iclportal.com/api/content/building/HG
Content-Type: application/json;charset=UTF-8
Accept-Encoding: gzip, deflate
Authorization: Bearer ..the auth_token...

{
"stiege": null
}

On success, the response is 200 OK with an empty body. If the request body is not a JSON object, the response is 400 Bad Request; if the item does not exist, 404 Not Found.

7. Deleting a content item​

Deletes an existing content item. You can use the items internal _id, contentItemId or externalId to identify an item.

Required permission: ContentItems.Delete

This is a soft delete

Content items are never actually deleted from the database to prevent data loss. Instead, their column IsDeleted is set to true and they are filtered from any future requests.

Example - using externalId

DELETE https://dev.iclportal.com/api/content/building/HG
Content-Type: application/json;charset=UTF-8
Accept-Encoding: gzip, deflate
Authorization: Bearer ..the auth_token...

The response will be empty and contain the corresponding status code:

  • 200 OK for success,
  • 400 Bad request in case you did something wrong
  • 404 Not found in case the item does not exist or was previously deleted

8. Adding/updating multiple content items at once​

This endpoint allows you to add or update multiple content items in one batch. Each item is matched against the existing items of the content type: an item that contains a contentItemId is identified by it, any other item by its externalId. In case an item is found, it is updated. If not, a new item is created (with the given contentItemId, if specified).

Required permission: ContentItems.Edit

an update replaces all data

In case an existing item is found, the update acts like a PUT operation. Any attributes that are not included in the request will be deleted from the item!

If any item has validation errors, the whole batch is rolled back and no item is added or updated. If an item references another one using a content field of type ContentItem (e.g. you create a building that belongs to some site), you can specify that site either by its contentItemId or externalId.

Example

POST https://dev.iclportal.com/api/content/building/batch
Content-Type: application/json;charset=UTF-8
Accept-Encoding: gzip, deflate
Authorization: Bearer ..the auth_token...

[
{
"externalId":"HG",
"buildingname":"HG10223",
"stiege":"1",
"stock":4,
"topnr":"43",
"plz":"1010",
"ort":"Wien"
},
{
"externalId":"LHS101",
"buildingname":"LANHS101",
"stiege":"10",
"strasse":"Landstraßer Hauptstraße",
"stock":1,
"topnr":"GO11",
"plz":"1030",
"ort":"Wien"
}
]

If all items were stored, the response is 200 OK with the following body (both lists are always empty):

{
"errored": [],
"succeeded": []
}

If any item is invalid, nothing is stored and the response is an error object (HTTP status 500) whose error.message lists the validation errors:

{
"targetUrl": null,
"result": null,
"success": false,
"error": {
"code": 0,
"message": "The field 'buildingname' is used as title field and thus required. You must provide a value",
"details": null,
"validationErrors": null
},
"unAuthorizedRequest": false,
"__abp": true
}

If the request body is not a JSON array, the response is 400 Bad Request.

9. Adding/updating multiple content items at once - ignoring errors​

This endpoint allows you to add or update multiple content items in one batch. The items are matched in the same way as in the batch endpoint: by their contentItemId if specified, otherwise by their externalId. In case an item is found, it is updated. If not, a new item is created.

Required permission: ContentItems.Edit

an update replaces all data

In case an existing item is found, the update acts like a PUT operation. Any attributes that are not included in the request will be deleted from the item!

In case of an error, the operation is continued. All valid items will be stored, only the invalid items are skipped.

For integration scenarios

This endpoint is intended for integration scenarios with tools such as SSIS or Azure Data Factory. In case of an error, you can return those e.g. per e-mail to the user in the source system, so (s)he can fix the issues of the failed items

If an item references another one using a content field of type ContentItem (e.g. you create a building that belongs to some site), you can specify that site either by its contentItemId or externalId.

Example

POST https://dev.iclportal.com/api/content/building/batchforce
Content-Type: application/json;charset=UTF-8
Accept-Encoding: gzip, deflate
Authorization: Bearer ..the auth_token...

[
{
"externalId":"HG11",
"stiege":"1",
"stock":4,
"topnr":"43",
"plz":"1010",
"ort":"Wien"
},
{
"externalId":"LHS101",
"buildingname":"LANHS101",
"stiege":"10",
"strasse":"Landstraßer Hauptstraße",
"stock":1,
"topnr":"GO11",
"plz":"1030",
"ort":"Wien"
}
]

If all items were stored, the response is 200 OK with empty lists: {"errored":[],"succeeded":[]}. If at least one item is invalid, the response is 400 Bad Request and lists the invalid items in errored - the valid items are stored nevertheless. Each invalid item is identified by its contentItemId if it was specified in the request, otherwise by its externalId (in both cases in the attribute externalId). The list succeeded is always empty.

{
"errored": [
{
"externalId": "HG11",
"error": "The field 'buildingname' is used as title field and thus required. You must provide a value"
}
],
"succeeded": []
}

If the request body is not a JSON array, the response is 400 Bad Request without a body.

10. Get changes of items of all types​

This endpoint returns all Content items regardless of their type that changed since a specific point in time. This point in time is denoted as changeToken and provided as query argument. If you omit this changeToken (or pass 0), you essentially get all content items.

Required permission: ContentItems.View

use this for incremental data synchronization

This endpoint is intended to be used in integration scenarios, where you need to synchronize content items from iCL Portal to some external system of your choice. To be as efficient as possible, it allows you to get incremental changes, so that you do not have to go through an evergrowing list of items until you run into timeouts.

The following sample shows the first request (omitting the changeToken)

GET https://dev.iclportal.com/api/content/getchanges
Content-Type: application/json;charset=UTF-8
Accept-Encoding: gzip, deflate
Authorization: Bearer ..the auth_token...

The response will include any items that changed since that point in time and will include a nextChangeToken which can be used to get the next page of changes. Alternatively you can use the nextLink.

limited to 500 results

Note that the result set is limited to 500 items per page by default (the page size can be changed in the server configuration using Api.GetChanges.PageSize). You need to page through the data if you have more items/changes.

{
"result": {
"results": [
{
"bezeichnung": "LSHS101-1030",
"adresse": "Landstraßer Hauptstraße 101",
"ort": "Wien",
"nummer": "101",
"_id": "0b6c1f0e-5d0c-4c1e-9a37-3d3a3c1f2b11",
"contentItemId": "683a34a9-b832-490a-8ab1-5d98aafc7d7f",
"externalId": "LSHS101-1030",
"lastModificationTime": "2018-11-20T15:21:43.767Z",
"isDeleted": true,
"inspectionId": null,
"$type": "gebaude"
},
{
"beschreibung": "Der DHL Bote findet den Eingang zu Opti-Q (Altstiege 2) nie",
"objektid": "683a34a9-b832-490a-8ab1-5d98aafc7d7f",
"gewerk": "Paketdienst",
"status": 0,
"frist": "2018-11-29T23:00:00Z",
"_id": "5f1d2a77-8c3e-4b0a-a1d2-6e4f9b8c7a21",
"contentItemId": "f66ba90c-819d-40c4-acdc-984220ba04b0",
"externalId": null,
"lastModificationTime": "2018-12-11T15:55:05.963Z",
"isDeleted": true,
"inspectionId": null,
"$type": "mangel"
},
...
],
"nextChangeToken": "AAAAAAADRF8",
"nextLink": "https://testportal.opti-q.com/api/content/getchanges?changeToken=AAAAAAADRF8"
},
"success": true,
"__abp": true
}

Since the content type is not specified, every result will contain a $type attribute to indicate the items content type. Once you reached the last page, the results array will be empty and the nextChangeToken will not change anymore.

If the request fails (e.g. because of an invalid changeToken or a missing permission), the response is 400 Bad Request.

this endpoint also returns deleted items

Since this endpoint is intended to be used for synchronization scenarios, it will also return deleted items. In that case, their isDeleted attribute will be true

11. Get changes of items of a specific type​

This endpoint returns all content items of the specified content type that changed since a specific point in time. This point in time is denoted as changeToken and provided as query argument. If you omit this changeToken (or pass 0), you essentially get all content items of that type.

Required permission: ContentItems.View

use this for incremental data synchronization

This endpoint is intended to be used in integration scenarios, where you need to synchronize content items from iCL Portal to some external system of your choice. To be as efficient as possible, it allows you to get incremental changes, so that you do not have to go through an evergrowing list of items until you run into timeouts.

The following sample shows the first request (omitting the changeToken)

GET https://dev.iclportal.com/api/content/building/getchanges
Content-Type: application/json;charset=UTF-8
Accept-Encoding: gzip, deflate
Authorization: Bearer ..the auth_token...

The response will include any items that changed since that point in time and will include a nextChangeToken which can be used to get the next page of changes. Alternatively you can use the nextLink.

limited to 500 results

Note that the result set is limited to 500 items per page by default (the page size can be changed in the server configuration using Api.GetChanges.PageSize). You need to page through the data if you have more items/changes.

{
"result": {
"results": [
{
"buildingname": "LSHS101-1030",
"strasse": "Landstraßer Hauptstraße 101",
"ort": "Wien",
"topnr": "101",
"_id": "0b6c1f0e-5d0c-4c1e-9a37-3d3a3c1f2b11",
"contentItemId": "683a34a9-b832-490a-8ab1-5d98aafc7d7f",
"externalId": "LSHS101-1030",
"lastModificationTime": "2018-11-20T15:21:43.767Z",
"isDeleted": true,
"inspectionId": null
},
{
"buildingname":"HG10223",
"strasse":"Hansongasse 23",
"stiege":"1",
"stock":4,
"topnr":"43",
"plz":"1010",
"ort":"Wien",
"_id":"a8218840-e764-46b7-a289-9e52b65cff66",
"contentItemId":"39d83715-b7d0-4a1e-88a7-bed24d5ab8a0",
"externalId":"HG",
"lastModificationTime":"2023-03-14T12:42:41.1951367Z",
"isDeleted":false,
"inspectionId": null
},
...
],
"nextChangeToken": "AAAAAAADRF8",
"nextLink": "https://testportal.opti-q.com/api/content/building/getchanges?changeToken=AAAAAAADRF8"
},
"success": true,
"__abp": true
}

Since the content type is specified explicitly, the items do not contain the $type attribute. Once you reached the last page, the results array will be empty and the nextChangeToken will not change anymore.

If the request fails (e.g. because the content type does not exist, the changeToken is invalid or the permission is missing), the response is 400 Bad Request.

this endpoint also returns deleted items

Since this endpoint is intended to be used for synchronization scenarios, it will also return deleted items. In that case, their isDeleted attribute will be true

Directly get to the last page

As there are no more changes, the system simply returns the latest change available, which is usually the very same change token we just used in the request.

However, you can use this mechanism to get straight to the last page of changed content items by using the highest possible change token __________8 This comes in handy, if you only want to start for getting changes from now on and do not wish to go through all the historical changes.

12. Downloading an Excel template​

This endpoint allows you to download an excel workbook which can be used to import content items to iCL Portal. For this, fill in the workbook and drag-and-drop it into any content item datagrid, or upload it using the import endpoint.

Required permission: ContentItems.View

Example

GET https://dev.iclportal.com/api/content/building/template/excel
Authorization: Bearer ..the auth_token...

The response is the file building_import_template.xlsx (the name of the content type followed by _import_template.xlsx).

keeps non specified columns

In case one of the imported items already exists, the items properties will be updated with the values coming from the import file. In case a column is not specified, the field will not be deleted from the item, but simply not touched. This allows you to update only specific fields of a content item without deleting anything else that is not specified!

Note that every row must have a value in the column ExternalId or Id (the contentItemId). This is to ensure, that users do not accidentally upload the same Excel workbook multiple times and end up with duplicated data!

13. Importing content items from Excel​

Uploads a filled-in Excel workbook (created using the Excel template or the Excel export) to import content items. The workbook is sent as multipart/form-data. Each sheet of the workbook is imported into the content type with the same name, so one workbook can contain items of several content types. To import images as well, upload a .zip file that contains the workbook and the images, as created by the Excel export with includeImages=true.

Required permissions: ContentItems.Create, ContentItems.Edit and ContentItems.Delete (all three)

Example

POST https://dev.iclportal.com/api/content/import
Content-Type: multipart/form-data; boundary=----boundary
Authorization: Bearer ..the auth_token...

------boundary
Content-Disposition: form-data; name="file"; filename="building_import_template.xlsx"
Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

...file content...
------boundary--

The response is 200 OK as soon as the file was uploaded. The import itself runs in the background: it only stores the items if the whole workbook is valid. Otherwise, the errors are written as comments into the workbook and no item is imported. The result of the import is shown in the iCL Portal user interface; the API response does not contain it.

14. Exporting content items to Excel​

Exports the content items of a content type to an Excel workbook, which can be edited and imported again.

Required permission: ContentItems.Export

ParameterDescription
includeImagesRequired. false returns an Excel workbook (.xlsx); true returns a .zip file that contains the workbook and the images of the items.

You can restrict and sort the exported items using the same OData v3 $filter and $orderby options as for querying content items of a specific type.

Example

GET https://dev.iclportal.com/api/content/building/export?includeImages=false
Authorization: Bearer ..the auth_token...

The response is the file building.xlsx (or building.zip if includeImages=true).

15. Getting changes since a date (obsolete)​

Obsolete

GET /api/contentsync/{contentTypeName}/{dateStr} is obsolete. Use Get changes of items of a specific type instead.

Returns the content items of a content type - including deleted items - that changed since the date dateStr (in UTC, format yyyyMMddTHHmmss, e.g. 20200112T103055). The response has the same format as querying content items of a specific type.

Required permission: ContentItems.List