Maintenance Notice - PDF Generation
Dynamic PDF generation for web-based content is temporarily unavailable. This maintenance affects dynamic PDF files that are generated from either the HTML-based page or manual that you are viewing. Links that normally allow this functionality have been hidden, and will reappear as soon as the feature is restored.


Note: Access to static files, including PDF files that are not dynamically generated from our web-based content, is unaffected.

Jump to: navigation, search

Create State Extension Schema

ApiRef2.png POST /metadata/states/extensions
Available since: 8.0.200.00

Description

Creates an extension schema for state resources. Your application must create a schema which defines the state extension before this extension can be used. For instance, if your application needs to fill in feedback data in some state, the first step is to create the corresponding schema which details the lists of attributes that compose this extension. See Extension for further details.

Operation

Information.png Genesys advises to use this operation in maintenance mode, rather than in production mode.

Create State Extension Schema
ID CV.WS.SRV.META.5
Method POST
URL /metadata/states/extensions
Name   Type   Mandatory Description
Body: The Schema of the State Extension <ref>This body contains a complete Extension Schema resource, which defines the state extension to create.</ref>
name string yes The unique name of the extension. The name, which is not case-sensitive, must start with a letter to be followed with letters, numbers, or underscores (_). The name is restricted to a maximum of 26 characters. (Maximum RDBMS shared limit on creation of index.)
type token
  • "single-valued"
  • "multi-valued"
yes Extensions come in the following forms:
  • Single-valued: a single extension record is associated with a given customer.
  • Multi-valued: multiple extension records can be associated with a given customer.
attributes  Attribute Schema[] yes The array of attribute schemas.
unique string[] no Lists attributes (separated by commas) which are unique in the scope of the given state. The resource cannot include several extension records with identical values for these attributes.

<references />

Response

The Context Management Service API answers with HTTP codes for every request. The following table shows the correct response for a successful request. See HTTP Response Codes and Errors for further details on the possible codes that this operation can return.

Response
HTTP code 201
HTTP message Created
Header Location: /metadata/states/extensions/${extension-name}

where:

  • ${extension-name} is the name of the created extension.
Body { "name": "${extension-name}"}

where:

  • ${extension-name} is the name of the created extension.

Example

Operation

 POST /metadata/states/extensions
 {
  "attributes": 
    [
      {"name":"FeedbackType","type":"string","length":"10","mandatory":"true"},
      {"name":"rating","type":"integer","mandatory":"true"},
      {"name":"notes","type":"string","length":256,"mandatory":"false"}
    ],
  "name":"Feedback",
  "type":"single-valued"
 }

Result

 201 Created
 { "name": "Feedback"}
This page was last edited on November 23, 2017, at 16:01.

Feedback

Comment on this article:

blog comments powered by Disqus