Overview
  • Package
  • Class
  • Tree
  • Todo

Packages

  • AddonValue
    • Interfaces
  • AdminHttpViewControllers
  • ApiV2Controllers
  • Authentication
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Strategies
  • Category
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • Customer
    • Address
    • Country
    • CountryZone
    • Interfaces
    • Storages
    • Validation
    • ValueObjects
  • Email
    • Collections
    • Entities
    • Exceptions
    • Interfaces
    • Repository
    • ValueObjects
  • Extensions
    • Customers
    • Emails
    • Helpers
    • Invoices
    • Orders
    • Serializers
    • Templates
  • Http
    • Collections
    • Exceptions
    • Factories
    • Interfaces
    • ValueObjects
  • HttpViewControllers
  • InfoBox
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
  • Invoice
    • Interfaces
    • ValueObjects
  • Loaders
    • CrossCuttingLoader
    • GXCoreLoader
    • Interfaces
  • Modules
    • Collections
    • Controllers
    • Interfaces
  • None
  • Order
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Storages
    • ValueObjects
  • Precheck
  • Product
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • ProductModule
    • Collections
    • Deleter
    • Entities
    • Factories
    • Interface
    • Interfaces
    • Reader
    • Repositories
    • Writer
  • Shared
    • ClassFinder
    • Exceptions
    • FileSystem
    • Interfaces
    • Storage
    • Types
  • SharedShoppingCart
    • Interfaces
  • Slider
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Storages
  • Statistics
    • Interfaces
  • UserConfiguration
    • Interfaces
    • Repository

Classes

  • AbstractApiV2Controller
  • AbstractImagesApiV2Controller
  • AddressesApiV2Controller
  • AttachmentsApiV2Controller
  • CategoriesApiV2Controller
  • CategoryIconsApiV2Controller
  • CategoryImagesApiV2Controller
  • CountriesApiV2Controller
  • CustomersApiV2Controller
  • DefaultApiV2Controller
  • EmailsApiV2Controller
  • HttpApiV2Controller
  • OrdersApiV2Controller
  • OrdersHistoryApiV2Controller
  • OrdersItemsApiV2Controller
  • OrdersItemsAttributesApiV2Controller
  • OrdersTotalsApiV2Controller
  • ProductImagesApiV2Controller
  • ProductsApiV2Controller
  • ProductsLinksApiV2Controller
  • ZonesApiV2Controller

Class CategoryImagesApiV2Controller

Class CategoryImagesApiV2Controller

This controller handles the Category Image file operations. The clients of the API can list, upload, rename or delete files that exist in the server.

AbstractApiV2Controller
Extended by HttpApiV2Controller
Extended by AbstractImagesApiV2Controller
Extended by CategoryImagesApiV2Controller
Package: ApiV2Controllers
Category: System
Located at Controllers/Api/v2/CategoryImagesApiV2Controller.inc.php

Methods summary

protected
# __initialize( )

Initializes API Controller

Initializes API Controller

protected string
# _getImageFolderName( )

Returns the absolute path where the image files are located.

Returns the absolute path where the image files are located.

Returns

string
Image folder name.
public
# post( )

Api

{post} /category_images Upload Category Image

Apidescription

Uploads an icon image for the categories. Make this request without the "Content-Type: application/json". Except from the file the POST request must also contain a "filename" value with the final file name.


Apierror

400-BadRequest No image file was provided or the "filename" parameter was not provided.

Apierrorexample

Error-Response (Missing image file) HTTP/1.1 400 Bad Request { "code": 400, "status": "error", "message": "No image file was provided." }


Error-Response (Missing filename parameter) HTTP/1.1 400 Bad Request { "code": 400, "status": "error", "message": "The 'filename' parameter is required and was not provided with the request." }


Apigroup

Categories

Apiname

UploadCategoryImage

Apisuccess

(Success 201) Response-Body Contains information about the uploaded file.

Apisuccessexample

{json} Success-Response { "code": 201, "status": "success", "action": "upload", "filename": "my-image-file.png" }


Apiversion

2.1.0
public
# put( )

Api

{put} /category_images Rename Image File

Apidescription

Use this method to rename an existing image file.

Apierror

400-BadRequest The body of the request was empty or the request body did not contain the oldFilename or newFilename properties, or their values were invalid.


Apierrorexample

Error-Response (Empty request body) HTTP/1.1 400 Bad Request { "code": 400, "status": "error", "message": "Category image data were not provided." }


Error-Response (Missing parameters) HTTP/1.1 400 Bad Request { "code": 400, "status": "error", "message": "This operation requires a JSON object with 'oldFilename' and 'newFilename' properties set." }


Apiexample

{json} Request-Body { "oldFilename": "my-old-image.png", "newFilename": "my-new-image.png" }


Apigroup

Categories

Apiname

RenameImageFile

Apisuccess

Response-Body Contains information about the executed operation.

Apisuccessexample

{json} Response-Body { "code": 200, "status": "success", "action": "rename", "oldFilename": "my-old-image.png", "newFilename": "my-new-image.png" }


Apiversion

2.1.0
public
# delete( )

Api

{delete} /category_images Delete Category Image

Apidescription

Removes the category image file from the server. This method will always provide a successful response even if the image file was not found.


Apierror

400-BadRequest The body of the request was empty or the request body did not contain the filename or its value was invalid.


Apierrorexample

Error-Response (Empty request body) HTTP/1.1 400 Bad Request { "code": 400, "status": "error", "message": "Category image data were not provided." }


Error-Response (Missing parameter) HTTP/1.1 400 Bad Request { "code": 400, "status": "error", "message": "This operation requires a JSON object with 'filename' properties set." }


Apiexample

{json} Request-Body { "filename": "file-to-be-deleted.png" }


Apigroup

Categories

Apiname

DeleteCategoryImage

Apisuccessexample

{json} Success-Response { "code": 200, "status": "success", "action": "delete", "filename": "file-to-be-deleted.png" }


Apiversion

2.1.0
public
# get( )

Api

{get} /category_images Get Category Images

Apidescription

Get a list of all category image files which exists in the server's filesystem through a GET request.

Apiexample

{curl} Get All Category Images curl -i --user admin@shop.de:12345 http://shop.de/api.php/v2/category_images


Apigroup

Categories

Apiname

GetCategoryImages

Apiversion

2.1.0

Overrides

AbstractImagesApiV2Controller::get

Methods inherited from HttpApiV2Controller

_linkResponse(), _locateResource(), _mapResponse(), _minimizeResponse(), _paginateResponse(), _searchResponse(), _setJsonValue(), _sortResponse(), _writeResponse()

Methods inherited from AbstractApiV2Controller

__construct()

Constants summary

Constants inherited from AbstractApiV2Controller

DEFAULT_CONTROLLER_NAME, DEFAULT_PAGE_ITEMS, DEFAULT_RATE_LIMIT, DEFAULT_RATE_RESET_PERIOD

Properties summary

Properties inherited from AbstractImagesApiV2Controller

$writeService

Properties inherited from AbstractApiV2Controller

$api, $uri

API documentation generated by ApiGen