You can get request information to generate a consumer definition.
Execution permission
Admin
Request line
GET baseURL/v1/services/GroupsDefinition/actions/generate
Request body
Not applicable.
Response body
The structure of the response body and the object attributes is as follows:Action
{ "name":"...", "href":"...", "method":"...", "type":"...", "parameters":["...", ...] }
Action (Type: Action)
Attribute |
Type |
Description |
---|---|---|
name |
string |
Name of the action. |
href |
string |
URL for the action. |
method |
string |
Name of the method. |
type |
string |
Data format for the object. |
parameters |
anyType[] |
A list of ConsumerDefinitionGenerateParam objects necessary to execute an operation. For details, see the table below. |
ConsumerDefinitionGenerateParam
{ "baseParameter":"...", "generationPolicy":"...", "generationPolicySubParam":"...", "gradeKey":"..." }
ConsumerDefinitionGenerateParam (Type: ConsumerDefinitionGenerateParam)
Attribute |
Type |
Description |
---|---|---|
baseParameter |
enum |
Base parameter for consumer auto creation (For details about the valid values, see the table BaseParameter in List of enumerators.) |
generationPolicy |
enum |
generation policy (For details about the valid values, see the table GenerationPolicy in List of enumerators.) |
generationPolicySubParam |
string |
Subparameter to define generation policy |
gradeKey |
string |
Grade of consumer |
Status codes
Status code |
Reason phrase |
Description |
---|---|---|
200 |
OK |
Success. |
401 |
Unauthorized |
No login privilege. |
403 |
Forbidden |
No reference privilege. |
412 |
Precondition Failed |
The server is not available. |
500 |
Internal Server Error |
Server processing error. |
Example code
[Request Header] GET Analytics/v1/services/GroupsDefinition/actions/generate authorization: Basic c3lzdGVtOm1hbmFnZXI= Host: localhost:22015 Accept: application/json Content-Type: application/json [Response Header] HTTP/1.1 200 OK date: Fri, 01 Apr 2022 02:02:31 GMT server: CosminexusComponentContainer cache-control: no-cache, must-revalidate, private, max-age=0 www-authenticate: HSSO 18616ecdaa33afda9e179c113bb286e7ebd3a67b_Wm0HGnlmckFqXXwA_V0810 content-type: application/json content-length: 389 x-frame-options: SAMEORIGIN x-xss-protection: 1; mode=block x-content-type-options: nosniff content-security-policy: frame-ancestors 'self' [Response Body] { "name" : "generate", "href" : "http://localhost:22015/Analytics/v1/services/GroupsDefinition/actions/generate/invoke", "method" : "POST", "type" : "application/json", "parameters" : [ { "baseParameter" : "HostGroup", "generationPolicy" : "LeadingAlphabets", "generationPolicySubParam" : "", "grade" : "", "autoAssignRelatedResource" : false } ] }