Create Task Extension Schema
POST /metadata/tasks/extensions | |
Available since: 8.0.200.00
|
Description
Creates an extension schema for task resources. Your application must create a schema which defines the task extension before this extension can be used. For instance, if your application needs to fill in feedback data in some task, the first step is to create the corresponding schema which details the lists of attributes that compose the new extension. Then, once the schema is created, your application can use the extension records in task resources which fulfill the extension schema. See Extension for further details. Your application can create the extension schema when the UCS is in Production mode, but Genesys recommends to create extensions when the server is in maintenance mode.
Operation
ID | CV.WS.SRV.META.7 | ||
---|---|---|---|
Method | POST | ||
URL | /metadata/tasks/extensions | ||
Name | Type | Mandatory | Description |
Body: The Schema of the Task Extension <ref>This body contains a complete Extension Schema resource, which defines the content of the task extension.</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
|
yes | Extensions come in the following forms:
|
attributes | Attribute Schema[] | yes | The array of attributes that compose the extension. |
unique | string[] | no | Lists attributes (separated by commas) which are unique in the scope of a given task. 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.
HTTP code | 201 |
---|---|
HTTP message | Created |
Header | Location: /metadata/tasks/extensions/${extension-name}
where:
|
Body | { "name": "${extension-name}"}
where:
|
Example
Operation
POST /metadata/tasks/extensions [ { "attributes": [ {"name":"url","type":"string","length":"1024","mandatory":"true"}, {"name":"question1","type":"integer","mandatory":"true"}, {"name":"question2","type":"boolean"}, {"name":"question3","type":"string","length":"256"} ], "name":"Survey", "type":"single-valued" } ]
Result
201 Created { "name": "Feedback"}