Open2b versione 7.5

blog-tags

blog-tags.find

Returns the blog tags that meet the given conditions.

Request

Admin SDK
Admin.api('site.blog-tags.find', request, function(response) { … });
HTTP POST
/api/v10/site.blog-tags.find
{
  "conditions" : { // returns only the blog tags …
    "ids" : [ 12, 71, … ], // … with these identifiers - int(1…)
    "after" : 22 // … with identifier after this - int(0…)
  },
  "language" : "en", // language ( ISO code ) of the texts to return - string(2)
  "fields" : [ "id", "name", "content", … ], // fields to return - string
  "order" : [ "name" ], // sort order of returned blog tags, can contain "id", "-id", "name", "-name"
  "limit" : 10, // maximum number of blog tags to return - int(1…)
  "first" : 30 // index of the first tag to return - int(0…)
}

Response

{
  "status" : "ok",
  "tags" : [ {
    "id" : 71, // identifier - int(1…)
    "name" : { // name - string(2) -> string(0…60)
      "en": "",
      "it": "",
    },
    "content" : { // content as HTML - string(2) -> string(0…65535)
      "en" : "Our company...",
      "it" : "La nostra azienda...",
      …
    },
    "seoTitle" : { // title for SEO - string(2) -> string(0…255)
      "en" : "…",
      "it" : "…",
      …
    },
    "seoDescription" : { // description for SEO - string(2) -> string(0…255)
      "en" : "…",
      "it" : "…",
      …
    },
    "canonicalURL" : { // canonical URL - string(2) -> string(10…)
      "en" : "https://…",
      "it" : "https://…",
      …
    },
    "image" : { // image (can be null)
      "url" : "https://…", // url - string(53..255)
      "width" : 350, // width in pixels - int(1..2500)
      "height" : 200 // height in pixels - int(1..2500)
    }
  }, … ]
}

blog-tags.get

Returns a blog tag given its identifier.

Request

Admin SDK
Admin.api('site.blog-tags.get', request, function(response) { … });
HTTP POST
/api/v10/site.blog-tags.get
{
  "id" : 71, // identifier of the blog tag (required) - int(1…)
  "language" : "en", // language ( ISO code ) of the texts to return - string(2)
  "fields" : [ "id", "name", … ] // fields to return - string
}

Response

{
  "status" : "ok",
  "tag" : { // (can be null)
    "id" : 71, // identifier - int(1…)
    "name" : { // name - string(2) -> string(0…60)
      "en": "",
      "it": "",
    },
    "content" : { // content as HTML - string(2) -> string(0…65535)
      "en" : "Our company...",
      "it" : "La nostra azienda...",
      …
    },
    "seoTitle" : { // title for SEO - string(2) -> string(0…255)
      "en" : "…",
      "it" : "…",
      …
    },
    "seoDescription" : { // description for SEO - string(2) -> string(0…255)
      "en" : "…",
      "it" : "…",
      …
    },
    "canonicalURL" : { // canonical URL - string(2) -> string(10…)
      "en" : "https://…",
      "it" : "https://…",
      …
    },
    "image" : { // image (can be null)
      "url" : "https://…", // url - string(53..255)
      "width" : 350, // width in pixels - int(1..2500)
      "height" : 200 // height in pixels - int(1..2500)
    }
  }
}

blog-tags.count

Number of blog tags that meet the given conditions.

Request

Admin SDK
Admin.api('site.blog-tags.count', request, function(response) { … });
HTTP POST
/api/v10/site.blog-tags.count
{
  "conditions" : { // returns only the blog tags …
    "ids" : [ 12, 71, … ], // … with these identifiers - int(1…)
    "after" : 22 // … with identifier after this - int(0…)
}

Response

{
  "status" : "ok",
  "count" : 83 // number of blog tags - int(0…)
}

blog-tags.create

Creates a new blog tag.

Request

Admin SDK
Admin.api('site.blog-tags.create', request, function(response) { … });
HTTP POST
/api/v10/site.blog-tags.create
{
  "tag" : { // blog tag to create (required) 
    "name" : { // name - string(2) -> string(0…60)
      "en": "",
      "it": "",
      …
    },
    "content" : { // content as HTML - string(2) -> string(0…65535)
      "en" : "Our company...",
      "it" : "La nostra azienda...",
      …
    },
    "seoTitle" : { // title for SEO - string(2) -> string(0…255)
      "en" : "…",
      "it" : "…",
      …
    },
    "seoDescription" : { // description for SEO - string(2) -> string(0…255)
      "en" : "…",
      "it" : "…",
      …
    },
    "image" : { // image (can be null)
      "name" : "page.jpg", // file name - string(1…255)
      "content" : "N3R…zaA==" // content encoded in Base64 - string
    },
}

Response

{
  "status" : "ok",
  "id" : 71 // identifier of the blog post - int(1…)
}

Errors

Field Type Description
image Malformed File format is not a valid or supported format
image Malformed File size can not be greater than 2 MB
image Malformed Image width and height must be less than 2500 pixel

blog-tags.update

Updates a tag. Any fields left out of the request will remain unchanged.

Request

Admin SDK
Admin.api('site.blog-tag.update', request, function(response) { … });
HTTP POST
/api/v10/site.blog-tag.update
{
  "id" : 71, // identifier of the blog tag to update (required) - int(1…)
  "tag" : { // blog tag to update (required) 
    "name" : { // name - string(2) -> string(0…60)
      "en" : "",
      "it" : "",
      …
    },
    "content" : { // content as HTML - string(2) -> string(0…65535)
      "en" : "Our company...",
      "it" : "La nostra azienda...",
      …
    },
    "seoTitle" : { // title for SEO - string(2) -> string(0…255)
      "en" : "…",
      "it" : "…",
      …
    },
    "seoDescription" : { // description for SEO - string(2) -> string(0…255)
      "en" : "…",
      "it" : "…",
      …
    },
    "image" : { // image (can be null)
      "name" : "page.jpg", // file name - string(1…255)
      "content" : "N3R…zaA==" // content encoded in Base64 - string
    },
}

Response

{
  "status" : "ok"
}

Errors

Field Type Description
id NotFound Blog tag <id> does not exist
image Malformed File format is not a valid or supported format
image Malformed File size can not be greater than 2 MB
image Malformed Image width and height must be less than 2500 pixel

blog-tags.delete

Deletes one o more blog tags.

Request

Admin SDK
Admin.api('site.blog-tags.delete', request, function(response) { … });
HTTP POST
/api/v10/site.blog-tags.delete
{
  "ids" : [ 12, 71, … ] // identifiers of the blog tags to delete (required) - int(1…)
}

Response

{
  "status" : "ok"
}