Meta include

Many times you need to apply some general level css or javescript files, tracking code snippets and etc. All this is done by the meta include. Have in mind that this functionality is only available for the root group administrators. The group administrators on lower levels, have the option to manage only the meta data, which is another content item

Method: list

Authorization is required.

Request

HTTP request

GET https://<YOUR_DOMAIN>/api/v1/en_US/meta-include/list

Parameters

Do not supply a request parameters with this method.

Request body

Do not supply a request body with this method.

Response

If successful, this method returns a response JSON with the following structure:

{
  "success": true,
  "message": "Pariatur occaecat dolor anim voluptate qui.",
  "timestamp": "2014-03-03T23:20:23Z",
  "errors": [],
  "object": {
    "offset": 0,
    "includes": [
      {
        "id": 1,
        "type": "metaInclude",
        "name": "Script snippet",
        "typeId": 2,
        "typeName": "css",
        "groups": [
          {
            "id": "e532e792-4101-4ef5-8cd7-68380bbbc703",
            "name": "home",
            "slug": "Home",
            "thumbUrl": "http://demo.hivesocialnow.com/logo/72_635267855582630000.png",
            "url": "http://demo.hivesocialnow.com/Home/"
          }
        ],
        "groupSelectionId": 4,
        "groupSelectionName": "selected",
        "placementId": 1,
        "placementName": "top",
        "position": 1,
        "content": "body .css {color:#333;}",
        "filePath": null,
        "accessWarnings": []
      }
    ]
  }
}

The general response properties are described on the Response format page. Here are the list of the specific properties for this method.

property value description
id integer The meta include Id
name string the name / description of the meta include
typeId integer The id of the meta include type. The alternatives are:
  • 1 - script
  • 2 - css
  • 3 - html
typeName string the human readable label of the include type as defined above
groups list (object) list of all groups that this include will apply to, if the groupSelectionId equals 4 (selected groups only). If it equals any other value, this property will be ignored.
groupSelectionId integer in which groups pages to inject this include. The alternatives are:
  • 1 - all. The include will be injected in all groups.
  • 2 - private. The include will be injected only in private groups.
  • 3 - premium. The include will be injected only in groups subscribed to premium packages.
  • 4 - selected. The include will be injected only in the groups that are contained in the groups property list.
groupSelectionName string the human readable label of the include group selection as defined above.
placementId integer where to inject the include. The alternatives are:
  • 1 - top. In the page's HTML head
  • 2 - bottom. Before the page's HTML body closing tag.
placementName string the human readable label of the include placement.
position integer Where to place this include in the include's list, on what place
content string the includes content, when content is included. This property alternates with the "filePath" property, which means that if it has value, the "filePath" property will be null
filePath string the includes file url, when file is included. This property alternates with the "content" property, which means that if it has value, the "content" property will be null

Method: create

Authorization is required.

Request

HTTP request

POST https://<YOUR_DOMAIN>/api/v1/en_US/meta-include

Parameters

Do not supply a request parameters with this method.

Request body

property value description
name string the name / description of the meta include
typeId integer The id of the meta include type. The alternatives are:
  • 1 - script
  • 2 - css
  • 3 - html
groups list (guid) list of all groups ids that this include will apply to, if the groupSelectionId equals 4 (selected groups only). If it equals any other value, this property will be ignored.
groupSelectionId integer in which groups pages to inject this include. The alternatives are:
  • 1 - all. The include will be injected in all groups.
  • 2 - private. The include will be injected only in private groups.
  • 3 - premium. The include will be injected only in groups subscribed to premium packages.
  • 4 - selected. The include will be injected only in the groups that are contained in the groups property list.
placementId integer where to inject the include. The alternatives are:
  • 1 - top. In the page's HTML head
  • 2 - bottom. Before the page's HTML body closing tag.
position integer Where to place this include in the include's list, on what place
content string the includes content, when content is included. This property alternates with the "filePath" property, which means that if it has value, the "filePath" property will be null
filePath string the includes file url, when file is included. This property alternates with the "content" property, which means that if it has value, the "content" property will be null

Response

If successful, this method returns a response JSON with the following structure:

{
  "timestamp": "2014-03-03T23:20:23Z",
  "success": false,
  "message": "Aliqua anim consequat amet cupidatat proident amet amet.",
  "errors": [
    {
      "key": "content",
      "value": "",
      "message": "Content cannot be blank"
    }
  ],
  "object": {
    "id": 1,
    "type": "metaInclude",
    "name": "Nisi proident tempor 11",
    "typeId": 2,
    "typeName": "css",
    "groups": [
      {
        "id": "4bdf61a1-9021-46fe-bf92-cfb4026ab4f2",
        "name": "private-sub",
        "slug": "PrivateSub",
        "thumbUrl": "http://demo.hivesocialnow.com/logo/72_635267855582630000.png",
        "url": "http://demo.hivesocialnow.com/Home/"
      }
    ],
    "groupSelectionId": 1,
    "groupSelectionName": "selected",
    "placementId": 2,
    "placementName": "bottom",
    "position": 1,
    "content": "Nisi proident tempor 111",
    "filePath": null,
    "accessWarnings": []
  }
}

