# DCAE Inventory API
## Overview
DCAE Inventory is a web service that provides the following:
1. Real-time data on all DCAE services and their components
2. Comprehensive details on available DCAE service types
### Version information
*Version* : 3.0.0
### Contact information
*Contact Email* : dcae@lists.openecomp.org
## Paths
### POST /dcae-service-types
#### Description
Inserts a new `DCAEServiceType` or updates an existing instance. Updates are only allowed iff there are no running DCAE services of the requested type,
#### Parameters
|Type|Name|Description|Schema|Default|
|---|---|---|---|---|
|**Body**|**body**
*required*||[DCAEServiceTypeRequest](#dcaeservicetyperequest)||
#### Responses
|HTTP Code|Description|Schema|
|---|---|---|
|**200**|Single `DCAEServiceType` object.|[DCAEServiceType](#dcaeservicetype)|
|**400**|Bad request provided.|[ApiResponseMessage](#apiresponsemessage)|
|**409**|Failed to update because there are still DCAE services of the requested type running.|[ApiResponseMessage](#apiresponsemessage)|
#### Consumes
* `application/json`
#### Produces
* `application/json`
### GET /dcae-service-types
#### Description
Get a list of `DCAEServiceType` objects.
#### Parameters
|Type|Name|Description|Schema|Default|
|---|---|---|---|---|
|**Query**|**asdcResourceId**
*optional*|Filter by associated asdc design resource id. Setting this to `NONE` will return instances that have asdc resource id set to null|string||
|**Query**|**asdcServiceId**
*optional*|Filter by associated asdc design service id. Setting this to `NONE` will return instances that have asdc service id set to null|string||
|**Query**|**offset**
*optional*|Query resultset offset used for pagination (zero-based)|integer(int32)||
|**Query**|**onlyActive**
*optional*|If set to true, query returns only *active* DCAE service types. If set to false, then all DCAE service types are returned. Default is true|boolean|`"true"`|
|**Query**|**onlyLatest**
*optional*|If set to true, query returns just the latest versions of DCAE service types. If set to false, then all versions are returned. Default is true|boolean|`"true"`|
|**Query**|**serviceId**
*optional*|Filter by assocaited service id. Instances with service id null or empty is always returned.|string||
|**Query**|**serviceLocation**
*optional*|Filter by associated service location. Instances with service location null or empty is always returned.|string||
|**Query**|**typeName**
*optional*|Filter by service type name|string||
|**Query**|**vnfType**
*optional*|Filter by associated vnf type. No wildcards, matches are explicit. This field is treated case insensitive.|string||
#### Responses
|HTTP Code|Description|Schema|
|---|---|---|
|**200**|List of `DCAEServiceType` objects|[InlineResponse200](#inlineresponse200)|
#### Consumes
* `application/json`
* `application/vnd.dcae.inventory.v1+json`
#### Produces
* `application/json`
* `application/vnd.dcae.inventory.v1+json`
### GET /dcae-service-types/{typeId}
#### Description
Get a `DCAEServiceType` object.
#### Parameters
|Type|Name|Description|Schema|Default|
|---|---|---|---|---|
|**Path**|**typeId**
*required*||string||
#### Responses
|HTTP Code|Description|Schema|
|---|---|---|
|**200**|Single `DCAEServiceType` object|[DCAEServiceType](#dcaeservicetype)|
|**404**|Resource not found|[DCAEServiceType](#dcaeservicetype)|
#### Consumes
* `application/json`
#### Produces
* `application/json`
### DELETE /dcae-service-types/{typeId}
#### Description
Deactivates existing `DCAEServiceType` instances
#### Parameters
|Type|Name|Description|Schema|Default|
|---|---|---|---|---|
|**Path**|**typeId**
*required*||string||
#### Responses
|HTTP Code|Description|Schema|
|---|---|---|
|**200**|`DCAEServiceType` has been deactivated|[ApiResponseMessage](#apiresponsemessage)|
|**404**|`DCAEServiceType` not found|[ApiResponseMessage](#apiresponsemessage)|
|**410**|`DCAEServiceType` already gone|[ApiResponseMessage](#apiresponsemessage)|
#### Consumes
* `application/vnd.dcae.inventory.v1+json`
* `application/json`
#### Produces
* `application/vnd.dcae.inventory.v1+json`
* `application/json`
### GET /dcae-services
#### Description
Get a list of `DCAEService` objects.
#### Parameters
|Type|Name|Description|Schema|Default|
|---|---|---|---|---|
|**Query**|**componentType**
*optional*|Use to filter by a specific DCAE service component type|string||
|**Query**|**created**
*optional*|Use to filter by created time|string||
|**Query**|**offset**
*optional*|Query resultset offset used for pagination (zero-based)|integer(int32)||
|**Query**|**shareable**
*optional*|Use to filter by DCAE services that have shareable components or not|boolean||
|**Query**|**typeId**
*optional*|DCAE service type name|string||
|**Query**|**vnfId**
*optional*||string||
|**Query**|**vnfLocation**
*optional*||string||
|**Query**|**vnfType**
*optional*|Filter by associated vnf type. This field is treated case insensitive.|string||
#### Responses
|HTTP Code|Description|Schema|
|---|---|---|
|**200**|List of `DCAEService` objects|[InlineResponse2001](#inlineresponse2001)|
#### Consumes
* `application/json`
* `application/vnd.dcae.inventory.v1+json`
#### Produces
* `application/json`
* `application/vnd.dcae.inventory.v1+json`
### GET /dcae-services-groupby/{propertyName}
#### Description
Get a list of unique values for the given `propertyName`
#### Parameters
|Type|Name|Description|Schema|Default|
|---|---|---|---|---|
|**Path**|**propertyName**
*required*|Property to find unique values. Restricted to `type`, `vnfType`, `vnfLocation`|string||
#### Responses
|HTTP Code|Description|Schema|
|---|---|---|
|**200**|List of unique property values|[DCAEServiceGroupByResults](#dcaeservicegroupbyresults)|
#### Consumes
* `application/json`
* `application/vnd.dcae.inventory.v1+json`
#### Produces
* `application/json`
* `application/vnd.dcae.inventory.v1+json`
### GET /dcae-services/{serviceId}
#### Description
Get a `DCAEService` object.
#### Parameters
|Type|Name|Description|Schema|Default|
|---|---|---|---|---|
|**Path**|**serviceId**
*required*||string||
#### Responses
|HTTP Code|Description|Schema|
|---|---|---|
|**200**|Single `DCAEService` object|[DCAEService](#dcaeservice)|
|**404**|DCAE service not found|[ApiResponseMessage](#apiresponsemessage)|
#### Consumes
* `application/json`
* `application/vnd.dcae.inventory.v1+json`
#### Produces
* `application/json`
* `application/vnd.dcae.inventory.v1+json`
### PUT /dcae-services/{serviceId}
#### Description
Put a new or update an existing `DCAEService` object.
#### Parameters
|Type|Name|Description|Schema|Default|
|---|---|---|---|---|
|**Path**|**serviceId**
*required*||string||
|**Body**|**body**
*required*||[DCAEServiceRequest](#dcaeservicerequest)||
#### Responses
|HTTP Code|Description|Schema|
|---|---|---|
|**200**|Single `DCAEService` object|[DCAEService](#dcaeservice)|
|**422**|Bad request provided|[ApiResponseMessage](#apiresponsemessage)|
#### Consumes
* `application/json`
* `application/vnd.dcae.inventory.v1+json`
#### Produces
* `application/json`
* `application/vnd.dcae.inventory.v1+json`
### DELETE /dcae-services/{serviceId}
#### Description
Remove an existing `DCAEService` object.
#### Parameters
|Type|Name|Description|Schema|Default|
|---|---|---|---|---|
|**Path**|**serviceId**
*required*||string||
#### Responses
|HTTP Code|Description|Schema|
|---|---|---|
|**200**|DCAE service has been removed|No Content|
|**404**|Unknown DCAE service|[ApiResponseMessage](#apiresponsemessage)|
#### Consumes
* `application/vnd.dcae.inventory.v1+json`
* `application/json`
#### Produces
* `application/json`
* `application/vnd.dcae.inventory.v1+json`
## Definitions
### ApiResponseMessage
|Name|Description|Schema|
|---|---|---|
|**code**
*optional*||integer(int32)|
|**message**
*optional*||string|
|**type**
*optional*||string|
### DCAEService
|Name|Description|Schema|
|---|---|---|
|**components**
*optional*||< [DCAEServiceComponent](#dcaeservicecomponent) > array|
|**created**
*optional*||string(date-time)|
|**deploymentRef**
*optional*|Reference to a Cloudify deployment|string|
|**modified**
*optional*||string(date-time)|
|**selfLink**
*optional*|Link.title is serviceId|[Link](#link)|
|**serviceId**
*optional*||string|
|**typeLink**
*optional*|Link.title is typeId|[Link](#link)|
|**vnfId**
*optional*||string|
|**vnfLink**
*optional*|Link.title is vnfId|[Link](#link)|
|**vnfLocation**
*optional*|Location information of the associated VNF|string|
|**vnfType**
*optional*||string|
### DCAEServiceComponent
|Name|Description|Schema|
|---|---|---|
|**componentId**
*required*|The id format is unique to the source|string|
|**componentLink**
*required*|Link to the underlying resource of this component|[Link](#link)|
|**componentSource**
*required*|Specifies the name of the underying source service that is responsible for this components|enum (DMaaPController)|
|**componentType**
*required*||string|
|**created**
*required*||string(date-time)|
|**location**
*optional*|Location information of the component|string|
|**modified**
*required*||string(date-time)|
|**shareable**
*required*|Used to determine if this component can be shared amongst different DCAE services|integer(int32)|
|**status**
*optional*||string|
### DCAEServiceComponentRequest
|Name|Description|Schema|
|---|---|---|
|**componentId**
*required*|The id format is unique to the source|string|
|**componentSource**
*required*|Specifies the name of the underying source service that is responsible for this components|enum (DMaaPController)|
|**componentType**
*required*||string|
|**shareable**
*required*|Used to determine if this component can be shared amongst different DCAE services|integer(int32)|
### DCAEServiceGroupByResults
|Name|Description|Schema|
|---|---|---|
|**propertyName**
*optional*|Property name of DCAE service that the group by operation was performed on|string|
|**propertyValues**
*optional*||< [DCAEServiceGroupByResultsPropertyValues](#dcaeservicegroupbyresultspropertyvalues) > array|
### DCAEServiceGroupByResultsPropertyValues
|Name|Description|Schema|
|---|---|---|
|**count**
*optional*||integer(int32)|
|**dcaeServiceQueryLink**
*optional*|Link.title is the DCAE service property value. Following this link will provide a list of DCAE services that all have this property value.|[Link](#link)|
|**propertyValue**
*optional*||string|
### DCAEServiceRequest
|Name|Description|Schema|
|---|---|---|
|**components**
*required*|List of DCAE service components that this service is composed of|< [DCAEServiceComponentRequest](#dcaeservicecomponentrequest) > array|
|**deploymentRef**
*optional*|Reference to a Cloudify deployment|string|
|**typeId**
*required*|Id of the associated DCAE service type|string|
|**vnfId**
*required*|Id of the associated VNF that this service is monitoring|string|
|**vnfLocation**
*required*|Location identifier of the associated VNF that this service is monitoring|string|
|**vnfType**
*required*|The type of the associated VNF that this service is monitoring|string|
### DCAEServiceType
|Name|Description|Schema|
|---|---|---|
|**asdcResourceId**
*optional*|Id of vf/vnf instance this DCAE service type is associated with. Value source is from ASDC's notification event's field `resourceInvariantUUID`.|string|
|**asdcServiceId**
*optional*|Id of service this DCAE service type is associated with. Value source is from ASDC's notification event's field `serviceInvariantUUID`.|string|
|**asdcServiceURL**
*optional*|URL to the ASDC service model|string|
|**blueprintTemplate**
*required*|String representation of a Cloudify blueprint with unbound variables|string|
|**created**
*required*|Created timestamp for this DCAE service type in epoch time|string(date-time)|
|**deactivated**
*optional*|Deactivated timestamp for this DCAE service type in epoch time|string(date-time)|
|**owner**
*required*||string|
|**selfLink**
*required*|Link to self where the Link.title is typeName|[Link](#link)|
|**serviceIds**
*optional*|List of service ids that are used to associate with DCAE service type. DCAE service types with this propery as null or empty means them apply for every service id.|< string > array|
|**serviceLocations**
*optional*|List of service locations that are used to associate with DCAE service type. DCAE service types with this propery as null or empty means them apply for every service location.|< string > array|
|**typeId**
*required*|Unique identifier for this DCAE service type|string|
|**typeName**
*required*|Descriptive name for this DCAE service type|string|
|**typeVersion**
*required*|Version number for this DCAE service type|integer(int32)|
|**vnfTypes**
*optional*||< string > array|
### DCAEServiceTypeRequest
|Name|Description|Schema|
|---|---|---|
|**asdcResourceId**
*optional*|Id of vf/vnf instance this DCAE service type is associated with. Value source is from ASDC's notification event's field `resourceInvariantUUID`.|string|
|**asdcServiceId**
*optional*|Id of service this DCAE service type is associated with. Value source is from ASDC's notification event's field `serviceInvariantUUID`.|string|
|**asdcServiceURL**
*optional*|URL to the ASDC service model|string|
|**blueprintTemplate**
*required*|String representation of a Cloudify blueprint with unbound variables|string|
|**owner**
*required*||string|
|**serviceIds**
*optional*|List of service ids that are used to associate with DCAE service type. DCAE service types with this propery as null or empty means them apply for every service id.|< string > array|
|**serviceLocations**
*optional*|List of service locations that are used to associate with DCAE service type. DCAE service types with this propery as null or empty means them apply for every service location.|< string > array|
|**typeName**
*required*|Descriptive name for this DCAE service type|string|
|**typeVersion**
*required*|Version number for this DCAE service type|integer(int32)|
|**vnfTypes**
*optional*||< string > array|
### InlineResponse200
|Name|Description|Schema|
|---|---|---|
|**items**
*optional*||< [DCAEServiceType](#dcaeservicetype) > array|
|**links**
*optional*||[InlineResponse200Links](#inlineresponse200links)|
|**totalCount**
*optional*||integer(int32)|
### InlineResponse2001
|Name|Description|Schema|
|---|---|---|
|**items**
*optional*||< [DCAEService](#dcaeservice) > array|
|**links**
*optional*||[InlineResponse200Links](#inlineresponse200links)|
|**totalCount**
*optional*||integer(int32)|
### InlineResponse200Links
Pagination links
|Name|Description|Schema|
|---|---|---|
|**nextLink**
*optional*||[Link](#link)|
|**previousLink**
*optional*||[Link](#link)|
### Link
|Name|Description|Schema|
|---|---|---|
|**params**
*optional*||< string, string > map|
|**rel**
*optional*||string|
|**rels**
*optional*||< string > array|
|**title**
*optional*||string|
|**type**
*optional*||string|
|**uri**
*optional*||string|
|**uriBuilder**
*optional*||[UriBuilder](#uribuilder)|
### UriBuilder
*Type* : object