Retrieve component variant metadata by ID

Request

Fetches component variant metadata.

Security
Bearer
Path
componentIdstringrequired

The component identifier.

Example:2492bac4-da07-4c86-87f0-9873d40e2276
componentVariantIdstringrequired

The component variant identifier.

Example:2f34355e-c52d-450e-b1b9-d4e9cbe64af2
Query
siteIdstringrequired

The site identifier.

Example:siteId=497f6eca-6276-4993-bfeb-53cbbbba6f08
environmentIdstring

The environment identifier. Defaults to "main". Currently only "main" is supported.

Example:environmentId=main
curl -i -X GET \
  'https://edge-platform.sitecorecloud.io/authoring/api/v1/components/2492bac4-da07-4c86-87f0-9873d40e2276/variant/2f34355e-c52d-450e-b1b9-d4e9cbe64af2/metadata?siteId=497f6eca-6276-4993-bfeb-53cbbbba6f08&environmentId=main' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Successful operation

Bodyapplication/json
idstring or null

The component variant identifier.

Example:"2492bac4-da07-4c86-87f0-9873d40e2276"
componentIdstring or null

The component identifier.

Example:"2492bac4-da07-4c86-87f0-9873d40e2276"
namestring or null

The component variant name.

Example:"Promo Ba"
displayNamestring or null

The component variant display name.

Example:"Promo"
codeIdstring or null

The component variant code identifier.

Example:"2492bac4-da07-4c86-87f0-9873d40e2276"
codestring or null

The component variant code.

Example:"const Greeting = () => <h1>Hello!</h1>;"
parsedCodestring or null

The parsed representation of the component variant code.

Example:"{\"type\":\"nextjs-pages\",\"code\":{\"type\":\"tsx\",\"content\":\"Hi\"},\"styles\":{\"type\":\"css-module\",\"content\":\"\"}}"
Response
{ "id": "2492bac4-da07-4c86-87f0-9873d40e2276", "componentId": "2492bac4-da07-4c86-87f0-9873d40e2276", "name": "Promo Ba", "displayName": "Promo", "codeId": "2492bac4-da07-4c86-87f0-9873d40e2276", "code": "const Greeting = () => <h1>Hello!</h1>;", "parsedCode": "{\"type\":\"nextjs-pages\",\"code\":{\"type\":\"tsx\",\"content\":\"Hi\"},\"styles\":{\"type\":\"css-module\",\"content\":\"\"}}" }