The general response properties are described on the Response format page. Here are the list of the specific properties for this method.

property value description
success Boolean Whether the requested operation is successful or not
message String Human readable error information
errors List (object) List of validation errors, if any. The "key" property value is matched to one of the record's fields
object object The object that caused the validation errors or that was created. Have in mind that, if the server requires string trimming or data manipulation after the user submission, it is applied in this object. In this way the returned object can differe from the posted one.

Method: update

Authorization is required.

Request

HTTP request

PUT https://<YOUR_DOMAIN>/api/v1/en_US/meta-include/{includeId}

Parameters

property value description
includeId integer In id of the updated record

Request body

property value description
name string the name / description of the meta include
typeId integer The id of the meta include type. The alternatives are:
  • 1 - script
  • 2 - css
  • 3 - html
groups list (guid) list of all groups ids that this include will apply to, if the groupSelectionId equals 4 (selected groups only). If it equals any other value, this property will be ignored.
groupSelectionId integer in which groups pages to inject this include. The alternatives are:
  • 1 - all. The include will be injected in all groups.
  • 2 - private. The include will be injected only in private groups.
  • 3 - premium. The include will be injected only in groups subscribed to premium packages.
  • 4 - selected. The include will be injected only in the groups that are contained in the groups property list.
placementId integer where to inject the include. The alternatives are:
  • 1 - top. In the page's HTML head
  • 2 - bottom. Before the page's HTML body closing tag.
position integer Where to place this include in the include's list, on what place
content string the includes content, when content is included. This property alternates with the "filePath" property, which means that if it has value, the "filePath" property will be null
filePath string the includes file url, when file is included. This property alternates with the "content" property, which means that if it has value, the "content" property will be null

Response

If successful, this method returns a response JSON with the following structure:

{
  "timestamp": "2014-03-03T23:20:23Z",
  "success": false,
  "message": "Aliqua anim consequat amet cupidatat proident amet amet.",
  "errors": [
    {
      "key": "content",
      "value": "",
      "message": "Content cannot be blank"
    }
  ],
  "object": {
    "id": 1,
    "type": "metaInclude",
    "name": "Nisi proident tempor 11",
    "typeId": 2,
    "typeName": "css",
    "groups": [
      {
        "id": "4bdf61a1-9021-46fe-bf92-cfb4026ab4f2",
        "name": "private-sub",
        "slug": "PrivateSub",
        "thumbUrl": "http://demo.hivesocialnow.com/logo/72_635267855582630000.png",
        "url": "http://demo.hivesocialnow.com/Home/"
      }
    ],
    "groupSelectionId": 1,
    "groupSelectionName": "selected",
    "placementId": 2,
    "placementName": "bottom",
    "position": 1,
    "content": "Nisi proident tempor 111",
    "filePath": null,
    "accessWarnings": []
  }
}

The general response properties are described on the Response format page. Here are the list of the specific properties for this method.

property value description
success Boolean Whether the requested operation is successful or not
message String Human readable error information
errors List (object) List of validation errors, if any. The "key" property value is matched to one of the record's fields
object object The object that caused the validation errors or that was updated. Have in mind that, if the server requires string trimming or data manipulation after the user submission, it is applied in this object. In this way the returned object can differe from the posted one.

Method: delete

Authorization is required.

Request

HTTP request

DELETE https://<YOUR_DOMAIN>/api/v1/en_US/meta-include/{includeId}

Parameters

property value description
includeId integer In id of the updated record

Request body

Do not supply a request body with this method.

Response

If successful, this method returns a response JSON with the following structure:

{
  "timestamp": "2014-03-03T23:20:23Z",
  "success": false,
  "message": "Aliqua anim consequat amet cupidatat proident amet amet.",
  "errors": [
    {
      "key": "content",
      "value": "",
      "message": "Content cannot be blank"
    }
  ],
  "object": {
    "id": 1,
    "type": "metaInclude",
    "name": "Nisi proident tempor 11",
    "typeId": 2,
    "typeName": "css",
    "groups": [
      {
        "id": "4bdf61a1-9021-46fe-bf92-cfb4026ab4f2",
        "name": "private-sub",
        "slug": "PrivateSub",
        "thumbUrl": "http://demo.hivesocialnow.com/logo/72_635267855582630000.png",
        "url": "http://demo.hivesocialnow.com/Home/"
      }
    ],
    "groupSelectionId": 1,
    "groupSelectionName": "selected",
    "placementId": 2,
    "placementName": "bottom",
    "position": 1,
    "content": "Nisi proident tempor 111",
    "filePath": null,
    "accessWarnings": []
  }
}

The general response properties are described on the Response format page. Here are the list of the specific properties for this method.

property value description
success Boolean Whether the requested operation is successful or not
message String Human readable error information
errors List (object) This list very rarely contains records during delete method processing
object object The object that was deleted