Creating a data subset

Ops Center Analyzer Detail View REST API Reference Guide

Version
11.0.x
Audience
anonymous
Part Number
MK-99ANA004-10

You can create a new data subset. Each data subset must have a unique ID within the same dataset. If the data subset ID already exists in the dataset, then an error message is received in a response message.

Request line

 Post baseURL/dbapi.do?action=createDataSubset&dataset=<Datasetname>

Request body

{
  "dataSubsetId":"",
  "dataSubsetType":""
}

Request example

POST /dbapi.do?action=createDataSubset&dataset=defaultDs HTTP /1.1 Authorization:Basic ZnJlZDpmcmVk
{
  "dataSubsetId":"US-NorthAmerica",
  "dataSubsetType":"VMware"
}

Request parameters

Parameter Type Description
action String {createDataSubset }

Specify the API function to be invoked.

dataset String Dataset name. From 2 to 32 alphanumeric, underscore (_), and hyphen (-) characters are allowed.
dataSubsetId String

The data subset is created with this ID. The ID must be unique within the dataset.

From 2 to 32 alphanumeric, underscore (_), and hyphen (-) characters are allowed.
dataSubsetType String

Data subset type is used to group the related data subsets. Multiple data subsets can have the same data subset type.

From 2 to 32 alphanumeric, underscore (_), and hyphen (-) characters are allowed.

Response body

{
  "dataSubset":""
}
{
  "code":"",
  "error":""
}

Response example

{
  "dataSubset":"US-NorthAmerica"
}

Response parameters

Parameter

Type

Description

dataSubset String Created data subset ID.
code String Eight-digit hexadecimal error code.
error String Error message.

Status codes

Status code

Message

Description

200 OK Request was successful, and the response body contains the requested log details.
206 PARTIAL CONTENT Request is in progress, and the incremental content is available in the response body.
400 BAD REQUEST Request URL or request body validation failed. Check the response body for details.
401 UNAUTHORIZED Supplied authentication token is invalid or does not have the appropriate credentials to access the resource.
404 NOT FOUND API server could not find a resource matching the request.
405 METHOD NOT ALLOWED Request HTTP method is not allowed for the operation.
409 CONFLICT Resource already exists.
500 SERVER ERROR API operation request failed. Check the response body for details.

Response codes

The following table lists the common API response codes that might be generated through the standard API. If an error response is not listed, examine the HTTP status codes to determine the best method for addressing the issue.

Response code Message Condition
210000E4 Mandatory parameter {dataset} is not specified. Parameter dataset is not specified.
21010002 Invalid JSON Request. Specified JSON input is invalid.
21010008 Mandatory parameter {dataSubsetId} is not specified. Parameter dataSubsetId is not specified.
2101000F Invalid value specified for parameter {dataSubsetId}. It must be of type string. Parameter dataSubsetId does not belong to the type string.
2102000F Invalid value specified for parameter {dataSubsetId}. The {dataSubsetId} length must be between 2 to 32 characters. Parameter dataSubsetId is less than 2 character or more than 32 characters.
2102000F Invalid value specified for parameter {dataSubsetId}. The {dataSubsetId} contains an invalid characters. The valid characters are [alphanumeric, - and _]. Parameter dataSubsetId contains an invalid character.
21010008 Mandatory parameter {dataSubsetType} is not specified. Parameter dataSubsetId is not specified.
2101000F Invalid value specified for parameter {dataSubsetType}. It must be of type string. Parameter dataSubsetId does not belong to the type string.
2102000F Invalid value specified for parameter {dataSubsetType}. The {dataSubsetType} length must be between 2 to 32 characters. Parameter dataSubsetId is less than 2 character or more than 32 characters.
2102000F Invalid value specified for parameter {dataSubsetType}. The {dataSubsetType} contains an invalid characters. The valid characters are [alphanumeric, - , and _ ]. Parameter dataSubsetType contains an invalid characters.
2101000C Parameter {dataset} is not supported. Parameter dataset is not supported.
210000E9 License is not valid. License is not uploaded, or the uploaded license is invalid or expired.
210000E9 Authorization needed. Request is sent with an invalid authentication token.
210000E4 Dataset with {name} [ds1] does not exist. Request sent for a dataset does not exist.
210000E0 HTTP method [GET] is not supported for action [createDataSubset]. Request is sent with an HTTP method other than POST.
21050004 DataSubset with {dataSubsetId} [US-NorthAmerica] already exists. Data subset already exists with the same subset ID.
210100E2 Application encountered an internal error. API server encountered an unknown error.