Ipro Variant Configuration API documentation version v1
http://acme.company.com:52000/ipro/myIpro/api/v1
Variants
A collection of all variant information for an Ipro
Fetches all variant information for an Ipro. If the query parameter "metadata" is set to true, then only the metadata of all variants is returned.
Creates new variants for an Ipro
Deletes all of the variants for an Ipro
get /variants
Fetches all variant information for an Ipro. If the query parameter "metadata" is set to true, then only the metadata of all variants is returned.
Headers
- Accept-Language: (string - default: en)
Used to determine a user's locale. Only applied to metadata requests.
Query Parameters
- sapRequestLanguage: (string)
The SAP request language used for localization, which takes precedence over the Accept-Language header parameter.
- metadata: (boolean - default: false)
If set to true, only the metadata of the variant is returned. Metadata is always localized.
HTTP status code 200
Body
Media type: application/json
Type: object
Examples:
default:
[
{
"variantId": "var1",
"config": {
"zoomLevel": 4
},
"i18n": [
{
"lang": "en",
"mapping": [
{
"key": "colorLabel",
"text": "Color"
},
{
"key": "variantName",
"text": "variant-1-en"
},
{
"key": "variantDescription",
"text": "variant-1-desc-en"
}
]
},
{
"lang": "de",
"mapping": [
{
"key": "colorLabel",
"text": "Farbe"
},
{
"key": "variantName",
"text": "variant-1-de"
},
{
"key": "variantDescription",
"text": "variant-1-desc-de"
}
]
}
]
},
{
"variantId": "var2",
"config": {
"zoomLevel": 7
},
"i18n": [
{
"lang": "en",
"mapping": [
{
"key": "typeDimension",
"text": "Type"
},
{
"key": "variantName",
"text": "variant-2-en"
},
{
"key": "variantDescription",
"text": "variant-2-desc-en"
}
]
},
{
"lang": "de",
"mapping": [
{
"key": "typeDimension",
"text": "Typ"
},
{
"key": "variantName",
"text": "variant-2-de"
},
{
"key": "variantDescription",
"text": "variant-2-desc-de"
}
]
}
]
}
]metadata:
[
{
"variantId": "var1",
"variantName": "variant-1-en",
"variantDescription": "variant-1-desc-en"
},
{
"variantId": "var2",
"variantName": "variant-2-en",
"variantDescription": "variant-2-desc-en"
}
]HTTP status code 500
If an unforseen internal error occurs.
post /variants
Creates new variants for an Ipro
Headers
- x-csrf-token: required (string)
Body
Media type: application/json
Type: object
Example:
[
{
"variantId": "var1",
"config": {
"zoomLevel": 4
},
"i18n": [
{
"lang": "en",
"mapping": [
{
"key": "colorLabel",
"text": "Color"
},
{
"key": "variantName",
"text": "variant-1-en"
},
{
"key": "variantDescription",
"text": "variant-1-desc-en"
}
]
},
{
"lang": "de",
"mapping": [
{
"key": "colorLabel",
"text": "Farbe"
},
{
"key": "variantName",
"text": "variant-1-de"
},
{
"key": "variantDescription",
"text": "variant-1-desc-de"
}
]
}
]
},
{
"variantId": "var2",
"config": {
"zoomLevel": 7
},
"i18n": [
{
"lang": "en",
"mapping": [
{
"key": "typeDimension",
"text": "Type"
},
{
"key": "variantName",
"text": "variant-2-en"
},
{
"key": "variantDescription",
"text": "variant-2-desc-en"
}
]
},
{
"lang": "de",
"mapping": [
{
"key": "typeDimension",
"text": "Typ"
},
{
"key": "variantName",
"text": "variant-2-de"
},
{
"key": "variantDescription",
"text": "variant-2-desc-de"
}
]
}
]
}
]HTTP status code 201
Returns a json representation of the variants that were created
Body
Media type: application/json
Type: array of Variant
Items: Variant
- variantId: required (string)
- config: required (object)
- i18n: required (array of I18n)
Items: I18n
- lang: required (string)
- mapping: required (array of Translation)
Items: Translation
- key: required (string)
- text: required (string)
HTTP status code 400
If there is an error in the JSON payload.
HTTP status code 409
If there is a conflict with an already existing variant-id.
HTTP status code 500
If an unforseen internal error occurs.
A specific variant, a member of the variants collection
Fetches variant information for a specific variant-id
Updates the variant information for a specific variant-id
Deletes all nested variant resources for a given variant-id
get /variants/{variantId}
Fetches variant information for a specific variant-id
URI Parameters
- variantId: required (string)
Headers
- Accept-Language: (string - default: en)
Used to determine a user's locale.
Query Parameters
- sapRequestLanguage: (string)
The SAP request language used for localization, which takes precedence over the Accept-Language header parameter.
- metadata: (boolean - default: false)
If set to true, only the metadata of the variants is returned. Metadata is always localized
- localized: (boolean - default: false)
If set to true, only the most relevant i18n language will be returned with the result, if available.
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
"config": {
"zoomLevel": 4
},
"i18n": [
{
"lang": "en",
"mapping": [
{
"key": "colorLabel",
"text": "Color"
},
{
"key": "variantName",
"text": "variant-1-en"
},
{
"key": "variantDescription",
"text": "variant-1-desc-en"
}
]
},
{
"lang": "de",
"mapping": [
{
"key": "colorLabel",
"text": "Farbe"
},
{
"key": "variantName",
"text": "variant-1-de"
},
{
"key": "variantDescription",
"text": "variant-1-desc-de"
}
]
}
]
}HTTP status code 404
If no variant can be found, which matches the provided variant-id.
HTTP status code 500
If an unforseen internal error occurs.
put /variants/{variantId}
Updates the variant information for a specific variant-id
URI Parameters
- variantId: required (string)
Headers
- x-csrf-token: required (string)
Body
Media type: application/json
Type: object
Example:
{
"config": {
"zoomLevel": 4
},
"i18n": [
{
"lang": "en",
"mapping": [
{
"key": "colorLabel",
"text": "Color"
},
{
"key": "variantName",
"text": "variant-1-en"
},
{
"key": "variantDescription",
"text": "variant-1-desc-en"
}
]
},
{
"lang": "de",
"mapping": [
{
"key": "colorLabel",
"text": "Farbe"
},
{
"key": "variantName",
"text": "variant-1-de"
},
{
"key": "variantDescription",
"text": "variant-1-desc-de"
}
]
}
]
}HTTP status code 200
If the language was successfully added.
Body
Media type: application/json
Type: object
Properties- lang: required (string)
- mapping: required (array of Translation)
Items: Translation
- key: required (string)
- text: required (string)
HTTP status code 400
If there is an error in the json payload.
HTTP status code 404
If the provided variant-id cannot be found.
HTTP status code 409
If there is a conflict with an already existing variant-id.
HTTP status code 500
If an unforseen internal error occurs.
A JSON object that holds the Ipro-specific configuration information for a variant
Fetches the configuration for a given variant-id
get /variants/{variantId}/config
Fetches the configuration for a given variant-id
A collection of language dependant key-text translation pairs
fetches all availavle languages and their translation key-text pairs for a given variant-id.
get /variants/{variantId}/i18n
fetches all availavle languages and their translation key-text pairs for a given variant-id.
URI Parameters
- variantId: required (string)
Headers
- Accept-Language: (string - default: en)
Used to determine a user's locale.
Query Parameters
- sapRequestLanguage: (string)
The SAP request language used for localization, which takes precedence over the Accept-Language header parameter.
- localized: (boolean - default: false)
If set to true, only the most relevant i18n language will be returned with the result, if available.
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
[
{
"lang": "en",
"mapping": [
{
"key": "colorLabel",
"text": "Color"
},
{
"key": "variantName",
"text": "variant-1-en"
},
{
"key": "variantDescription",
"text": "variant-1-desc-en"
}
]
},
{
"lang": "de",
"mapping": [
{
"key": "colorLabel",
"text": "Farbe"
},
{
"key": "variantName",
"text": "variant-1-de"
},
{
"key": "variantDescription",
"text": "variant-1-desc-de"
}
]
}
]HTTP status code 404
If the provided variant-id doesn't exist or the variant has no i18n information.
HTTP status code 500
If an unforseen internal error occurs.
The i18n containing key-text pairs for a specific language.
Fetches all key-text pairs for a given variant-id and language.
Creates/updates key-text pairs for a given variant-id and language.
Deletes all key text pairs for a given variant-id and language combination.
get /variants/{variantId}/i18n/{lang}
Fetches all key-text pairs for a given variant-id and language.
URI Parameters
- variantId: required (string)
- lang: required (string)
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
"mapping": [
{
"key": "colorLabel",
"text": "Color"
},
{
"key": "variantName",
"text": "variant-1-en"
},
{
"key": "variantDescription",
"text": "variant-1-desc-en"
}
]
}HTTP status code 404
If the provided variant-id or language does not exist.
HTTP status code 500
If an unforseen internal error occurs.
put /variants/{variantId}/i18n/{lang}
Creates/updates key-text pairs for a given variant-id and language.
URI Parameters
- variantId: required (string)
- lang: required (string)
Headers
- x-csrf-token: required (string)
Body
Media type: application/json
Type: object
Example:
{
"mapping": [
{
"key": "colorLabel",
"text": "Color"
},
{
"key": "variantName",
"text": "variant-1-en"
},
{
"key": "variantDescription",
"text": "variant-1-desc-en"
}
]
}HTTP status code 200
Body
Media type: application/json
Type: array of Translation
Items: Translation
- key: required (string)
- text: required (string)
HTTP status code 400
If there is an error in the provided json payload.
HTTP status code 404
If the provided variant-id does not exist.
HTTP status code 500
If an unforseen internal error occurs.