PUT restapi/personal/pages/{elementId}/contentblocks/images/{contentBlockId}/v1

Updates images content block.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
elementId

The unique identifier of the page element.

integer

Required

contentBlockId

The unique identifier of the content block.

integer

Required

Body Parameters

The image content block update request.

Itsolutions.Itslearning.Web.RestApi.Personal.Page.Requests.UpdateContentBlockImagesRequestUI
NameDescriptionTypeAdditional information
NewImages

Images to add to the content block.

Collection of Itsolutions.Itslearning.Web.RestApi.Personal.Page.PageApiModels.Requests.ImageItem

None.

DeletedImageIds

Image IDs to delete from the content block.

Collection of integer

None.

UpdatedImages

Images that should be updated in the content block.

Collection of Itsolutions.Itslearning.Web.RestApi.Personal.Page.PageApiModels.ImageMetaData

None.

ContentBlockId

The unique identifier for the content block.

integer

None.

Type

The type of the content block (e.g. "text", "image", "files", "rss", "poll"). Defaults to an empty string.

string

None.

Title

The title of the content block. Defaults to an empty string.

string

None.

Order

The display order of the content block within its Layout Zone. Lower values appear first.

integer

None.

LayoutZone

The layout zone where the content block should be placed (e.g. "Left", "Right"). Determines the positioning within the page layout.

string

None.

Color

The color of the content block.

string

None.

Request Formats

application/json, text/json

Sample:
{
  "newImages": [
    {
      "imageFile": {
        "fileRepoId": "3bf5df94-fcef-4b5b-98e0-8d1b9ce1b5e1",
        "signedFileRepoId": "sample string 2",
        "name": "sample string 3",
        "mimeType": "sample string 4"
      },
      "altText": "sample string 1",
      "caption": "sample string 2"
    },
    {
      "imageFile": {
        "fileRepoId": "bc71da7c-a645-43df-a6b1-0a8070350d6e",
        "signedFileRepoId": "sample string 2",
        "name": "sample string 3",
        "mimeType": "sample string 4"
      },
      "altText": "sample string 1",
      "caption": "sample string 2"
    }
  ],
  "deletedImageIds": [
    1,
    2
  ],
  "updatedImages": [
    {
      "imageId": 1,
      "altText": "sample string 2",
      "caption": "sample string 3"
    },
    {
      "imageId": 1,
      "altText": "sample string 2",
      "caption": "sample string 3"
    }
  ],
  "contentBlockId": 1,
  "type": "sample string 2",
  "title": "sample string 3",
  "order": 4,
  "layoutZone": "sample string 5",
  "color": "sample string 6"
}

application/xml, text/xml

Sample:
<UpdateContentBlockImagesRequestUI xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Itsolutions.Itslearning.Web.RestApi.Personal.Page.Requests">
  <Color>sample string 6</Color>
  <ContentBlockId>1</ContentBlockId>
  <LayoutZone>sample string 5</LayoutZone>
  <Order>4</Order>
  <Title>sample string 3</Title>
  <Type>sample string 2</Type>
  <DeletedImageIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>1</d2p1:int>
    <d2p1:int>2</d2p1:int>
  </DeletedImageIds>
  <NewImages xmlns:d2p1="http://schemas.datacontract.org/2004/07/Itsolutions.Itslearning.Web.RestApi.Personal.Page.PageApiModels.Requests">
    <d2p1:ImageItem>
      <d2p1:AltText>sample string 1</d2p1:AltText>
      <d2p1:Caption>sample string 2</d2p1:Caption>
      <d2p1:ImageFile>
        <d2p1:FileRepoId>3bf5df94-fcef-4b5b-98e0-8d1b9ce1b5e1</d2p1:FileRepoId>
        <d2p1:MimeType>sample string 4</d2p1:MimeType>
        <d2p1:Name>sample string 3</d2p1:Name>
        <d2p1:SignedFileRepoId>sample string 2</d2p1:SignedFileRepoId>
      </d2p1:ImageFile>
    </d2p1:ImageItem>
    <d2p1:ImageItem>
      <d2p1:AltText>sample string 1</d2p1:AltText>
      <d2p1:Caption>sample string 2</d2p1:Caption>
      <d2p1:ImageFile>
        <d2p1:FileRepoId>bc71da7c-a645-43df-a6b1-0a8070350d6e</d2p1:FileRepoId>
        <d2p1:MimeType>sample string 4</d2p1:MimeType>
        <d2p1:Name>sample string 3</d2p1:Name>
        <d2p1:SignedFileRepoId>sample string 2</d2p1:SignedFileRepoId>
      </d2p1:ImageFile>
    </d2p1:ImageItem>
  </NewImages>
  <UpdatedImages xmlns:d2p1="http://schemas.datacontract.org/2004/07/Itsolutions.Itslearning.Web.RestApi.Personal.Page.PageApiModels">
    <d2p1:ImageMetaData>
      <d2p1:AltText>sample string 2</d2p1:AltText>
      <d2p1:Caption>sample string 3</d2p1:Caption>
      <d2p1:ImageId>1</d2p1:ImageId>
    </d2p1:ImageMetaData>
    <d2p1:ImageMetaData>
      <d2p1:AltText>sample string 2</d2p1:AltText>
      <d2p1:Caption>sample string 3</d2p1:Caption>
      <d2p1:ImageId>1</d2p1:ImageId>
    </d2p1:ImageMetaData>
  </UpdatedImages>
</UpdateContentBlockImagesRequestUI>

application/x-www-form-urlencoded

Sample:
No sample available

Response Information

Resource Description

Updated image content block.

System.Web.Http.IHttpActionResult

None.

Response Formats

application/json, text/json, application/xml, text/xml

Sample:

Sample not available.