This section describes the common specifications of each API when using the Web API.
The following table shows the data types used by the Web API.
Specify each parameter in the request and reference the field values in the response body to the data type.
Type Name | Corresponding JSON Type | Description |
---|---|---|
String | string | Text data.
|
Numeric | number | Numeric data. |
List | string | Data that handles the specified value. |
Date and time | string | Date and time data.
YYYY: The year is represented by 4 digits, 0000 -9999. |
Truth value | true, false | Boolean data. |
Request Line
Specify the request lines according to the resources you want to use.
Request lines are specified in ASCII characters. If part of the path name (path parameter) contains multibyte characters, URL-encode in UTF -8.
Request Line | Specification |
---|---|
Method | Specify the HTTP methods available for each resource. |
Path Name | Specify the URI and query string for each resource. |
HTTP Version | Specify "HTTP/1.1". |
To get a list of each resource, use query parameters to narrow down the list and control the response. Common specifications for query parameters that can be used for list retrieval are as follows.
Parameter Name | Default Value | Specification |
---|---|---|
subsystem | Refer to the "17.2.3.5 Subsystem Number" | Specify the subsystem to list. Refer to the "17.2.3.5 Subsystem Number" for possible values. |
offset | 0 | Specify the start position of the record to return. |
limit | 100 | Specify the maximum number of records to return. The possible value is 0 - 15000. |
Request Header
Specify the following request headers.
Request Header | Specified Contents |
---|---|
Host | Specify the host name and IP address of the Systemwalker Operation Manager server to connect to in the following format. host:port |
Authorization | Specify credentials for basic authentication. |
Content-Type | Specify that you want to specify parameters for the request body. |
Request Body
Specify the request parameters in JSON.
The parameters you can specify are different for each resource, refer to the "Request" section for each resource for more information.
Status Line
Returns the result of processing the request as an HTTP status code.
Refer to the "Response" section for each resource for the HTTP status code to return.
The response body format differs between normal and abnormal. Check the HTTP status code before using the response body.
Response Header
Set and return the following response header.
Response Header | Specified Contents | Specification |
---|---|---|
Content-Type | application/json;charset=UTF-8 | Media type of the response body. |
Response Body
Media type with response header "Content-Type" is returned.
The format of the response body is as follows.
The format of a successful request for each resource is as follows.
{
"next": false,
"total: n,
"data": [ <--+
{ ... }, |
... Object array for each resource
{ ... } |
] <--+
}
n: Number of elements in the array of objects to be returned
If there is at least one target object, the data field contains the target object array. The values in the next and total fields determine whether all objects have been returned.
If there are zero objects, next is false, total is 0, and data is an empty array.
Filed Name | Type | Specification |
---|---|---|
next | truth value | Indicates whether an object that has not been stored in the data field exists in the object to be returned. It is "true" if the number of elements in the object array to be returned is greater than or equal to the value specified by the query parameter limit. true: There are unreturned objects. |
total | Numeric | The number of elements in the object array to return. |
data | - | An array of objects to return. |
Note
Non-JSON data formats, such as text/html, may be returned in the response body on failure. Check the response header "Content-Type" and refer to the appropriate data format.
If an error occurs in the processing of a request for each resource, the format is as follows.
{ "code": "Error code", "message": "Message statement" }
Returns error information using HTTP status codes, error codes, and message statements. For more information about error codes and message statements, refer to the "Messages of Web API [Windows version][Linux version]" in the "Systemwalker Operation Manager Message Guide".
Filed Name | Type | Specification |
---|---|---|
code | String | Code indicating error information. |
message | String | Message indicating error information. |
Each API request requires authentication.
Set basic authentication information in the request header.
The user ID and password are the credentials of the Systemwalker Operation Manager server deployment machine to which you are connecting.
If extended user management is enabled, specify the Operation Manager user. [Linux version]
Operates each resource with the permissions of the specified user ID. Refer to the description of each resource for required permissions.
Authorization: Basic <UserID: Base 64 encoded string of the password > |
Specify the subsystem number as follows.
Path Parameters
/subsystems/{subsystem} does not need to be specified.
It can be specified as subsystem number 0. You cannot specify a value of from 1 to 9.
Query Parameters
?subsystem={subsystem} does not need to be specified.
It can be specified as subsystem number 0. If you specify a value of 1 - 9, the filtering result of list acquisition is 0.
Path Parameters
Can be specified by /subsystems/{subsystem}.
The subsystem number is required to uniquely identify the resource.
If specified, the subsystem number is assumed; if omitted, the subsystem number 0 is assumed.
Query Parameters
Can be specified by ?subsystem={subsystem}.
If omitted, all subsystem numbers are processed. Therefore, if you have subsystems that you did not intend to start, specify only those subsystems that you do not want.
Example Request (After /Systemwalker-omgr/api)
To operate a job net in the jobnets resource:
When specifying a subsystem number:
/v1/subsystem/1/projects/{projectname}/jobnets/{jobnetname} [EE]
/v1/subsystem/0/projects/{projectname}/jobnets/{jobnetname}
When omitting a subsystem number:
/v1/projects/{projectname}/jobnets/{jobnetname}
To get a list of job net information in the jobnets resource:
When specifying a subsystem number:
/v1/jobnets?subsystem=1
/v1/jobnets?subsystem=0
When specifying a subsystem number:
/v1/jobnets