Create Images
post
Create Images
Allow the creation of a Image metadata.
Approach is to create a Library using Create Library API and retrieve the libraryUuid, prior to creating a Image metadata. Once the Image metadata has been created, proceed to upload the image asset using Upload Media Files API.
To create successfully, the following input parameters are mandatory: name, category, subCategory, tags, libraryUuid and mediaType.
Approach is to create a Library using Create Library API and retrieve the libraryUuid, prior to creating a Image metadata. Once the Image metadata has been created, proceed to upload the image asset using Upload Media Files API.
To create successfully, the following input parameters are mandatory: name, category, subCategory, tags, libraryUuid and mediaType.
Resource URL
https://api.stb.gov.sg/media-management /images/v2
Header Parameters
Name | Values | Description |
---|---|---|
Content-Type
(required) |
Format of the request body sent. Accepts only application/json. |
Example
JSON which holds all the properties of the Image to be created
Request Attributes
Parameter Name | Type | Max Length | Description | Example |
---|---|---|---|---|
name | string | 255 | Name of image. Mandatory | TIH Image |
tags | array | Tags pertaining to the record. Refer to Tags. Mandatory Validation: acceptable tag value(s) | ||
category | string | 255 | Image category. Refer to Dataset. Mandatory Validation: valid category | attractions |
subCategory | string | 255 | Image subcategory. Refer to the respective media sub-categories of each media category. Mandatory Validation: valid sub-category correspond to media category. | adventure |
description | string | 255 | An overview to help visitors understand the key features of the image. | Passion Singapore. Image by John Tan |
url | string | 255 | File url. | https://tih.com/media/10091bdbdc579094039b8cf390b04d694f6 |
libraryUuid | string | 255 | Library uuid for the image to be uploaded to. Mandatory Validation: valid library uuid | |
mediaType | string | 255 | Image media type. Mandatory Validation: media type value, i.e. "image" | image |
Response Error Details
HTTP Code | Description |
---|---|
400 | Bad Request — Request was not accepted and could be due to malformed parameter (e.g. spelling error) or missing a required parameter. |
401 | Unauthorised — API key is invalid or was not provided. |
403 | Forbidden — API key does not have the permission to perform the request. |
404 | Resource Not Found — Requested resource (i.e. the resource URL) does not exist. |
405 | Method Not Allowed — The HTTP request method is not supported by the resource. |
406 | Not Acceptable — Requester's acceptable content type for the response does not match the content type returned by the resource. |
414 | Request URL Too Long — Request URL exceeded the maximum acceptable URL length. |
415 | Unsupported Media Type — Request's format is not supported by the resource. |
422 | Unprocessable Entity — Request was not accepted, often due to semantic errors, such as data format. |
500 | Server Errors — Something is not working on TIH's end, happened very rarely. |
Resource Summary
Security | Content Type | Category |
---|---|---|
OAuth 2.0 |
application/json |
Images |
Working...
JSON which holds all the properties of the Image to be created