Search
- Last UpdatedApr 24, 2023
- 7 minute read
API that returns information about the streams that are shared with communities
List Streams By Community
Searches for streams within a community by query
Request
GET /api/v1-preview/search/communities/{communityId}/streams
?query={query}&skip={skip}&count={count}&pageSize={pageSize}&maxPages={maxPages}&continuationToken={continuationToken}&orderBy={orderBy}
Parameters
string communityId
Community identifier
[optional] string query
Query to execute. The query uses the same format as SDS. See Search in SDS.[optional] integer skip
Parameter representing the zero-based offset of the first object to retrieve. If unspecified, a default value of 0 is used.[optional] integer count
The maximum number of results to return.[optional] integer pageSize
The number of results to return per page. Supercedes 'count' if specified. Will also cause a Link response header to be created with links to subsequent result sets. Those result sets are first, last, next or previous.[optional] integer maxPages
The maximum number of result records that can be returned. This is used in conjunction with pageSize.[optional] string continuationToken
If specified, this call retrieves a set of results as specified within the token. The possible result sets are first, last, next or previous.[optional] string orderBy
The search result order specification. If not specified, the results are ordered by ascending stream name. If a search result order is specified, it should consist of one stream result attribute name (attribute-name) with an optional sort order (sort-order). The sort-order, if specified, is separated from the attribute-name by a space. The supported stream result attribute names are Id, Name, TypeId, Description, Self, TenantId, NamespaceId, TenantName, and CommunityId. The sort order values are ASC, for ascending, which is the default, and DESC, for descending. Attribute names and sort order values are not case sensitive. Example: NamespaceID DESC
Response
| Status Code | Body Type | Description |
|---|---|---|
| 200 | StreamSearchResult[] | Returns the stream information that matches the search criteria. This is a set of objects of type StreamSearchResult. |
| 207 | PartialFailureResult | Returns the stream information that matches the search criteria. This is a set of objects of type StreamSearchResult. |
| 400 | ErrorResponse | Bad Request. The server could not understand the request due to invalid syntax. |
| 401 | None | Unauthorized. The client has not been authenticated. |
| 403 | ErrorResponse | Forbidden. The client does not have the required permissions to make the request. |
| 404 | ErrorResponse | Not Found. The requested community was not found. |
| 408 | ErrorResponse | Request Timeout. The request has timed out. |
| 500 | ErrorResponse | Internal Server Error. The server has encountered a situation it does not know how to handle. |
Example response body
200 Response (StreamSearchResult[])
[
{
"Id": "string",
"Name": "string",
"TypeId": "string",
"Description": "string",
"Self": "string",
"TenantId": "string",
"TenantName": "string",
"NamespaceId": "string",
"CommunityId": "string",
"PropertyOverrides": [
{
"SdsTypePropertyId": "string",
"Uom": "string",
"InterpolationMode": 0
}
]
}
]
List Streams By Namespace 1
Searches for shared streams within a namespace by query.
Request
GET /api/v1-preview/tenants/{tenantId}/search/namespaces/{namespaceId}/streams
?query={query}&skip={skip}&count={count}&orderBy={orderBy}
Parameters
string tenantId
Calling tenant identifier.string namespaceId
Namespace identifier.
[optional] string query
Query to execute. The query uses the same format as SDS. See Search in SDS.[optional] integer skip
Parameter representing the zero-based offset of the first object to retrieve. If unspecified, a default value of 0 is used.[optional] integer count
Maximum total results.[optional] string orderBy
The search result order specification. If not specified, the results are ordered by ascending stream name. If a search result order is specified, it should consist of one stream result attribute name (attribute-name) with an optional sort order (sort-order). The sort-order, if specified, is separated from the attribute-name by a space. The supported stream result attribute names are Id, Name, TypeId, and Description. The sort order values are ASC, for ascending, which is the default, and DESC, for descending. Attribute names and sort order values are not case sensitive. Example: TypeID DESC
Response
| Status Code | Body Type | Description |
|---|---|---|
| 200 | StreamFromSearchByNamespace[] | Returns the streams that matches the search criteria. This is a set of objects of type StreamFromSearchByNamespace. |
| 400 | ErrorResponse | Bad Request. The server could not understand the request due to invalid syntax. |
| 401 | None | Unauthorized. The client has not been authenticated. |
| 403 | ErrorResponse | Forbidden. The client does not have the required permissions to make the request. |
| 404 | ErrorResponse | Not Found. The requested community was not found. |
| 408 | ErrorResponse | Request Timeout. The request has timed out. |
| 500 | ErrorResponse | Internal Server Error. The server has encountered a situation it does not know how to handle. |
Example response body
200 Response (StreamFromSearchByNamespace[])
[
{
"Id": "string",
"Name": "string",
"TypeId": "string",
"Description": "string",
"PropertyOverrides": [
{
"SdsTypePropertyId": "string",
"Uom": "string",
"InterpolationMode": 0
}
]
}
]
Search Streams By Namespace 2
Searches for shared streams within a namespace by query.
Request
POST /api/v1-preview/tenants/{tenantId}/search/namespaces/{namespaceId}/streams
?query={query}&skip={skip}&count={count}&orderBy={orderBy}
Parameters
string tenantId
Calling tenant identifier.string namespaceId
Namespace identifier.
[optional] string query
Query to execute. The query uses the same format as SDS. See Search in SDS.[optional] integer skip
Parameter representing the zero-based offset of the first object to retrieve. If unspecified, a default value of 0 is used.[optional] integer count
Maximum total results.[optional] string orderBy
The search result order specification. If not specified, the results are ordered by ascending stream name. If a search result order is specified, it should consist of one stream result attribute name (attribute-name) with an optional sort order (sort-order). The sort-order, if specified, is separated from the attribute-name by a space. The supported stream result attribute names are Id, Name, TypeId, and Description. The sort order values are ASC, for ascending, which is the default, and DESC, for descending. Attribute names and sort order values are not case sensitive. Example: TypeID DESC
Request Body
Input used to search namespace.
{
"CommunityIds": [
"string"
]
}
Response
| Status Code | Body Type | Description |
|---|---|---|
| 200 | StreamFromSearchByNamespace[] | Returns the streams that matches the search criteria. This is a set of objects of type StreamFromSearchByNamespace. |
| 400 | ErrorResponse | Bad Request. The server could not understand the request due to invalid syntax. |
| 401 | None | Unauthorized. The client has not been authenticated. |
| 403 | ErrorResponse | Forbidden. The client does not have the required permissions to make the request. |
| 404 | ErrorResponse | Not Found. The requested namespace was not found. |
| 408 | ErrorResponse | Request Timeout. The request has timed out. |
| 500 | ErrorResponse | Internal Server Error. The server has encountered a situation it does not know how to handle. |
Example response body
200 Response (StreamFromSearchByNamespace[])
[
{
"Id": "string",
"Name": "string",
"TypeId": "string",
"Description": "string",
"PropertyOverrides": [
{
"SdsTypePropertyId": "string",
"Uom": "string",
"InterpolationMode": 0
}
]
}
]
Definitions
StreamSearchResult
The StreamSearchResult object. This is the model representation exposed to callers of controller endpoints.
Properties
| Property Name | Data Type | Required | Nullable | Description |
|---|---|---|---|---|
| Id | string | false | true | The Id |
| Name | string | false | true | The name |
| TypeId | string | false | true | The type Id |
| Description | string | false | true | The description |
| Self | string | false | true | The base URL for shared access self link to access community data. For more information, see Shared Access Requests. |
| TenantId | string | false | true | The Tenant Id of stream |
| TenantName | string | false | true | The Tenant name of stream |
| NamespaceId | string | false | true | The Namespace ID of stream |
| CommunityId | string | false | true | The Community Id |
| PropertyOverrides | [SdsStreamPropertyOverride] | false | true | The Stream PropertyOverrides. |
{
"Id": "string",
"Name": "string",
"TypeId": "string",
"Description": "string",
"Self": "string",
"TenantId": "string",
"TenantName": "string",
"NamespaceId": "string",
"CommunityId": "string",
"PropertyOverrides": [
{
"SdsTypePropertyId": "string",
"Uom": "string",
"InterpolationMode": 0
}
]
}
SdsStreamPropertyOverride
Properties
| Property Name | Data Type | Required | Nullable | Description |
|---|---|---|---|---|
| SdsTypePropertyId | string | false | true | None |
| Uom | string | false | true | None |
| InterpolationMode | SdsInterpolationMode | false | true | None |
{
"SdsTypePropertyId": "string",
"Uom": "string",
"InterpolationMode": 0
}
SdsInterpolationMode
Enumerated Values
| Property | Value |
|---|---|
| Continuous | 0 |
| Default | 0 |
| StepwiseContinuousLeading | 1 |
| StepwiseContinuousTrailing | 2 |
| Discrete | 3 |
| ContinuousNullableLeading | 4 |
| ContinuousNullableTrailing | 5 |
PartialFailureResult
PartialFailureResult object. Used for HTTP status code 207 responses. This is a model representation exposed to callers of the Search Streams By Community controller endpoint.
Properties
| Property Name | Data Type | Required | Nullable | Description |
|---|---|---|---|---|
| OperationId | string | false | true | The Id for the executed operation. |
| Error | string | false | true | Error message for 207 |
| ReasonPhrase | string | false | true | Reason for the 207 response |
| ChildErrors | [ChildError] | false | true | A list of encountered errors |
| Data | [StreamSearchResult] | false | true | A list of successfully returned content |
{
"OperationId": "string",
"Error": "string",
"ReasonPhrase": "string",
"ChildErrors": [
{
"OperationId": "string",
"TenantId": "string",
"NamespaceId": "string",
"Error": "string",
"Reason": "string",
"Resolution": "string",
"StatusCode": 0
}
],
"Data": [
{
"Id": "string",
"Name": "string",
"TypeId": "string",
"Description": "string",
"Self": "string",
"TenantId": "string",
"TenantName": "string",
"NamespaceId": "string",
"CommunityId": "string",
"PropertyOverrides": [
{
"SdsTypePropertyId": "string",
"Uom": "string",
"InterpolationMode": 0
}
]
}
]
}
ChildError
The ChildError object. This is a model representation exposed to callers of the Search Streams By Community controller endpoint.
Properties
| Property Name | Data Type | Required | Nullable | Description |
|---|---|---|---|---|
| OperationId | string | false | true | The Id for the executed operation. |
| TenantId | string | false | true | The Tenant Id of stream |
| NamespaceId | string | false | true | The Namespace Id of stream |
| Error | string | false | true | The error. |
| Reason | string | false | true | Reason for the exception. |
| Resolution | string | false | true | Suggested resolution. |
| StatusCode | int32 | false | false | HTTP Status Code |
{
"OperationId": "string",
"TenantId": "string",
"NamespaceId": "string",
"Error": "string",
"Reason": "string",
"Resolution": "string",
"StatusCode": 0
}
ErrorResponse
Properties
| Property Name | Data Type | Required | Nullable | Description |
|---|---|---|---|---|
| OperationId | string | false | true | OperationId of the action that caused the error |
| Error | string | false | true | Error description |
| Reason | string | false | true | Reason for the error |
| Resolution | string | false | true | Resolution for the Error |
{
"OperationId": "string",
"Error": "string",
"Reason": "string",
"Resolution": "string"
}
StreamFromSearchByNamespace
The StreamFromSearchByNamespace object. This is the model representation exposed to called of controller endpoints.
Properties
| Property Name | Data Type | Required | Nullable | Description |
|---|---|---|---|---|
| Id | string | false | true | The Stream Id. |
| Name | string | false | true | The Stream Name. |
| TypeId | string | false | true | The Stream TypeId. |
| Description | string | false | true | The Stream Description. |
| PropertyOverrides | [SdsStreamPropertyOverride] | false | true | The Stream PropertyOverrides. |
{
"Id": "string",
"Name": "string",
"TypeId": "string",
"Description": "string",
"PropertyOverrides": [
{
"SdsTypePropertyId": "string",
"Uom": "string",
"InterpolationMode": 0
}
]
}
SearchStreamsByNamespaceInput
The SearchStreamsByNamespaceInput object.
Properties
| Property Name | Data Type | Required | Nullable | Description |
|---|---|---|---|---|
| CommunityIds | string[] | false | true | List of CommunityIds to filter in for search. |
{
"CommunityIds": [
"string"
]
}