diff --git a/cwms-data-api-client/src/main/java/mil/army/usace/hec/cwms/data/api/client/controllers/RatingController.java b/cwms-data-api-client/src/main/java/mil/army/usace/hec/cwms/data/api/client/controllers/RatingController.java index 5bdd0c5c..af8c41f7 100644 --- a/cwms-data-api-client/src/main/java/mil/army/usace/hec/cwms/data/api/client/controllers/RatingController.java +++ b/cwms-data-api-client/src/main/java/mil/army/usace/hec/cwms/data/api/client/controllers/RatingController.java @@ -25,6 +25,8 @@ package mil.army.usace.hec.cwms.data.api.client.controllers; import static mil.army.usace.hec.cwms.data.api.client.controllers.CdaEndpointConstants.ACCEPT_XML_HEADER_V2; +import static mil.army.usace.hec.cwms.data.api.client.controllers.RatingEffectiveDatesEndpointInput.EFFECTIVE_DATES_ENDPOINT; +import mil.army.usace.hec.cwms.data.api.client.model.RatingEffectiveDatesMap; import mil.army.usace.hec.cwms.http.client.ApiConnectionInfo; import mil.army.usace.hec.cwms.http.client.HttpRequestBuilderImpl; import mil.army.usace.hec.cwms.http.client.HttpRequestResponse; @@ -58,6 +60,17 @@ public String retrieveRatingXml(ApiConnectionInfo apiConnectionInfo, RatingEndpo } } + public RatingEffectiveDatesMap retrieveRatingEffectiveDates(ApiConnectionInfo apiConnectionInfo, RatingEffectiveDatesEndpointInput.GetAll input) throws IOException { + HttpRequestExecutor executor = new HttpRequestBuilderImpl(apiConnectionInfo, RATINGS + "/" + EFFECTIVE_DATES_ENDPOINT) + .addEndpointInput(input) + .get() + .withMediaType(ACCEPT_XML_HEADER_V2); + try (HttpRequestResponse response = executor.execute()) { + String body = response.getBody(); + return RadarObjectMapper.mapJsonToObject(body, RatingEffectiveDatesMap.class); + } + } + public void storeRatingSetXml(ApiConnectionInfo apiConnectionInfo, RatingEndpointInput.Post input) throws IOException { new HttpRequestBuilderImpl(apiConnectionInfo, RATINGS) .addEndpointInput(input) diff --git a/cwms-data-api-client/src/main/java/mil/army/usace/hec/cwms/data/api/client/controllers/RatingEffectiveDatesEndpointInput.java b/cwms-data-api-client/src/main/java/mil/army/usace/hec/cwms/data/api/client/controllers/RatingEffectiveDatesEndpointInput.java new file mode 100644 index 00000000..800565f6 --- /dev/null +++ b/cwms-data-api-client/src/main/java/mil/army/usace/hec/cwms/data/api/client/controllers/RatingEffectiveDatesEndpointInput.java @@ -0,0 +1,73 @@ +package mil.army.usace.hec.cwms.data.api.client.controllers; + +import java.time.Instant; +import java.time.ZoneId; +import java.util.Optional; +import static mil.army.usace.hec.cwms.data.api.client.controllers.CdaEndpointConstants.ACCEPT_HEADER_V2; +import static mil.army.usace.hec.cwms.data.api.client.controllers.CdaEndpointConstants.ACCEPT_QUERY_HEADER; +import mil.army.usace.hec.cwms.http.client.EndpointInput; +import mil.army.usace.hec.cwms.http.client.HttpRequestBuilder; + +public final class RatingEffectiveDatesEndpointInput { + + static final String EFFECTIVE_DATES_ENDPOINT = "effective-dates"; + static final String OFFICE_MASK_QUERY_PARAMETER = "office-mask"; + static final String RATING_ID_MASK_QUERY_PARAMETER = "rating-id-mask"; + static final String TIMEZONE_QUERY_PARAMETER = "timezone"; + static final String BEGIN_QUERY_PARAMETER = "begin"; + static final String END_QUERY_PARAMETER = "end"; + + public static GetAll getAll() { + return new GetAll(); + } + + public static final class GetAll extends EndpointInput{ + private String officeMask; + private String ratingIdMask; + private Instant begin; + private Instant end; + private ZoneId zoneId; + + private GetAll() { + //empty private ctor + } + + public GetAll officeMask(String officeMask) { + this.officeMask = officeMask; + return this; + } + + public GetAll ratingIdMask(String ratingIdMask) { + this.ratingIdMask = ratingIdMask; + return this; + } + + public GetAll zoneId(ZoneId timezone) { + this.zoneId = timezone; + return this; + } + + public GetAll begin(Instant begin) { + this.begin = begin; + return this; + } + + public GetAll end(Instant end) { + this.end = end; + return this; + } + + @Override + protected HttpRequestBuilder addInputParameters(HttpRequestBuilder httpRequestBuilder) { + String beginString = Optional.ofNullable(begin).map(Object::toString).orElse(null); + String endString = Optional.ofNullable(end).map(Object::toString).orElse(null); + String zoneIdString = Optional.ofNullable(this.zoneId).map(ZoneId::getId).orElse(null); + return httpRequestBuilder.addQueryParameter(OFFICE_MASK_QUERY_PARAMETER, officeMask) + .addQueryParameter(RATING_ID_MASK_QUERY_PARAMETER, ratingIdMask) + .addQueryParameter(TIMEZONE_QUERY_PARAMETER, zoneIdString) + .addQueryParameter(BEGIN_QUERY_PARAMETER, beginString) + .addQueryParameter(END_QUERY_PARAMETER, endString) + .addQueryHeader(ACCEPT_QUERY_HEADER, ACCEPT_HEADER_V2); + } + } +} diff --git a/cwms-data-api-client/src/test/java/mil/army/usace/hec/cwms/data/api/client/controllers/TestRatingController.java b/cwms-data-api-client/src/test/java/mil/army/usace/hec/cwms/data/api/client/controllers/TestRatingController.java index 8596a74b..dc15f035 100644 --- a/cwms-data-api-client/src/test/java/mil/army/usace/hec/cwms/data/api/client/controllers/TestRatingController.java +++ b/cwms-data-api-client/src/test/java/mil/army/usace/hec/cwms/data/api/client/controllers/TestRatingController.java @@ -24,6 +24,7 @@ package mil.army.usace.hec.cwms.data.api.client.controllers; +import java.util.Map; import mil.army.usace.hec.cwms.data.api.client.model.AbstractRatingMetadata; import mil.army.usace.hec.cwms.data.api.client.model.RatingMetadata; import mil.army.usace.hec.cwms.data.api.client.model.RatingMetadataList; @@ -76,6 +77,41 @@ void testUpdateRatingSet() throws IOException { assertDoesNotThrow(() -> controller.updateRatingSetXml(apiConnectionInfo, input)); } + @Test + public void testRatingsEffectiveDates() throws Exception { + String collect = readJsonFile("radar/v2/json/rating_effective_dates.json"); + mockHttpServer.enqueue(collect); + mockHttpServer.start(); + RatingController ratingController = new RatingController(); + ApiConnectionInfo apiConnectionInfo = buildConnectionInfo(); + RatingEffectiveDatesEndpointInput.GetAll ratingEffectiveDatesEndPointInput = RatingEffectiveDatesEndpointInput.getAll(); + RatingEffectiveDatesMap ratingeffectiveDatesMap = ratingController.retrieveRatingEffectiveDates(apiConnectionInfo, ratingEffectiveDatesEndPointInput); + assertNotNull(ratingeffectiveDatesMap.getOfficeToSpecDates()); + Map> effectiveDates = ratingeffectiveDatesMap.getOfficeToSpecDates(); + assertFalse(effectiveDates.isEmpty()); + List lrlEffectiveDates = effectiveDates.get("LRL"); + List spkEffectiveDates = effectiveDates.get("SPK"); + RatingSpecEffectiveDates baseProd = lrlEffectiveDates.get(0); + assertEquals("Milford.Stage;Flow.BASE.PRODUCTION", baseProd.getRatingSpecId()); + List baseProdEffectiveDates = baseProd.getEffectiveDates(); + assertEquals(2, baseProdEffectiveDates.size()); + assertEquals("2020-03-01T00:00:00Z", baseProdEffectiveDates.get(0).toString()); + assertEquals("2021-03-01T00:00:00Z", baseProdEffectiveDates.get(1).toString()); + + RatingSpecEffectiveDates logUsgs = lrlEffectiveDates.get(1); + assertEquals("Milford.Stage;Flow.Logarithmic.USGS-NWIS", logUsgs.getRatingSpecId()); + List logUsgsEffectiveDates = logUsgs.getEffectiveDates(); + assertEquals(2, logUsgsEffectiveDates.size()); + assertEquals("2020-03-02T00:00:00Z", logUsgsEffectiveDates.get(0).toString()); + assertEquals("2021-03-02T00:00:00Z", logUsgsEffectiveDates.get(1).toString()); + + RatingSpecEffectiveDates stj = spkEffectiveDates.get(0); + assertEquals("STJ-St_Joseph-Missouri.Stage;Flow.USGS-BASE.Production", stj.getRatingSpecId()); + List stjEffectiveDates = stj.getEffectiveDates(); + assertEquals(1, stjEffectiveDates.size()); + assertEquals("2022-01-01T00:00:00Z", stjEffectiveDates.get(0).toString()); + } + @Test void testDeleteRatingSet() throws IOException { String collect = readJsonFile("radar/v2/xml/rating.xml"); diff --git a/cwms-data-api-client/src/test/java/mil/army/usace/hec/cwms/data/api/client/controllers/TestRatingEffectiveDatesEndpointInput.java b/cwms-data-api-client/src/test/java/mil/army/usace/hec/cwms/data/api/client/controllers/TestRatingEffectiveDatesEndpointInput.java new file mode 100644 index 00000000..09d2293c --- /dev/null +++ b/cwms-data-api-client/src/test/java/mil/army/usace/hec/cwms/data/api/client/controllers/TestRatingEffectiveDatesEndpointInput.java @@ -0,0 +1,37 @@ +package mil.army.usace.hec.cwms.data.api.client.controllers; + +import java.time.ZoneId; +import java.time.ZonedDateTime; +import static mil.army.usace.hec.cwms.data.api.client.controllers.CdaEndpointConstants.ACCEPT_HEADER_V2; +import static mil.army.usace.hec.cwms.data.api.client.controllers.CdaEndpointConstants.ACCEPT_QUERY_HEADER; +import static mil.army.usace.hec.cwms.data.api.client.controllers.RatingEffectiveDatesEndpointInput.END_QUERY_PARAMETER; +import static mil.army.usace.hec.cwms.data.api.client.controllers.RatingEffectiveDatesEndpointInput.OFFICE_MASK_QUERY_PARAMETER; +import static mil.army.usace.hec.cwms.data.api.client.controllers.RatingEffectiveDatesEndpointInput.RATING_ID_MASK_QUERY_PARAMETER; +import static mil.army.usace.hec.cwms.data.api.client.controllers.RatingEffectiveDatesEndpointInput.BEGIN_QUERY_PARAMETER; +import static mil.army.usace.hec.cwms.data.api.client.controllers.RatingEffectiveDatesEndpointInput.TIMEZONE_QUERY_PARAMETER; +import static org.junit.jupiter.api.Assertions.assertEquals; +import org.junit.jupiter.api.Test; + +final class TestRatingEffectiveDatesEndpointInput { + + @Test + void testGetAll() { + MockHttpRequestBuilder mockHttpRequestBuilder = new MockHttpRequestBuilder(); + String ratingId = "BUFF.Stage;Flow.WCDS.Production"; + RatingEffectiveDatesEndpointInput.GetAll input = RatingEffectiveDatesEndpointInput.getAll() + .officeMask("SWT") + .ratingIdMask(ratingId) + .zoneId(ZoneId.of("UTC")) + .begin(ZonedDateTime.of(2022, 1, 1, 0, 0, 0, 0, ZoneId.of("UTC")).toInstant()) + .end(ZonedDateTime.of(2022, 2, 1, 0, 0, 0, 0, ZoneId.of("UTC")).toInstant()); + + input.addInputParameters(mockHttpRequestBuilder); + assertEquals("SWT", mockHttpRequestBuilder.getQueryParameter(OFFICE_MASK_QUERY_PARAMETER)); + + assertEquals(ratingId, mockHttpRequestBuilder.getQueryParameter(RATING_ID_MASK_QUERY_PARAMETER)); + assertEquals("2022-01-01T00:00:00Z", mockHttpRequestBuilder.getQueryParameter(BEGIN_QUERY_PARAMETER)); + assertEquals("2022-02-01T00:00:00Z", mockHttpRequestBuilder.getQueryParameter(END_QUERY_PARAMETER)); + assertEquals("UTC", mockHttpRequestBuilder.getQueryParameter(TIMEZONE_QUERY_PARAMETER)); + assertEquals(ACCEPT_HEADER_V2, mockHttpRequestBuilder.getQueryHeader(ACCEPT_QUERY_HEADER)); + } +} diff --git a/cwms-data-api-client/src/test/resources/radar/v2/json/rating_effective_dates.json b/cwms-data-api-client/src/test/resources/radar/v2/json/rating_effective_dates.json new file mode 100644 index 00000000..9b95b534 --- /dev/null +++ b/cwms-data-api-client/src/test/resources/radar/v2/json/rating_effective_dates.json @@ -0,0 +1,29 @@ +{ + "office-to-spec-dates": + { + "LRL": [ + { + "rating-spec-id": "Milford.Stage;Flow.BASE.PRODUCTION", + "effective-dates": [ + "2020-03-01T00:00:00Z", + "2021-03-01T00:00:00Z" + ] + }, + { + "rating-spec-id": "Milford.Stage;Flow.Logarithmic.USGS-NWIS", + "effective-dates": [ + "2020-03-02T00:00:00Z", + "2021-03-02T00:00:00Z" + ] + } + ], + "SPK": [ + { + "rating-spec-id": "STJ-St_Joseph-Missouri.Stage;Flow.USGS-BASE.Production", + "effective-dates": [ + "2022-01-01T00:00:00Z" + ] + } + ] + } +} \ No newline at end of file diff --git a/cwms-data-api-model/cwms-data-api-swagger.yaml b/cwms-data-api-model/cwms-data-api-swagger.yaml index 9ed2f83a..00e4fb66 100644 --- a/cwms-data-api-model/cwms-data-api-swagger.yaml +++ b/cwms-data-api-model/cwms-data-api-swagger.yaml @@ -43,7 +43,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] /auth/keys/{key-name}: get: tags: @@ -97,7 +97,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] delete: tags: - Authorization @@ -149,7 +149,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] /auth/keys: get: tags: @@ -198,7 +198,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] post: tags: - Authorization @@ -249,7 +249,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] /location/category/{category-id}: get: tags: @@ -309,7 +309,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] delete: tags: - Location Categories @@ -367,7 +367,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] /location/category: get: tags: @@ -422,7 +422,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] post: tags: - Location Categories @@ -468,7 +468,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] /location/group/{group-id}: get: tags: @@ -552,7 +552,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] delete: tags: - Location Groups @@ -616,7 +616,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] patch: tags: - Location Groups @@ -679,7 +679,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] /location/group: get: tags: @@ -761,7 +761,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] post: tags: - Location Groups @@ -807,7 +807,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] /locations/{location-id}: get: tags: @@ -831,9 +831,8 @@ paths: in: query description: |- Specifies the unit or unit system of the response. Valid values for the unit field are: - * `EN` Specifies English unit system. Location values will be in the default English units for their parameters. + * `EN` Specifies English unit system. Location values will be in the default English units for their parameters. This is the default behavior. * `SI` Specifies the SI unit system. Location values will be in the default SI units for their parameters. - * `Other` Any unit returned in the response to the units URI request that is appropriate for the requested parameters. schema: type: string responses: @@ -878,7 +877,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] delete: tags: - Locations @@ -897,6 +896,8 @@ paths: schema: type: string responses: + '200': + description: Location successfully deleted from CWMS. '400': description: Bad Request content: @@ -929,7 +930,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] patch: tags: - Locations @@ -984,7 +985,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] /locations: get: tags: @@ -1096,13 +1097,19 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] post: tags: - Locations summary: Post locations description: Create new CWMS Location operationId: postLocations + parameters: + - name: fail-if-exists + in: query + description: 'Specifies whether to fail if the location already exists. Default: true. If true, an error will be returned if the location already exists. If false, the existing location will be updated with the new values.' + schema: + type: boolean requestBody: content: application/json: @@ -1145,7 +1152,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] /states: get: tags: @@ -1193,7 +1200,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] /counties: get: tags: @@ -1241,7 +1248,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] /offices/{office}: get: tags: @@ -1318,7 +1325,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] /offices: get: tags: @@ -1391,7 +1398,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] /units: get: tags: @@ -1446,7 +1453,7 @@ paths: description: The format requested is not implemented security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] /parameters: get: tags: @@ -1516,7 +1523,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] /timezones: get: tags: @@ -1578,7 +1585,7 @@ paths: description: The format requested is not implemented security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] /levels/{level-id}: get: tags: @@ -1658,7 +1665,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] delete: tags: - Levels @@ -1725,7 +1732,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] patch: tags: - Levels @@ -1749,9 +1756,6 @@ paths: application/json: schema: $ref: '#/components/schemas/LocationLevel' - application/xml: - schema: - $ref: '#/components/schemas/LocationLevel' required: true responses: '400': @@ -1786,7 +1790,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] /levels: get: tags: @@ -1904,7 +1908,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] post: tags: - Levels @@ -1916,9 +1920,6 @@ paths: application/json: schema: $ref: '#/components/schemas/LocationLevel' - application/xml: - schema: - $ref: '#/components/schemas/LocationLevel' required: true responses: '400': @@ -1953,7 +1954,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] /levels/{level-id}/timeseries: get: tags: @@ -1981,12 +1982,12 @@ paths: type: string - name: begin in: query - description: Specifies the start of the time window for data to be included in the response. If this field is not specified, any required time window begins 24 hours prior to the specified or default end time. The format for this field is ISO 8601 extended, with optional offset and timezone, i.e., 'YYYY-MM-dd'T'hh:mm:ss[Z'['VV']']', e.g., '2021-06-10T13:00:00-07:00'. + description: Specifies the start of the time window for data to be included in the response. If this field is not specified, any required time window begins 24 hours prior to the specified or default end time. The format for this field is ISO 8601 extended, with optional offset and timezone, i.e., 'YYYY-MM-dd'T'hh:mm:ss[Z'['VV']']', e.g., '2021-06-10T13:00:00-07:00'. schema: type: string - name: end in: query - description: Specifies the end of the time window for data to be included in the response. If this field is not specified, any required time window ends at the current time. The format for this field is ISO 8601 extended, with optional timezone, i.e., 'YYYY-MM-dd'T'hh:mm:ss[Z'['VV']']', e.g., '2021-06-10T13:00:00-07:00'. + description: Specifies the end of the time window for data to be included in the response. If this field is not specified, any required time window ends at the current time. The format for this field is ISO 8601 extended, with optional offset and timezone, i.e., 'YYYY-MM-dd'T'hh:mm:ss[Z'['VV']']', e.g., '2021-06-10T13:00:00-07:00'. schema: type: string - name: timezone @@ -2053,7 +2054,7 @@ paths: description: Requested format is not implemented security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] /timeseries/recent: get: tags: @@ -2130,7 +2131,142 @@ paths: description: request format is not implemented security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] + /timeseries/filtered: + get: + tags: + - TimeSeries + summary: Get timeseries filtered + operationId: getTimeseriesFiltered + parameters: + - name: name + in: query + description: Specifies the name of the time series whose data is to be included in the response. A case insensitive comparison is used to match names. + required: true + schema: + type: string + - name: office + in: query + description: Specifies the owning office of the time series(s) whose data is to be included in the response. Required for:application/json;version=2 and application/xml;version=2. For other formats, if this field is not specified, matching location level information from all offices shall be returned. + schema: + type: string + - name: unit + in: query + description: |- + Specifies the unit or unit system of the response. Valid values for the unit field are: + * `EN` (default) Specifies English unit system. Location level values will be in the default English units for their parameters. + * `SI` Specifies the SI unit system. Location level values will be in the default SI units for their parameters. + * `Other` Any unit returned in the response to the units URI request that is appropriate for the requested parameters. + schema: + type: string + - name: version-date + in: query + description: Specifies the version date of a time series trace to be selected. The format for this field is ISO 8601 extended, with optional offset and timezone, i.e., 'YYYY-MM-dd'T'hh:mm:ss[Z'['VV']']', e.g., '2021-06-10T13:00:00-07:00'. If field is empty, query will return a max aggregate for the timeseries. Only supported for:application/json;version=2 and application/xml;version=2 + schema: + type: string + - name: begin + in: query + description: Specifies the start of the time window for data to be included in the response. If this field is not specified, any required time window begins 24 hours prior to the specified or default end time. The format for this field is ISO 8601 extended, with optional offset and timezone, i.e., 'YYYY-MM-dd'T'hh:mm:ss[Z'['VV']']', e.g., '2021-06-10T13:00:00-07:00'. + schema: + type: string + - name: end + in: query + description: Specifies the end of the time window for data to be included in the response. If this field is not specified, any required time window ends at the current time. The format for this field is ISO 8601 extended, with optional offset and timezone, i.e., 'YYYY-MM-dd'T'hh:mm:ss[Z'['VV']']', e.g., '2021-06-10T13:00:00-07:00'. + schema: + type: string + - name: timezone + in: query + description: "Specifies the time zone of the values of the begin and end fields (unless otherwise specified). For application/json;version=2 and application/xml;version=2 the results are returned in UTC. For other formats this parameter affects the time zone of times in the response. If this field is not specified, the default time zone of UTC shall be used.\r\nIgnored if begin was specified with offset and timezone." + schema: + type: string + - name: trim + in: query + description: Specifies whether to trim missing values from the beginning and end of the retrieved values. Only supported for:application/json;version=2 and application/xml;version=2. Default is true. + schema: + type: boolean + - name: include-entry-date + in: query + description: Specifies whether to include the data entry date of each value in the response. Including the data entry date will increase the size of the array containing each data value from three to four, changing the format of the response. Default is false. + schema: + type: boolean + - name: query + in: query + description: |- + Specifies an RSQL-like query string to filter the results. Expressions may reference "value, date_time, quality, data_entry_date". Example Queries: + * `value!=null` Excludes null values + * `date_time>2020-04-01T00:00:00Z and date_time<2024-04-01T00:00:00Z` Returns values within a date range. + * `data_entry_date=2025-05-15T00:00:00Z` Returns data entered at a specific data_entry_date + * `value>=0 and value < 215.0` Returns points when the value is within a specified range. + * `value<0 or value > 215.0` Returns points when the value is outside a specified range. + * `(value==null or value<0) and date_time>2019-11-01T00:00:00Z and data_entry_date>2024-03-01T00:00:00Z and data_entry_date<2024-04-01T00:00:00Z` Find null or negative values for times after start of pandemic that were entered in March 2024. + * `quality=in=(255,256,1023,1024)` Returns points with specific quality codes. + schema: + type: string + - name: page + in: query + description: This end point can return large amounts of data as a series of pages. This parameter is used to describes the current location in the response stream. This is an opaque value, and can be obtained from the 'next-page' value in the response. + schema: + type: string + - name: page-size + in: query + description: How many entries per page returned. Default 500. + schema: + type: integer + format: int32 + responses: + '200': + description: A list of elements of the data set you've selected. + content: + application/json;version=2: + schema: + $ref: '#/components/schemas/TimeSeries' + application/xml;version=2: + schema: + $ref: '#/components/schemas/TimeSeries' + application/xml: + schema: + $ref: '#/components/schemas/TimeSeries' + application/json: + schema: + $ref: '#/components/schemas/TimeSeries' + '': + schema: + $ref: '#/components/schemas/TimeSeries' + '400': + description: Invalid parameter combination + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '404': + description: The provided combination of parameters did not find a timeseries. + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '500': + description: Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '501': + description: Requested format is not implemented + security: + - ApiKey: [] + - CwmsAAACacAuth: [] /standard-text-id/{standard-text-id}: get: tags: @@ -2190,7 +2326,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] delete: tags: - Standard Text @@ -2249,7 +2385,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] /standard-text-id: get: tags: @@ -2307,7 +2443,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] post: tags: - Standard Text @@ -2359,7 +2495,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] /timeseries/text: get: tags: @@ -2435,7 +2571,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] post: tags: - Text-TimeSeries @@ -2487,7 +2623,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] /timeseries/text/{name}: delete: tags: @@ -2569,7 +2705,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] patch: tags: - Text-TimeSeries @@ -2627,7 +2763,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] /timeseries/text/{name}/value: get: tags: @@ -2708,7 +2844,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] /timeseries/binary: get: tags: @@ -2794,7 +2930,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] post: tags: - Binary-TimeSeries @@ -2845,7 +2981,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] /timeseries/binary/{name}: delete: tags: @@ -2926,7 +3062,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] patch: tags: - Binary-TimeSeries @@ -2983,7 +3119,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] /timeseries/binary/{name}/value: get: tags: @@ -3065,7 +3201,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] /timeseries/profile/{location-id}/{parameter-id}: get: tags: @@ -3132,7 +3268,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] delete: tags: - TimeSeries @@ -3193,7 +3329,7 @@ paths: description: Internal server error security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] /timeseries/profile: get: tags: @@ -3268,7 +3404,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] post: tags: - TimeSeries @@ -3318,7 +3454,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] /timeseries/profile-parser/{location-id}/{parameter-id}: get: tags: @@ -3388,7 +3524,7 @@ paths: description: Requested format is not implemented security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] delete: tags: - TimeSeries @@ -3450,7 +3586,7 @@ paths: description: Requested format is not implemented security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] /timeseries/profile-parser: get: tags: @@ -3521,7 +3657,7 @@ paths: description: Requested format is not implemented security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] post: tags: - TimeSeries @@ -3575,7 +3711,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] /timeseries/profile-instance/{location-id}/{parameter-id}/{version}: get: tags: @@ -3716,7 +3852,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] delete: tags: - TimeSeries @@ -3804,7 +3940,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] /timeseries/profile-instance: get: tags: @@ -3874,7 +4010,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] post: tags: - TimeSeries @@ -3952,7 +4088,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] /timeseries/category/{category-id}: get: tags: @@ -4014,7 +4150,7 @@ paths: description: request format is not implemented security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] delete: tags: - TimeSeries Categories @@ -4072,7 +4208,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] /timeseries/category: get: tags: @@ -4129,7 +4265,7 @@ paths: description: request format is not implemented security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] post: tags: - TimeSeries Categories @@ -4181,7 +4317,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] /timeseries/identifier-descriptor/{name}: get: tags: @@ -4248,7 +4384,7 @@ paths: description: request format is not implemented security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] delete: tags: - TimeSeries Identifier @@ -4312,7 +4448,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] patch: tags: - TimeSeries Identifier @@ -4392,7 +4528,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] /timeseries/identifier-descriptor: get: tags: @@ -4463,7 +4599,7 @@ paths: description: request format is not implemented security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] post: tags: - TimeSeries Identifier @@ -4518,7 +4654,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] /timeseries/group/{group-id}: get: tags: @@ -4596,7 +4732,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] delete: tags: - Timeseries Groups @@ -4655,7 +4791,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] patch: tags: - Timeseries Groups @@ -4718,7 +4854,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] /timeseries/group: get: tags: @@ -4795,7 +4931,7 @@ paths: description: request format is not implemented security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] post: tags: - Timeseries Groups @@ -4847,7 +4983,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] /timeseries: get: tags: @@ -4857,7 +4993,7 @@ paths: parameters: - name: name in: query - description: Specifies the name(s) of the time series whose data is to be included in the response. A case insensitive comparison is used to match names. + description: Specifies the name of the time series whose data is to be included in the response. A case insensitive comparison is used to match names. required: true schema: type: string @@ -4873,11 +5009,21 @@ paths: * `EN` (default) Specifies English unit system. Location level values will be in the default English units for their parameters. * `SI` Specifies the SI unit system. Location level values will be in the default SI units for their parameters. * `Other` Any unit returned in the response to the units URI request that is appropriate for the requested parameters. + deprecated: true + schema: + type: string + - name: units + in: query + description: |- + Specifies the units or unit system of the response. Valid values for the units field are: + * `EN` (default) Specifies English unit system. Location level values will be in the default English units for their parameters. + * `SI` Specifies the SI unit system. Location level values will be in the default SI units for their parameters. + * `Other` Any units returned in the response to the units URI request that is appropriate for the requested parameters. schema: type: string - name: version-date in: query - description: Specifies the version date of a time series trace to be selected. The format for this field is ISO 8601 extended, i.e., 'format', e.g., '2021-06-10T13:00:00-0700' .If field is empty, query will return a max aggregate for the timeseries. Only supported for:application/json;version=2 and application/xml;version=2 + description: Specifies the version date of a time series trace to be selected. The format for this field is ISO 8601 extended, with optional offset and timezone, i.e., 'YYYY-MM-dd'T'hh:mm:ss[Z'['VV']']', e.g., '2021-06-10T13:00:00-07:00'.If field is empty, query will return a max aggregate for the timeseries. Only supported for:application/json;version=2 and application/xml;version=2 schema: type: string - name: datum @@ -4890,12 +5036,12 @@ paths: type: string - name: begin in: query - description: Specifies the start of the time window for data to be included in the response. If this field is not specified, any required time window begins 24 hours prior to the specified or default end time. The format for this field is ISO 8601 extended, with optional offset and timezone, i.e., 'YYYY-MM-dd'T'hh:mm:ss[Z'['VV']']', e.g., '2021-06-10T13:00:00-07:00'. + description: Specifies the start of the time window for data to be included in the response. If this field is not specified, any required time window begins 24 hours prior to the specified or default end time. The format for this field is ISO 8601 extended, with optional offset and timezone, i.e., 'YYYY-MM-dd'T'hh:mm:ss[Z'['VV']']', e.g., '2021-06-10T13:00:00-07:00'. schema: type: string - name: end in: query - description: Specifies the end of the time window for data to be included in the response. If this field is not specified, any required time window ends at the current time. The format for this field is ISO 8601 extended, with optional timezone, i.e., 'YYYY-MM-dd'T'hh:mm:ss[Z'['VV']']', e.g., '2021-06-10T13:00:00-07:00'. + description: Specifies the end of the time window for data to be included in the response. If this field is not specified, any required time window ends at the current time. The format for this field is ISO 8601 extended, with optional offset and timezone, i.e., 'YYYY-MM-dd'T'hh:mm:ss[Z'['VV']']', e.g., '2021-06-10T13:00:00-07:00'. schema: type: string - name: timezone @@ -4919,6 +5065,11 @@ paths: * `json` (default) schema: type: string + - name: include-entry-date + in: query + description: Specifies whether to include the data entry date of each value in the response. Including the data entry date will increase the size of the array containing each data value from three to four, changing the format of the response. Default is false. + schema: + type: boolean - name: page in: query description: This end point can return large amounts of data as a series of pages. This parameter is used to describes the current location in the response stream. This is an opaque value, and can be obtained from the 'next-page' value in the response. @@ -4983,12 +5134,12 @@ paths: description: Requested format is not implemented security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] post: tags: - TimeSeries summary: Post timeseries - description: 'Used to create and save time-series data. Data to be stored must have time stamps in UTC represented as epoch milliseconds ' + description: 'Used to create and save time-series data. Data to be stored must have time stamps in UTC represented as epoch milliseconds. If data entry date is included in the request, it will be dropped. ' operationId: postTimeseries parameters: - name: timezone @@ -5094,7 +5245,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] /timeseries/{timeseries}: delete: tags: @@ -5116,13 +5267,13 @@ paths: type: string - name: begin in: query - description: The start of the time window to delete. The format for this field is ISO 8601 extended, with optional offset and timezone, i.e., 'YYYY-MM-dd'T'hh:mm:ss[Z'['VV']']', e.g., '2021-06-10T13:00:00-07:00'. + description: The start of the time window to delete. The format for this field is ISO 8601 extended, with optional offset and timezone, i.e., 'YYYY-MM-dd'T'hh:mm:ss[Z'['VV']']', e.g., '2021-06-10T13:00:00-07:00'. required: true schema: type: string - name: end in: query - description: The end of the time window to delete.The format for this field is ISO 8601 extended, with optional offset and timezone, i.e., 'YYYY-MM-dd'T'hh:mm:ss[Z'['VV']']', e.g., '2021-06-10T13:00:00-07:00'. + description: The end of the time window to delete. The format for this field is ISO 8601 extended, with optional offset and timezone, i.e., 'YYYY-MM-dd'T'hh:mm:ss[Z'['VV']']', e.g., '2021-06-10T13:00:00-07:00'. required: true schema: type: string @@ -5189,7 +5340,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] patch: tags: - TimeSeries @@ -5306,43 +5457,54 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - /ratings/template/{template-id}: - get: + - CwmsAAACacAuth: [] + /ratings/rate-values/{office}/{rating-id}: + post: tags: - Ratings - summary: Get ratings template with templateId - operationId: getRatingsTemplateWithTemplateId + summary: Post ratings rateValues with office with ratingId + description: 'Rates input values using CWMS ratings. The input format `RatingInputValues` includes a two dimensional array with each dimension corresponding to an independent parameter in the rating curve. The output format `RatedOutputTimeSeries` will contain a singular double array corresponding to the dependent parameter of the rating curve. ' + operationId: postRatingsRateValuesWithOfficeWithRatingId parameters: - - name: template-id + - name: office in: path - description: Specifies the template whose data is to be included in the response + description: Office owning the rating required: true schema: type: string - - name: office - in: query - description: Specifies the owning office of the Rating Templates whose data is to be included in the response. If this field is not specified, matching rating information from all offices shall be returned. + - name: rating-id + in: path + description: Rating Specification identifier required: true schema: type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RateInputValues' + application/json;version=1: + schema: + $ref: '#/components/schemas/RateInputValues' + required: true responses: '200': description: OK content: - application/json;version=2: + application/json: schema: - type: array - items: - $ref: '#/components/schemas/RatingTemplate' + $ref: '#/components/schemas/RatedOutputValues' + application/json;version=1: + schema: + $ref: '#/components/schemas/RatedOutputValues' '400': - description: Bad Request + description: Invalid input parameters. content: application/json: schema: $ref: '#/components/schemas/CdaError' '401': - description: Unauthorized + description: Client is not authorized. content: application/json: schema: @@ -5354,7 +5516,7 @@ paths: schema: $ref: '#/components/schemas/CdaError' '404': - description: Not Found + description: The rating curve was not found. content: application/json: schema: @@ -5365,43 +5527,58 @@ paths: application/json: schema: $ref: '#/components/schemas/CdaError' + '501': + description: Requested format is not implemented security: - ApiKey: [] - - OpenIDConnect: [] - delete: + - CwmsAAACacAuth: [] + /ratings/rate-ts/{office}/{rating-id}: + post: tags: - Ratings - summary: Delete ratings template with templateId - description: Deletes requested rating specification - operationId: deleteRatingsTemplateWithTemplateId + summary: Post ratings rateTs with office with ratingId + description: 'Rates input values using CWMS ratings. The input format `RateInputTimeSeries` DTO supports an array of CWMS time series ids, each corresponding to an independent parameter in the rating curve.The output format `RatedOutputTimeSeries` will contain a singular double array corresponding to the dependent parameter of the rating curve. ' + operationId: postRatingsRateTsWithOfficeWithRatingId parameters: - - name: template-id + - name: office in: path - description: The rating-template-id of the ratings data to be deleted. + description: Office owning the rating required: true schema: type: string - - name: office - in: query - description: Specifies the owning office of the ratings to be deleted. + - name: rating-id + in: path + description: Rating Specification identifier required: true schema: type: string - - name: method - in: query - description: Specifies the delete method used. - required: true - schema: - $ref: '#/components/schemas/DeleteMethod' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RateInputTimeSeries' + application/json;version=1: + schema: + $ref: '#/components/schemas/RateInputTimeSeries' + required: true responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/RatedOutputTimeSeries' + application/json;version=1: + schema: + $ref: '#/components/schemas/RatedOutputTimeSeries' '400': - description: Bad Request + description: Invalid input parameters. content: application/json: schema: $ref: '#/components/schemas/CdaError' '401': - description: Unauthorized + description: Client is not authorized. content: application/json: schema: @@ -5413,7 +5590,7 @@ paths: schema: $ref: '#/components/schemas/CdaError' '404': - description: Not Found + description: The rating curve was not found. content: application/json: schema: @@ -5424,52 +5601,58 @@ paths: application/json: schema: $ref: '#/components/schemas/CdaError' + '501': + description: Requested format is not implemented security: - ApiKey: [] - - OpenIDConnect: [] - /ratings/template: - get: + - CwmsAAACacAuth: [] + /ratings/reverse-rate-values/{office}/{rating-id}: + post: tags: - Ratings - summary: Get ratings template - operationId: getRatingsTemplate + summary: Post ratings reverseRateValues with office with ratingId + description: 'Reverse rates input values using CWMS ratings. The input format `RateInputValues` requires a singular array of doubles corresponding to the dependent parameter in the rating curve. The output format `RatedOutputValues` will contain a singular double array corresponding to the independent parameter of the rating curve. Note: This endpoint only works on monotonically increase/decreasing table ratings with a single independent parameter.' + operationId: postRatingsReverseRateValuesWithOfficeWithRatingId parameters: - name: office - in: query - description: Specifies the owning office of the Rating Templates whose data is to be included in the response. If this field is not specified, matching rating information from all offices shall be returned. - schema: - type: string - - name: template-id-mask - in: query - description: RegExp that specifies the rating template IDs to be included in the response. If this field is not specified, all rating templates shall be returned. + in: path + description: Office owning the rating + required: true schema: type: string - - name: page - in: query - description: This end point can return a lot of data, this identifies where in the request you are. This is an opaque value, and can be obtained from the 'next-page' value in the response. + - name: rating-id + in: path + description: Rating Specification identifier + required: true schema: type: string - - name: page-size - in: query - description: How many entries per page returned. Default 100. - schema: - type: integer - format: int32 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RateInputValues' + application/json;version=1: + schema: + $ref: '#/components/schemas/RateInputValues' + required: true responses: '200': description: OK content: - application/json;version=2: + application/json: schema: - $ref: '#/components/schemas/RatingTemplates' + $ref: '#/components/schemas/RatedOutputValues' + application/json;version=1: + schema: + $ref: '#/components/schemas/RatedOutputValues' '400': - description: Bad Request + description: Invalid input parameters. content: application/json: schema: $ref: '#/components/schemas/CdaError' '401': - description: Unauthorized + description: Client is not authorized. content: application/json: schema: @@ -5481,7 +5664,7 @@ paths: schema: $ref: '#/components/schemas/CdaError' '404': - description: Not Found + description: The rating or input time series were not found. content: application/json: schema: @@ -5492,36 +5675,58 @@ paths: application/json: schema: $ref: '#/components/schemas/CdaError' + '501': + description: Requested format is not implemented security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] + /ratings/reverse-rate-ts/{office}/{rating-id}: post: tags: - Ratings - summary: Post ratings template - description: Create new Rating Template - operationId: postRatingsTemplate + summary: Post ratings reverseRateTs with office with ratingId + description: 'Reverse rates input values using CWMS ratings. The input format `RateInputTimeSeries` requires a singular time series id corresponding to the dependent parameter in the rating curve. The output format `RatedOutputTimeSeries` will contain a singular double array corresponding to the independent parameter of the rating curve. Note: This endpoint only works on monotonically increase/decreasing table ratings with a single independent parameter.' + operationId: postRatingsReverseRateTsWithOfficeWithRatingId parameters: - - name: fail-if-exists - in: query - description: 'Create will fail if provided ID already exists. Default: true' + - name: office + in: path + description: Office owning the rating + required: true schema: - type: boolean + type: string + - name: rating-id + in: path + description: Rating Specification identifier + required: true + schema: + type: string requestBody: content: - application/xml;version=2: + application/json: schema: - $ref: '#/components/schemas/RatingTemplate' + $ref: '#/components/schemas/RateInputTimeSeries' + application/json;version=1: + schema: + $ref: '#/components/schemas/RateInputTimeSeries' required: true responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/RatedOutputTimeSeries' + application/json;version=1: + schema: + $ref: '#/components/schemas/RatedOutputTimeSeries' '400': - description: Bad Request + description: Invalid input parameters. content: application/json: schema: $ref: '#/components/schemas/CdaError' '401': - description: Unauthorized + description: Client is not authorized. content: application/json: schema: @@ -5533,7 +5738,7 @@ paths: schema: $ref: '#/components/schemas/CdaError' '404': - description: Not Found + description: The rating or input time series were not found. content: application/json: schema: @@ -5544,25 +5749,27 @@ paths: application/json: schema: $ref: '#/components/schemas/CdaError' + '501': + description: Requested format is not implemented security: - ApiKey: [] - - OpenIDConnect: [] - /ratings/spec/{rating-id}: + - CwmsAAACacAuth: [] + /ratings/template/{template-id}: get: tags: - Ratings - summary: Get ratings spec with ratingId - operationId: getRatingsSpecWithRatingId + summary: Get ratings template with templateId + operationId: getRatingsTemplateWithTemplateId parameters: - - name: rating-id + - name: template-id in: path - description: Specifies the rating-id of the Rating Spec to be included in the response + description: Specifies the template whose data is to be included in the response required: true schema: type: string - name: office in: query - description: Specifies the owning office of the Rating Specs whose data is to be included in the response. If this field is not specified, matching rating information from all offices shall be returned. + description: Specifies the owning office of the Rating Templates whose data is to be included in the response. If this field is not specified, matching rating information from all offices shall be returned. required: true schema: type: string @@ -5572,7 +5779,9 @@ paths: content: application/json;version=2: schema: - $ref: '#/components/schemas/RatingSpec' + type: array + items: + $ref: '#/components/schemas/RatingTemplate' '400': description: Bad Request content: @@ -5605,17 +5814,17 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] delete: tags: - Ratings - summary: Delete ratings spec with ratingId + summary: Delete ratings template with templateId description: Deletes requested rating specification - operationId: deleteRatingsSpecWithRatingId + operationId: deleteRatingsTemplateWithTemplateId parameters: - - name: rating-id + - name: template-id in: path - description: The rating-spec-id of the ratings data to be deleted. + description: The rating-template-id of the ratings data to be deleted. required: true schema: type: string @@ -5664,22 +5873,22 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - /ratings/spec: + - CwmsAAACacAuth: [] + /ratings/template: get: tags: - Ratings - summary: Get ratings spec - operationId: getRatingsSpec + summary: Get ratings template + operationId: getRatingsTemplate parameters: - name: office in: query - description: Specifies the owning office of the Rating Specs whose data is to be included in the response. If this field is not specified, matching rating information from all offices shall be returned. + description: Specifies the owning office of the Rating Templates whose data is to be included in the response. If this field is not specified, matching rating information from all offices shall be returned. schema: type: string - - name: rating-id-mask + - name: template-id-mask in: query - description: Posix regular expression that specifies the rating IDs to be included in the response. If this field is not specified, all Rating Specs shall be returned. + description: RegExp that specifies the rating template IDs to be included in the response. If this field is not specified, all rating templates shall be returned. schema: type: string - name: page @@ -5699,7 +5908,7 @@ paths: content: application/json;version=2: schema: - $ref: '#/components/schemas/RatingSpecs' + $ref: '#/components/schemas/RatingTemplates' '400': description: Bad Request content: @@ -5732,13 +5941,13 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] post: tags: - Ratings - summary: Post ratings spec - description: Create new Rating Specification - operationId: postRatingsSpec + summary: Post ratings template + description: Create new Rating Template + operationId: postRatingsTemplate parameters: - name: fail-if-exists in: query @@ -5749,7 +5958,7 @@ paths: content: application/xml;version=2: schema: - $ref: '#/components/schemas/RatingSpec' + $ref: '#/components/schemas/RatingTemplate' required: true responses: '400': @@ -5784,57 +5993,33 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - /ratings/metadata: + - CwmsAAACacAuth: [] + /ratings/spec/{rating-id}: get: tags: - Ratings - summary: Get ratings metadata - operationId: getRatingsMetadata + summary: Get ratings spec with ratingId + operationId: getRatingsSpecWithRatingId parameters: - - name: office - in: query - description: Specifies the owning office of the Rating Specs whose data is to be included in the response. If this field is not specified, matching rating information from all offices shall be returned. - schema: - type: string - - name: rating-id-mask - in: query - description: RegExp that specifies the rating IDs to be included in the response. If this field is not specified, all Rating Specs shall be returned. - schema: - type: string - - name: start - in: query - description: Specifies the start of the time window of the effective dates to be included. If this field is not specified no start time will be used. - schema: - type: string - - name: end - in: query - description: Specifies the end of the time window for effective dates to be included. If this field is not specified no end time will be used. - schema: - type: string - - name: timezone - in: query - description: Specifies the time zone of the values of the begin and end fields (unless otherwise specified). If this field is not specified, the default time zone of UTC shall be used. + - name: rating-id + in: path + description: Specifies the rating-id of the Rating Spec to be included in the response + required: true schema: type: string - - name: page + - name: office in: query - description: This end point can return a lot of data, this identifies where in the request you are. This is an opaque value, and can be obtained from the 'next-page' value in the response. + description: Specifies the owning office of the Rating Specs whose data is to be included in the response. If this field is not specified, matching rating information from all offices shall be returned. + required: true schema: type: string - - name: page-size - in: query - description: How many entries per page returned. Default 50. - schema: - type: integer - format: int32 responses: '200': description: OK content: application/json;version=2: schema: - $ref: '#/components/schemas/RatingMetadataList' + $ref: '#/components/schemas/RatingSpec' '400': description: Bad Request content: @@ -5867,37 +6052,33 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - /ratings/{rating-id}/latest: - get: + - CwmsAAACacAuth: [] + delete: tags: - Ratings - summary: Get ratings with ratingId latest - description: Returns CWMS Rating Data - operationId: getRatingsWithRatingIdLatest + summary: Delete ratings spec with ratingId + description: Deletes requested rating specification + operationId: deleteRatingsSpecWithRatingId parameters: - name: rating-id in: path - description: 'The rating-id of the effective dates to be retrieve. ' + description: The rating-spec-id of the ratings data to be deleted. required: true schema: type: string - name: office in: query - description: Specifies the owning office of the ratingset to be included in the response. + description: Specifies the owning office of the ratings to be deleted. required: true schema: type: string + - name: method + in: query + description: Specifies the delete method used. + required: true + schema: + $ref: '#/components/schemas/DeleteMethod' responses: - '200': - description: OK - content: - application/json;version=2: - schema: - $ref: '#/components/schemas/Unit' - application/xml;version=2: - schema: - $ref: '#/components/schemas/Unit' '400': description: Bad Request content: @@ -5930,57 +6111,42 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - /ratings/{rating-id}: + - CwmsAAACacAuth: [] + /ratings/spec: get: tags: - Ratings - summary: Get ratings with ratingId - description: Returns CWMS Rating Data - operationId: getRatingsWithRatingId + summary: Get ratings spec + operationId: getRatingsSpec parameters: - - name: rating-id - in: path - description: 'The rating-id of the effective dates to be retrieve. ' - required: true - schema: - type: string - name: office in: query - description: Specifies the owning office of the ratingset to be included in the response. - required: true - schema: - type: string - - name: begin - in: query - description: Specifies the start of the time window for data to be included in the response. If this field is not specified no start time will be used. + description: Specifies the owning office of the Rating Specs whose data is to be included in the response. If this field is not specified, matching rating information from all offices shall be returned. schema: type: string - - name: end + - name: rating-id-mask in: query - description: Specifies the end of the time window for data to be included in the response. If this field is not specified no end time will be used. + description: Posix regular expression that specifies the rating IDs to be included in the response. If this field is not specified, all Rating Specs shall be returned. schema: type: string - - name: timezone + - name: page in: query - description: Specifies the time zone of the values of the begin and end fields (unless otherwise specified), as well as the time zone of any times in the response. If this field is not specified, the default time zone of UTC shall be used. + description: This end point can return a lot of data, this identifies where in the request you are. This is an opaque value, and can be obtained from the 'next-page' value in the response. schema: type: string - - name: method + - name: page-size in: query - description: Specifies the retrieval method used. If no method is provided EAGER will be used. + description: How many entries per page returned. Default 100. schema: - $ref: '#/components/schemas/DatabaseLoadMethod' + type: integer + format: int32 responses: '200': description: OK content: application/json;version=2: schema: - $ref: '#/components/schemas/Unit' - application/xml;version=2: - schema: - $ref: '#/components/schemas/Unit' + $ref: '#/components/schemas/RatingSpecs' '400': description: Bad Request content: @@ -6013,42 +6179,25 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - delete: + - CwmsAAACacAuth: [] + post: tags: - Ratings - summary: Delete ratings with ratingId - operationId: deleteRatingsWithRatingId + summary: Post ratings spec + description: Create new Rating Specification + operationId: postRatingsSpec parameters: - - name: rating-id - in: path - description: 'The rating-id of the effective dates to be deleted. ' - required: true - schema: - type: string - - name: office - in: query - description: Specifies the office of the ratings to be deleted. - required: true - schema: - type: string - - name: begin - in: query - description: The start of the time window to delete. The format for this field is ISO 8601 extended, with optional offset and timezone, i.e., 'YYYY-MM-dd'T'hh:mm:ss[Z'['VV']']', e.g., '2021-06-10T13:00:00-07:00'. - required: true - schema: - type: string - - name: end - in: query - description: The end of the time window to delete. The format for this field is ISO 8601 extended, with optional offset and timezone, i.e., 'YYYY-MM-dd'T'hh:mm:ss[Z'['VV']']', e.g., '2021-06-10T13:00:00-07:00'. - required: true - schema: - type: string - - name: timezone + - name: fail-if-exists in: query - description: This field specifies a default timezone to be used if the format of the begin, end, or version-date parameters do not include offset or time zone information. Defaults to UTC. + description: 'Create will fail if provided ID already exists. Default: true' schema: - type: string + type: boolean + requestBody: + content: + application/xml;version=2: + schema: + $ref: '#/components/schemas/RatingSpec' + required: true responses: '400': description: Bad Request @@ -6082,34 +6231,57 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - patch: + - CwmsAAACacAuth: [] + /ratings/metadata: + get: tags: - Ratings - summary: Patch ratings with ratingId - description: Update a RatingSet - operationId: patchRatingsWithRatingId + summary: Get ratings metadata + operationId: getRatingsMetadata parameters: - - name: rating-id - in: path - required: true + - name: office + in: query + description: Specifies the owning office of the Rating Specs whose data is to be included in the response. If this field is not specified, matching rating information from all offices shall be returned. schema: type: string - - name: store-template + - name: rating-id-mask in: query - description: 'Also store updates to the rating template. Default: true' + description: RegExp that specifies the rating IDs to be included in the response. If this field is not specified, all Rating Specs shall be returned. schema: - type: boolean - requestBody: - content: - application/xml;version=2: - schema: - $ref: '#/components/schemas/Unit' - application/json;version=2: - schema: - $ref: '#/components/schemas/Unit' - required: true + type: string + - name: start + in: query + description: Specifies the start of the time window of the effective dates to be included. If this field is not specified no start time will be used. + schema: + type: string + - name: end + in: query + description: Specifies the end of the time window for effective dates to be included. If this field is not specified no end time will be used. + schema: + type: string + - name: timezone + in: query + description: Specifies the time zone of the values of the begin and end fields (unless otherwise specified). If this field is not specified, the default time zone of UTC shall be used. + schema: + type: string + - name: page + in: query + description: This end point can return a lot of data, this identifies where in the request you are. This is an opaque value, and can be obtained from the 'next-page' value in the response. + schema: + type: string + - name: page-size + in: query + description: How many entries per page returned. Default 50. + schema: + type: integer + format: int32 responses: + '200': + description: OK + content: + application/json;version=2: + schema: + $ref: '#/components/schemas/RatingMetadataList' '400': description: Bad Request content: @@ -6142,82 +6314,37 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - /ratings: + - CwmsAAACacAuth: [] + /ratings/{rating-id}/latest: get: tags: - Ratings - summary: Get ratings - operationId: getRatings + summary: Get ratings with ratingId latest + description: Returns CWMS Rating Data + operationId: getRatingsWithRatingIdLatest parameters: - - name: name - in: query - description: Specifies the name(s) of the rating whose data is to be included in the response. A case insensitive comparison is used to match names. + - name: rating-id + in: path + description: 'The rating-id of the effective dates to be retrieve. ' + required: true schema: type: string - name: office in: query - description: Specifies the owning office of the Rating(s) whose data is to be included in the response. If this field is not specified, matching rating information from all offices shall be returned. - schema: - type: string - - name: unit - in: query - description: |- - Specifies the unit or unit system of the response. Valid values for the unit field are: - * `EN` Specifies English unit system. Rating values will be in the default English units for their parameters. - * `SI` Specifies the SI unit system. Rating values will be in the default SI units for their parameters. - * `Other` Any unit returned in the response to the units URI request that is appropriate for the requested parameters. - schema: - type: string - - name: datum - in: query - description: |- - Specifies the elevation datum of the response. This field affects only elevation Ratings. Valid values for this field are: - * `NAVD88` The elevation values will in the specified or default units above the NAVD-88 datum. - * `NGVD29` The elevation values will be in the specified or default units above the NGVD-29 datum. - schema: - type: string - - name: at - in: query - description: Specifies the start of the time window for data to be included in the response. If this field is not specified, any required time window begins 24 hours prior to the specified or default end time. - schema: - type: string - - name: end - in: query - description: Specifies the end of the time window for data to be included in the response. If this field is not specified, any required time window ends at the current time - schema: - type: string - - name: timezone - in: query - description: Specifies the time zone of the values of the begin and end fields (unless otherwise specified), as well as the time zone of any times in the response. If this field is not specified, the default time zone of UTC shall be used. - schema: - type: string - - name: format - in: query - description: |- - Specifies the encoding format of the response. Valid values for the format field for this URI are: - * `tab` - * `csv` - * `xml` - * `json` (default) + description: Specifies the owning office of the ratingset to be included in the response. + required: true schema: type: string responses: '200': description: OK content: - application/json: + application/json;version=2: schema: $ref: '#/components/schemas/Unit' - application/xml: + application/xml;version=2: schema: $ref: '#/components/schemas/Unit' - text/tab-separated-values: - schema: - type: string - text/csv: - schema: - type: string '400': description: Bad Request content: @@ -6237,7 +6364,7 @@ paths: schema: $ref: '#/components/schemas/CdaError' '404': - description: The provided combination of parameters did not find a rating table. + description: Not Found content: application/json: schema: @@ -6248,33 +6375,49 @@ paths: application/json: schema: $ref: '#/components/schemas/CdaError' - '501': - description: Requested format is not implemented security: - ApiKey: [] - - OpenIDConnect: [] - post: + - CwmsAAACacAuth: [] + /ratings/effective-dates: + get: tags: - Ratings - summary: Post ratings - description: Create new RatingSet - operationId: postRatings + summary: Get ratings effectiveDates + description: Returns mapping of office -> spec id -> effective date-times for all matching offices and spec ids. + operationId: getRatingsEffectiveDates parameters: - - name: store-template + - name: office-mask in: query - description: 'Also store updates to the rating template. Default: true' + description: Office Id used to filter the results. schema: - type: boolean - requestBody: - content: - application/xml;version=2: - schema: - $ref: '#/components/schemas/Unit' - application/json;version=2: - schema: - $ref: '#/components/schemas/Unit' - required: true + type: string + - name: rating-id-mask + in: query + description: Spec Id used to filter the results. Defaults to '*' + schema: + type: string + - name: timezone + in: query + description: Specifies the time zone of the values of the begin and end fields (unless otherwise specified). If this field is not specified, the default time zone of UTC shall be used. + schema: + type: string + - name: begin + in: query + description: The start of the time window + schema: + type: string + - name: end + in: query + description: The end of the time window + schema: + type: string responses: + '200': + description: OK + content: + application/json;version=2: + schema: + $ref: '#/components/schemas/RatingEffectiveDatesMap' '400': description: Bad Request content: @@ -6307,101 +6450,57 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - /catalog/{dataset}: + - CwmsAAACacAuth: [] + /ratings/{rating-id}: get: tags: - - Catalog - summary: Get catalog with dataset - operationId: getCatalogWithDataset + - Ratings + summary: Get ratings with ratingId + description: Returns CWMS Rating Data + operationId: getRatingsWithRatingId parameters: - - name: dataset + - name: rating-id in: path - description: A list of what data? E.g. Timeseries, Locations, Ratings, etc + description: 'The rating-id of the effective dates to be retrieve. ' required: true - schema: - $ref: '#/components/schemas/CatalogableEndpoint' - - name: page - in: query - description: This end point can return a lot of data, this identifies where in the request you are. schema: type: string - - name: page-size - in: query - description: How many entries per page returned. Default 500. - schema: - type: integer - format: int32 - - name: unit-system - in: query - description: Unit System desired in response. Can be SI (International Scientific) or EN (Imperial.) If unspecified, defaults to SI. - schema: - $ref: '#/components/schemas/UnitSystem' - name: office in: query - description: 3-4 letter office name representing the district you want to isolate data to. - schema: - type: string - - name: like - in: query - description: Posix regular expression matching against the id - schema: - type: string - - name: timeseries-category-like - in: query - description: Posix regular expression matching against the timeseries category id - schema: - type: string - - name: timeseries-group-like - in: query - description: Posix regular expression matching against the timeseries group id - schema: - type: string - - name: location-category-like - in: query - description: Posix regular expression matching against the location category id + description: Specifies the owning office of the ratingset to be included in the response. + required: true schema: type: string - - name: location-group-like + - name: begin in: query - description: Posix regular expression matching against the location group id + description: Specifies the start of the time window for data to be included in the response. If this field is not specified no start time will be used. schema: type: string - - name: bounding-office-like + - name: end in: query - description: Posix regular expression matching against the location bounding office. When this field is used items with no bounding office set will not be present in results. + description: Specifies the end of the time window for data to be included in the response. If this field is not specified no end time will be used. schema: type: string - - name: include-extents - in: query - description: Whether the returned catalog entries should include timeseries extents. Only valid for TIMESERIES. Default is true. - schema: - type: boolean - - name: exclude-empty - in: query - description: Specifies whether Timeseries that have empty extents should be excluded from the results. For purposes of this parameter 'empty' is defined as VERSION_TIME, EARLIEST_TIME, LATEST_TIME and LAST_UPDATE all being null. This parameter does not control whether the extents are returned to the user, only whether matching timeseries are excluded. Only valid for TIMESERIES. Default is true. - schema: - type: boolean - - name: location-kind-like + - name: timezone in: query - description: 'Posix regular expression matching against the location kind. The location-kind is typically unset or one of the following: {"SITE", "EMBANKMENT", "OVERFLOW", "TURBINE", "STREAM", "PROJECT", "STREAMGAGE", "BASIN", "OUTLET", "LOCK", "GATE"}. Multiple kinds can be matched by using Regular Expression OR clauses. For example: "(SITE|STREAM)"' + description: Specifies the time zone of the values of the begin and end fields (unless otherwise specified), as well as the time zone of any times in the response. If this field is not specified, the default time zone of UTC shall be used. schema: type: string - - name: location-type-like + - name: method in: query - description: Posix regular expression matching against the location type. + description: Specifies the retrieval method used. If no method is provided EAGER will be used. schema: - type: string + $ref: '#/components/schemas/DatabaseLoadMethod' responses: '200': - description: A list of elements the data set you've selected. + description: OK content: application/json;version=2: schema: - $ref: '#/components/schemas/Catalog' - application/xml: + $ref: '#/components/schemas/Unit' + application/xml;version=2: schema: - $ref: '#/components/schemas/Catalog' + $ref: '#/components/schemas/Unit' '400': description: Bad Request content: @@ -6434,109 +6533,42 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - /basins/{name}: - get: + - CwmsAAACacAuth: [] + delete: tags: - - Basins - summary: Get basins with name - description: Returns CWMS Basin Data - operationId: getBasinsWithName + - Ratings + summary: Delete ratings with ratingId + operationId: deleteRatingsWithRatingId parameters: - - name: name + - name: rating-id in: path - description: Specifies the name of the basin to be retrieved. + description: 'The rating-id of the effective dates to be deleted. ' required: true schema: type: string - name: office in: query - description: Specifies the owning office of the basin whose data is to be included in the response. + description: Specifies the office of the ratings to be deleted. required: true schema: type: string - - name: unit + - name: begin in: query - description: |- - Specifies the unit or unit system of the response. Valid values for the unit field are: - * `EN` (default) Specifies English unit system. Basin area values will be in the default English units for their parameters. - * `SI` Specifies the SI unit system. - * `Other` Any unit returned in the response to the units URI request that is appropriate for the requested parameters. - schema: - type: string - responses: - '200': - description: OK - content: - application/vnd.named+pg+json: - schema: - $ref: '#/components/schemas/Basin' - application/json;version=1: - schema: - $ref: '#/components/schemas/Basin' - application/json: - schema: - $ref: '#/components/schemas/Basin' - '400': - description: Bad Request - content: - application/json: - schema: - $ref: '#/components/schemas/CdaError' - '401': - description: Unauthorized - content: - application/json: - schema: - $ref: '#/components/schemas/CdaError' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/CdaError' - '404': - description: The provided combination of parameters did not find a basin. - content: - application/json: - schema: - $ref: '#/components/schemas/CdaError' - '500': - description: Server Error - content: - application/json: - schema: - $ref: '#/components/schemas/CdaError' - '501': - description: Requested format is not implemented - security: - - ApiKey: [] - - OpenIDConnect: [] - delete: - tags: - - Basins - summary: Delete basins with name - description: Renames CWMS Basin - operationId: deleteBasinsWithName - parameters: - - name: name - in: path - description: Specifies the name of the basin to be deleted. + description: The start of the time window to delete. The format for this field is ISO 8601 extended, with optional offset and timezone, i.e., 'YYYY-MM-dd'T'hh:mm:ss[Z'['VV']']', e.g., '2021-06-10T13:00:00-07:00'. required: true schema: type: string - - name: office + - name: end in: query - description: Specifies the owning office of the basin to be renamed. + description: The end of the time window to delete. The format for this field is ISO 8601 extended, with optional offset and timezone, i.e., 'YYYY-MM-dd'T'hh:mm:ss[Z'['VV']']', e.g., '2021-06-10T13:00:00-07:00'. required: true schema: type: string - - name: method + - name: timezone in: query - description: Specifies the delete method used. - required: true + description: This field specifies a default timezone to be used if the format of the begin, end, or version-date parameters do not include offset or time zone information. Defaults to UTC. schema: - $ref: '#/components/schemas/DeleteMethod' + type: string responses: '400': description: Bad Request @@ -6570,31 +6602,39 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] patch: tags: - - Basins - summary: Patch basins with name - description: Renames CWMS Basin - operationId: patchBasinsWithName + - Ratings + summary: Patch ratings with ratingId + description: Update a RatingSet + operationId: patchRatingsWithRatingId parameters: - - name: name + - name: rating-id in: path + description: Specifies the rating-id of the rating to be updated. required: true schema: type: string - - name: name + - name: store-template in: query - description: Specifies the new name for the basin. - required: true + description: 'Also store updates to the rating template. Default: true' schema: - type: string - - name: office + type: boolean + - name: replace-base-curve in: query - description: Specifies the owning office of the basin to be renamed. - required: true + description: 'Replace the base curve of USGS stream flow rating. Default: false' schema: - type: string + type: boolean + requestBody: + content: + application/xml;version=2: + schema: + $ref: '#/components/schemas/Unit' + application/json;version=2: + schema: + $ref: '#/components/schemas/Unit' + required: true responses: '400': description: Bad Request @@ -6615,7 +6655,7 @@ paths: schema: $ref: '#/components/schemas/CdaError' '404': - description: The provided combination of parameters did not find a basin. + description: Not Found content: application/json: schema: @@ -6626,45 +6666,84 @@ paths: application/json: schema: $ref: '#/components/schemas/CdaError' - '501': - description: Requested format is not implemented security: - ApiKey: [] - - OpenIDConnect: [] - /basins: + - CwmsAAACacAuth: [] + /ratings: get: tags: - - Basins - summary: Get basins - description: Returns CWMS Basin Data - operationId: getBasins + - Ratings + summary: Get ratings + operationId: getRatings parameters: + - name: name + in: query + description: Specifies the name(s) of the rating whose data is to be included in the response. A case insensitive comparison is used to match names. + schema: + type: string - name: office in: query - description: Specifies the owning office of the basin whose data is to be included in the response. If this field is not specified, matching basin information from all offices shall be returned. + description: Specifies the owning office of the Rating(s) whose data is to be included in the response. If this field is not specified, matching rating information from all offices shall be returned. schema: type: string - name: unit in: query description: |- - Specifies the unit or unit system of the response. Valid values for the unit field are: - * `EN` Specifies English unit system. Basin values will be in the default English units for their parameters. (This is default if no value is entered) - * `SI` Specifies the SI unit system. Basin values will be in the default SI units for their parameters. + Specifies the unit or unit system of the response. Valid values for the unit field are: + * `EN` Specifies English unit system. Rating values will be in the default English units for their parameters. + * `SI` Specifies the SI unit system. Rating values will be in the default SI units for their parameters. + * `NATIVE` Specifies the NATIVE units. Rating values will be in the native units for their parameters. + schema: + type: string + - name: datum + in: query + description: |- + Specifies the elevation datum of the response. This field affects only elevation Ratings. Valid values for this field are: + * `NAVD88` The elevation values will in the specified or default units above the NAVD-88 datum. + * `NGVD29` The elevation values will be in the specified or default units above the NGVD-29 datum. + schema: + type: string + - name: at + in: query + description: Specifies the start of the time window for data to be included in the response. If this field is not specified, any required time window begins 24 hours prior to the specified or default end time. + schema: + type: string + - name: end + in: query + description: Specifies the end of the time window for data to be included in the response. If this field is not specified, any required time window ends at the current time + schema: + type: string + - name: timezone + in: query + description: Specifies the time zone of the values of the begin and end fields (unless otherwise specified), as well as the time zone of any times in the response. If this field is not specified, the default time zone of UTC shall be used. + schema: + type: string + - name: format + in: query + description: |- + Specifies the encoding format of the response. Valid values for the format field for this URI are: + * `tab` + * `csv` + * `xml` + * `json` (default) schema: type: string responses: '200': description: OK content: - application/vnd.named+pg+json: + application/json: schema: - $ref: '#/components/schemas/Basin' - application/json;version=1: + $ref: '#/components/schemas/Unit' + application/xml: schema: - $ref: '#/components/schemas/Basin' - application/json: + $ref: '#/components/schemas/Unit' + text/tab-separated-values: schema: - $ref: '#/components/schemas/Basin' + type: string + text/csv: + schema: + type: string '400': description: Bad Request content: @@ -6684,7 +6763,7 @@ paths: schema: $ref: '#/components/schemas/CdaError' '404': - description: The provided combination of parameters did not find a basin. + description: The provided combination of parameters did not find a rating table. content: application/json: schema: @@ -6699,16 +6778,31 @@ paths: description: Requested format is not implemented security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] post: tags: - - Basins - summary: Post basins - description: Creates CWMS Basin - operationId: postBasins + - Ratings + summary: Post ratings + description: Create new RatingSet + operationId: postRatings + parameters: + - name: store-template + in: query + description: 'Also store updates to the rating template. Default: true' + schema: + type: boolean + requestBody: + content: + application/xml;version=2: + schema: + $ref: '#/components/schemas/Unit' + application/json;version=2: + schema: + $ref: '#/components/schemas/Unit' + required: true responses: - '204': - description: Basin successfully stored to CWMS. + '201': + description: Rating Set successfully stored to CWMS. '400': description: Bad Request content: @@ -6739,50 +6833,108 @@ paths: application/json: schema: $ref: '#/components/schemas/CdaError' - '501': - description: Requested format is not implemented security: - ApiKey: [] - - OpenIDConnect: [] - /streams/{name}: + - CwmsAAACacAuth: [] + /catalog/{dataset}: get: tags: - - Streams - summary: Get streams with name - description: Returns CWMS Stream Data - operationId: getStreamsWithName + - Catalog + summary: Get catalog with dataset + operationId: getCatalogWithDataset parameters: - - name: name + - name: dataset in: path - description: Specifies the stream-id of the stream to be retrieved. + description: A list of what data? E.g. Timeseries, Locations, Ratings, etc required: true + schema: + $ref: '#/components/schemas/CatalogableEndpoint' + - name: page + in: query + description: This end point can return a lot of data, this identifies where in the request you are. schema: type: string + - name: page-size + in: query + description: How many entries per page returned. Default 500. + schema: + type: integer + format: int32 + - name: unit-system + in: query + description: Unit System desired in response. Can be SI (International Scientific) or EN (Imperial.) If unspecified, defaults to SI. + schema: + $ref: '#/components/schemas/UnitSystem' - name: office in: query - description: Specifies the owning office of the stream to be retrieved. - required: true + description: 3-4 letter office name representing the district you want to isolate data to. schema: type: string - - name: station-unit + - name: like in: query - description: Specifies the unit of measure for the station. Defaults to mi. + description: Posix regular expression matching against the id schema: type: string - responses: - '200': - description: OK - content: - application/json;version=1: - schema: - type: array - items: - $ref: '#/components/schemas/Stream' - application/json: + - name: timeseries-category-like + in: query + description: Posix regular expression matching against the timeseries category id + schema: + type: string + - name: timeseries-group-like + in: query + description: Posix regular expression matching against the timeseries group id + schema: + type: string + - name: location-category-like + in: query + description: Posix regular expression matching against the location category id + schema: + type: string + - name: location-group-like + in: query + description: Posix regular expression matching against the location group id + schema: + type: string + - name: bounding-office-like + in: query + description: Posix regular expression matching against the location bounding office. When this field is used items with no bounding office set will not be present in results. + schema: + type: string + - name: include-extents + in: query + description: Whether the returned catalog entries should include timeseries extents. Only valid for TIMESERIES. Default is true. + schema: + type: boolean + - name: exclude-empty + in: query + description: Specifies whether Timeseries that have empty extents should be excluded from the results. For purposes of this parameter 'empty' is defined as VERSION_TIME, EARLIEST_TIME, LATEST_TIME and LAST_UPDATE all being null. This parameter does not control whether the extents are returned to the user, only whether matching timeseries are excluded. Only valid for TIMESERIES. Default is true. + schema: + type: boolean + - name: location-kind-like + in: query + description: 'Posix regular expression matching against the location kind. The location-kind is typically unset or one of the following: {"SITE", "EMBANKMENT", "OVERFLOW", "TURBINE", "STREAM", "PROJECT", "STREAMGAGE", "BASIN", "OUTLET", "LOCK", "GATE"}. Multiple kinds can be matched by using Regular Expression OR clauses. For example: "(SITE|STREAM)"' + schema: + type: string + - name: location-type-like + in: query + description: Posix regular expression matching against the location type. + schema: + type: string + - name: include-aliases + in: query + description: Whether to add aliases to the catalog entries. Default is false. If true, the aliases will be added to the catalog entries in the response. + schema: + type: boolean + responses: + '200': + description: A list of elements the data set you've selected. + content: + application/json;version=2: schema: - type: array - items: - $ref: '#/components/schemas/Stream' + $ref: '#/components/schemas/Catalog' + application/xml: + schema: + $ref: '#/components/schemas/Catalog' '400': description: Bad Request content: @@ -6815,34 +6967,49 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - delete: + - CwmsAAACacAuth: [] + /basins/{name}: + get: tags: - - Streams - summary: Delete streams with name - description: Delete CWMS Stream - operationId: deleteStreamsWithName + - Basins + summary: Get basins with name + description: Returns CWMS Basin Data + operationId: getBasinsWithName parameters: - name: name in: path - description: Specifies the stream-id of the stream to be deleted. + description: Specifies the name of the basin to be retrieved. required: true schema: type: string - name: office in: query - description: Specifies the owning office of the stream to be deleted. + description: Specifies the owning office of the basin whose data is to be included in the response. required: true schema: type: string - - name: method + - name: unit in: query - description: Specifies the delete method used. Defaults to "DELETE_KEY" + description: |- + Specifies the unit or unit system of the response. Valid values for the unit field are: + * `EN` (default) Specifies English unit system. Basin area values will be in the default English units for their parameters. + * `SI` Specifies the SI unit system. + * `Other` Any unit returned in the response to the units URI request that is appropriate for the requested parameters. schema: - $ref: '#/components/schemas/DeleteMethod' + type: string responses: - '204': - description: Stream successfully deleted from CWMS. + '200': + description: OK + content: + application/vnd.named+pg+json: + schema: + $ref: '#/components/schemas/Basin' + application/json;version=1: + schema: + $ref: '#/components/schemas/Basin' + application/json: + schema: + $ref: '#/components/schemas/Basin' '400': description: Bad Request content: @@ -6862,7 +7029,7 @@ paths: schema: $ref: '#/components/schemas/CdaError' '404': - description: Based on the combination of inputs provided the stream was not found. + description: The provided combination of parameters did not find a basin. content: application/json: schema: @@ -6873,36 +7040,37 @@ paths: application/json: schema: $ref: '#/components/schemas/CdaError' + '501': + description: Requested format is not implemented security: - ApiKey: [] - - OpenIDConnect: [] - patch: + - CwmsAAACacAuth: [] + delete: tags: - - Streams - summary: Patch streams with name - description: Rename CWMS Stream - operationId: patchStreamsWithName + - Basins + summary: Delete basins with name + description: Deletes CWMS Basin + operationId: deleteBasinsWithName parameters: - name: name in: path + description: Specifies the name of the basin to be deleted. required: true schema: type: string - - name: name + - name: office in: query - description: 'Specifies the new stream-id. ' + description: Specifies the owning office of the basin to be deleted. required: true schema: type: string - - name: office + - name: method in: query - description: Specifies the owning office of the stream to be renamed. + description: Specifies the delete method used. required: true schema: - type: string + $ref: '#/components/schemas/DeleteMethod' responses: - '204': - description: Stream successfully renamed in CWMS. '400': description: Bad Request content: @@ -6935,54 +7103,101 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - /streams: - get: + - CwmsAAACacAuth: [] + patch: tags: - - Streams - summary: Get streams - description: Returns matching CWMS Stream Data for a Reservoir Project. - operationId: getStreams + - Basins + summary: Patch basins with name + description: Renames CWMS Basin + operationId: patchBasinsWithName parameters: - - name: office-mask - in: query - description: Office id for the reservoir project location associated with the streams. + - name: name + in: path + required: true schema: type: string - - name: stream-id-mask + - name: name in: query - description: Specifies the stream-id of the stream to be retrieved. + description: Specifies the new name for the basin. + required: true schema: type: string - - name: diverts-from-stream-id-mask + - name: office in: query - description: Specifies the stream-id of the stream that the returned streams flow from. + description: Specifies the owning office of the basin to be renamed. + required: true schema: type: string - - name: flows-into-stream-id-mask + responses: + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '404': + description: The provided combination of parameters did not find a basin. + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '500': + description: Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '501': + description: Requested format is not implemented + security: + - ApiKey: [] + - CwmsAAACacAuth: [] + /basins: + get: + tags: + - Basins + summary: Get basins + description: Returns CWMS Basin Data + operationId: getBasins + parameters: + - name: office in: query - description: Specifies the stream-id of the stream that the returned streams flow into. + description: Specifies the owning office of the basin whose data is to be included in the response. If this field is not specified, matching basin information from all offices shall be returned. schema: type: string - - name: station-unit + - name: unit in: query - description: Specifies the unit of measure for the station. Defaults to mi. + description: |- + Specifies the unit or unit system of the response. Valid values for the unit field are: + * `EN` Specifies English unit system. Basin values will be in the default English units for their parameters. (This is default if no value is entered) + * `SI` Specifies the SI unit system. Basin values will be in the default SI units for their parameters. schema: type: string responses: '200': description: OK content: + application/vnd.named+pg+json: + schema: + $ref: '#/components/schemas/Basin' application/json;version=1: schema: - type: array - items: - $ref: '#/components/schemas/Stream' + $ref: '#/components/schemas/Basin' application/json: schema: - type: array - items: - $ref: '#/components/schemas/Stream' + $ref: '#/components/schemas/Basin' '400': description: Bad Request content: @@ -7002,7 +7217,7 @@ paths: schema: $ref: '#/components/schemas/CdaError' '404': - description: Not Found + description: The provided combination of parameters did not find a basin. content: application/json: schema: @@ -7013,30 +7228,20 @@ paths: application/json: schema: $ref: '#/components/schemas/CdaError' + '501': + description: Requested format is not implemented security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] post: tags: - - Streams - summary: Post streams - description: Create CWMS Stream - operationId: postStreams - parameters: - - name: fail-if-exists - in: query - description: 'Create will fail if provided ID already exists. Default: true' - schema: - type: boolean - requestBody: - content: - application/json;version=1: - schema: - $ref: '#/components/schemas/Stream' - required: true + - Basins + summary: Post basins + description: Creates CWMS Basin + operationId: postBasins responses: '204': - description: Stream successfully stored to CWMS. + description: Basin successfully stored to CWMS. '400': description: Bad Request content: @@ -7067,52 +7272,34 @@ paths: application/json: schema: $ref: '#/components/schemas/CdaError' + '501': + description: Requested format is not implemented security: - ApiKey: [] - - OpenIDConnect: [] - /stream-locations/{office}/{name}/downstream-locations: + - CwmsAAACacAuth: [] + /streams/{name}: get: tags: - - StreamLocations - summary: Get streamLocations with office with name downstreamLocations - description: Returns matching downstream stream locations. - operationId: getStreamLocationsWithOfficeWithNameDownstreamLocations - parameters: - - name: office - in: path - description: Office id for the stream location associated with the downstream locations. - required: true - schema: - type: string + - Streams + summary: Get streams with name + description: Returns CWMS Stream Data + operationId: getStreamsWithName + parameters: - name: name in: path - description: Specifies the name of the stream location whose downstream locations data is to be included in the response. + description: Specifies the stream-id of the stream to be retrieved. required: true schema: type: string - - name: all-downstream - in: query - description: If true, retrieve all downstream locations. - schema: - type: boolean - - name: same-stream-only - in: query - description: If true, retrieve only locations on the same stream. - schema: - type: boolean - - name: station-unit - in: query - description: Station units. - schema: - type: string - - name: stage-unit + - name: office in: query - description: Stage units. + description: Specifies the owning office of the stream to be retrieved. + required: true schema: type: string - - name: area-unit + - name: station-unit in: query - description: Area units. + description: Specifies the unit of measure for the station. Defaults to mi. schema: type: string responses: @@ -7123,7 +7310,12 @@ paths: schema: type: array items: - $ref: '#/components/schemas/StreamLocation' + $ref: '#/components/schemas/Stream' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Stream' '400': description: Bad Request content: @@ -7156,61 +7348,34 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - /stream-locations/{office}/{name}/upstream-locations: - get: + - CwmsAAACacAuth: [] + delete: tags: - - StreamLocations - summary: Get streamLocations with office with name upstreamLocations - description: Returns matching upstream stream locations. - operationId: getStreamLocationsWithOfficeWithNameUpstreamLocations + - Streams + summary: Delete streams with name + description: Delete CWMS Stream + operationId: deleteStreamsWithName parameters: - - name: office - in: path - description: Office id for the stream location associated with the upstream locations. - required: true - schema: - type: string - name: name in: path - description: Specifies the name of the stream location whose upstream locations data is to be included in the response. + description: Specifies the stream-id of the stream to be deleted. required: true schema: type: string - - name: all-upstream - in: query - description: If true, retrieve all upstream locations. - schema: - type: boolean - - name: same-stream-only - in: query - description: If true, retrieve only locations on the same stream. - schema: - type: boolean - - name: station-unit - in: query - description: Station units. - schema: - type: string - - name: stage-unit + - name: office in: query - description: Stage units. + description: Specifies the owning office of the stream to be deleted. + required: true schema: type: string - - name: area-unit + - name: method in: query - description: Area units. + description: Specifies the delete method used. Defaults to "DELETE_KEY" schema: - type: string + $ref: '#/components/schemas/DeleteMethod' responses: '200': - description: OK - content: - application/json;version=1: - schema: - type: array - items: - $ref: '#/components/schemas/StreamLocation' + description: Stream successfully deleted from CWMS. '400': description: Bad Request content: @@ -7230,7 +7395,7 @@ paths: schema: $ref: '#/components/schemas/CdaError' '404': - description: Not Found + description: Based on the combination of inputs provided the stream was not found. content: application/json: schema: @@ -7243,62 +7408,34 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - /stream-locations/{name}: - get: + - CwmsAAACacAuth: [] + patch: tags: - - StreamLocations - summary: Get streamLocations with name - description: Returns CWMS Stream Location Data - operationId: getStreamLocationsWithName + - Streams + summary: Patch streams with name + description: Rename CWMS Stream + operationId: patchStreamsWithName parameters: - name: name in: path - description: Specifies the location-id of the stream location to be retrieved. required: true schema: type: string - - name: office + - name: name in: query - description: Specifies the owning office of the stream location to be retrieved. + description: 'Specifies the new stream-id. ' required: true schema: type: string - - name: stream-id + - name: office in: query - description: Specifies the stream-id of the stream location to be retrieved. + description: Specifies the owning office of the stream to be renamed. required: true schema: type: string - - name: station-unit - in: query - description: Specifies the unit of measure for the station. Default units are mi. - schema: - type: string - - name: stage-unit - in: query - description: Specifies the unit of measure for the stage. Default units are ft. - schema: - type: string - - name: area-unit - in: query - description: Specifies the unit of measure for the area. Default units are mi2. - schema: - type: string responses: - '200': - description: OK - content: - application/json;version=1: - schema: - type: array - items: - $ref: '#/components/schemas/StreamLocation' - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/StreamLocation' + '204': + description: Stream successfully renamed in CWMS. '400': description: Bad Request content: @@ -7331,35 +7468,54 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - delete: + - CwmsAAACacAuth: [] + /streams: + get: tags: - - StreamLocations - summary: Delete streamLocations with name - description: Delete CWMS Stream Location - operationId: deleteStreamLocationsWithName + - Streams + summary: Get streams + description: Returns matching CWMS Stream Data for a Reservoir Project. + operationId: getStreams parameters: - - name: name - in: path - description: Specifies the location-id of the stream location to be deleted. - required: true + - name: office-mask + in: query + description: Office id for the reservoir project location associated with the streams. schema: type: string - - name: office + - name: stream-id-mask in: query - description: Specifies the owning office of the stream location to be deleted. - required: true + description: Specifies the stream-id of the stream to be retrieved. schema: type: string - - name: stream-id + - name: diverts-from-stream-id-mask in: query - description: Specifies the stream-id of the stream location to be deleted. - required: true + description: Specifies the stream-id of the stream that the returned streams flow from. + schema: + type: string + - name: flows-into-stream-id-mask + in: query + description: Specifies the stream-id of the stream that the returned streams flow into. + schema: + type: string + - name: station-unit + in: query + description: Specifies the unit of measure for the station. Defaults to mi. schema: type: string responses: - '204': - description: Stream Location successfully deleted from CWMS. + '200': + description: OK + content: + application/json;version=1: + schema: + type: array + items: + $ref: '#/components/schemas/Stream' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Stream' '400': description: Bad Request content: @@ -7379,7 +7535,7 @@ paths: schema: $ref: '#/components/schemas/CdaError' '404': - description: Stream Location not found. + description: Not Found content: application/json: schema: @@ -7392,28 +7548,28 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - patch: + - CwmsAAACacAuth: [] + post: tags: - - StreamLocations - summary: Patch streamLocations with name - description: Update CWMS Stream Location - operationId: patchStreamLocationsWithName + - Streams + summary: Post streams + description: Create CWMS Stream + operationId: postStreams parameters: - - name: name - in: path - required: true + - name: fail-if-exists + in: query + description: 'Create will fail if provided ID already exists. Default: true' schema: - type: string + type: boolean requestBody: content: application/json;version=1: schema: - $ref: '#/components/schemas/StreamLocation' + $ref: '#/components/schemas/Stream' required: true responses: '204': - description: Stream Location successfully updated to CWMS. + description: Stream successfully stored to CWMS. '400': description: Bad Request content: @@ -7446,43 +7602,50 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - /stream-locations: + - CwmsAAACacAuth: [] + /stream-locations/{office}/{name}/downstream-locations: get: tags: - StreamLocations - summary: Get streamLocations - description: Returns matching CWMS Stream Location Data for a Reservoir Project. - operationId: getStreamLocations + summary: Get streamLocations with office with name downstreamLocations + description: Returns matching downstream stream locations. + operationId: getStreamLocationsWithOfficeWithNameDownstreamLocations parameters: - - name: office-mask - in: query - description: Office id for the reservoir project location associated with the stream locations. + - name: office + in: path + description: Office id for the stream location associated with the downstream locations. + required: true schema: type: string - - name: stream-id-mask - in: query - description: Specifies the stream-id of the stream that the returned stream locations belong to. + - name: name + in: path + description: Specifies the name of the stream location whose downstream locations data is to be included in the response. + required: true schema: type: string - - name: name-mask + - name: all-downstream in: query - description: Specifies the location-id of the stream location to be retrieved. + description: If true, retrieve all downstream locations. schema: - type: string - - name: station-unit + type: boolean + - name: same-stream-only in: query - description: Specifies the unit of measure for the station. Default units are mi. + description: If true, retrieve only locations on the same stream. schema: - type: string + type: boolean + - name: station-unit + in: query + description: Station units. + schema: + type: string - name: stage-unit in: query - description: Specifies the unit of measure for the stage. Default units are ft. + description: Stage units. schema: type: string - name: area-unit in: query - description: Specifies the unit of measure for the area. Default units are mi2. + description: Area units. schema: type: string responses: @@ -7494,11 +7657,6 @@ paths: type: array items: $ref: '#/components/schemas/StreamLocation' - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/StreamLocation' '400': description: Bad Request content: @@ -7531,28 +7689,61 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - post: + - CwmsAAACacAuth: [] + /stream-locations/{office}/{name}/upstream-locations: + get: tags: - StreamLocations - summary: Post streamLocations - description: Create CWMS Stream Location - operationId: postStreamLocations + summary: Get streamLocations with office with name upstreamLocations + description: Returns matching upstream stream locations. + operationId: getStreamLocationsWithOfficeWithNameUpstreamLocations parameters: - - name: fail-if-exists + - name: office + in: path + description: Office id for the stream location associated with the upstream locations. + required: true + schema: + type: string + - name: name + in: path + description: Specifies the name of the stream location whose upstream locations data is to be included in the response. + required: true + schema: + type: string + - name: all-upstream in: query - description: 'Create will fail if provided ID already exists. Default: true' + description: If true, retrieve all upstream locations. schema: type: boolean - requestBody: - content: - application/json;version=1: - schema: - $ref: '#/components/schemas/StreamLocation' - required: true + - name: same-stream-only + in: query + description: If true, retrieve only locations on the same stream. + schema: + type: boolean + - name: station-unit + in: query + description: Station units. + schema: + type: string + - name: stage-unit + in: query + description: Stage units. + schema: + type: string + - name: area-unit + in: query + description: Area units. + schema: + type: string responses: - '204': - description: Stream Location successfully stored to CWMS. + '200': + description: OK + content: + application/json;version=1: + schema: + type: array + items: + $ref: '#/components/schemas/StreamLocation' '400': description: Bad Request content: @@ -7585,36 +7776,46 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - /stream-reaches/{name}: + - CwmsAAACacAuth: [] + /stream-locations/{name}: get: tags: - - StreamReaches - summary: Get streamReaches with name - description: Returns CWMS Stream Reach Data - operationId: getStreamReachesWithName + - StreamLocations + summary: Get streamLocations with name + description: Returns CWMS Stream Location Data + operationId: getStreamLocationsWithName parameters: - name: name in: path - description: Specifies the reach-id of the stream reach to be retrieved. + description: Specifies the location-id of the stream location to be retrieved. required: true schema: type: string - name: office in: query - description: Specifies the owning office of the stream reach to be retrieved. + description: Specifies the owning office of the stream location to be retrieved. required: true schema: type: string - name: stream-id in: query - description: Specifies the stream-id of the stream reach to be retrieved. + description: Specifies the stream-id of the stream location to be retrieved. required: true schema: type: string - name: station-unit in: query - description: Specifies the unit of measure for the station. Defaults to mi. + description: Specifies the unit of measure for the station. Default units are mi. + schema: + type: string + - name: stage-unit + in: query + description: Specifies the unit of measure for the stage. Default units are ft. + schema: + type: string + - name: area-unit + in: query + description: Specifies the unit of measure for the area. Default units are mi2. schema: type: string responses: @@ -7625,12 +7826,12 @@ paths: schema: type: array items: - $ref: '#/components/schemas/StreamReach' + $ref: '#/components/schemas/StreamLocation' application/json: schema: type: array items: - $ref: '#/components/schemas/StreamReach' + $ref: '#/components/schemas/StreamLocation' '400': description: Bad Request content: @@ -7663,29 +7864,35 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] delete: tags: - - StreamReaches - summary: Delete streamReaches with name - description: Delete CWMS Stream Reach - operationId: deleteStreamReachesWithName + - StreamLocations + summary: Delete streamLocations with name + description: Delete CWMS Stream Location + operationId: deleteStreamLocationsWithName parameters: - name: name in: path - description: Specifies the reach-id of the stream reach to be deleted. + description: Specifies the location-id of the stream location to be deleted. required: true schema: type: string - name: office in: query - description: Specifies the owning office of the stream reach to be deleted. + description: Specifies the owning office of the stream location to be deleted. + required: true + schema: + type: string + - name: stream-id + in: query + description: Specifies the stream-id of the stream location to be deleted. required: true schema: type: string responses: - '204': - description: Stream Reach successfully deleted from CWMS. + '200': + description: Stream Location successfully deleted from CWMS. '400': description: Bad Request content: @@ -7705,7 +7912,7 @@ paths: schema: $ref: '#/components/schemas/CdaError' '404': - description: Not Found + description: Stream Location not found. content: application/json: schema: @@ -7718,34 +7925,28 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] patch: tags: - - StreamReaches - summary: Patch streamReaches with name - description: Rename CWMS Stream Reach - operationId: patchStreamReachesWithName + - StreamLocations + summary: Patch streamLocations with name + description: Update CWMS Stream Location + operationId: patchStreamLocationsWithName parameters: - name: name in: path required: true schema: type: string - - name: name - in: query - description: 'Specifies the new reach-id. ' - required: true - schema: - type: string - - name: office - in: query - description: Specifies the owning office of the stream reach to be renamed. - required: true - schema: - type: string + requestBody: + content: + application/json;version=1: + schema: + $ref: '#/components/schemas/StreamLocation' + required: true responses: - '204': - description: Stream Reach successfully renamed in CWMS. + '200': + description: Updated Stream Location '400': description: Bad Request content: @@ -7778,38 +7979,43 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - /stream-reaches: + - CwmsAAACacAuth: [] + /stream-locations: get: tags: - - StreamReaches - summary: Get streamReaches - description: Returns matching CWMS Stream Reach Data for a Reservoir Project. - operationId: getStreamReaches + - StreamLocations + summary: Get streamLocations + description: Returns matching CWMS Stream Location Data for a Reservoir Project. + operationId: getStreamLocations parameters: - name: office-mask in: query - description: Office id for the reservoir project location associated with the stream reaches. + description: Office id for the reservoir project location associated with the stream locations. schema: type: string - name: stream-id-mask in: query - description: Specifies the stream-id mask for the stream reaches. + description: Specifies the stream-id of the stream that the returned stream locations belong to. schema: type: string - - name: reach-id-mask + - name: name-mask in: query - description: Specifies the reach-id mask for the stream reaches. + description: Specifies the location-id of the stream location to be retrieved. schema: type: string - - name: configuration-id-mask + - name: station-unit in: query - description: Specifies the configuration-id mask for the stream reaches. + description: Specifies the unit of measure for the station. Default units are mi. schema: type: string - - name: station-unit + - name: stage-unit in: query - description: Specifies the unit of measure for the station. Defaults to mi. + description: Specifies the unit of measure for the stage. Default units are ft. + schema: + type: string + - name: area-unit + in: query + description: Specifies the unit of measure for the area. Default units are mi2. schema: type: string responses: @@ -7820,12 +8026,12 @@ paths: schema: type: array items: - $ref: '#/components/schemas/StreamReach' + $ref: '#/components/schemas/StreamLocation' application/json: schema: type: array items: - $ref: '#/components/schemas/StreamReach' + $ref: '#/components/schemas/StreamLocation' '400': description: Bad Request content: @@ -7858,13 +8064,13 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] post: tags: - - StreamReaches - summary: Post streamReaches - description: Create CWMS Stream Reach - operationId: postStreamReaches + - StreamLocations + summary: Post streamLocations + description: Create CWMS Stream Location + operationId: postStreamLocations parameters: - name: fail-if-exists in: query @@ -7875,11 +8081,11 @@ paths: content: application/json;version=1: schema: - $ref: '#/components/schemas/StreamReach' + $ref: '#/components/schemas/StreamLocation' required: true responses: - '204': - description: Stream Reach successfully stored to CWMS. + '201': + description: Stream Location successfully stored to CWMS. '400': description: Bad Request content: @@ -7912,18 +8118,36 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - /measurements/time-extents: + - CwmsAAACacAuth: [] + /stream-reaches/{name}: get: tags: - - StreamLocations - summary: Get measurements timeExtents - description: Returns matching downstream stream locations. - operationId: getMeasurementsTimeExtents + - StreamReaches + summary: Get streamReaches with name + description: Returns CWMS Stream Reach Data + operationId: getStreamReachesWithName parameters: - - name: office-mask + - name: name + in: path + description: Specifies the reach-id of the stream reach to be retrieved. + required: true + schema: + type: string + - name: office in: query - description: Office Id used to filter the results. + description: Specifies the owning office of the stream reach to be retrieved. + required: true + schema: + type: string + - name: stream-id + in: query + description: Specifies the stream-id of the stream reach to be retrieved. + required: true + schema: + type: string + - name: station-unit + in: query + description: Specifies the unit of measure for the station. Defaults to mi. schema: type: string responses: @@ -7934,7 +8158,12 @@ paths: schema: type: array items: - $ref: '#/components/schemas/CwmsIdTimeExtentsEntry' + $ref: '#/components/schemas/StreamReach' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/StreamReach' '400': description: Bad Request content: @@ -7967,102 +8196,29 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - /measurements: - get: + - CwmsAAACacAuth: [] + delete: tags: - - Measurements - summary: Get measurements - description: Returns matching measurement data. - operationId: getMeasurements + - StreamReaches + summary: Delete streamReaches with name + description: Delete CWMS Stream Reach + operationId: deleteStreamReachesWithName parameters: - - name: office-mask - in: query - description: Office id mask for filtering measurements. Use null to retrieve measurements for all offices. - schema: - type: string - - name: id-mask - in: query - description: Location id mask for filtering measurements. Use null to retrieve measurements for all locations. - schema: - type: string - - name: min-number - in: query - description: Minimum measurement number-id for filtering measurements. - schema: - type: string - - name: max-number - in: query - description: Maximum measurement number-id for filtering measurements. - schema: - type: string - - name: begin - in: query - description: The start of the time window to delete. The format for this field is ISO 8601 extended, with optional offset and timezone, i.e., 'YYYY-MM-dd'T'hh:mm:ss[Z'['VV']']', e.g., '2021-06-10T13:00:00-07:00'. A null value is treated as an unbounded start. - schema: - type: string - - name: end - in: query - description: The end of the time window to delete.The format for this field is ISO 8601 extended, with optional offset and timezone, i.e., 'YYYY-MM-dd'T'hh:mm:ss[Z'['VV']']', e.g., '2021-06-10T13:00:00-07:00'.A null value is treated as an unbounded end. - schema: - type: string - - name: timezone - in: query - description: This field specifies a default timezone to be used if the format of the beginand end parameters do not include offset or time zone information. Defaults to UTC. - schema: - type: string - - name: min-height - in: query - description: Minimum height for filtering measurements. - schema: - type: string - - name: max-height - in: query - description: Maximum height for filtering measurements. - schema: - type: string - - name: min-flow - in: query - description: Minimum flow for filtering measurements. - schema: - type: string - - name: max-flow - in: query - description: Maximum flow for filtering measurements. - schema: - type: string - - name: agency - in: query - description: Agencies for filtering measurements. - schema: - type: string - - name: quality - in: query - description: Quality for filtering measurements. + - name: name + in: path + description: Specifies the reach-id of the stream reach to be deleted. + required: true schema: type: string - - name: unit-system + - name: office in: query - description: |- - Specifies the unit system of the response. Valid values for the unit field are: - * `EN` Specifies English unit system. Location values will be in the default English units for their parameters. - * `SI` Specifies the SI unit system. Location values will be in the default SI units for their parameters. If not specified, EN is used. + description: Specifies the owning office of the stream reach to be deleted. + required: true schema: type: string responses: '200': - description: OK - content: - application/json;version=1: - schema: - type: array - items: - $ref: '#/components/schemas/Measurement' - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Measurement' + description: Stream Reach successfully deleted from CWMS. '400': description: Bad Request content: @@ -8095,35 +8251,34 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - post: + - CwmsAAACacAuth: [] + patch: tags: - - Measurements - summary: Post measurements - description: Create new measurement(s). - operationId: postMeasurements + - StreamReaches + summary: Patch streamReaches with name + description: Rename CWMS Stream Reach + operationId: patchStreamReachesWithName parameters: - - name: fail-if-exists + - name: name + in: path + required: true + schema: + type: string + - name: name in: query - description: 'Create will fail if provided Measurement(s) already exist. Default: true' + description: 'Specifies the new reach-id. ' + required: true schema: - type: boolean - requestBody: - content: - application/json;version=1: - schema: - type: array - items: - $ref: '#/components/schemas/Measurement' - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Measurement' - required: true + type: string + - name: office + in: query + description: Specifies the owning office of the stream reach to be renamed. + required: true + schema: + type: string responses: - '204': - description: Measurement(s) successfully stored. + '200': + description: Stream Reach successfully renamed in CWMS. '400': description: Bad Request content: @@ -8156,57 +8311,54 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - /measurements/{location-id}: - delete: + - CwmsAAACacAuth: [] + /stream-reaches: + get: tags: - - Measurements - summary: Delete measurements with locationId - description: Delete an existing measurement. - operationId: deleteMeasurementsWithLocationId + - StreamReaches + summary: Get streamReaches + description: Returns matching CWMS Stream Reach Data for a Reservoir Project. + operationId: getStreamReaches parameters: - - name: location-id - in: path - description: Specifies the location-id of the measurement(s) to be deleted. - required: true - schema: - type: string - - name: office - in: query - description: Specifies the office of the measurements to delete - required: true - schema: - type: string - - name: begin + - name: office-mask in: query - description: The start of the time window to delete. The format for this field is ISO 8601 extended, with optional offset and timezone, i.e., 'YYYY-MM-dd'T'hh:mm:ss[Z'['VV']']', e.g., '2021-06-10T13:00:00-07:00'. - required: true + description: Office id for the reservoir project location associated with the stream reaches. schema: type: string - - name: end + - name: stream-id-mask in: query - description: The end of the time window to delete.The format for this field is ISO 8601 extended, with optional offset and timezone, i.e., 'YYYY-MM-dd'T'hh:mm:ss[Z'['VV']']', e.g., '2021-06-10T13:00:00-07:00'. - required: true + description: Specifies the stream-id mask for the stream reaches. schema: type: string - - name: timezone + - name: reach-id-mask in: query - description: This field specifies a default timezone to be used if the format of the beginand end parameters do not include offset or time zone information. Defaults to UTC. + description: Specifies the reach-id mask for the stream reaches. schema: type: string - - name: min-number + - name: configuration-id-mask in: query - description: Specifies the min number-id of the measurement to delete. + description: Specifies the configuration-id mask for the stream reaches. schema: type: string - - name: max-number + - name: station-unit in: query - description: Specifies the max number-id of the measurement to delete. + description: Specifies the unit of measure for the station. Defaults to mi. schema: type: string responses: - '204': - description: Measurement successfully deleted. + '200': + description: OK + content: + application/json;version=1: + schema: + type: array + items: + $ref: '#/components/schemas/StreamReach' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/StreamReach' '400': description: Bad Request content: @@ -8226,7 +8378,7 @@ paths: schema: $ref: '#/components/schemas/CdaError' '404': - description: Measurement not found. + description: Not Found content: application/json: schema: @@ -8239,25 +8391,28 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - /blobs/{blob-id}: - get: + - CwmsAAACacAuth: [] + post: tags: - - Blob - summary: Get blobs with blobId - operationId: getBlobsWithBlobId + - StreamReaches + summary: Post streamReaches + description: Create CWMS Stream Reach + operationId: postStreamReaches parameters: - - name: blob-id - in: path - required: true - schema: - type: string - - name: office + - name: fail-if-exists in: query - description: Specifies the owning office. + description: 'Create will fail if provided ID already exists. Default: true' schema: - type: string + type: boolean + requestBody: + content: + application/json;version=1: + schema: + $ref: '#/components/schemas/StreamReach' + required: true responses: + '201': + description: Stream Reach successfully stored to CWMS. '400': description: Bad Request content: @@ -8290,45 +8445,157 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - /blobs: + - CwmsAAACacAuth: [] + /measurements/time-extents: get: tags: - - Blob - summary: Get blobs - operationId: getBlobs + - Measurements + summary: Get measurements timeExtents + description: Returns matching downstream stream locations. + operationId: getMeasurementsTimeExtents parameters: - - name: office - in: query - description: Specifies the owning office. If this field is not specified, matching information from all offices shall be returned. - schema: - type: string - - name: page - in: query - description: This end point can return a lot of data, this identifies where in the request you are. This is an opaque value, and can be obtained from the 'next-page' value in the response. - schema: - type: string - - name: page-size - in: query - description: How many entries per page returned. Default 20. - schema: - type: integer - format: int32 - - name: like + - name: office-mask in: query - description: Posix regular expression describing the blob id's you want + description: Office Id used to filter the results. schema: type: string responses: '200': - description: A list of blobs. + description: OK + content: + application/json;version=1: + schema: + type: array + items: + $ref: '#/components/schemas/CwmsIdTimeExtentsEntry' + '400': + description: Bad Request content: application/json: schema: - $ref: '#/components/schemas/Blobs' - application/json;version=2: + $ref: '#/components/schemas/CdaError' + '401': + description: Unauthorized + content: + application/json: schema: - $ref: '#/components/schemas/Blobs' + $ref: '#/components/schemas/CdaError' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '500': + description: Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + security: + - ApiKey: [] + - CwmsAAACacAuth: [] + /measurements: + get: + tags: + - Measurements + summary: Get measurements + description: Returns matching measurement data. + operationId: getMeasurements + parameters: + - name: office-mask + in: query + description: Office id mask for filtering measurements. Use null to retrieve measurements for all offices. + schema: + type: string + - name: id-mask + in: query + description: Location id mask for filtering measurements. Use null to retrieve measurements for all locations. + schema: + type: string + - name: min-number + in: query + description: Minimum measurement number-id for filtering measurements. + schema: + type: string + - name: max-number + in: query + description: Maximum measurement number-id for filtering measurements. + schema: + type: string + - name: begin + in: query + description: The start of the time window to delete. The format for this field is ISO 8601 extended, with optional offset and timezone, i.e., 'YYYY-MM-dd'T'hh:mm:ss[Z'['VV']']', e.g., '2021-06-10T13:00:00-07:00'. A null value is treated as an unbounded start. + schema: + type: string + - name: end + in: query + description: The end of the time window to delete.The format for this field is ISO 8601 extended, with optional offset and timezone, i.e., 'YYYY-MM-dd'T'hh:mm:ss[Z'['VV']']', e.g., '2021-06-10T13:00:00-07:00'. A null value is treated as an unbounded end. + schema: + type: string + - name: timezone + in: query + description: This field specifies a default timezone to be used if the format of the beginand end parameters do not include offset or time zone information. Defaults to UTC. + schema: + type: string + - name: min-height + in: query + description: Minimum height for filtering measurements. + schema: + type: string + - name: max-height + in: query + description: Maximum height for filtering measurements. + schema: + type: string + - name: min-flow + in: query + description: Minimum flow for filtering measurements. + schema: + type: string + - name: max-flow + in: query + description: Maximum flow for filtering measurements. + schema: + type: string + - name: agency + in: query + description: Agencies for filtering measurements. + schema: + type: string + - name: quality + in: query + description: Quality for filtering measurements. + schema: + type: string + - name: unit-system + in: query + description: |- + Specifies the unit system of the response. Valid values for the unit field are: + * `EN` Specifies English unit system. Location values will be in the default English units for their parameters. + * `SI` Specifies the SI unit system. Location values will be in the default SI units for their parameters. If not specified, EN is used. + schema: + type: string + responses: + '200': + description: OK + content: + application/json;version=1: + schema: + type: array + items: + $ref: '#/components/schemas/Measurement' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Measurement' '400': description: Bad Request content: @@ -8361,26 +8628,35 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] post: tags: - - Blob - summary: Post blobs - description: Create new Blob - operationId: postBlobs + - Measurements + summary: Post measurements + description: Create new measurement(s). + operationId: postMeasurements parameters: - name: fail-if-exists in: query - description: 'Create will fail if provided ID already exists. Default: true' + description: 'Create will fail if provided Measurement(s) already exist. Default: true' schema: type: boolean requestBody: content: - application/json;version=2: + application/json;version=1: schema: - $ref: '#/components/schemas/Blob' + type: array + items: + $ref: '#/components/schemas/Measurement' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Measurement' required: true responses: + '201': + description: Measurement(s) successfully stored. '400': description: Bad Request content: @@ -8413,40 +8689,57 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - /clobs/{clob-id}: - get: + - CwmsAAACacAuth: [] + /measurements/{location-id}: + delete: tags: - - Clob - summary: Get clobs with clobId - description: Get a single clob. If the accept header is set to text/plain, the raw value is returned as the response body. Responses to text/plain requests are streamed and support the Range header. When the accept header is set to application/json;version=2 the clob will be returned as a serialized Clob object with fields for office-id, id, description and value. - operationId: getClobsWithClobId + - Measurements + summary: Delete measurements with locationId + description: Delete an existing measurement. + operationId: deleteMeasurementsWithLocationId parameters: - - name: clob-id + - name: location-id in: path + description: Specifies the location-id of the measurement(s) to be deleted. required: true schema: type: string - name: office in: query - description: Specifies the owning office. + description: Specifies the office of the measurements to delete + required: true schema: type: string - - name: clob-id + - name: begin in: query - description: 'If this _query_ parameter is provided the id _path_ parameter is ignored and the value of the query parameter is used. Note: this query parameter is necessary for id''s that contain ''/'' or other special characters. Because of abuse even properly escaped ''/'' in url paths are blocked. When using this query parameter a valid path parameter must still be provided for the request to be properly routed. If your clob id contains ''/'' you can''t specify the clob-id query parameter and also specify the id path parameter because firewall and/or server rules will deny the request even though you are specifying this override. "ignored" is suggested.' + description: The start of the time window to delete. The format for this field is ISO 8601 extended, with optional offset and timezone, i.e., 'YYYY-MM-dd'T'hh:mm:ss[Z'['VV']']', e.g., '2021-06-10T13:00:00-07:00'. + required: true + schema: + type: string + - name: end + in: query + description: The end of the time window to delete.The format for this field is ISO 8601 extended, with optional offset and timezone, i.e., 'YYYY-MM-dd'T'hh:mm:ss[Z'['VV']']', e.g., '2021-06-10T13:00:00-07:00'. + required: true + schema: + type: string + - name: timezone + in: query + description: This field specifies a default timezone to be used if the format of the beginand end parameters do not include offset or time zone information. Defaults to UTC. + schema: + type: string + - name: min-number + in: query + description: Specifies the min number-id of the measurement to delete. + schema: + type: string + - name: max-number + in: query + description: Specifies the max number-id of the measurement to delete. schema: type: string responses: '200': - description: Returns requested clob. - content: - application/json;version=2: - schema: - $ref: '#/components/schemas/Clob' - text/plain: - schema: - type: string + description: Measurement successfully deleted. '400': description: Bad Request content: @@ -8466,7 +8759,7 @@ paths: schema: $ref: '#/components/schemas/CdaError' '404': - description: Not Found + description: Measurement not found. content: application/json: schema: @@ -8479,24 +8772,23 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - delete: + - CwmsAAACacAuth: [] + /blobs/{blob-id}: + get: tags: - - Clob - summary: Delete clobs with clobId - description: Delete clob - operationId: deleteClobsWithClobId + - Blob + summary: Get blobs with blobId + description: Returns the binary value of the requested blob as a seekable stream with the appropriate media type. + operationId: getBlobsWithBlobId parameters: - - name: clob-id + - name: blob-id in: path - description: Specifies the id of the clob to be deleted required: true schema: type: string - name: office in: query - description: Specifies the office of the clob. - required: true + description: Specifies the owning office. schema: type: string responses: @@ -8532,34 +8824,26 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - patch: + - CwmsAAACacAuth: [] + delete: tags: - - Clob - summary: Patch clobs with clobId - description: Update clob - operationId: patchClobsWithClobId + - Blob + summary: Delete blobs with blobId + description: Deletes requested blob + operationId: deleteBlobsWithBlobId parameters: - - name: clob-id + - name: blob-id in: path - description: Specifies the id of the clob to be updated + description: The blob identifier to be deleted required: true schema: type: string - - name: ignore-nulls + - name: office in: query - description: 'If true, null and empty fields in the provided clob will be ignored and the existing value of those fields left in place. Default: true' + description: Specifies the owning office of the blob to be deleted + required: true schema: - type: boolean - requestBody: - content: - application/json;version=2: - schema: - $ref: '#/components/schemas/Clob' - application/xml;version=2: - schema: - $ref: '#/components/schemas/Clob' - required: true + type: string responses: '400': description: Bad Request @@ -8593,16 +8877,72 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - /clobs: - get: + - CwmsAAACacAuth: [] + patch: tags: - - Clob - summary: Get clobs - operationId: getClobs + - Blob + summary: Patch blobs with blobId + description: Update an existing Blob + operationId: patchBlobsWithBlobId parameters: - - name: office - in: query + - name: blob-id + in: path + description: The blob identifier to be deleted + required: true + schema: + type: string + requestBody: + content: + application/json;version=2: + schema: + $ref: '#/components/schemas/Blob' + application/json: + schema: + $ref: '#/components/schemas/Blob' + required: true + responses: + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '500': + description: Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + security: + - ApiKey: [] + - CwmsAAACacAuth: [] + /blobs: + get: + tags: + - Blob + summary: Get blobs + operationId: getBlobs + parameters: + - name: office + in: query description: Specifies the owning office. If this field is not specified, matching information from all offices shall be returned. schema: type: string @@ -8617,26 +8957,21 @@ paths: schema: type: integer format: int32 - - name: include-values - in: query - description: 'Do you want the value associated with this particular clob (default: false)' - schema: - type: boolean - name: like in: query - description: Posix regular expression matching against the id + description: Posix regular expression describing the blob id's you want schema: type: string responses: '200': - description: A list of clobs. + description: A list of blobs. content: - application/json;version=2: + application/json: schema: - $ref: '#/components/schemas/Clobs' - application/xml;version=2: + $ref: '#/components/schemas/Blobs' + application/json;version=2: schema: - $ref: '#/components/schemas/Clobs' + $ref: '#/components/schemas/Blobs' '400': description: Bad Request content: @@ -8669,13 +9004,13 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] post: tags: - - Clob - summary: Post clobs - description: Create new Clob - operationId: postClobs + - Blob + summary: Post blobs + description: Create new Blob + operationId: postBlobs parameters: - name: fail-if-exists in: query @@ -8686,10 +9021,7 @@ paths: content: application/json;version=2: schema: - $ref: '#/components/schemas/Clob' - application/xml;version=2: - schema: - $ref: '#/components/schemas/Clob' + $ref: '#/components/schemas/Blob' required: true responses: '400': @@ -8724,60 +9056,40 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - /pools/{pool-id}: + - CwmsAAACacAuth: [] + /clobs/{clob-id}: get: tags: - - Pools - summary: Get pools with poolId - description: Retrieves requested Pool - operationId: getPoolsWithPoolId + - Clob + summary: Get clobs with clobId + description: Get a single clob. If the accept header is set to text/plain, the raw value is returned as the response body. Responses to text/plain requests are streamed and support the Range header. When the accept header is set to application/json;version=2 the clob will be returned as a serialized Clob object with fields for office-id, id, description and value. + operationId: getClobsWithClobId parameters: - - name: pool-id + - name: clob-id in: path - description: Specifies the pool whose data is to be included in the response. required: true schema: type: string - name: office in: query - description: Specifies the owning office of the Pool whose data is to be included in the response. - required: true - schema: - type: string - - name: project-id - in: query - description: Specifies the project-id of the Pool whose data is to be included in the response. - required: true - schema: - type: string - - name: bottom-mask - in: query - description: Bottom level mask. Default value:* - schema: - type: string - - name: top-mask - in: query - description: Top level mask. Default value:* - schema: - type: string - - name: include-explicit - in: query - description: Specifies if the results should include explicit Pools. Default value:false + description: Specifies the owning office. schema: type: string - - name: include-implicit + - name: clob-id in: query - description: Specifies if the results should include implicit Pools. Default value:true + description: 'If this _query_ parameter is provided the id _path_ parameter is ignored and the value of the query parameter is used. Note: this query parameter is necessary for id''s that contain ''/'' or other special characters. Because of abuse even properly escaped ''/'' in url paths are blocked. When using this query parameter a valid path parameter must still be provided for the request to be properly routed. If your clob id contains ''/'' you can''t specify the clob-id query parameter and also specify the id path parameter because firewall and/or server rules will deny the request even though you are specifying this override. "ignored" is suggested.' schema: type: string responses: '200': - description: OK + description: Returns requested clob. content: application/json;version=2: schema: - $ref: '#/components/schemas/Pool' + $ref: '#/components/schemas/Clob' + text/plain: + schema: + type: string '400': description: Bad Request content: @@ -8797,7 +9109,7 @@ paths: schema: $ref: '#/components/schemas/CdaError' '404': - description: Based on the combination of inputs provided the Location Category was not found. + description: Not Found content: application/json: schema: @@ -8808,72 +9120,29 @@ paths: application/json: schema: $ref: '#/components/schemas/CdaError' - '501': - description: request format is not implemented security: - ApiKey: [] - - OpenIDConnect: [] - /pools: - get: + - CwmsAAACacAuth: [] + delete: tags: - - Pools - summary: Get pools - description: Returns Pools Data - operationId: getPools + - Clob + summary: Delete clobs with clobId + description: Delete clob + operationId: deleteClobsWithClobId parameters: - - name: office - in: query - description: Specifies the owning office of the data in the response. If this field is not specified, matching items from all offices shall be returned. - schema: - type: string - - name: id-mask - in: query - description: Project Id mask. Default value:* - schema: - type: string - - name: name-mask - in: query - description: Name mask. Default value:* - schema: - type: string - - name: bottom-mask - in: query - description: Bottom level mask. Default value:* - schema: - type: string - - name: top-mask - in: query - description: Top level mask. Default value:* - schema: - type: string - - name: include-explicit - in: query - description: Specifies if the results should include explicit Pools. Default value:false - schema: - type: string - - name: include-implicit - in: query - description: Specifies if the results should include implicit Pools. Default value:true + - name: clob-id + in: path + description: Specifies the id of the clob to be deleted + required: true schema: type: string - - name: page + - name: office in: query - description: This end point can return a lot of data, this identifies where in the request you are. This is an opaque value, and can be obtained from the 'next-page' value in the response. + description: Specifies the office of the clob. + required: true schema: type: string - - name: page-size - in: query - description: How many entries per page returned. Default 100. - schema: - type: integer - format: int32 responses: - '200': - description: OK - content: - application/json;version=2: - schema: - $ref: '#/components/schemas/Pools' '400': description: Bad Request content: @@ -8893,7 +9162,7 @@ paths: schema: $ref: '#/components/schemas/CdaError' '404': - description: Based on the combination of inputs provided the pools were not found. + description: Not Found content: application/json: schema: @@ -8904,35 +9173,37 @@ paths: application/json: schema: $ref: '#/components/schemas/CdaError' - '501': - description: request format is not implemented security: - ApiKey: [] - - OpenIDConnect: [] - /specified-levels: - get: + - CwmsAAACacAuth: [] + patch: tags: - - Levels - summary: Get specifiedLevels - operationId: getSpecifiedLevels + - Clob + summary: Patch clobs with clobId + description: Update clob + operationId: patchClobsWithClobId parameters: - - name: office - in: query - description: Specifies the owning office of the Specified Levels whose data is to be included in the response. If this field is not specified, matching rating information from all offices shall be returned. + - name: clob-id + in: path + description: Specifies the id of the clob to be updated + required: true schema: type: string - - name: template-id-mask + - name: ignore-nulls in: query - description: Mask that specifies the IDs to be included in the response. If this field is not specified, all specified levels shall be returned. + description: 'If true, null and empty fields in the provided clob will be ignored and the existing value of those fields left in place. Default: true' schema: - type: string + type: boolean + requestBody: + content: + application/json;version=2: + schema: + $ref: '#/components/schemas/Clob' + application/xml;version=2: + schema: + $ref: '#/components/schemas/Clob' + required: true responses: - '200': - description: OK - content: - application/json;version=2: - schema: - $ref: '#/components/schemas/SpecifiedLevel' '400': description: Bad Request content: @@ -8965,26 +9236,50 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - post: + - CwmsAAACacAuth: [] + /clobs: + get: tags: - - Levels - summary: Post specifiedLevels - description: Create new SpecifiedLevel - operationId: postSpecifiedLevels + - Clob + summary: Get clobs + operationId: getClobs parameters: - - name: fail-if-exists + - name: office in: query - description: 'Create will fail if provided ID already exists. Default: true' + description: Specifies the owning office. If this field is not specified, matching information from all offices shall be returned. + schema: + type: string + - name: page + in: query + description: This end point can return a lot of data, this identifies where in the request you are. This is an opaque value, and can be obtained from the 'next-page' value in the response. + schema: + type: string + - name: page-size + in: query + description: How many entries per page returned. Default 20. + schema: + type: integer + format: int32 + - name: include-values + in: query + description: 'Do you want the value associated with this particular clob (default: false)' schema: type: boolean - requestBody: - content: - application/json;version=2: - schema: - $ref: '#/components/schemas/SpecifiedLevel' - required: true + - name: like + in: query + description: Posix regular expression matching against the id + schema: + type: string responses: + '200': + description: A list of clobs. + content: + application/json;version=2: + schema: + $ref: '#/components/schemas/Clobs' + application/xml;version=2: + schema: + $ref: '#/components/schemas/Clobs' '400': description: Bad Request content: @@ -9017,27 +9312,28 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - /specified-levels/{specified-level-id}: - delete: + - CwmsAAACacAuth: [] + post: tags: - - Levels - summary: Delete specifiedLevels with specifiedLevelId - description: Deletes requested specified level id - operationId: deleteSpecifiedLevelsWithSpecifiedLevelId + - Clob + summary: Post clobs + description: Create new Clob + operationId: postClobs parameters: - - name: specified-level-id - in: path - description: The specified level id to be deleted - required: true - schema: - type: string - - name: office + - name: fail-if-exists in: query - description: Specifies the owning office of the timeseries identifier to be deleted - required: true + description: 'Create will fail if provided ID already exists. Default: true' schema: - type: string + type: boolean + requestBody: + content: + application/json;version=2: + schema: + $ref: '#/components/schemas/Clob' + application/xml;version=2: + schema: + $ref: '#/components/schemas/Clob' + required: true responses: '400': description: Bad Request @@ -9071,32 +9367,60 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - patch: + - CwmsAAACacAuth: [] + /pools/{pool-id}: + get: tags: - - Levels - summary: Patch specifiedLevels with specifiedLevelId - description: Renames the requested specified level id - operationId: patchSpecifiedLevelsWithSpecifiedLevelId + - Pools + summary: Get pools with poolId + description: Retrieves requested Pool + operationId: getPoolsWithPoolId parameters: - - name: specified-level-id + - name: pool-id in: path + description: Specifies the pool whose data is to be included in the response. required: true schema: type: string - - name: specified-level-id + - name: office in: query - description: The new specified level id. + description: Specifies the owning office of the Pool whose data is to be included in the response. required: true schema: type: string - - name: office + - name: project-id in: query - description: Specifies the owning office of the specified level to be renamed + description: Specifies the project-id of the Pool whose data is to be included in the response. required: true schema: type: string + - name: bottom-mask + in: query + description: Bottom level mask. Default value:* + schema: + type: string + - name: top-mask + in: query + description: Top level mask. Default value:* + schema: + type: string + - name: include-explicit + in: query + description: Specifies if the results should include explicit Pools. Default value:false + schema: + type: string + - name: include-implicit + in: query + description: Specifies if the results should include implicit Pools. Default value:true + schema: + type: string responses: + '200': + description: OK + content: + application/json;version=2: + schema: + $ref: '#/components/schemas/Pool' '400': description: Bad Request content: @@ -9116,7 +9440,7 @@ paths: schema: $ref: '#/components/schemas/CdaError' '404': - description: Not Found + description: Based on the combination of inputs provided the Location Category was not found. content: application/json: schema: @@ -9127,56 +9451,74 @@ paths: application/json: schema: $ref: '#/components/schemas/CdaError' + '501': + description: request format is not implemented security: - ApiKey: [] - - OpenIDConnect: [] - /forecast-instance/{name}: + - CwmsAAACacAuth: [] + /pools: get: tags: - - Forecast - summary: Get forecastInstance with name - description: Used to get all forecast instances for a given forecast spec - operationId: getForecastInstanceWithName + - Pools + summary: Get pools + description: Returns Pools Data + operationId: getPools parameters: - - name: name - in: path - description: Specifies the spec id of the forecast spec whose forecast instance data is to be included in the response. - required: true + - name: office + in: query + description: Specifies the owning office of the data in the response. If this field is not specified, matching items from all offices shall be returned. schema: type: string - - name: forecast-date + - name: id-mask in: query - description: Specifies the forecast date time of the forecast instance to be retrieved. - required: true + description: Project Id mask. Default value:* schema: type: string - - name: issue-date + - name: name-mask in: query - description: Specifies the issue date time of the forecast instance to be retrieved. - required: true + description: Name mask. Default value:* schema: type: string - - name: office + - name: bottom-mask in: query - description: Specifies the owning office of the forecast spec whose forecast instance is to be included in the response. - required: true + description: Bottom level mask. Default value:* schema: type: string - - name: designator + - name: top-mask in: query - description: Specifies the designator of the forecast spec whose forecast instance data to be included in the response. - required: true + description: Top level mask. Default value:* + schema: + type: string + - name: include-explicit + in: query + description: Specifies if the results should include explicit Pools. Default value:false + schema: + type: string + - name: include-implicit + in: query + description: Specifies if the results should include implicit Pools. Default value:true + schema: + type: string + - name: page + in: query + description: This end point can return a lot of data, this identifies where in the request you are. This is an opaque value, and can be obtained from the 'next-page' value in the response. schema: type: string + - name: page-size + in: query + description: How many entries per page returned. Default 100. + schema: + type: integer + format: int32 responses: '200': - description: A list of elements of the data set you've selected. + description: OK content: application/json;version=2: schema: - $ref: '#/components/schemas/ForecastInstance' + $ref: '#/components/schemas/Pools' '400': - description: Invalid parameter combination + description: Bad Request content: application/json: schema: @@ -9194,7 +9536,7 @@ paths: schema: $ref: '#/components/schemas/CdaError' '404': - description: The provided combination of parameters did not find a forecast instance. + description: Based on the combination of inputs provided the pools were not found. content: application/json: schema: @@ -9206,48 +9548,34 @@ paths: schema: $ref: '#/components/schemas/CdaError' '501': - description: Requested format is not implemented + description: request format is not implemented security: - ApiKey: [] - - OpenIDConnect: [] - delete: + - CwmsAAACacAuth: [] + /specified-levels: + get: tags: - - Forecast - summary: Delete forecastInstance with name - description: Used to delete forecast instance data based on unique fields - operationId: deleteForecastInstanceWithName + - Levels + summary: Get specifiedLevels + operationId: getSpecifiedLevels parameters: - - name: name - in: path - description: Specifies the spec id of the forecast spec associated with the forecast instanceto be deleted. - required: true - schema: - type: string - - name: forecast-date - in: query - description: Specifies the forecast date time of the forecast instance to be deleted. - required: true - schema: - type: string - - name: issue-date - in: query - description: Specifies the issue date time of the forecast instance to be deleted. - required: true - schema: - type: string - name: office in: query - description: Specifies the owning office of the forecast spec associated with the forecast instance to be deleted. - required: true + description: Specifies the owning office of the Specified Levels whose data is to be included in the response. If this field is not specified, matching rating information from all offices shall be returned. schema: type: string - - name: designator + - name: template-id-mask in: query - description: Specifies the designator of the forecast spec associated with the forecast instance to be deleted. - required: true + description: Mask that specifies the IDs to be included in the response. If this field is not specified, all specified levels shall be returned. schema: type: string responses: + '200': + description: OK + content: + application/json;version=2: + schema: + $ref: '#/components/schemas/SpecifiedLevel' '400': description: Bad Request content: @@ -9267,7 +9595,7 @@ paths: schema: $ref: '#/components/schemas/CdaError' '404': - description: The provided combination of parameters did not find a forecast instance. + description: Not Found content: application/json: schema: @@ -9280,25 +9608,24 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - patch: + - CwmsAAACacAuth: [] + post: tags: - - Forecast - summary: Patch forecastInstance with name - description: Update a forecast instance with new max age, notes, forecast fileand forecast info key/value pairs. - operationId: patchForecastInstanceWithName + - Levels + summary: Post specifiedLevels + description: Create new SpecifiedLevel + operationId: postSpecifiedLevels parameters: - - name: name - in: path - description: Specifies the spec id of the forecast spec to be updated. - required: true + - name: fail-if-exists + in: query + description: 'Create will fail if provided ID already exists. Default: true' schema: - type: string + type: boolean requestBody: content: application/json;version=2: schema: - $ref: '#/components/schemas/ForecastInstance' + $ref: '#/components/schemas/SpecifiedLevel' required: true responses: '400': @@ -9320,7 +9647,7 @@ paths: schema: $ref: '#/components/schemas/CdaError' '404': - description: Based on the combination of inputs provided the ForecastInstance was not found. + description: Not Found content: application/json: schema: @@ -9333,39 +9660,30 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - /forecast-instance: - get: + - CwmsAAACacAuth: [] + /specified-levels/{specified-level-id}: + delete: tags: - - Forecast - summary: Get forecastInstance - description: Used to get all forecast instances for a given forecast spec - operationId: getForecastInstance + - Levels + summary: Delete specifiedLevels with specifiedLevelId + description: Deletes requested specified level id + operationId: deleteSpecifiedLevelsWithSpecifiedLevelId parameters: - - name: office - in: query - description: Specifies the owning office of the forecast spec whose forecast instance is to be included in the response. Default will be all offices. - schema: - type: string - - name: name - in: query - description: Specifies the spec id of the forecast spec whose forecast instance data is to be included in the response. Default will be all names. + - name: specified-level-id + in: path + description: The specified level id to be deleted + required: true schema: type: string - - name: designator + - name: office in: query - description: 'Specifies the designator of the forecast spec whose forecast instance data to be included in the response. ' + description: Specifies the owning office of the timeseries identifier to be deleted + required: true schema: type: string responses: - '200': - description: A list of elements of the data set you've selected. - content: - application/json;version=2: - schema: - $ref: '#/components/schemas/ForecastInstance' '400': - description: Invalid parameter combination + description: Bad Request content: application/json: schema: @@ -9394,23 +9712,33 @@ paths: application/json: schema: $ref: '#/components/schemas/CdaError' - '501': - description: Requested format is not implemented security: - ApiKey: [] - - OpenIDConnect: [] - post: + - CwmsAAACacAuth: [] + patch: tags: - - Forecast - summary: Post forecastInstance - description: Used to create and save a forecast instance - operationId: postForecastInstance - requestBody: - content: - application/json;version=2: - schema: - $ref: '#/components/schemas/ForecastInstance' - required: true + - Levels + summary: Patch specifiedLevels with specifiedLevelId + description: Renames the requested specified level id + operationId: patchSpecifiedLevelsWithSpecifiedLevelId + parameters: + - name: specified-level-id + in: path + required: true + schema: + type: string + - name: specified-level-id + in: query + description: The new specified level id. + required: true + schema: + type: string + - name: office + in: query + description: Specifies the owning office of the specified level to be renamed + required: true + schema: + type: string responses: '400': description: Bad Request @@ -9444,40 +9772,51 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - /forecast-spec/{name}: + - CwmsAAACacAuth: [] + /forecast-instance/{name}: get: tags: - Forecast - summary: Get forecastSpec with name - description: Used to query a single forecast spec record - operationId: getForecastSpecWithName + summary: Get forecastInstance with name + description: Used to get all forecast instances for a given forecast spec + operationId: getForecastInstanceWithName parameters: - name: name in: path - description: Specifies the spec id of the forecast spec whose data is to be included in the response. + description: Specifies the spec id of the forecast spec whose forecast instance data is to be included in the response. + required: true + schema: + type: string + - name: forecast-date + in: query + description: Specifies the forecast date time of the forecast instance to be retrieved. + required: true + schema: + type: string + - name: issue-date + in: query + description: Specifies the issue date time of the forecast instance to be retrieved. required: true schema: type: string - name: office in: query - description: Specifies the owning office of the forecast spec whose data is to be included in the response. + description: Specifies the owning office of the forecast spec whose forecast instance is to be included in the response. required: true schema: type: string - name: designator in: query - description: Specifies the designator of the forecast spec whose data to be included in the response. - required: true + description: Specifies the designator of the forecast spec whose forecast instance data to be included in the response. schema: type: string responses: '200': - description: Returns the requested forecast spec + description: A list of elements of the data set you've selected. content: application/json;version=2: schema: - $ref: '#/components/schemas/ForecastSpec' + $ref: '#/components/schemas/ForecastInstance' '400': description: Invalid parameter combination content: @@ -9497,7 +9836,7 @@ paths: schema: $ref: '#/components/schemas/CdaError' '404': - description: The provided combination of parameters did not find a forecast spec. + description: The provided combination of parameters did not find a forecast instance. content: application/json: schema: @@ -9512,37 +9851,43 @@ paths: description: Requested format is not implemented security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] delete: tags: - Forecast - summary: Delete forecastSpec with name - description: Used to delete forecast spec data based on unique fields - operationId: deleteForecastSpecWithName + summary: Delete forecastInstance with name + description: Used to delete forecast instance data based on unique fields + operationId: deleteForecastInstanceWithName parameters: - name: name in: path - description: Specifies the spec id of the forecast spec whose data is to be deleted. + description: Specifies the spec id of the forecast spec associated with the forecast instanceto be deleted. required: true schema: type: string - - name: office + - name: forecast-date in: query - description: Specifies the owning office of the forecast spec whose data is to be deleted. + description: Specifies the forecast date time of the forecast instance to be deleted. required: true schema: type: string - - name: designator + - name: issue-date in: query - description: Specifies the designator of the forecast spec whose data is to be deleted. + description: Specifies the issue date time of the forecast instance to be deleted. required: true schema: type: string - - name: method + - name: office in: query - description: Specifies the delete method used. Defaults to "DELETE_KEY" + description: Specifies the owning office of the forecast spec associated with the forecast instance to be deleted. + required: true schema: - $ref: '#/components/schemas/DeleteMethod' + type: string + - name: designator + in: query + description: Specifies the designator of the forecast spec associated with the forecast instance to be deleted. + schema: + type: string responses: '400': description: Bad Request @@ -9563,7 +9908,7 @@ paths: schema: $ref: '#/components/schemas/CdaError' '404': - description: The provided combination of parameters did not find a forecast spec. + description: The provided combination of parameters did not find a forecast instance. content: application/json: schema: @@ -9576,17 +9921,17 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] patch: tags: - Forecast - summary: Patch forecastSpec with name - description: Update a forecast spec with provided values - operationId: patchForecastSpecWithName + summary: Patch forecastInstance with name + description: Update a forecast instance with new max age, notes, forecast fileand forecast info key/value pairs. + operationId: patchForecastInstanceWithName parameters: - name: name in: path - description: Forecast spec id to be updated + description: Specifies the spec id of the forecast spec to be updated. required: true schema: type: string @@ -9594,7 +9939,7 @@ paths: content: application/json;version=2: schema: - $ref: '#/components/schemas/ForecastSpec' + $ref: '#/components/schemas/ForecastInstance' required: true responses: '400': @@ -9616,7 +9961,7 @@ paths: schema: $ref: '#/components/schemas/CdaError' '404': - description: Based on the combination of inputs provided the forecast spec was not found. + description: Based on the combination of inputs provided the ForecastInstance was not found. content: application/json: schema: @@ -9629,33 +9974,28 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - /forecast-spec: + - CwmsAAACacAuth: [] + /forecast-instance: get: tags: - Forecast - summary: Get forecastSpec - description: Used to query multiple forecast specs - operationId: getForecastSpec + summary: Get forecastInstance + description: Used to get all forecast instances for a given forecast spec + operationId: getForecastInstance parameters: - name: office in: query - description: Specifies the owning office of the forecast spec whose data is to be included in the response. - schema: - type: string - - name: id-mask - in: query - description: Posix regular expression that specifies the spec IDs to be included in the response. + description: Specifies the owning office of the forecast spec whose forecast instance is to be included in the response. Default will be all offices. schema: type: string - - name: designator-mask + - name: name in: query - description: Posix regular expression that specifies the designator of the forecast spec whose data to be included in the response. + description: Specifies the spec id of the forecast spec whose forecast instance data is to be included in the response. Default will be all names. schema: type: string - - name: source-entity + - name: designator in: query - description: Specifies the source identity of the forecast spec whose data is to be included in the response. + description: 'Specifies the designator of the forecast spec whose forecast instance data to be included in the response. ' schema: type: string responses: @@ -9664,7 +10004,7 @@ paths: content: application/json;version=2: schema: - $ref: '#/components/schemas/ForecastSpec' + $ref: '#/components/schemas/ForecastInstance' '400': description: Invalid parameter combination content: @@ -9699,18 +10039,18 @@ paths: description: Requested format is not implemented security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] post: tags: - Forecast - summary: Post forecastSpec - description: Used to create and save forecast spec data - operationId: postForecastSpec + summary: Post forecastInstance + description: Used to create and save a forecast instance + operationId: postForecastInstance requestBody: content: application/json;version=2: schema: - $ref: '#/components/schemas/ForecastSpec' + $ref: '#/components/schemas/ForecastInstance' required: true responses: '400': @@ -9745,53 +10085,39 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - /forecast-instance/{name}/file-data: + - CwmsAAACacAuth: [] + /forecast-spec/{name}: get: tags: - Forecast - summary: Get forecastInstance with name fileData - description: Used to download forecast file for the given parameters - operationId: getForecastInstanceWithNameFileData + summary: Get forecastSpec with name + description: Used to query a single forecast spec record + operationId: getForecastSpecWithName parameters: - name: name in: path - description: Specifies the spec id of the forecast spec whose forecast instance data is to be included in the response. - required: true - schema: - type: string - - name: forecast-date - in: query - description: Specifies the forecast date time of the forecast instance to be retrieved. - required: true - schema: - type: string - - name: issue-date - in: query - description: Specifies the issue date time of the forecast instance to be retrieved. + description: Specifies the spec id of the forecast spec whose data is to be included in the response. required: true schema: type: string - name: office in: query - description: Specifies the owning office of the forecast spec whose forecast instance is to be included in the response. + description: Specifies the owning office of the forecast spec whose data is to be included in the response. required: true schema: type: string - name: designator in: query - description: Specifies the designator of the forecast spec whose forecast instance data to be included in the response. - required: true + description: Specifies the designator of the forecast spec whose data to be included in the response. schema: type: string responses: '200': - description: OK + description: Returns the requested forecast spec content: - application/octet-stream: + application/json;version=2: schema: - type: string - format: binary + $ref: '#/components/schemas/ForecastSpec' '400': description: Invalid parameter combination content: @@ -9811,7 +10137,7 @@ paths: schema: $ref: '#/components/schemas/CdaError' '404': - description: The provided combination of parameters did not find a forecast instance. + description: The provided combination of parameters did not find a forecast spec. content: application/json: schema: @@ -9826,56 +10152,37 @@ paths: description: Requested format is not implemented security: - ApiKey: [] - - OpenIDConnect: [] - /projects/status-update/{name}: - post: + - CwmsAAACacAuth: [] + delete: tags: - - Projects - summary: Post projects statusUpdate with name - description: Publishes a message on the office's STATUS queue that a project has been updated for a specified application - operationId: postProjectsStatusUpdateWithName + - Forecast + summary: Delete forecastSpec with name + description: Used to delete forecast spec data based on unique fields + operationId: deleteForecastSpecWithName parameters: - name: name in: path - description: The location identifier of the project that has been updated + description: Specifies the spec id of the forecast spec whose data is to be deleted. required: true schema: type: string - name: office in: query - description: The office generating the message (and owning the project). - required: true - schema: - type: string - - name: application-id - in: query - description: A text string identifying the application for which the update applies. + description: Specifies the owning office of the forecast spec whose data is to be deleted. required: true schema: type: string - - name: source-id - in: query - description: An application-defined string of the instance and/or component that generated the message. If NULL or not specified, the generated message will not include this item. - schema: - type: string - - name: timeseries-id + - name: designator in: query - description: A time series identifier of the time series associated with the update. If NULL or not specified, the generated message will not include this item. + description: Specifies the designator of the forecast spec whose data is to be deleted. schema: type: string - - name: begin + - name: method in: query - description: The start time of the updates to the time series. If NULL or not specified, the generated message will not include this item. + description: Specifies the delete method used. Defaults to "DELETE_KEY" schema: - type: string - - name: end - in: query - description: The end time of the updates to the time series. If NULL or not specified, the generated message will not include this item. - schema: - type: string + $ref: '#/components/schemas/DeleteMethod' responses: - '200': - description: OK '400': description: Bad Request content: @@ -9895,7 +10202,7 @@ paths: schema: $ref: '#/components/schemas/CdaError' '404': - description: Not Found + description: The provided combination of parameters did not find a forecast spec. content: application/json: schema: @@ -9908,40 +10215,27 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - /projects/{office}/{project-id}/water-user/{water-user}: - get: + - CwmsAAACacAuth: [] + patch: tags: - - Water Contracts - summary: Get projects with office with projectId waterUser with waterUser - description: Gets a specified water user. - operationId: getProjectsWithOfficeWithProjectIdWaterUserWithWaterUser + - Forecast + summary: Patch forecastSpec with name + description: Update a forecast spec with provided values + operationId: patchForecastSpecWithName parameters: - - name: office - in: path - description: The office Id the contract is associated with. - required: true - schema: - type: string - - name: project-id - in: path - description: The project Id the contract is associated with. - required: true - schema: - type: string - - name: water-user + - name: name in: path - description: The water user the contract is associated with. + description: Forecast spec id to be updated required: true schema: type: string + requestBody: + content: + application/json;version=2: + schema: + $ref: '#/components/schemas/ForecastSpec' + required: true responses: - '200': - description: OK - content: - application/json;version=1: - schema: - $ref: '#/components/schemas/WaterUserContract' '400': description: Bad Request content: @@ -9961,7 +10255,7 @@ paths: schema: $ref: '#/components/schemas/CdaError' '404': - description: Not Found + description: Based on the combination of inputs provided the forecast spec was not found. content: application/json: schema: @@ -9974,40 +10268,44 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - delete: + - CwmsAAACacAuth: [] + /forecast-spec: + get: tags: - - Water Contracts - summary: Delete projects with office with projectId waterUser with waterUser - description: Deletes a water user from CWMS. - operationId: deleteProjectsWithOfficeWithProjectIdWaterUserWithWaterUser + - Forecast + summary: Get forecastSpec + description: Used to query multiple forecast specs + operationId: getForecastSpec parameters: - name: office - in: path - description: The office Id the contract is associated with. - required: true + in: query + description: Specifies the owning office of the forecast spec whose data is to be included in the response. schema: type: string - - name: project-id - in: path - description: The project Id the contract is associated with. - required: true + - name: id-mask + in: query + description: Posix regular expression that specifies the spec IDs to be included in the response. schema: type: string - - name: water-user - in: path - description: The water user the contract is associated with. - required: true + - name: designator-mask + in: query + description: 'Posix regular expression that specifies the designator of the forecast spec whose data to be included in the response. Default behavior when this parameter is not provided is to search for forecast specifications with a null designator. ' schema: type: string - - name: method + - name: source-entity in: query - description: Specifies the delete method used. Default is DELETE_KEY. + description: Specifies the source identity of the forecast spec whose data is to be included in the response. schema: - $ref: '#/components/schemas/DeleteMethod' + type: string responses: + '200': + description: A list of elements of the data set you've selected. + content: + application/json;version=2: + schema: + $ref: '#/components/schemas/ForecastSpec' '400': - description: Bad Request + description: Invalid parameter combination content: application/json: schema: @@ -10036,49 +10334,24 @@ paths: application/json: schema: $ref: '#/components/schemas/CdaError' + '501': + description: Requested format is not implemented security: - ApiKey: [] - - OpenIDConnect: [] - patch: + - CwmsAAACacAuth: [] + post: tags: - - Water Contracts - summary: Patch projects with office with projectId waterUser with waterUser - description: Updates a water user in CWMS. - operationId: patchProjectsWithOfficeWithProjectIdWaterUserWithWaterUser - parameters: - - name: office - in: path - description: The office Id the contract is associated with. - required: true - schema: - type: string - - name: project-id - in: path - description: The project Id the contract is associated with. - required: true - schema: - type: string - - name: water-user - in: path - description: The water user the contract is associated with. - required: true - schema: - type: string - - name: name - in: query - description: Specifies the new name of the water user entity. - required: true - schema: - type: string + - Forecast + summary: Post forecastSpec + description: Used to create and save forecast spec data + operationId: postForecastSpec requestBody: content: - application/json;version=1: + application/json;version=2: schema: - $ref: '#/components/schemas/WaterUser' + $ref: '#/components/schemas/ForecastSpec' required: true responses: - '204': - description: Water user successfully updated in CWMS. '400': description: Bad Request content: @@ -10109,40 +10382,56 @@ paths: application/json: schema: $ref: '#/components/schemas/CdaError' - '501': - description: Requested format is not implemented security: - ApiKey: [] - - OpenIDConnect: [] - /projects/{office}/{project-id}/water-user: + - CwmsAAACacAuth: [] + /forecast-instance/{name}/file-data: get: tags: - - Water Contracts - summary: Get projects with office with projectId waterUser - description: Gets all water users. - operationId: getProjectsWithOfficeWithProjectIdWaterUser + - Forecast + summary: Get forecastInstance with name fileData + description: Used to download forecast file for the given parameters + operationId: getForecastInstanceWithNameFileData parameters: - - name: office + - name: name in: path - description: The office Id the water user is associated with. + description: Specifies the spec id of the forecast spec whose forecast instance data is to be included in the response. required: true schema: type: string - - name: project-id - in: path - description: The project Id the water user is associated with. + - name: forecast-date + in: query + description: Specifies the forecast date time of the forecast instance to be retrieved. + required: true + schema: + type: string + - name: issue-date + in: query + description: Specifies the issue date time of the forecast instance to be retrieved. + required: true + schema: + type: string + - name: office + in: query + description: Specifies the owning office of the forecast spec whose forecast instance is to be included in the response. required: true schema: type: string + - name: designator + in: query + description: Specifies the designator of the forecast spec whose forecast instance data to be included in the response. + schema: + type: string responses: '200': description: OK content: - application/json;version=1: + application/octet-stream: schema: - $ref: '#/components/schemas/WaterUser' + type: string + format: binary '400': - description: Bad Request + description: Invalid parameter combination content: application/json: schema: @@ -10160,7 +10449,7 @@ paths: schema: $ref: '#/components/schemas/CdaError' '404': - description: Not Found + description: The provided combination of parameters did not find a forecast instance. content: application/json: schema: @@ -10171,40 +10460,60 @@ paths: application/json: schema: $ref: '#/components/schemas/CdaError' + '501': + description: Requested format is not implemented security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] + /projects/status-update/{name}: post: tags: - - Water Contracts - summary: Post projects with office with projectId waterUser - description: Stores a water user to CWMS. - operationId: postProjectsWithOfficeWithProjectIdWaterUser + - Projects + summary: Post projects statusUpdate with name + description: Publishes a message on the office's STATUS queue that a project has been updated for a specified application + operationId: postProjectsStatusUpdateWithName parameters: - - name: office + - name: name in: path + description: The location identifier of the project that has been updated required: true schema: type: string - - name: project-id - in: path + - name: office + in: query + description: The office generating the message (and owning the project). required: true schema: type: string - - name: fail-if-exists + - name: application-id in: query - description: 'If true, the operation will fail if the water user already exists. Default: true' + description: A text string identifying the application for which the update applies. + required: true schema: - type: boolean - requestBody: - content: - application/json;version=1: - schema: - $ref: '#/components/schemas/WaterUser' - required: true + type: string + - name: source-id + in: query + description: An application-defined string of the instance and/or component that generated the message. If NULL or not specified, the generated message will not include this item. + schema: + type: string + - name: timeseries-id + in: query + description: A time series identifier of the time series associated with the update. If NULL or not specified, the generated message will not include this item. + schema: + type: string + - name: begin + in: query + description: The start time of the updates to the time series. If NULL or not specified, the generated message will not include this item. + schema: + type: string + - name: end + in: query + description: The end time of the updates to the time series. If NULL or not specified, the generated message will not include this item. + schema: + type: string responses: - '204': - description: Water user successfully stored to CWMS. + '200': + description: OK '400': description: Bad Request content: @@ -10235,18 +10544,16 @@ paths: application/json: schema: $ref: '#/components/schemas/CdaError' - '501': - description: Requested format is not implemented security: - ApiKey: [] - - OpenIDConnect: [] - /projects/{office}/{project-id}/water-user/{water-user}/contracts/{contract-name}: + - CwmsAAACacAuth: [] + /projects/{office}/{project-id}/water-user/{water-user}: get: tags: - Water Contracts - summary: Get projects with office with projectId waterUser with waterUser contracts with contractName - description: Return a specified water contract - operationId: getProjectsWithOfficeWithProjectIdWaterUserWithWaterUserContractsWithContractName + summary: Get projects with office with projectId waterUser with waterUser + description: Gets a specified water user. + operationId: getProjectsWithOfficeWithProjectIdWaterUserWithWaterUser parameters: - name: office in: path @@ -10266,12 +10573,6 @@ paths: required: true schema: type: string - - name: contract-name - in: path - description: The name of the contract to retrieve. - required: true - schema: - type: string responses: '200': description: OK @@ -10279,9 +10580,6 @@ paths: application/json;version=1: schema: $ref: '#/components/schemas/WaterUserContract' - application/json: - schema: - $ref: '#/components/schemas/WaterUserContract' '400': description: Bad Request content: @@ -10301,7 +10599,7 @@ paths: schema: $ref: '#/components/schemas/CdaError' '404': - description: The provided combination of parameters did not find any contracts. + description: Not Found content: application/json: schema: @@ -10312,17 +10610,15 @@ paths: application/json: schema: $ref: '#/components/schemas/CdaError' - '501': - description: Requested format is not implemented. security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] delete: tags: - Water Contracts - summary: Delete projects with office with projectId waterUser with waterUser contracts with contractName - description: Delete a specified water contract - operationId: deleteProjectsWithOfficeWithProjectIdWaterUserWithWaterUserContractsWithContractName + summary: Delete projects with office with projectId waterUser with waterUser + description: Deletes a water user from CWMS. + operationId: deleteProjectsWithOfficeWithProjectIdWaterUserWithWaterUser parameters: - name: office in: path @@ -10342,15 +10638,9 @@ paths: required: true schema: type: string - - name: contract-name - in: path - description: The name of the contract to be deleted. - required: true - schema: - type: string - name: method in: query - description: Specifies the delete method used. Defaults to DELETE_KEY. + description: Specifies the delete method used. Default is DELETE_KEY. schema: $ref: '#/components/schemas/DeleteMethod' responses: @@ -10386,13 +10676,13 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] patch: tags: - Water Contracts - summary: Patch projects with office with projectId waterUser with waterUser contracts with contractName - description: Renames a water contract - operationId: patchProjectsWithOfficeWithProjectIdWaterUserWithWaterUserContractsWithContractName + summary: Patch projects with office with projectId waterUser with waterUser + description: Updates a water user in CWMS. + operationId: patchProjectsWithOfficeWithProjectIdWaterUserWithWaterUser parameters: - name: office in: path @@ -10412,14 +10702,9 @@ paths: required: true schema: type: string - - name: contract-name - in: path - required: true - schema: - type: string - - name: contract-name + - name: name in: query - description: Specifies the new name of the contract. + description: Specifies the new name of the water user entity. required: true schema: type: string @@ -10427,9 +10712,11 @@ paths: content: application/json;version=1: schema: - $ref: '#/components/schemas/WaterUserContract' + $ref: '#/components/schemas/WaterUser' required: true responses: + '200': + description: Water user successfully updated in CWMS. '400': description: Bad Request content: @@ -10449,7 +10736,7 @@ paths: schema: $ref: '#/components/schemas/CdaError' '404': - description: The provided combination of parameters did not find a contract + description: Not Found content: application/json: schema: @@ -10461,33 +10748,27 @@ paths: schema: $ref: '#/components/schemas/CdaError' '501': - description: Requested format is not implemented. + description: Requested format is not implemented security: - ApiKey: [] - - OpenIDConnect: [] - /projects/{office}/{project-id}/water-user/{water-user}/contracts: + - CwmsAAACacAuth: [] + /projects/{office}/{project-id}/water-user: get: tags: - Water Contracts - summary: Get projects with office with projectId waterUser with waterUser contracts - description: Return all water contracts - operationId: getProjectsWithOfficeWithProjectIdWaterUserWithWaterUserContracts + summary: Get projects with office with projectId waterUser + description: Gets all water users. + operationId: getProjectsWithOfficeWithProjectIdWaterUser parameters: - name: office in: path - description: Specifies the office that the contract is associated with. + description: The office Id the water user is associated with. required: true schema: type: string - name: project-id in: path - description: Specifies the project id of the contract. - required: true - schema: - type: string - - name: water-user - in: path - description: Specifies the water user of the contract. + description: The project Id the water user is associated with. required: true schema: type: string @@ -10497,10 +10778,7 @@ paths: content: application/json;version=1: schema: - $ref: '#/components/schemas/WaterUserContract' - application/json: - schema: - $ref: '#/components/schemas/WaterUserContract' + $ref: '#/components/schemas/WaterUser' '400': description: Bad Request content: @@ -10520,7 +10798,7 @@ paths: schema: $ref: '#/components/schemas/CdaError' '404': - description: The provided combination of parameters did not find any contracts. + description: Not Found content: application/json: schema: @@ -10531,55 +10809,40 @@ paths: application/json: schema: $ref: '#/components/schemas/CdaError' - '501': - description: Requested format is not implemented. security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] post: tags: - Water Contracts - summary: Post projects with office with projectId waterUser with waterUser contracts - description: Create a new water contract - operationId: postProjectsWithOfficeWithProjectIdWaterUserWithWaterUserContracts + summary: Post projects with office with projectId waterUser + description: Stores a water user to CWMS. + operationId: postProjectsWithOfficeWithProjectIdWaterUser parameters: - name: office in: path - description: The office Id the contract is associated with. required: true schema: type: string - name: project-id in: path - description: The project Id the contract is associated with. - required: true - schema: - type: string - - name: water-user - in: path - description: The water user the contract is associated with. required: true schema: type: string - name: fail-if-exists in: query - description: If true, the contract will not be stored if it already exists. - schema: - type: boolean - - name: ignore-nulls - in: query - description: If true, null fields will be ignored when storing the contract. + description: 'If true, the operation will fail if the water user already exists. Default: true' schema: type: boolean requestBody: content: application/json;version=1: schema: - $ref: '#/components/schemas/WaterUserContract' + $ref: '#/components/schemas/WaterUser' required: true responses: - '204': - description: Water contract successfully stored to CWMS. + '201': + description: Water user successfully stored to CWMS. '400': description: Bad Request content: @@ -10611,99 +10874,52 @@ paths: schema: $ref: '#/components/schemas/CdaError' '501': - description: Requested format is not implemented. + description: Requested format is not implemented security: - ApiKey: [] - - OpenIDConnect: [] - /projects/{office}/{project-id}/water-user/{water-user}/contracts/{contract-name}/accounting: + - CwmsAAACacAuth: [] + /projects/{office}/{project-id}/water-user/{water-user}/contracts/{contract-name}: get: tags: - - Pump Accounting - summary: Get projects with office with projectId waterUser with waterUser contracts with contractName accounting - description: Get pump accounting entries associated with a water supply contract. - operationId: getProjectsWithOfficeWithProjectIdWaterUserWithWaterUserContractsWithContractNameAccounting + - Water Contracts + summary: Get projects with office with projectId waterUser with waterUser contracts with contractName + description: Return a specified water contract + operationId: getProjectsWithOfficeWithProjectIdWaterUserWithWaterUserContractsWithContractName parameters: - name: office in: path - description: The office ID of the project the pump accounting is associated with. + description: The office Id the contract is associated with. required: true schema: type: string - name: project-id in: path - description: The project ID the pump accounting is associated with. + description: The project Id the contract is associated with. required: true schema: type: string - name: water-user in: path - description: The water user the pump accounting is associated with. + description: The water user the contract is associated with. required: true schema: type: string - name: contract-name in: path - description: The name of the contract associated with the pump accounting. - required: true - schema: - type: string - - name: start - in: query - description: The start time of the time window for pump accounting entries to retrieve. The format for this field is ISO 8601 extended, with optional offset and timezone - required: true - schema: - type: string - - name: end - in: query - description: The end time of the time window for pump accounting entries to retrieve. + description: The name of the contract to retrieve. required: true schema: type: string - - name: timezone - in: query - description: This field specifies a default timezone to be used if the format of the end or begin parameters do not include offset or time zone information. Defaults to UTC. - schema: - type: string - - name: unit - in: query - description: The unit of the flow rate of the accounting entries to retrieve. Defaults to 'cms'. - schema: - type: string - - name: start-time-inclusive - in: query - description: Whether or not the start time is inclusive or not. Defaults to TRUE. - schema: - type: boolean - - name: end-time-inclusive - in: query - description: Whether or not the end time is inclusive or not. Defaults to TRUE. - schema: - type: boolean - - name: ascending - in: query - description: Whether or not the entries should be returned in ascending order. Defaults to TRUE. - schema: - type: boolean - - name: row-limit - in: query - description: The maximum number of rows to return. Defaults to 0, which means no limit. - schema: - type: integer - format: int32 responses: '200': description: OK content: application/json;version=1: schema: - type: array - items: - $ref: '#/components/schemas/WaterSupplyAccounting' + $ref: '#/components/schemas/WaterUserContract' application/json: schema: - type: array - items: - $ref: '#/components/schemas/WaterSupplyAccounting' + $ref: '#/components/schemas/WaterUserContract' '400': description: Bad Request content: @@ -10723,7 +10939,7 @@ paths: schema: $ref: '#/components/schemas/CdaError' '404': - description: Pump Accounting not found for provided input parameters. + description: The provided combination of parameters did not find any contracts. content: application/json: schema: @@ -10735,49 +10951,47 @@ paths: schema: $ref: '#/components/schemas/CdaError' '501': - description: Requested format is not implemented + description: Requested format is not implemented. security: - ApiKey: [] - - OpenIDConnect: [] - post: + - CwmsAAACacAuth: [] + delete: tags: - - Pump Accounting - summary: Post projects with office with projectId waterUser with waterUser contracts with contractName accounting - description: Create a new pump accounting entry associated with a water supply contract. - operationId: postProjectsWithOfficeWithProjectIdWaterUserWithWaterUserContractsWithContractNameAccounting + - Water Contracts + summary: Delete projects with office with projectId waterUser with waterUser contracts with contractName + description: Delete a specified water contract + operationId: deleteProjectsWithOfficeWithProjectIdWaterUserWithWaterUserContractsWithContractName parameters: - name: office in: path - description: The office ID the accounting is associated with. + description: The office Id the contract is associated with. required: true schema: type: string - name: project-id in: path + description: The project Id the contract is associated with. required: true schema: type: string - name: water-user in: path - description: The water user the accounting is associated with. + description: The water user the contract is associated with. required: true schema: type: string - name: contract-name in: path - description: The name of the contract associated with the accounting. + description: The name of the contract to be deleted. required: true schema: type: string - requestBody: - content: - application/json;version=1: - schema: - $ref: '#/components/schemas/WaterSupplyAccounting' - required: true + - name: method + in: query + description: Specifies the delete method used. Defaults to DELETE_KEY. + schema: + $ref: '#/components/schemas/DeleteMethod' responses: - '204': - description: The pump accounting entry was created. '400': description: Bad Request content: @@ -10808,61 +11022,54 @@ paths: application/json: schema: $ref: '#/components/schemas/CdaError' - '501': - description: Requested format is not implemented security: - ApiKey: [] - - OpenIDConnect: [] - /projects/{office}/{project-id}/water-user/{water-user}/contracts/{contract-name}/pumps/{name}: - delete: + - CwmsAAACacAuth: [] + patch: tags: - Water Contracts - summary: Delete projects with office with projectId waterUser with waterUser contracts with contractName pumps with name - description: Disassociate a pump from a contract - operationId: deleteProjectsWithOfficeWithProjectIdWaterUserWithWaterUserContractsWithContractNamePumpsWithName + summary: Patch projects with office with projectId waterUser with waterUser contracts with contractName + description: Renames a water contract + operationId: patchProjectsWithOfficeWithProjectIdWaterUserWithWaterUserContractsWithContractName parameters: - name: office in: path - description: The office the project is associated with. + description: The office Id the contract is associated with. required: true schema: type: string - name: project-id in: path - description: The name of the project. + description: The project Id the contract is associated with. required: true schema: type: string - name: water-user in: path - description: The name of the water user the contract is associated with. + description: The water user the contract is associated with. required: true schema: type: string - name: contract-name in: path - description: The name of the contract the pump is associated with. - required: true - schema: - type: string - - name: name - in: path - description: The name of the pump to be disassociated from the specified contract. required: true schema: type: string - - name: pump-type + - name: contract-name in: query - description: 'The type of pump to be disassociated from the contract. Expected values: IN, OUT, OUT BELOW' + description: Specifies the new name of the contract. required: true schema: - $ref: '#/components/schemas/PumpType' - - name: delete-accounting - in: query - description: Whether to delete the associated accounting data. Defaults to FALSE. - schema: - type: boolean + type: string + requestBody: + content: + application/json;version=1: + schema: + $ref: '#/components/schemas/WaterUserContract' + required: true responses: + '200': + description: Contract successfully renamed in CWMS. '400': description: Bad Request content: @@ -10882,7 +11089,7 @@ paths: schema: $ref: '#/components/schemas/CdaError' '404': - description: Not Found + description: The provided combination of parameters did not find a contract content: application/json: schema: @@ -10893,20 +11100,34 @@ paths: application/json: schema: $ref: '#/components/schemas/CdaError' + '501': + description: Requested format is not implemented. security: - ApiKey: [] - - OpenIDConnect: [] - /projects/{office}/contract-types: + - CwmsAAACacAuth: [] + /projects/{office}/{project-id}/water-user/{water-user}/contracts: get: tags: - Water Contracts - summary: Get projects with office contractTypes - description: Get all water contract types - operationId: getProjectsWithOfficeContractTypes + summary: Get projects with office with projectId waterUser with waterUser contracts + description: Return all water contracts + operationId: getProjectsWithOfficeWithProjectIdWaterUserWithWaterUserContracts parameters: - name: office in: path - description: The office Id the contract is associated with. + description: Specifies the office that the contract is associated with. + required: true + schema: + type: string + - name: project-id + in: path + description: Specifies the project id of the contract. + required: true + schema: + type: string + - name: water-user + in: path + description: Specifies the water user of the contract. required: true schema: type: string @@ -10916,10 +11137,10 @@ paths: content: application/json;version=1: schema: - $ref: '#/components/schemas/LookupType' + $ref: '#/components/schemas/WaterUserContract' application/json: schema: - $ref: '#/components/schemas/LookupType' + $ref: '#/components/schemas/WaterUserContract' '400': description: Bad Request content: @@ -10954,33 +11175,51 @@ paths: description: Requested format is not implemented. security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] post: tags: - Water Contracts - summary: Post projects with office contractTypes - description: Create a new water contract type - operationId: postProjectsWithOfficeContractTypes + summary: Post projects with office with projectId waterUser with waterUser contracts + description: Create a new water contract + operationId: postProjectsWithOfficeWithProjectIdWaterUserWithWaterUserContracts parameters: - name: office in: path + description: The office Id the contract is associated with. + required: true + schema: + type: string + - name: project-id + in: path + description: The project Id the contract is associated with. + required: true + schema: + type: string + - name: water-user + in: path + description: The water user the contract is associated with. required: true schema: type: string - name: fail-if-exists in: query - description: 'Create will fail if provideddisplay value already exists. Default: true' + description: If true, the contract will not be stored if it already exists. + schema: + type: boolean + - name: ignore-nulls + in: query + description: If true, null fields will be ignored when storing the contract. schema: type: boolean requestBody: content: application/json;version=1: schema: - $ref: '#/components/schemas/LookupType' + $ref: '#/components/schemas/WaterUserContract' required: true responses: '204': - description: Contract type successfully stored to CWMS. + description: Water contract successfully stored to CWMS. '400': description: Bad Request content: @@ -11015,28 +11254,96 @@ paths: description: Requested format is not implemented. security: - ApiKey: [] - - OpenIDConnect: [] - /projects/{office}/contract-types/{display-value}: - delete: + - CwmsAAACacAuth: [] + /projects/{office}/{project-id}/water-user/{water-user}/contracts/{contract-name}/accounting: + get: tags: - - Water Contracts - summary: Delete projects with office contractTypes with displayValue - description: Delete a water contract type - operationId: deleteProjectsWithOfficeContractTypesWithDisplayValue + - Pump Accounting + summary: Get projects with office with projectId waterUser with waterUser contracts with contractName accounting + description: Get pump accounting entries associated with a water supply contract. + operationId: getProjectsWithOfficeWithProjectIdWaterUserWithWaterUserContractsWithContractNameAccounting parameters: - name: office in: path - description: The office associated with the contract type to delete + description: The office ID of the project the pump accounting is associated with. required: true schema: type: string - - name: display-value + - name: project-id in: path - description: The location associated with the contract type to delete + description: The project ID the pump accounting is associated with. required: true schema: type: string + - name: water-user + in: path + description: The water user the pump accounting is associated with. + required: true + schema: + type: string + - name: contract-name + in: path + description: The name of the contract associated with the pump accounting. + required: true + schema: + type: string + - name: start + in: query + description: The start time of the time window for pump accounting entries to retrieve. The format for this field is ISO 8601 extended, with optional offset and timezone, i.e., 'YYYY-MM-dd'T'hh:mm:ss[Z'['VV']']', e.g., '2021-06-10T13:00:00-07:00'. + required: true + schema: + type: string + - name: end + in: query + description: The end time of the time window for pump accounting entries to retrieve.The format for this field is ISO 8601 extended, with optional offset and timezone, i.e., 'YYYY-MM-dd'T'hh:mm:ss[Z'['VV']']', e.g., '2021-06-10T13:00:00-07:00'. + required: true + schema: + type: string + - name: timezone + in: query + description: This field specifies a default timezone to be used if the format of the end or begin parameters do not include offset or time zone information. Defaults to UTC. + schema: + type: string + - name: unit + in: query + description: The unit of the flow rate of the accounting entries to retrieve. Defaults to 'cms'. + schema: + type: string + - name: start-time-inclusive + in: query + description: Whether or not the start time is inclusive or not. Defaults to TRUE. + schema: + type: boolean + - name: end-time-inclusive + in: query + description: Whether or not the end time is inclusive or not. Defaults to TRUE. + schema: + type: boolean + - name: ascending + in: query + description: Whether or not the entries should be returned in ascending order. Defaults to TRUE. + schema: + type: boolean + - name: row-limit + in: query + description: The maximum number of rows to return. Defaults to 0, which means no limit. + schema: + type: integer + format: int32 responses: + '200': + description: OK + content: + application/json;version=1: + schema: + type: array + items: + $ref: '#/components/schemas/WaterSupplyAccounting' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/WaterSupplyAccounting' '400': description: Bad Request content: @@ -11056,7 +11363,7 @@ paths: schema: $ref: '#/components/schemas/CdaError' '404': - description: Not Found + description: Pump Accounting not found for provided input parameters. content: application/json: schema: @@ -11067,43 +11374,50 @@ paths: application/json: schema: $ref: '#/components/schemas/CdaError' + '501': + description: Requested format is not implemented security: - ApiKey: [] - - OpenIDConnect: [] - /projects/embankments/{name}: - get: + - CwmsAAACacAuth: [] + post: tags: - - Embankments - summary: Get projects embankments with name - description: Returns CWMS Embankment Data - operationId: getProjectsEmbankmentsWithName + - Pump Accounting + summary: Post projects with office with projectId waterUser with waterUser contracts with contractName accounting + description: Create a new pump accounting entry associated with a water supply contract. + operationId: postProjectsWithOfficeWithProjectIdWaterUserWithWaterUserContractsWithContractNameAccounting parameters: - - name: name + - name: office in: path - description: Specifies the name of the embankment to be retrieved. + description: The office ID the accounting is associated with. required: true schema: type: string - - name: office - in: query - description: Specifies the owning office of the embankment to be retrieved. + - name: project-id + in: path + required: true + schema: + type: string + - name: water-user + in: path + description: The water user the accounting is associated with. required: true schema: type: string + - name: contract-name + in: path + description: The name of the contract associated with the accounting. + required: true + schema: + type: string + requestBody: + content: + application/json;version=1: + schema: + $ref: '#/components/schemas/WaterSupplyAccounting' + required: true responses: - '200': - description: OK - content: - application/json;version=1: - schema: - type: array - items: - $ref: '#/components/schemas/Embankment' - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Embankment' + '201': + description: The pump accounting entry was created. '400': description: Bad Request content: @@ -11134,36 +11448,61 @@ paths: application/json: schema: $ref: '#/components/schemas/CdaError' + '501': + description: Requested format is not implemented security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] + /projects/{office}/{project-id}/water-user/{water-user}/contracts/{contract-name}/pumps/{name}: delete: tags: - - Embankments - summary: Delete projects embankments with name - description: Delete CWMS Embankment - operationId: deleteProjectsEmbankmentsWithName + - Water Contracts + summary: Delete projects with office with projectId waterUser with waterUser contracts with contractName pumps with name + description: Disassociate a pump from a contract + operationId: deleteProjectsWithOfficeWithProjectIdWaterUserWithWaterUserContractsWithContractNamePumpsWithName parameters: + - name: office + in: path + description: The office the project is associated with. + required: true + schema: + type: string + - name: project-id + in: path + description: The name of the project. + required: true + schema: + type: string + - name: water-user + in: path + description: The name of the water user the contract is associated with. + required: true + schema: + type: string + - name: contract-name + in: path + description: The name of the contract the pump is associated with. + required: true + schema: + type: string - name: name in: path - description: Specifies the name of the embankment to be deleted. + description: The name of the pump to be disassociated from the specified contract. required: true schema: type: string - - name: office + - name: pump-type in: query - description: Specifies the owning office of the embankment to be deleted. + description: 'The type of pump to be disassociated from the contract. Expected values: IN, OUT, OUT BELOW' required: true schema: - type: string - - name: method + $ref: '#/components/schemas/PumpType' + - name: delete-accounting in: query - description: Specifies the delete method used. Defaults to "DELETE_KEY" + description: Whether to delete the associated accounting data. Defaults to FALSE. schema: - $ref: '#/components/schemas/DeleteMethod' + type: boolean responses: - '204': - description: Embankment successfully deleted from CWMS. '400': description: Bad Request content: @@ -11183,7 +11522,7 @@ paths: schema: $ref: '#/components/schemas/CdaError' '404': - description: Based on the combination of inputs provided the embankment was not found. + description: Not Found content: application/json: schema: @@ -11196,34 +11535,31 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - patch: + - CwmsAAACacAuth: [] + /projects/{office}/contract-types: + get: tags: - - Embankments - summary: Patch projects embankments with name - description: Rename CWMS Embankment - operationId: patchProjectsEmbankmentsWithName + - Water Contracts + summary: Get projects with office contractTypes + description: Get all water contract types + operationId: getProjectsWithOfficeContractTypes parameters: - - name: name + - name: office in: path - required: true - schema: - type: string - - name: name - in: query - description: 'Specifies the new embankment name. ' - required: true - schema: - type: string - - name: office - in: query - description: Specifies the owning office of the embankment to be renamed. + description: The office Id the contract is associated with. required: true schema: type: string responses: - '204': - description: Embankment successfully renamed in CWMS. + '200': + description: OK + content: + application/json;version=1: + schema: + $ref: '#/components/schemas/LookupType' + application/json: + schema: + $ref: '#/components/schemas/LookupType' '400': description: Bad Request content: @@ -11243,7 +11579,7 @@ paths: schema: $ref: '#/components/schemas/CdaError' '404': - description: Not Found + description: The provided combination of parameters did not find any contracts. content: application/json: schema: @@ -11254,42 +11590,37 @@ paths: application/json: schema: $ref: '#/components/schemas/CdaError' + '501': + description: Requested format is not implemented. security: - ApiKey: [] - - OpenIDConnect: [] - /projects/embankments: - get: + - CwmsAAACacAuth: [] + post: tags: - - Embankments - summary: Get projects embankments - description: Returns matching CWMS Embankment Data for a Reservoir Project. - operationId: getProjectsEmbankments + - Water Contracts + summary: Post projects with office contractTypes + description: Create a new water contract type + operationId: postProjectsWithOfficeContractTypes parameters: - name: office - in: query - description: Office id for the reservoir project location associated with the embankments. + in: path + required: true schema: type: string - - name: project-id + - name: fail-if-exists in: query - description: Specifies the project-id of the Embankments whose data is to be included in the response. - required: true + description: 'Create will fail if provideddisplay value already exists. Default: true' schema: - type: string + type: boolean + requestBody: + content: + application/json;version=1: + schema: + $ref: '#/components/schemas/LookupType' + required: true responses: - '200': - description: OK - content: - application/json;version=1: - schema: - type: array - items: - $ref: '#/components/schemas/Embankment' - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Embankment' + '201': + description: Contract type successfully stored to CWMS. '400': description: Bad Request content: @@ -11320,30 +11651,32 @@ paths: application/json: schema: $ref: '#/components/schemas/CdaError' + '501': + description: Requested format is not implemented. security: - ApiKey: [] - - OpenIDConnect: [] - post: + - CwmsAAACacAuth: [] + /projects/{office}/contract-types/{display-value}: + delete: tags: - - Embankments - summary: Post projects embankments - description: Create CWMS Embankment - operationId: postProjectsEmbankments + - Water Contracts + summary: Delete projects with office contractTypes with displayValue + description: Delete a water contract type + operationId: deleteProjectsWithOfficeContractTypesWithDisplayValue parameters: - - name: fail-if-exists - in: query - description: 'Create will fail if provided ID already exists. Default: true' + - name: office + in: path + description: The office associated with the contract type to delete + required: true schema: - type: boolean - requestBody: - content: - application/json;version=1: - schema: - $ref: '#/components/schemas/Embankment' - required: true + type: string + - name: display-value + in: path + description: The location associated with the contract type to delete + required: true + schema: + type: string responses: - '204': - description: Embankment successfully stored to CWMS. '400': description: Bad Request content: @@ -11376,24 +11709,24 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - /projects/turbines/{name}: + - CwmsAAACacAuth: [] + /projects/embankments/{name}: get: tags: - - Turbines - summary: Get projects turbines with name - description: Returns CWMS Turbine Data - operationId: getProjectsTurbinesWithName + - Embankments + summary: Get projects embankments with name + description: Returns CWMS Embankment Data + operationId: getProjectsEmbankmentsWithName parameters: - name: name in: path - description: Specifies the name of the turbine to be retrieved. + description: Specifies the name of the embankment to be retrieved. required: true schema: type: string - name: office in: query - description: Specifies the owning office of the turbine to be retrieved. + description: Specifies the owning office of the embankment to be retrieved. required: true schema: type: string @@ -11403,10 +11736,14 @@ paths: content: application/json;version=1: schema: - $ref: '#/components/schemas/Turbine' + type: array + items: + $ref: '#/components/schemas/Embankment' application/json: schema: - $ref: '#/components/schemas/Turbine' + type: array + items: + $ref: '#/components/schemas/Embankment' '400': description: Bad Request content: @@ -11439,23 +11776,23 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] delete: tags: - - Turbines - summary: Delete projects turbines with name - description: Delete CWMS Turbine - operationId: deleteProjectsTurbinesWithName + - Embankments + summary: Delete projects embankments with name + description: Delete CWMS Embankment + operationId: deleteProjectsEmbankmentsWithName parameters: - name: name in: path - description: Specifies the name of the turbine to be deleted. + description: Specifies the name of the embankment to be deleted. required: true schema: type: string - name: office in: query - description: Specifies the owning office of the turbine to be deleted. + description: Specifies the owning office of the embankment to be deleted. required: true schema: type: string @@ -11465,8 +11802,8 @@ paths: schema: $ref: '#/components/schemas/DeleteMethod' responses: - '204': - description: Turbine successfully deleted from CWMS. + '200': + description: Embankment successfully deleted from CWMS. '400': description: Bad Request content: @@ -11486,7 +11823,7 @@ paths: schema: $ref: '#/components/schemas/CdaError' '404': - description: Based on the combination of inputs provided the turbine was not found. + description: Based on the combination of inputs provided the embankment was not found. content: application/json: schema: @@ -11499,13 +11836,13 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] patch: tags: - - Turbines - summary: Patch projects turbines with name - description: Rename CWMS Turbine - operationId: patchProjectsTurbinesWithName + - Embankments + summary: Patch projects embankments with name + description: Rename CWMS Embankment + operationId: patchProjectsEmbankmentsWithName parameters: - name: name in: path @@ -11514,19 +11851,19 @@ paths: type: string - name: name in: query - description: 'Specifies the new turbine name. ' + description: 'Specifies the new embankment name. ' required: true schema: type: string - name: office in: query - description: Specifies the owning office of the turbine to be renamed. + description: Specifies the owning office of the embankment to be renamed. required: true schema: type: string responses: '204': - description: Turbine successfully renamed in to CWMS. + description: Embankment successfully renamed in CWMS. '400': description: Bad Request content: @@ -11559,24 +11896,23 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - /projects/turbines: + - CwmsAAACacAuth: [] + /projects/embankments: get: tags: - - Turbines - summary: Get projects turbines - description: Returns matching CWMS Turbine Data for a Reservoir Project. - operationId: getProjectsTurbines + - Embankments + summary: Get projects embankments + description: Returns matching CWMS Embankment Data for a Reservoir Project. + operationId: getProjectsEmbankments parameters: - name: office in: query - description: Office id for the reservoir project location associated with the turbines. - required: true + description: Office id for the reservoir project location associated with the embankments. schema: type: string - name: project-id in: query - description: Specifies the project-id of the Turbines whose data is to be included in the response. + description: Specifies the project-id of the Embankments whose data is to be included in the response. required: true schema: type: string @@ -11588,10 +11924,12 @@ paths: schema: type: array items: - $ref: '#/components/schemas/Turbine' + $ref: '#/components/schemas/Embankment' application/json: schema: - $ref: '#/components/schemas/Turbine' + type: array + items: + $ref: '#/components/schemas/Embankment' '400': description: Bad Request content: @@ -11624,13 +11962,13 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] post: tags: - - Turbines - summary: Post projects turbines - description: Create CWMS Turbine - operationId: postProjectsTurbines + - Embankments + summary: Post projects embankments + description: Create CWMS Embankment + operationId: postProjectsEmbankments parameters: - name: fail-if-exists in: query @@ -11641,14 +11979,11 @@ paths: content: application/json;version=1: schema: - $ref: '#/components/schemas/Turbine' - application/json: - schema: - $ref: '#/components/schemas/Turbine' + $ref: '#/components/schemas/Embankment' required: true responses: '204': - description: Turbine successfully stored to CWMS. + description: Embankment successfully stored to CWMS. '400': description: Bad Request content: @@ -11681,50 +12016,37 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - /projects/locks/{name}: + - CwmsAAACacAuth: [] + /projects/turbines/{name}: get: tags: - - Locks - summary: Get projects locks with name - description: Returns CWMS Lock Data - operationId: getProjectsLocksWithName + - Turbines + summary: Get projects turbines with name + description: Returns CWMS Turbine Data + operationId: getProjectsTurbinesWithName parameters: - name: name in: path - description: Specifies the name of the lock to be retrieved. + description: Specifies the name of the turbine to be retrieved. required: true schema: type: string - name: office in: query - description: Specifies the owning office of the lock to be retrieved. + description: Specifies the owning office of the turbine to be retrieved. required: true schema: type: string - - name: unit - in: query - description: |- - Specifies the unit system to be used in the response. Valid values are: - * `SI` - Metric units. - * `EN` - Imperial units. - Defaults to SI. - schema: - type: string responses: '200': description: OK content: application/json;version=1: schema: - type: array - items: - $ref: '#/components/schemas/Lock' + $ref: '#/components/schemas/Turbine' application/json: schema: - type: array - items: - $ref: '#/components/schemas/Lock' + $ref: '#/components/schemas/Turbine' '400': description: Bad Request content: @@ -11757,23 +12079,23 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] delete: tags: - - Locks - summary: Delete projects locks with name - description: Delete CWMS Lock - operationId: deleteProjectsLocksWithName + - Turbines + summary: Delete projects turbines with name + description: Delete CWMS Turbine + operationId: deleteProjectsTurbinesWithName parameters: - name: name in: path - description: Specifies the name of the lock to be deleted. + description: Specifies the name of the turbine to be deleted. required: true schema: type: string - name: office in: query - description: Specifies the owning office of the lock to be deleted. + description: Specifies the owning office of the turbine to be deleted. required: true schema: type: string @@ -11783,8 +12105,8 @@ paths: schema: $ref: '#/components/schemas/DeleteMethod' responses: - '204': - description: Lock successfully deleted from CWMS. + '200': + description: Turbine successfully deleted from CWMS. '400': description: Bad Request content: @@ -11804,7 +12126,7 @@ paths: schema: $ref: '#/components/schemas/CdaError' '404': - description: Based on the combination of inputs provided the lock was not found. + description: Based on the combination of inputs provided the turbine was not found. content: application/json: schema: @@ -11817,13 +12139,13 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] patch: tags: - - Locks - summary: Patch projects locks with name - description: Rename CWMS Lock - operationId: patchProjectsLocksWithName + - Turbines + summary: Patch projects turbines with name + description: Rename CWMS Turbine + operationId: patchProjectsTurbinesWithName parameters: - name: name in: path @@ -11832,19 +12154,19 @@ paths: type: string - name: name in: query - description: Specifies the new lock name. + description: 'Specifies the new turbine name. ' required: true schema: type: string - name: office in: query - description: Specifies the owning office of the lock to be renamed. + description: Specifies the owning office of the turbine to be renamed. required: true schema: type: string responses: - '204': - description: Lock successfully renamed in CWMS. + '200': + description: Turbine successfully renamed in to CWMS. '400': description: Bad Request content: @@ -11877,24 +12199,24 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - /projects/locks: + - CwmsAAACacAuth: [] + /projects/turbines: get: tags: - - Locks - summary: Get projects locks - description: Returns matching CWMS Lock Data for a Reservoir Project. - operationId: getProjectsLocks + - Turbines + summary: Get projects turbines + description: Returns matching CWMS Turbine Data for a Reservoir Project. + operationId: getProjectsTurbines parameters: - name: office in: query - description: Office id for the reservoir project location associated with the locks. + description: Office id for the reservoir project location associated with the turbines. required: true schema: type: string - name: project-id in: query - description: Specifies the project ID of the Locks whose data is to be included in the response. + description: Specifies the project-id of the Turbines whose data is to be included in the response. required: true schema: type: string @@ -11906,12 +12228,10 @@ paths: schema: type: array items: - $ref: '#/components/schemas/Lock' + $ref: '#/components/schemas/Turbine' application/json: schema: - type: array - items: - $ref: '#/components/schemas/Lock' + $ref: '#/components/schemas/Turbine' '400': description: Bad Request content: @@ -11944,13 +12264,13 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] post: tags: - - Locks - summary: Post projects locks - description: Create CWMS Lock - operationId: postProjectsLocks + - Turbines + summary: Post projects turbines + description: Create CWMS Turbine + operationId: postProjectsTurbines parameters: - name: fail-if-exists in: query @@ -11961,11 +12281,14 @@ paths: content: application/json;version=1: schema: - $ref: '#/components/schemas/Lock' + $ref: '#/components/schemas/Turbine' + application/json: + schema: + $ref: '#/components/schemas/Turbine' required: true responses: - '204': - description: Lock successfully stored to CWMS. + '201': + description: Turbine successfully stored to CWMS. '400': description: Bad Request content: @@ -11998,60 +12321,36 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - /projects/{office}/{name}/turbine-changes: + - CwmsAAACacAuth: [] + /projects/locks/{name}: get: tags: - - Turbines - summary: Get projects with office with name turbineChanges - description: Returns matching CWMS Turbine Change Data for a Reservoir Project. - operationId: getProjectsWithOfficeWithNameTurbineChanges + - Locks + summary: Get projects locks with name + description: Returns CWMS Lock Data + operationId: getProjectsLocksWithName parameters: - - name: office - in: path - description: Office id for the reservoir project location associated with the turbine changes. - required: true - schema: - type: string - name: name in: path - description: Specifies the name of project of the Turbine changes whose data is to be included in the response. + description: Specifies the name of the lock to be retrieved. required: true schema: type: string - - name: begin + - name: office in: query - description: The start of the time window + description: Specifies the owning office of the lock to be retrieved. required: true schema: type: string - - name: end + - name: unit in: query - description: The end of the time window. - required: true + description: |- + Specifies the unit system to be used in the response. Valid values are: + * `SI` - Metric units. + * `EN` - Imperial units. + Defaults to SI. schema: type: string - - name: start-time-inclusive - in: query - description: A flag specifying whether any data at the start time should be retrieved ('True') or only data after the start time ('False'). Default value is True - schema: - type: boolean - - name: end-time-inclusive - in: query - description: A flag ('True'/'False') specifying whether any data at the end time should be retrieved ('True') or only data before the end time ('False'). Default value is False - schema: - type: boolean - - name: unit-system - in: query - description: Unit System desired in response. Can be SI (International Scientific) or EN (Imperial.) If unspecified, defaults to EN. - schema: - $ref: '#/components/schemas/UnitSystem' - - name: page-size - in: query - description: the maximum number of turbine changes to retrieve, regardless of time window. A positive integer is interpreted as the maximum number of changes from the beginning of the time window. A negative integer is interpreted as the maximum number from the end of the time window. Default 500.A page cursor will not be returned by this DTO. Instead, the next page can be determined by querying the next set of changes using the last returned change date and using start-time-inclusive=false - schema: - type: integer - format: int32 responses: '200': description: OK @@ -12060,7 +12359,12 @@ paths: schema: type: array items: - $ref: '#/components/schemas/TurbineChange' + $ref: '#/components/schemas/Lock' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Lock' '400': description: Bad Request content: @@ -12093,43 +12397,34 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - post: + - CwmsAAACacAuth: [] + delete: tags: - - Turbines - summary: Post projects with office with name turbineChanges - description: Create CWMS Turbine Changes - operationId: postProjectsWithOfficeWithNameTurbineChanges + - Locks + summary: Delete projects locks with name + description: Delete CWMS Lock + operationId: deleteProjectsLocksWithName parameters: - - name: office + - name: name in: path - description: Office id for the reservoir project location associated with the turbine changes. + description: Specifies the name of the lock to be deleted. required: true schema: type: string - - name: name - in: path - description: Specifies the name of project of the Turbine changes whose data is to stored. + - name: office + in: query + description: Specifies the owning office of the lock to be deleted. required: true schema: type: string - - name: override-protection + - name: method in: query - description: A flag ('True'/'False') specifying whether to delete protected data. Default is False + description: Specifies the delete method used. Defaults to "DELETE_KEY" schema: - type: boolean - requestBody: - content: - application/json;version=1: - schema: - $ref: '#/components/schemas/TurbineChange' - application/json: - schema: - $ref: '#/components/schemas/TurbineChange' - required: true + $ref: '#/components/schemas/DeleteMethod' responses: - '204': - description: Turbine successfully stored to CWMS. + '200': + description: Lock successfully deleted from CWMS. '400': description: Bad Request content: @@ -12149,7 +12444,7 @@ paths: schema: $ref: '#/components/schemas/CdaError' '404': - description: Project Id or Turbine location Ids not found. + description: Based on the combination of inputs provided the lock was not found. content: application/json: schema: @@ -12162,46 +12457,34 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - delete: + - CwmsAAACacAuth: [] + patch: tags: - - Turbines - summary: Delete projects with office with name turbineChanges - description: Delete CWMS Turbine Changes - operationId: deleteProjectsWithOfficeWithNameTurbineChanges + - Locks + summary: Patch projects locks with name + description: Rename CWMS Lock + operationId: patchProjectsLocksWithName parameters: - - name: office - in: path - description: Specifies the owning office of the project for changes to be deleted. - required: true - schema: - type: string - name: name in: path - description: Specifies the name of project for the turbine changes to be deleted. required: true schema: type: string - - name: begin + - name: name in: query - description: The start of the time window + description: Specifies the new lock name. required: true schema: type: string - - name: end + - name: office in: query - description: The end of the time window. + description: Specifies the owning office of the lock to be renamed. required: true schema: type: string - - name: override-protection - in: query - description: A flag ('True'/'False') specifying whether to delete protected data. Default is False - schema: - type: boolean responses: - '204': - description: Turbine successfully deleted from CWMS. + '200': + description: Lock successfully renamed in CWMS. '400': description: Bad Request content: @@ -12221,7 +12504,7 @@ paths: schema: $ref: '#/components/schemas/CdaError' '404': - description: Based on the combination of inputs provided the project was not found. + description: Not Found content: application/json: schema: @@ -12234,24 +12517,24 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - /projects/outlets/{name}: + - CwmsAAACacAuth: [] + /projects/locks: get: tags: - - Outlets - summary: Get projects outlets with name - description: Returns CWMS Outlet Data - operationId: getProjectsOutletsWithName + - Locks + summary: Get projects locks + description: Returns matching CWMS Lock Data for a Reservoir Project. + operationId: getProjectsLocks parameters: - - name: name - in: path - description: Specifies the location-id of the Outlet to be created. + - name: office + in: query + description: Office id for the reservoir project location associated with the locks. required: true schema: type: string - - name: office + - name: project-id in: query - description: Specifies the owning office of the outlet to be retrieved. + description: Specifies the project ID of the Locks whose data is to be included in the response. required: true schema: type: string @@ -12261,10 +12544,14 @@ paths: content: application/json;version=1: schema: - $ref: '#/components/schemas/Outlet' + type: array + items: + $ref: '#/components/schemas/Lock' application/json: schema: - $ref: '#/components/schemas/Outlet' + type: array + items: + $ref: '#/components/schemas/Lock' '400': description: Bad Request content: @@ -12297,34 +12584,28 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - delete: + - CwmsAAACacAuth: [] + post: tags: - - Outlets - summary: Delete projects outlets with name - description: Delete CWMS Outlet - operationId: deleteProjectsOutletsWithName + - Locks + summary: Post projects locks + description: Create CWMS Lock + operationId: postProjectsLocks parameters: - - name: name - in: path - description: Specifies the location-id of the outlet to be deleted. - required: true - schema: - type: string - - name: office - in: query - description: Specifies the owning office of the outlet to be deleted. - required: true - schema: - type: string - - name: method + - name: fail-if-exists in: query - description: Specifies the delete method used. Defaults to "DELETE_KEY" + description: 'Create will fail if provided ID already exists. Default: true' schema: - $ref: '#/components/schemas/DeleteMethod' + type: boolean + requestBody: + content: + application/json;version=1: + schema: + $ref: '#/components/schemas/Lock' + required: true responses: - '204': - description: Outlet successfully deleted from CWMS. + '201': + description: Lock successfully stored to CWMS. '400': description: Bad Request content: @@ -12344,7 +12625,7 @@ paths: schema: $ref: '#/components/schemas/CdaError' '404': - description: Based on the combination of inputs provided the outlet was not found. + description: Not Found content: application/json: schema: @@ -12357,87 +12638,60 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - patch: + - CwmsAAACacAuth: [] + /projects/{office}/{name}/turbine-changes: + get: tags: - - Outlets - summary: Patch projects outlets with name - description: Rename CWMS Outlet - operationId: patchProjectsOutletsWithName + - Turbines + summary: Get projects with office with name turbineChanges + description: Returns matching CWMS Turbine Change Data for a Reservoir Project. + operationId: getProjectsWithOfficeWithNameTurbineChanges parameters: - - name: name + - name: office in: path + description: Office id for the reservoir project location associated with the turbine changes. required: true schema: type: string - name: name - in: query - description: Specifies the new outlet location-id. + in: path + description: Specifies the name of project of the Turbine changes whose data is to be included in the response. required: true schema: type: string - - name: office + - name: begin in: query - description: Specifies the owning office of the outlet to be renamed. + description: The start of the time window required: true schema: type: string - responses: - '204': - description: CWMS Outlet successfully renamed. - '400': - description: Bad Request - content: - application/json: - schema: - $ref: '#/components/schemas/CdaError' - '401': - description: Unauthorized - content: - application/json: - schema: - $ref: '#/components/schemas/CdaError' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/CdaError' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/CdaError' - '500': - description: Server Error - content: - application/json: - schema: - $ref: '#/components/schemas/CdaError' - security: - - ApiKey: [] - - OpenIDConnect: [] - /projects/outlets: - get: - tags: - - Outlets - summary: Get projects outlets - description: Returns matching CWMS Outlet Data for a Reservoir Project. - operationId: getProjectsOutlets - parameters: - - name: office + - name: end in: query - description: Office id for the reservoir project location associated with the outlets. + description: The end of the time window. required: true schema: type: string - - name: project-id + - name: start-time-inclusive in: query - description: Specifies the project-id of the Outlets whose data is to be included in the response. - required: true + description: A flag specifying whether any data at the start time should be retrieved ('True') or only data after the start time ('False'). Default value is True schema: - type: string + type: boolean + - name: end-time-inclusive + in: query + description: A flag ('True'/'False') specifying whether any data at the end time should be retrieved ('True') or only data before the end time ('False'). Default value is False + schema: + type: boolean + - name: unit-system + in: query + description: Unit System desired in response. Can be SI (International Scientific) or EN (Imperial.) If unspecified, defaults to EN. + schema: + $ref: '#/components/schemas/UnitSystem' + - name: page-size + in: query + description: the maximum number of turbine changes to retrieve, regardless of time window. A positive integer is interpreted as the maximum number of changes from the beginning of the time window. A negative integer is interpreted as the maximum number from the end of the time window. Default 500.A page cursor will not be returned by this DTO. Instead, the next page can be determined by querying the next set of changes using the last returned change date and using start-time-inclusive=false + schema: + type: integer + format: int32 responses: '200': description: OK @@ -12446,12 +12700,7 @@ paths: schema: type: array items: - $ref: '#/components/schemas/Outlet' - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Outlet' + $ref: '#/components/schemas/TurbineChange' '400': description: Bad Request content: @@ -12484,31 +12733,43 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] post: tags: - - Outlets - summary: Post projects outlets - description: Create CWMS Outlet - operationId: postProjectsOutlets + - Turbines + summary: Post projects with office with name turbineChanges + description: Create CWMS Turbine Changes + operationId: postProjectsWithOfficeWithNameTurbineChanges parameters: - - name: fail-if-exists + - name: office + in: path + description: Office id for the reservoir project location associated with the turbine changes. + required: true + schema: + type: string + - name: name + in: path + description: Specifies the name of project of the Turbine changes whose data is to stored. + required: true + schema: + type: string + - name: override-protection in: query - description: 'Create will fail if provided ID already exists. Default: true' + description: A flag ('True'/'False') specifying whether to delete protected data. Default is False schema: type: boolean requestBody: content: application/json;version=1: schema: - $ref: '#/components/schemas/Outlet' + $ref: '#/components/schemas/TurbineChange' application/json: schema: - $ref: '#/components/schemas/Outlet' + $ref: '#/components/schemas/TurbineChange' required: true responses: - '204': - description: Outlet successfully stored to CWMS. + '201': + description: Turbine successfully stored to CWMS. '400': description: Bad Request content: @@ -12528,7 +12789,7 @@ paths: schema: $ref: '#/components/schemas/CdaError' '404': - description: Not Found + description: Project Id or Turbine location Ids not found. content: application/json: schema: @@ -12541,36 +12802,46 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - /projects/gate-changes: - post: + - CwmsAAACacAuth: [] + delete: tags: - - Outlets - summary: Post projects gateChanges - description: Create CWMS Gate Changes - operationId: postProjectsGateChanges + - Turbines + summary: Delete projects with office with name turbineChanges + description: Delete CWMS Turbine Changes + operationId: deleteProjectsWithOfficeWithNameTurbineChanges parameters: - - name: fail-if-exists + - name: office + in: path + description: Specifies the owning office of the project for changes to be deleted. + required: true + schema: + type: string + - name: name + in: path + description: Specifies the name of project for the turbine changes to be deleted. + required: true + schema: + type: string + - name: begin in: query - description: 'Create will fail if provided Gate Changes already exist. Default: true' + description: The start of the time window + required: true + schema: + type: string + - name: end + in: query + description: The end of the time window. + required: true + schema: + type: string + - name: override-protection + in: query + description: A flag ('True'/'False') specifying whether to delete protected data. Default is False schema: type: boolean - requestBody: - content: - application/json;version=1: - schema: - type: array - items: - $ref: '#/components/schemas/GateChange' - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/GateChange' - required: true responses: - '201': - description: Gate Changes successfully stored to CWMS. + '200': + description: Turbine successfully deleted from CWMS. '400': description: Bad Request content: @@ -12590,7 +12861,7 @@ paths: schema: $ref: '#/components/schemas/CdaError' '404': - description: Not Found + description: Based on the combination of inputs provided the project was not found. content: application/json: schema: @@ -12603,74 +12874,37 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - /projects/{office}/{project-id}/gate-changes: + - CwmsAAACacAuth: [] + /projects/outlets/{name}: get: tags: - Outlets - summary: Get projects with office with projectId gateChanges - description: Returns matching CWMS gate change data for a Reservoir Project. - operationId: getProjectsWithOfficeWithProjectIdGateChanges + summary: Get projects outlets with name + description: Returns CWMS Outlet Data + operationId: getProjectsOutletsWithName parameters: - - name: office - in: path - description: Office id for the reservoir project location associated with the Gate Changes. - required: true - schema: - type: string - - name: project-id + - name: name in: path - description: Specifies the project-id of the Gate Changes whose data is to be included in the response. - required: true - schema: - type: string - - name: begin - in: query - description: The start of the time window + description: Specifies the location-id of the Outlet to be created. required: true schema: type: string - - name: end + - name: office in: query - description: The end of the time window. + description: Specifies the owning office of the outlet to be retrieved. required: true schema: type: string - - name: start-time-inclusive - in: query - description: A flag specifying whether any data at the start time should be retrieved ('True') or only data after the start time ('False'). Default value is True - schema: - type: boolean - - name: end-time-inclusive - in: query - description: A flag ('True'/'False') specifying whether any data at the end time should be retrieved ('True') or only data before the end time ('False'). Default value is False - schema: - type: boolean - - name: unit-system - in: query - description: Unit System desired in response. Can be SI (International Scientific) or EN (Imperial.) If unspecified, defaults to EN. - schema: - $ref: '#/components/schemas/UnitSystem' - - name: page-size - in: query - description: the maximum number of gate changes to retrieve, regardless of time window. A positive integer is interpreted as the maximum number of changes from the beginning of the time window. A negative integer is interpreted as the maximum number from the end of the time window. Default 500.A page cursor will not be returned by this DTO. Instead, the next page can be determined by querying the next set of changes using the last returned change date and using start-time-inclusive=false - schema: - type: integer - format: int32 responses: '200': description: OK content: application/json;version=1: schema: - type: array - items: - $ref: '#/components/schemas/GateChange' + $ref: '#/components/schemas/Outlet' application/json: schema: - type: array - items: - $ref: '#/components/schemas/GateChange' + $ref: '#/components/schemas/Outlet' '400': description: Bad Request content: @@ -12703,46 +12937,34 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] delete: tags: - Outlets - summary: Delete projects with office with projectId gateChanges - description: Deletes matching CWMS gate change data for a Reservoir Project. - operationId: deleteProjectsWithOfficeWithProjectIdGateChanges + summary: Delete projects outlets with name + description: Delete CWMS Outlet + operationId: deleteProjectsOutletsWithName parameters: - - name: office - in: path - description: Office id for the reservoir project location associated with the Gate Changes. - required: true - schema: - type: string - - name: project-id + - name: name in: path - description: Specifies the project-id of the Gate Changes whose data is to be included in the response. + description: Specifies the location-id of the outlet to be deleted. required: true schema: type: string - - name: begin + - name: office in: query - description: The start of the time window + description: Specifies the owning office of the outlet to be deleted. required: true schema: type: string - - name: end - in: query - description: The end of the time window. - required: true - schema: - type: string - - name: override-protection + - name: method in: query - description: A flag ('True'/'False') specifying whether to delete protected data. Default is False + description: Specifies the delete method used. Defaults to "DELETE_KEY" schema: - type: boolean + $ref: '#/components/schemas/DeleteMethod' responses: - '204': - description: Gate changes successfully deleted from CWMS. + '200': + description: Outlet successfully deleted from CWMS. '400': description: Bad Request content: @@ -12762,7 +12984,7 @@ paths: schema: $ref: '#/components/schemas/CdaError' '404': - description: Based on the combination of inputs provided the project was not found. + description: Based on the combination of inputs provided the outlet was not found. content: application/json: schema: @@ -12775,43 +12997,34 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - /projects/{office}/{project-id}/virtual-outlets/{name}: - get: + - CwmsAAACacAuth: [] + patch: tags: - Outlets - summary: Get projects with office with projectId virtualOutlets with name - description: Returns CWMS Virtual Outlet Data - operationId: getProjectsWithOfficeWithProjectIdVirtualOutletsWithName + summary: Patch projects outlets with name + description: Rename CWMS Outlet + operationId: patchProjectsOutletsWithName parameters: - - name: office + - name: name in: path - description: Specifies the owning office of the virtual outlet to be retrieved. required: true schema: type: string - - name: project-id - in: path - description: Specifies the project-id of the virtual outlets whose data is to be included in the response. + - name: name + in: query + description: Specifies the new outlet location-id. required: true schema: type: string - - name: name - in: path - description: Specifies the location-id of the virtual outlet to be created. + - name: office + in: query + description: Specifies the owning office of the outlet to be renamed. required: true schema: type: string responses: '200': - description: OK - content: - application/json;version=1: - schema: - $ref: '#/components/schemas/VirtualOutlet' - application/json: - schema: - $ref: '#/components/schemas/VirtualOutlet' + description: CWMS Outlet successfully renamed. '400': description: Bad Request content: @@ -12844,40 +13057,41 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - delete: + - CwmsAAACacAuth: [] + /projects/outlets: + get: tags: - Outlets - summary: Delete projects with office with projectId virtualOutlets with name - description: Delete CWMS Virtual Outlet - operationId: deleteProjectsWithOfficeWithProjectIdVirtualOutletsWithName + summary: Get projects outlets + description: Returns matching CWMS Outlet Data for a Reservoir Project. + operationId: getProjectsOutlets parameters: - name: office - in: path - description: Specifies the owning office of the virtual outlet to be deleted. + in: query + description: Office id for the reservoir project location associated with the outlets. required: true schema: type: string - name: project-id - in: path - description: Specifies the project id of the virtual outlet to be deleted. - required: true - schema: - type: string - - name: name - in: path - description: Specifies the location id of the virtual outlet to be deleted + in: query + description: Specifies the project-id of the Outlets whose data is to be included in the response. required: true schema: type: string - - name: method - in: query - description: Specifies the delete method used. Defaults to "DELETE_KEY" - schema: - $ref: '#/components/schemas/DeleteMethod' responses: - '204': - description: Virtual Outlet successfully deleted from CWMS. + '200': + description: OK + content: + application/json;version=1: + schema: + type: array + items: + $ref: '#/components/schemas/Outlet' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Outlet' '400': description: Bad Request content: @@ -12897,7 +13111,7 @@ paths: schema: $ref: '#/components/schemas/CdaError' '404': - description: Based on the combination of inputs provided the virtual outlet was not found. + description: Not Found content: application/json: schema: @@ -12910,41 +13124,31 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - /projects/{office}/{project-id}/virtual-outlets: - get: + - CwmsAAACacAuth: [] + post: tags: - Outlets - summary: Get projects with office with projectId virtualOutlets - description: Returns matching CWMS Virtual Outlet Data for a Reservoir Project. - operationId: getProjectsWithOfficeWithProjectIdVirtualOutlets + summary: Post projects outlets + description: Create CWMS Outlet + operationId: postProjectsOutlets parameters: - - name: office - in: path - description: Office id for the reservoir project location associated with the virtual outlets. Defaults to the user session id. - required: true - schema: - type: string - - name: project-id - in: path - description: Specifies the project-id of the virtual outlets whose data is to be included in the response. - required: true + - name: fail-if-exists + in: query + description: 'Create will fail if provided ID already exists. Default: true' schema: - type: string + type: boolean + requestBody: + content: + application/json;version=1: + schema: + $ref: '#/components/schemas/Outlet' + application/json: + schema: + $ref: '#/components/schemas/Outlet' + required: true responses: - '200': - description: OK - content: - application/json;version=1: - schema: - type: array - items: - $ref: '#/components/schemas/VirtualOutlet' - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/VirtualOutlet' + '201': + description: Outlet successfully stored to CWMS. '400': description: Bad Request content: @@ -12977,32 +13181,36 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - /projects/virtual-outlets: + - CwmsAAACacAuth: [] + /projects/gate-changes: post: tags: - Outlets - summary: Post projects virtualOutlets - description: Create CWMS Virtual Outlet - operationId: postProjectsVirtualOutlets + summary: Post projects gateChanges + description: Create CWMS Gate Changes + operationId: postProjectsGateChanges parameters: - name: fail-if-exists in: query - description: 'Create will fail if provided ID already exists. Default: true' + description: 'Create will fail if provided Gate Changes already exist. Default: true' schema: type: boolean requestBody: content: application/json;version=1: schema: - $ref: '#/components/schemas/VirtualOutlet' + type: array + items: + $ref: '#/components/schemas/GateChange' application/json: schema: - $ref: '#/components/schemas/VirtualOutlet' + type: array + items: + $ref: '#/components/schemas/GateChange' required: true responses: - '204': - description: Virtual Outlet successfully stored to CWMS. + '201': + description: Gate Changes successfully stored to CWMS. '400': description: Bad Request content: @@ -13035,39 +13243,74 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - /projects/locations: + - CwmsAAACacAuth: [] + /projects/{office}/{project-id}/gate-changes: get: tags: - - Projects - summary: Get projects locations - description: Get a list of project child locations - operationId: getProjectsLocations + - Outlets + summary: Get projects with office with projectId gateChanges + description: Returns matching CWMS gate change data for a Reservoir Project. + operationId: getProjectsWithOfficeWithProjectIdGateChanges parameters: - name: office - in: query + in: path + description: Office id for the reservoir project location associated with the Gate Changes. required: true schema: type: string - - name: project-like + - name: project-id + in: path + description: Specifies the project-id of the Gate Changes whose data is to be included in the response. + required: true + schema: + type: string + - name: begin in: query - description: Posix regular expression matching against the project_id. + description: The start of the time window + required: true schema: type: string - - name: location-kind-like + - name: end in: query - description: 'Posix regular expression matching against the location kind. The pattern will be matched against the valid location-kinds for Project child locations:{"EMBANKMENT", "TURBINE", "OUTLET", "LOCK", "GATE"}. Multiple kinds can be matched by using Regular Expression OR clauses. For example: "(TURBINE|OUTLET)"' + description: The end of the time window. + required: true schema: type: string + - name: start-time-inclusive + in: query + description: A flag specifying whether any data at the start time should be retrieved ('True') or only data after the start time ('False'). Default value is True + schema: + type: boolean + - name: end-time-inclusive + in: query + description: A flag ('True'/'False') specifying whether any data at the end time should be retrieved ('True') or only data before the end time ('False'). Default value is False + schema: + type: boolean + - name: unit-system + in: query + description: Unit System desired in response. Can be SI (International Scientific) or EN (Imperial.) If unspecified, defaults to EN. + schema: + $ref: '#/components/schemas/UnitSystem' + - name: page-size + in: query + description: the maximum number of gate changes to retrieve, regardless of time window. A positive integer is interpreted as the maximum number of changes from the beginning of the time window. A negative integer is interpreted as the maximum number from the end of the time window. Default 500.A page cursor will not be returned by this DTO. Instead, the next page can be determined by querying the next set of changes using the last returned change date and using start-time-inclusive=false + schema: + type: integer + format: int32 responses: '200': description: OK content: + application/json;version=1: + schema: + type: array + items: + $ref: '#/components/schemas/GateChange' application/json: schema: type: array items: - $ref: '#/components/schemas/ProjectChildLocations' + $ref: '#/components/schemas/GateChange' '400': description: Bad Request content: @@ -13100,35 +13343,47 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - /projects/{name}: - get: + - CwmsAAACacAuth: [] + delete: tags: - - Projects - summary: Get projects with name - description: Retrieves requested Project - operationId: getProjectsWithName + - Outlets + summary: Delete projects with office with projectId gateChanges + description: Deletes matching CWMS gate change data for a Reservoir Project. + operationId: deleteProjectsWithOfficeWithProjectIdGateChanges parameters: - - name: name + - name: office in: path - description: Specifies the project to be included in the response. + description: Office id for the reservoir project location associated with the Gate Changes. required: true schema: type: string - - name: office + - name: project-id + in: path + description: Specifies the project-id of the Gate Changes whose data is to be included in the response. + required: true + schema: + type: string + - name: begin in: query - description: Specifies the owning office of the Project whose data is to be included in the response. + description: The start of the time window required: true schema: type: string - responses: - '200': - description: OK - content: - application/json;version=1: - schema: - $ref: '#/components/schemas/Project' - '400': + - name: end + in: query + description: The end of the time window. + required: true + schema: + type: string + - name: override-protection + in: query + description: A flag ('True'/'False') specifying whether to delete protected data. Default is False + schema: + type: boolean + responses: + '204': + description: Gate changes successfully deleted from CWMS. + '400': description: Bad Request content: application/json: @@ -13147,7 +13402,7 @@ paths: schema: $ref: '#/components/schemas/CdaError' '404': - description: Based on the combination of inputs provided the Project was not found. + description: Based on the combination of inputs provided the project was not found. content: application/json: schema: @@ -13158,36 +13413,45 @@ paths: application/json: schema: $ref: '#/components/schemas/CdaError' - '501': - description: request format is not implemented security: - ApiKey: [] - - OpenIDConnect: [] - delete: + - CwmsAAACacAuth: [] + /projects/{office}/{project-id}/virtual-outlets/{name}: + get: tags: - - Projects - summary: Delete projects with name - description: Deletes requested reservoir project - operationId: deleteProjectsWithName + - Outlets + summary: Get projects with office with projectId virtualOutlets with name + description: Returns CWMS Virtual Outlet Data + operationId: getProjectsWithOfficeWithProjectIdVirtualOutletsWithName parameters: - - name: name + - name: office in: path - description: The project identifier to be deleted + description: Specifies the owning office of the virtual outlet to be retrieved. required: true schema: type: string - - name: office - in: query - description: Specifies the owning office of the project to be deleted + - name: project-id + in: path + description: Specifies the project-id of the virtual outlets whose data is to be included in the response. required: true schema: type: string - - name: method - in: query - description: Specifies the delete method used. Defaults to "DELETE_KEY" + - name: name + in: path + description: Specifies the location-id of the virtual outlet to be created. + required: true schema: - $ref: '#/components/schemas/DeleteMethod' + type: string responses: + '200': + description: OK + content: + application/json;version=1: + schema: + $ref: '#/components/schemas/VirtualOutlet' + application/json: + schema: + $ref: '#/components/schemas/VirtualOutlet' '400': description: Bad Request content: @@ -13220,40 +13484,40 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - patch: + - CwmsAAACacAuth: [] + delete: tags: - - Projects - summary: Patch projects with name - description: Rename a project - operationId: patchProjectsWithName + - Outlets + summary: Delete projects with office with projectId virtualOutlets with name + description: Delete CWMS Virtual Outlet + operationId: deleteProjectsWithOfficeWithProjectIdVirtualOutletsWithName parameters: - - name: name + - name: office + in: path + description: Specifies the owning office of the virtual outlet to be deleted. + required: true + schema: + type: string + - name: project-id in: path + description: Specifies the project id of the virtual outlet to be deleted. required: true schema: type: string - name: name - in: query - description: The new name of the project + in: path + description: Specifies the location id of the virtual outlet to be deleted required: true schema: type: string - - name: office + - name: method in: query - description: The office of the project to be renamed + description: Specifies the delete method used. Defaults to "DELETE_KEY" schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Project' - application/json;version=1: - schema: - $ref: '#/components/schemas/Project' - required: true + $ref: '#/components/schemas/DeleteMethod' responses: + '200': + description: Virtual Outlet successfully deleted from CWMS. '400': description: Bad Request content: @@ -13273,7 +13537,7 @@ paths: schema: $ref: '#/components/schemas/CdaError' '404': - description: Not Found + description: Based on the combination of inputs provided the virtual outlet was not found. content: application/json: schema: @@ -13286,43 +13550,41 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - /projects: + - CwmsAAACacAuth: [] + /projects/{office}/{project-id}/virtual-outlets: get: tags: - - Projects - summary: Get projects - description: Returns Projects Data - operationId: getProjects + - Outlets + summary: Get projects with office with projectId virtualOutlets + description: Returns matching CWMS Virtual Outlet Data for a Reservoir Project. + operationId: getProjectsWithOfficeWithProjectIdVirtualOutlets parameters: - name: office - in: query - description: Specifies the owning office of the data in the response. If this field is not specified, matching items from all offices shall be returned. - schema: - type: string - - name: id-mask - in: query - description: Project Id mask. + in: path + description: Office id for the reservoir project location associated with the virtual outlets. Defaults to the user session id. + required: true schema: type: string - - name: page - in: query - description: This end point can return a lot of data, this identifies where in the request you are. This is an opaque value, and can be obtained from the 'next-page' value in the response. + - name: project-id + in: path + description: Specifies the project-id of the virtual outlets whose data is to be included in the response. + required: true schema: type: string - - name: page-size - in: query - description: How many entries per page returned. Default 100. - schema: - type: integer - format: int32 responses: '200': description: OK content: + application/json;version=1: + schema: + type: array + items: + $ref: '#/components/schemas/VirtualOutlet' application/json: schema: - $ref: '#/components/schemas/Projects' + type: array + items: + $ref: '#/components/schemas/VirtualOutlet' '400': description: Bad Request content: @@ -13342,7 +13604,7 @@ paths: schema: $ref: '#/components/schemas/CdaError' '404': - description: Based on the combination of inputs provided the projects were not found. + description: Not Found content: application/json: schema: @@ -13353,17 +13615,16 @@ paths: application/json: schema: $ref: '#/components/schemas/CdaError' - '501': - description: request format is not implemented security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] + /projects/virtual-outlets: post: tags: - - Projects - summary: Post projects - description: Create new Project - operationId: postProjects + - Outlets + summary: Post projects virtualOutlets + description: Create CWMS Virtual Outlet + operationId: postProjectsVirtualOutlets parameters: - name: fail-if-exists in: query @@ -13374,12 +13635,14 @@ paths: content: application/json;version=1: schema: - $ref: '#/components/schemas/Project' + $ref: '#/components/schemas/VirtualOutlet' application/json: schema: - $ref: '#/components/schemas/Project' + $ref: '#/components/schemas/VirtualOutlet' required: true responses: + '204': + description: Virtual Outlet successfully stored to CWMS. '400': description: Bad Request content: @@ -13412,36 +13675,28 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - /properties/{name}: + - CwmsAAACacAuth: [] + /projects/locations: get: tags: - - Properties - summary: Get properties with name - description: Returns CWMS Property Data - operationId: getPropertiesWithName + - Projects + summary: Get projects locations + description: Get a list of project child locations + operationId: getProjectsLocations parameters: - - name: name - in: path - description: Specifies the name of the property to be retrieved. - required: true - schema: - type: string - name: office in: query - description: Specifies the owning office of the property to be retrieved. required: true schema: type: string - - name: category-id + - name: project-like in: query - description: Specifies the category id of the property to be retrieved. - required: true + description: Posix regular expression matching against the project_id. schema: type: string - - name: default-value + - name: location-kind-like in: query - description: Specifies the default value if the property does not exist. + description: 'Posix regular expression matching against the location kind. The pattern will be matched against the valid location-kinds for Project child locations:{"EMBANKMENT", "TURBINE", "OUTLET", "LOCK", "GATE"}. Multiple kinds can be matched by using Regular Expression OR clauses. For example: "(TURBINE|OUTLET)"' schema: type: string responses: @@ -13450,7 +13705,9 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Property' + type: array + items: + $ref: '#/components/schemas/ProjectChildLocations' '400': description: Bad Request content: @@ -13483,35 +13740,34 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - delete: + - CwmsAAACacAuth: [] + /projects/{name}: + get: tags: - - Properties - summary: Delete properties with name - description: Delete CWMS Property - operationId: deletePropertiesWithName + - Projects + summary: Get projects with name + description: Retrieves requested Project + operationId: getProjectsWithName parameters: - name: name in: path - description: Specifies the name of the property to be deleted. + description: Specifies the project to be included in the response. required: true schema: type: string - name: office in: query - description: Specifies the owning office of the property to be deleted. - required: true - schema: - type: string - - name: category-id - in: query - description: Specifies the category id of the property to be deleted. + description: Specifies the owning office of the Project whose data is to be included in the response. required: true schema: type: string responses: - '204': - description: Property successfully deleted from CWMS. + '200': + description: OK + content: + application/json;version=1: + schema: + $ref: '#/components/schemas/Project' '400': description: Bad Request content: @@ -13531,7 +13787,7 @@ paths: schema: $ref: '#/components/schemas/CdaError' '404': - description: Based on the combination of inputs provided the property was not found. + description: Based on the combination of inputs provided the Project was not found. content: application/json: schema: @@ -13542,30 +13798,36 @@ paths: application/json: schema: $ref: '#/components/schemas/CdaError' + '501': + description: request format is not implemented security: - ApiKey: [] - - OpenIDConnect: [] - patch: + - CwmsAAACacAuth: [] + delete: tags: - - Properties - summary: Patch properties with name - description: Update CWMS Property - operationId: patchPropertiesWithName + - Projects + summary: Delete projects with name + description: Deletes requested reservoir project + operationId: deleteProjectsWithName parameters: - name: name in: path + description: The project identifier to be deleted required: true schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Property' - required: true + - name: office + in: query + description: Specifies the owning office of the project to be deleted + required: true + schema: + type: string + - name: method + in: query + description: Specifies the delete method used. Defaults to "DELETE_KEY" + schema: + $ref: '#/components/schemas/DeleteMethod' responses: - '204': - description: Property successfully stored to CWMS. '400': description: Bad Request content: @@ -13598,87 +13860,40 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - /properties: - get: + - CwmsAAACacAuth: [] + patch: tags: - - Properties - summary: Get properties - description: Returns matching CWMS Property Data. - operationId: getProperties + - Projects + summary: Patch projects with name + description: Rename a project + operationId: patchProjectsWithName parameters: - - name: office-mask - in: query - description: Filters properties to the specified office mask + - name: name + in: path + required: true schema: type: string - - name: category-id + - name: name in: query - description: Filters properties to the specified category mask + description: The new name of the project + required: true schema: type: string - - name: name-mask + - name: office in: query - description: Filters properties to the specified name mask + description: The office of the project to be renamed schema: type: string - responses: - '200': - description: OK - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Property' - '400': - description: Bad Request - content: - application/json: - schema: - $ref: '#/components/schemas/CdaError' - '401': - description: Unauthorized - content: - application/json: - schema: - $ref: '#/components/schemas/CdaError' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/CdaError' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/CdaError' - '500': - description: Server Error - content: - application/json: - schema: - $ref: '#/components/schemas/CdaError' - security: - - ApiKey: [] - - OpenIDConnect: [] - post: - tags: - - Properties - summary: Post properties - description: Create CWMS Property - operationId: postProperties requestBody: content: application/json: schema: - $ref: '#/components/schemas/Property' + $ref: '#/components/schemas/Project' + application/json;version=1: + schema: + $ref: '#/components/schemas/Project' required: true responses: - '204': - description: Property successfully stored to CWMS. '400': description: Bad Request content: @@ -13711,42 +13926,43 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - /lookup-types: + - CwmsAAACacAuth: [] + /projects: get: tags: - - LookupTypes - summary: Get lookupTypes - description: Returns matching CWMS Lookup Type Data. - operationId: getLookupTypes + - Projects + summary: Get projects + description: Returns Projects Data + operationId: getProjects parameters: - - name: category + - name: office in: query - description: Filters lookup types to the specified category - required: true + description: Specifies the owning office of the data in the response. If this field is not specified, matching items from all offices shall be returned. schema: type: string - - name: prefix + - name: id-mask in: query - description: Filters lookup types to the specified prefix - required: true + description: Project Id mask. schema: type: string - - name: office + - name: page in: query - description: Filters lookup types to the specified office ID - required: true + description: This end point can return a lot of data, this identifies where in the request you are. This is an opaque value, and can be obtained from the 'next-page' value in the response. schema: type: string + - name: page-size + in: query + description: How many entries per page returned. Default 100. + schema: + type: integer + format: int32 responses: '200': description: OK content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/LookupType' + $ref: '#/components/schemas/Projects' '400': description: Bad Request content: @@ -13766,7 +13982,7 @@ paths: schema: $ref: '#/components/schemas/CdaError' '404': - description: Not Found + description: Based on the combination of inputs provided the projects were not found. content: application/json: schema: @@ -13777,37 +13993,33 @@ paths: application/json: schema: $ref: '#/components/schemas/CdaError' + '501': + description: request format is not implemented security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] post: tags: - - LookupTypes - summary: Post lookupTypes - description: Create CWMS Lookup Type - operationId: postLookupTypes + - Projects + summary: Post projects + description: Create new Project + operationId: postProjects parameters: - - name: category - in: query - description: Specifies the category id of the lookup type to be created. - required: true - schema: - type: string - - name: prefix + - name: fail-if-exists in: query - description: Specifies the prefix of the lookup type to be created. - required: true + description: 'Create will fail if provided ID already exists. Default: true' schema: - type: string + type: boolean requestBody: content: + application/json;version=1: + schema: + $ref: '#/components/schemas/Project' application/json: schema: - $ref: '#/components/schemas/LookupType' + $ref: '#/components/schemas/Project' required: true responses: - '204': - description: Lookup Type successfully stored to CWMS. '400': description: Bad Request content: @@ -13840,41 +14052,45 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - /lookup-types/{name}: - delete: + - CwmsAAACacAuth: [] + /properties/{name}: + get: tags: - - LookupTypes - summary: Delete lookupTypes with name - description: Delete CWMS Lookup Type - operationId: deleteLookupTypesWithName + - Properties + summary: Get properties with name + description: Returns CWMS Property Data + operationId: getPropertiesWithName parameters: - name: name in: path + description: Specifies the name of the property to be retrieved. required: true schema: type: string - - name: category + - name: office in: query - description: Specifies the category id of the lookup type to be deleted. + description: Specifies the owning office of the property to be retrieved. required: true schema: type: string - - name: prefix + - name: category-id in: query - description: Specifies the prefix of the lookup type to be deleted. + description: Specifies the category id of the property to be retrieved. required: true schema: type: string - - name: office + - name: default-value in: query - description: Specifies the owning office of the lookup type to be deleted. - required: true + description: Specifies the default value if the property does not exist. schema: type: string responses: - '204': - description: Lookup Type successfully deleted from CWMS. + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/Property' '400': description: Bad Request content: @@ -13894,7 +14110,7 @@ paths: schema: $ref: '#/components/schemas/CdaError' '404': - description: Based on the combination of inputs provided the lookup type was not found. + description: Not Found content: application/json: schema: @@ -13907,40 +14123,35 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - patch: + - CwmsAAACacAuth: [] + delete: tags: - - LookupTypes - summary: Patch lookupTypes with name - description: Update CWMS Lookup Type - operationId: patchLookupTypesWithName + - Properties + summary: Delete properties with name + description: Delete CWMS Property + operationId: deletePropertiesWithName parameters: - name: name in: path + description: Specifies the name of the property to be deleted. required: true schema: type: string - - name: category + - name: office in: query - description: Specifies the category id of the lookup type to be updated. + description: Specifies the owning office of the property to be deleted. required: true schema: type: string - - name: prefix + - name: category-id in: query - description: Specifies the prefix of the lookup type to be updated. + description: Specifies the category id of the property to be deleted. required: true schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/LookupType' - required: true responses: - '204': - description: Lookup Type successfully stored to CWMS. + '200': + description: Property successfully deleted from CWMS. '400': description: Bad Request content: @@ -13960,7 +14171,7 @@ paths: schema: $ref: '#/components/schemas/CdaError' '404': - description: Not Found + description: Based on the combination of inputs provided the property was not found. content: application/json: schema: @@ -13973,40 +14184,28 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - /project-locks/{name}: - get: + - CwmsAAACacAuth: [] + patch: tags: - - Project Locks - summary: Get projectLocks with name - description: Return a lock if the specified project is locked. Otherwise 404 - operationId: getProjectLocksWithName + - Properties + summary: Patch properties with name + description: Update CWMS Property + operationId: patchPropertiesWithName parameters: - name: name in: path - description: The id of the project. - required: true - schema: - type: string - - name: office - in: query - description: The office id. - required: true - schema: - type: string - - name: application-id - in: query - description: The application-id required: true schema: type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Property' + required: true responses: '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/ProjectLock' + description: Property successfully updated in CWMS. '400': description: Bad Request content: @@ -14026,7 +14225,7 @@ paths: schema: $ref: '#/components/schemas/CdaError' '404': - description: No matching Lock was found. + description: Not Found content: application/json: schema: @@ -14039,33 +14238,39 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - delete: + - CwmsAAACacAuth: [] + /properties: + get: tags: - - Project Locks - summary: Delete projectLocks with name - description: Revokes a project lock, if successful the lock is deleted - operationId: deleteProjectLocksWithName + - Properties + summary: Get properties + description: Returns matching CWMS Property Data. + operationId: getProperties parameters: - - name: name - in: path - description: Specifies the project-id to be deleted - required: true + - name: office-mask + in: query + description: Filters properties to the specified office mask schema: type: string - - name: office + - name: category-id in: query - description: Specifies the office of the lock. - required: true + description: Filters properties to the specified category mask schema: type: string - - name: revoke-timeout + - name: name-mask in: query - description: 'time in seconds to wait for existing lock to be revoked. Default: 10' + description: Filters properties to the specified name mask schema: - type: integer - format: int32 + type: string responses: + '200': + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Property' '400': description: Bad Request content: @@ -14098,38 +14303,22 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - /project-locks: - get: + - CwmsAAACacAuth: [] + post: tags: - - Project Locks - summary: Get projectLocks - description: Get a list of project locks - operationId: getProjectLocks - parameters: - - name: office-mask - in: query - description: Specifies the office mask to be used to filter the locks. Supports '*' but is typically a single office. - required: true - schema: - type: string - - name: project-mask - in: query - description: Specifies the project mask to be used to filter the locks. Defaults to '*' - schema: - type: string - - name: application-mask - in: query - description: Specifies the application mask to be used to filter the locks. Defaults to '*' - schema: - type: string + - Properties + summary: Post properties + description: Create CWMS Property + operationId: postProperties + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Property' + required: true responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/ProjectLock' + '204': + description: Property successfully stored to CWMS. '400': description: Bad Request content: @@ -14162,39 +14351,42 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - post: + - CwmsAAACacAuth: [] + /lookup-types: + get: tags: - - Project Locks - summary: Post projectLocks - description: Requests the creation of a new Reservoir Project Lock - operationId: postProjectLocks + - LookupTypes + summary: Get lookupTypes + description: Returns matching CWMS Lookup Type Data. + operationId: getLookupTypes parameters: - - name: revoke-existing + - name: category in: query - description: 'If an existing lock is found should a revoke be attempted? Default: false' + description: Filters lookup types to the specified category + required: true schema: - type: boolean - - name: revoke-timeout + type: string + - name: prefix in: query - description: 'time in seconds to wait for existing lock to be revoked. Default: 10' + description: Filters lookup types to the specified prefix + required: true schema: - type: integer - format: int32 - requestBody: - description: Users must provide a Lock object specifying the officeId, projectId and applicationId. Other fields will be ignored. - content: - application/json: - schema: - $ref: '#/components/schemas/ProjectLock' - required: true + type: string + - name: office + in: query + description: Filters lookup types to the specified office ID + required: true + schema: + type: string responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/ProjectLockId' + type: array + items: + $ref: '#/components/schemas/LookupType' '400': description: Bad Request content: @@ -14227,22 +14419,35 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - /project-locks/deny: + - CwmsAAACacAuth: [] post: tags: - - Project Locks - summary: Post projectLocks deny - description: Deny a Lock revoke request. - operationId: postProjectLocksDeny + - LookupTypes + summary: Post lookupTypes + description: Create CWMS Lookup Type + operationId: postLookupTypes parameters: - - name: lock-id + - name: category in: query - description: The id of the lock. + description: Specifies the category id of the lookup type to be created. + required: true + schema: + type: string + - name: prefix + in: query + description: Specifies the prefix of the lookup type to be created. required: true schema: type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LookupType' + required: true responses: + '204': + description: Lookup Type successfully stored to CWMS. '400': description: Bad Request content: @@ -14275,28 +14480,41 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - /project-locks/release: - post: + - CwmsAAACacAuth: [] + /lookup-types/{name}: + delete: tags: - - Project Locks - summary: Post projectLocks release - description: Releases a project lock - operationId: postProjectLocksRelease + - LookupTypes + summary: Delete lookupTypes with name + description: Delete CWMS Lookup Type + operationId: deleteLookupTypesWithName parameters: - - name: office + - name: name + in: path + required: true + schema: + type: string + - name: category in: query - description: The user's office. + description: Specifies the category id of the lookup type to be deleted. required: true schema: type: string - - name: lock-id + - name: prefix in: query - description: The id of the lock to release. + description: Specifies the prefix of the lookup type to be deleted. + required: true + schema: + type: string + - name: office + in: query + description: Specifies the owning office of the lookup type to be deleted. required: true schema: type: string responses: + '200': + description: Lookup Type successfully deleted from CWMS. '400': description: Bad Request content: @@ -14316,7 +14534,7 @@ paths: schema: $ref: '#/components/schemas/CdaError' '404': - description: Not Found + description: Based on the combination of inputs provided the lookup type was not found. content: application/json: schema: @@ -14329,40 +14547,40 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - /project-lock-rights: - get: + - CwmsAAACacAuth: [] + patch: tags: - - Project Lock Revoker Rights - summary: Get projectLockRights - description: 'Get a list of project lock revoker rights ' - operationId: getProjectLockRights + - LookupTypes + summary: Patch lookupTypes with name + description: Update CWMS Lookup Type + operationId: patchLookupTypesWithName parameters: - - name: office-mask - in: query - description: Specifies the office mask to be used to filter the lock revoker rights. Supports '*' but is typically a single office. + - name: name + in: path required: true schema: type: string - - name: project-mask + - name: category in: query - description: Specifies the project mask to be used to filter the lock revoker rights. Defaults to '*' + description: Specifies the category id of the lookup type to be updated. + required: true schema: type: string - - name: application-mask + - name: prefix in: query - description: Specifies the application mask to be used to filter the lock revoker rights. Defaults to '*' + description: Specifies the prefix of the lookup type to be updated. + required: true schema: type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LookupType' + required: true responses: '200': - description: OK - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/LockRevokerRights' + description: Updated Lookup Type '400': description: Bad Request content: @@ -14395,34 +14613,40 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - /project-lock-rights/remove-all: - post: + - CwmsAAACacAuth: [] + /project-locks/{name}: + get: tags: - - Project Lock Revoker Rights - summary: Post projectLockRights removeAll - description: Revokes a project lock, if successful the lock is deleted - operationId: postProjectLockRightsRemoveAll + - Project Locks + summary: Get projectLocks with name + description: Return a lock if the specified project is locked. Otherwise 404 + operationId: getProjectLocksWithName parameters: - - name: office - in: query - description: Specifies the session office. + - name: name + in: path + description: The id of the project. required: true schema: type: string - - name: application-id + - name: office in: query - description: Specifies the application id. + description: The office id. required: true schema: type: string - - name: user-id + - name: application-id in: query - description: Specifies the user. + description: The application-id required: true schema: type: string responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectLock' '400': description: Bad Request content: @@ -14442,7 +14666,7 @@ paths: schema: $ref: '#/components/schemas/CdaError' '404': - description: Not Found + description: No matching Lock was found. content: application/json: schema: @@ -14455,12 +14679,428 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] - /project-lock-rights/update: - post: + - CwmsAAACacAuth: [] + delete: tags: - - Project Lock Revoker Rights - summary: Post projectLockRights update + - Project Locks + summary: Delete projectLocks with name + description: Revokes a project lock, if successful the lock is deleted + operationId: deleteProjectLocksWithName + parameters: + - name: name + in: path + description: Specifies the project-id to be deleted + required: true + schema: + type: string + - name: office + in: query + description: Specifies the office of the lock. + required: true + schema: + type: string + - name: revoke-timeout + in: query + description: 'time in seconds to wait for existing lock to be revoked. Default: 10' + schema: + type: integer + format: int32 + responses: + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '500': + description: Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + security: + - ApiKey: [] + - CwmsAAACacAuth: [] + /project-locks: + get: + tags: + - Project Locks + summary: Get projectLocks + description: Get a list of project locks + operationId: getProjectLocks + parameters: + - name: office-mask + in: query + description: Specifies the office mask to be used to filter the locks. Supports '*' but is typically a single office. + required: true + schema: + type: string + - name: project-mask + in: query + description: Specifies the project mask to be used to filter the locks. Defaults to '*' + schema: + type: string + - name: application-mask + in: query + description: Specifies the application mask to be used to filter the locks. Defaults to '*' + schema: + type: string + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectLock' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '500': + description: Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + security: + - ApiKey: [] + - CwmsAAACacAuth: [] + post: + tags: + - Project Locks + summary: Post projectLocks + description: Requests the creation of a new Reservoir Project Lock + operationId: postProjectLocks + parameters: + - name: revoke-existing + in: query + description: 'If an existing lock is found should a revoke be attempted? Default: false' + schema: + type: boolean + - name: revoke-timeout + in: query + description: 'time in seconds to wait for existing lock to be revoked. Default: 10' + schema: + type: integer + format: int32 + requestBody: + description: Users must provide a Lock object specifying the officeId, projectId and applicationId. Other fields will be ignored. + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectLock' + required: true + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectLockId' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '500': + description: Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + security: + - ApiKey: [] + - CwmsAAACacAuth: [] + /project-locks/deny: + post: + tags: + - Project Locks + summary: Post projectLocks deny + description: Deny a Lock revoke request. + operationId: postProjectLocksDeny + parameters: + - name: lock-id + in: query + description: The id of the lock. + required: true + schema: + type: string + responses: + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '500': + description: Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + security: + - ApiKey: [] + - CwmsAAACacAuth: [] + /project-locks/release: + post: + tags: + - Project Locks + summary: Post projectLocks release + description: Releases a project lock + operationId: postProjectLocksRelease + parameters: + - name: office + in: query + description: The user's office. + required: true + schema: + type: string + - name: lock-id + in: query + description: The id of the lock to release. + required: true + schema: + type: string + responses: + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '500': + description: Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + security: + - ApiKey: [] + - CwmsAAACacAuth: [] + /project-lock-rights: + get: + tags: + - Project Lock Revoker Rights + summary: Get projectLockRights + description: 'Get a list of project lock revoker rights ' + operationId: getProjectLockRights + parameters: + - name: office-mask + in: query + description: Specifies the office mask to be used to filter the lock revoker rights. Supports '*' but is typically a single office. + required: true + schema: + type: string + - name: project-mask + in: query + description: Specifies the project mask to be used to filter the lock revoker rights. Defaults to '*' + schema: + type: string + - name: application-mask + in: query + description: Specifies the application mask to be used to filter the lock revoker rights. Defaults to '*' + schema: + type: string + responses: + '200': + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/LockRevokerRights' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '500': + description: Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + security: + - ApiKey: [] + - CwmsAAACacAuth: [] + /project-lock-rights/remove-all: + post: + tags: + - Project Lock Revoker Rights + summary: Post projectLockRights removeAll + description: Revokes a project lock, if successful the lock is deleted + operationId: postProjectLockRightsRemoveAll + parameters: + - name: office + in: query + description: Specifies the session office. + required: true + schema: + type: string + - name: application-id + in: query + description: Specifies the application id. + required: true + schema: + type: string + - name: user-id + in: query + description: Specifies the user. + required: true + schema: + type: string + responses: + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '500': + description: Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + security: + - ApiKey: [] + - CwmsAAACacAuth: [] + /project-lock-rights/update: + post: + tags: + - Project Lock Revoker Rights + summary: Post projectLockRights update description: Update Lock Revoker Rights. operationId: postProjectLockRightsUpdate parameters: @@ -14481,19 +15121,359 @@ paths: required: true schema: type: string - - name: user-id - in: query - description: Specifies the user. + - name: user-id + in: query + description: Specifies the user. + required: true + schema: + type: string + - name: allow + in: query + description: True to add the user to the allow list, False to add to the deny list + required: true + schema: + type: boolean + responses: + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '500': + description: Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + security: + - ApiKey: [] + - CwmsAAACacAuth: [] + /users/{user-name}: + get: + tags: + - User Management + summary: Get users with userName + description: View specific user + operationId: getUsersWithUserName + parameters: + - name: user-name + in: path + description: Specific user to retrieve + required: true + schema: + type: string + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/User' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '500': + description: Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + security: + - ApiKey: [] + - CwmsAAACacAuth: [] + /users: + get: + tags: + - User Management + summary: Get users + description: View all users + operationId: getUsers + parameters: + - name: office + in: query + description: Show only users with active privileges in a given office.Office Identifier 3/4 letter as returned by the office endpoint. + allowEmptyValue: true + schema: + type: string + - name: page + in: query + description: This end point can return a lot of data, this identifies where in the request you are. This is an opaque value, and can be obtained from the 'next-page' value in the response. + schema: + type: string + - name: page-size + in: query + description: How many entries per page returned. Default 100. + schema: + type: integer + format: int32 + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/Users' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '500': + description: Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + security: + - ApiKey: [] + - CwmsAAACacAuth: [] + /roles: + get: + tags: + - User Management + summary: Get roles + description: View all roles + operationId: getRoles + responses: + '200': + description: OK + content: + application/json: + schema: + type: array + items: + type: string + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '500': + description: Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + security: + - ApiKey: [] + - CwmsAAACacAuth: [] + /user/profile: + get: + tags: + - User Management + summary: Get user profile + description: View users' own information + operationId: getUserProfile + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/User' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '500': + description: Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + security: + - ApiKey: [] + - CwmsAAACacAuth: [] + /user/{user-name}/roles/{office-id}: + post: + tags: + - User Management + summary: Post user with userName roles with officeId + description: Add roles to user + operationId: postUserWithUserNameRolesWithOfficeId + parameters: + - name: user-name + in: path + description: Name of the user to alter + required: true + schema: + type: string + - name: office-id + in: path + description: Office for these roles.Office Identifier 3/4 letter as returned by the office endpoint. + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + type: array + items: + type: string + responses: + '204': + description: No Content + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + '500': + description: Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/CdaError' + security: + - ApiKey: [] + - CwmsAAACacAuth: [] + delete: + tags: + - User Management + summary: Delete user with userName roles with officeId + description: Remove roles from user + operationId: deleteUserWithUserNameRolesWithOfficeId + parameters: + - name: user-name + in: path + description: Username of the user to alter required: true schema: type: string - - name: allow - in: query - description: True to add the user to the allow list, False to add to the deny list + - name: office-id + in: path + description: Office for these roles.Office Identifier 3/4 letter as returned by the office endpoint. required: true schema: - type: boolean + type: string + requestBody: + content: + application/json: + schema: + type: array + items: + type: string responses: + '204': + description: No Content '400': description: Bad Request content: @@ -14526,7 +15506,7 @@ paths: $ref: '#/components/schemas/CdaError' security: - ApiKey: [] - - OpenIDConnect: [] + - CwmsAAACacAuth: [] components: schemas: CdaError: @@ -14543,65 +15523,289 @@ components: type: object ApiKey: required: - - key-name - - user-id + - key-name + - user-id + type: object + properties: + user-id: + type: string + key-name: + type: string + api-key: + type: string + created: + type: string + description: The instant this Key was created, in ISO-8601 format with offset and timezone ('yyyy-MM-dd'T'HH:mm:ssZ'['VV']'') + format: date-time + readOnly: true + expires: + type: string + description: When this key expires, in ISO-8601 format with offset and timezone ('yyyy-MM-dd'T'HH:mm:ssZ'['VV']'') + format: date-time + location_category: + required: + - office-id + type: object + properties: + office-id: + type: string + description: Owning office of object. + id: + type: string + description: + type: string + description: A representation of a location category + LocationCategory: + required: + - office-id + type: object + properties: + office-id: + type: string + description: Owning office of object. + id: + type: string + description: + type: string + description: A representation of a location category + AssignedLocation: + type: object + properties: + location-id: + type: string + office-id: + type: string + alias-id: + type: string + attribute: + type: number + ref-location-id: + type: string + location_group: + required: + - office-id + type: object + properties: + office-id: + type: string + description: Owning office of object. + id: + type: string + location-category: + $ref: '#/components/schemas/location_category' + description: + type: string + shared-loc-alias-id: + type: string + shared-ref-location-id: + type: string + loc-group-attribute: + type: number + assigned-locations: + type: array + items: + $ref: '#/components/schemas/AssignedLocation' + description: A representation of a location group + LocationGroup: + required: + - office-id + type: object + properties: + office-id: + type: string + description: Owning office of object. + id: + type: string + location-category: + $ref: '#/components/schemas/location_category' + description: + type: string + shared-loc-alias-id: + type: string + shared-ref-location-id: + type: string + loc-group-attribute: + type: number + assigned-locations: + type: array + items: + $ref: '#/components/schemas/AssignedLocation' + description: A representation of a location group + LocationGroup_CSV: + type: object + description: Single LocationGroup or List of LocationGroups in comma separated format + example: "#LocationGroup Id, OfficeId, Description, CategoryId, CategoryOfficeId, SharedLocAliasId, SharedRefLocationId, LocGroupAttribute\r\nCERL,Construction Engineering Research Laboratory,Field Operating Activity\tERD\r\nCHL,Coastal and Hydraulics Laboratory,Field Operating Activity\tERD\r\nNAB,Baltimore District,District,NAD\r\nNAD,North Atlantic Division,Division Headquarters,HQ" + CsvV1LocationGroup: + type: object + description: Single LocationGroup or List of LocationGroups in comma separated format + example: "#LocationGroup Id, OfficeId, Description, CategoryId, CategoryOfficeId, SharedLocAliasId, SharedRefLocationId, LocGroupAttribute\r\nCERL,Construction Engineering Research Laboratory,Field Operating Activity\tERD\r\nCHL,Coastal and Hydraulics Laboratory,Field Operating Activity\tERD\r\nNAB,Baltimore District,District,NAD\r\nNAD,North Atlantic Division,Division Headquarters,HQ" + Unit: + type: object + Location: + required: + - name + - office-id + type: object + properties: + office-id: + type: string + description: Owning office of object. + name: + type: string + latitude: + type: number + format: double + longitude: + type: number + format: double + active: + type: boolean + public-name: + type: string + long-name: + type: string + description: + type: string + timezone-name: + type: string + location-type: + type: string + location-kind: + type: string + nation: + type: string + enum: + - US + - CANADA + - MEXICO + state-initial: + type: string + county-name: + type: string + nearest-city: + type: string + horizontal-datum: + type: string + published-longitude: + type: number + format: double + published-latitude: + type: number + format: double + vertical-datum: + type: string + elevation: + type: number + format: double + map-label: + type: string + bounding-office-id: + type: string + elevation-units: + type: string + state: + required: + - name + - state-initial + type: object + properties: + state-initial: + type: string + name: + type: string + description: A representation of a state + State: + required: + - name + - state-initial type: object properties: - user-id: + state-initial: type: string - key-name: + name: type: string - api-key: + description: A representation of a state + county: + required: + - county-id + - name + - state-initial + type: object + properties: + name: type: string - created: + county-id: type: string - description: The instant this Key was created, in ISO-8601 format with offset and timezone ('yyyy-MM-dd'T'HH:mm:ssZ'['VV']'') - format: date-time - readOnly: true - expires: + state-initial: type: string - description: When this key expires, in ISO-8601 format with offset and timezone ('yyyy-MM-dd'T'HH:mm:ssZ'['VV']'') - format: date-time - location_category: + description: A representation of a county + County: required: - - office-id + - county-id + - name + - state-initial type: object properties: - office-id: + name: type: string - description: Owning office of object. - id: + county-id: type: string - description: + state-initial: type: string - description: A representation of a location category - LocationCategory: - required: - - office-id + description: A representation of a county + OfficeFormatV1: type: object properties: - office-id: + offices: + $ref: '#/components/schemas/OfficesFMT' + OfficesFMT: + type: object + properties: + offices: + type: array + items: + $ref: '#/components/schemas/office' + office: + type: object + properties: + name: type: string - description: Owning office of object. - id: + long-name: type: string - description: + type: type: string - description: A representation of a location category - AssignedLocation: + enum: + - unknown + - corps headquarters + - division headquarters + - division regional + - district + - filed operating activity + reports-to: + type: string + description: Reference to another office, like a division, that this office reports to. + description: A representation of a CWMS office + Office: type: object properties: - location-id: + name: type: string - office-id: + long-name: type: string - alias-id: + type: type: string - attribute: - type: number - ref-location-id: + enum: + - unknown + - corps headquarters + - division headquarters + - division regional + - district + - filed operating activity + reports-to: type: string - location_group: + description: Reference to another office, like a division, that this office reports to. + description: A representation of a CWMS office + parameter: required: - office-id type: object @@ -14609,24 +15813,21 @@ components: office-id: type: string description: Owning office of object. - id: + name: type: string - location-category: - $ref: '#/components/schemas/location_category' - description: + base-parameter: type: string - shared-loc-alias-id: + sub-parameter: type: string - shared-ref-location-id: + sub-parameter-description: type: string - loc-group-attribute: - type: number - assigned-locations: - type: array - items: - $ref: '#/components/schemas/AssignedLocation' - description: A representation of a location group - LocationGroup: + db-unit-id: + type: string + unit-long-name: + type: string + unit-description: + type: string + Parameter: required: - office-id type: object @@ -14634,263 +15835,351 @@ components: office-id: type: string description: Owning office of object. - id: + name: type: string - location-category: - $ref: '#/components/schemas/location_category' - description: + base-parameter: type: string - shared-loc-alias-id: + sub-parameter: type: string - shared-ref-location-id: + sub-parameter-description: type: string - loc-group-attribute: - type: number - assigned-locations: - type: array - items: - $ref: '#/components/schemas/AssignedLocation' - description: A representation of a location group - LocationGroup_CSV: + db-unit-id: + type: string + unit-long-name: + type: string + unit-description: + type: string + time-zone: + required: + - time-zone type: object - description: Single LocationGroup or List of LocationGroups in comma separated format - example: "#LocationGroup Id, OfficeId, Description, CategoryId, CategoryOfficeId, SharedLocAliasId, SharedRefLocationId, LocGroupAttribute\r\nCERL,Construction Engineering Research Laboratory,Field Operating Activity\tERD\r\nCHL,Coastal and Hydraulics Laboratory,Field Operating Activity\tERD\r\nNAB,Baltimore District,District,NAD\r\nNAD,North Atlantic Division,Division Headquarters,HQ" - CsvV1LocationGroup: + properties: + time-zone: + type: string + time-zones: type: object - description: Single LocationGroup or List of LocationGroups in comma separated format - example: "#LocationGroup Id, OfficeId, Description, CategoryId, CategoryOfficeId, SharedLocAliasId, SharedRefLocationId, LocGroupAttribute\r\nCERL,Construction Engineering Research Laboratory,Field Operating Activity\tERD\r\nCHL,Coastal and Hydraulics Laboratory,Field Operating Activity\tERD\r\nNAB,Baltimore District,District,NAD\r\nNAD,North Atlantic Division,Division Headquarters,HQ" - Unit: + properties: + time-zones: + type: array + items: + $ref: '#/components/schemas/time-zone' + TimeZoneIds: type: object - Location: + properties: + time-zones: + type: array + items: + $ref: '#/components/schemas/time-zone' + ConstantLocationLevel: required: - - name + - location-level-id - office-id type: object properties: office-id: type: string description: Owning office of object. - name: + location-level-id: type: string - latitude: + description: Name of the location level + specified-level-id: + type: string + description: Timeseries ID (e.g. from the times series catalog) to use as the location level. Mutually exclusive with seasonalValues and siParameterUnitsConstantValue + expiration-date: + type: string + format: date-time + parameter-id: + type: string + description: Data Type such as Stage, Elevation, or others. + parameter-type-id: + type: string + description: To indicate if single or aggregate value + enum: + - Inst + - Ave + - Min + - Max + - Total + interpolate-string: + type: string + description: Indicating whether or not to interpolate between seasonal values. + enum: + - T + - F + level-units-id: + type: string + description: Units the provided levels are in + level-date: + type: string + description: The date/time at which this location level configuration takes effect. + format: date-time + level-comment: + type: string + duration-id: + type: string + description: 0 if parameterTypeId is Inst. Otherwise duration indicating the time window of the aggregate value. + attribute-value: type: number - format: double - longitude: + attribute-units-id: + type: string + attribute-parameter-type-id: + type: string + attribute-parameter-id: + type: string + attribute-duration-id: + type: string + attribute-comment: + type: string + constant-value: type: number + description: Single value for this location level. format: double - active: - type: boolean - public-name: + LocationLevel: + required: + - location-level-id + - office-id + type: object + properties: + office-id: type: string - long-name: + description: Owning office of object. + location-level-id: type: string - description: + description: Name of the location level + specified-level-id: type: string - timezone-name: + description: Timeseries ID (e.g. from the times series catalog) to use as the location level. Mutually exclusive with seasonalValues and siParameterUnitsConstantValue + expiration-date: type: string - location-type: + format: date-time + parameter-id: type: string - location-kind: + description: Data Type such as Stage, Elevation, or others. + parameter-type-id: type: string - nation: + description: To indicate if single or aggregate value + enum: + - Inst + - Ave + - Min + - Max + - Total + interpolate-string: type: string + description: Indicating whether or not to interpolate between seasonal values. enum: - - US - - CANADA - - MEXICO - state-initial: + - T + - F + level-units-id: type: string - county-name: + description: Units the provided levels are in + level-date: type: string - nearest-city: + description: The date/time at which this location level configuration takes effect. + format: date-time + level-comment: type: string - horizontal-datum: + duration-id: type: string - published-longitude: - type: number - format: double - published-latitude: + description: 0 if parameterTypeId is Inst. Otherwise duration indicating the time window of the aggregate value. + attribute-value: type: number - format: double - vertical-datum: + attribute-units-id: type: string - elevation: - type: number - format: double - map-label: + attribute-parameter-type-id: type: string - bounding-office-id: + attribute-parameter-id: type: string - elevation-units: + attribute-duration-id: type: string - state: - required: - - name - - state-initial + attribute-comment: + type: string + readOnly: true + oneOf: + - $ref: '#/components/schemas/ConstantLocationLevel' + - $ref: '#/components/schemas/TimeSeriesLocationLevel' + - $ref: '#/components/schemas/SeasonalLocationLevel' + - $ref: '#/components/schemas/VirtualLocationLevel' + LocationLevelConstituent: + type: object + allOf: + - $ref: '#/components/schemas/RATING' + - type: object + properties: + attribute-id: + type: string + attribute-value: + type: number + format: double + attribute-units: + type: string + RATING: type: object properties: - state-initial: + abbr: + type: string + type: type: string name: type: string - description: A representation of a state - State: + constituent-list: + type: array + items: + type: string + discriminator: + propertyName: type + SeasonalLocationLevel: required: - - name - - state-initial + - location-level-id + - office-id type: object properties: - state-initial: + office-id: type: string - name: + description: Owning office of object. + location-level-id: type: string - description: A representation of a state - county: - required: - - county-id - - name - - state-initial - type: object - properties: - name: + description: Name of the location level + specified-level-id: type: string - county-id: + description: Timeseries ID (e.g. from the times series catalog) to use as the location level. Mutually exclusive with seasonalValues and siParameterUnitsConstantValue + expiration-date: type: string - state-initial: + format: date-time + parameter-id: type: string - description: A representation of a county - County: - required: - - county-id - - name - - state-initial - type: object - properties: - name: + description: Data Type such as Stage, Elevation, or others. + parameter-type-id: type: string - county-id: + description: To indicate if single or aggregate value + enum: + - Inst + - Ave + - Min + - Max + - Total + interpolate-string: type: string - state-initial: + description: Indicating whether or not to interpolate between seasonal values. + enum: + - T + - F + level-units-id: type: string - description: A representation of a county - OfficeFormatV1: - type: object - properties: - offices: - $ref: '#/components/schemas/OfficesFMT' - OfficesFMT: - type: object - properties: - offices: - type: array - items: - $ref: '#/components/schemas/office' - office: - type: object - properties: - name: + description: Units the provided levels are in + level-date: type: string - long-name: + description: The date/time at which this location level configuration takes effect. + format: date-time + level-comment: type: string - type: + duration-id: type: string - enum: - - unknown - - corps headquarters - - division headquarters - - division regional - - district - - filed operating activity - reports-to: + description: 0 if parameterTypeId is Inst. Otherwise duration indicating the time window of the aggregate value. + attribute-value: + type: number + attribute-units-id: type: string - description: Reference to another office, like a division, that this office reports to. - description: A representation of a CWMS office - Office: - type: object - properties: - name: + attribute-parameter-type-id: type: string - long-name: + attribute-parameter-id: type: string - type: + attribute-duration-id: type: string - enum: - - unknown - - corps headquarters - - division headquarters - - division regional - - district - - filed operating activity - reports-to: + attribute-comment: type: string - description: Reference to another office, like a division, that this office reports to. - description: A representation of a CWMS office - parameter: + interval-origin: + type: string + description: The start point of provided seasonal values + format: date-time + interval-months: + type: integer + format: int32 + interval-minutes: + type: integer + format: int32 + seasonal-values: + type: array + description: List of Repeating seasonal values. The values repeat after the specified interval. A yearly interval seasonable could have 12 different values, one for each month for example. Mutually exclusive with seasonalTimeSeriesId and siParameterUnitsConstantValue + items: + $ref: '#/components/schemas/SeasonalValueBean' + SeasonalValueBean: + type: object + properties: + value: + type: number + format: double + offset-months: + type: integer + format: int32 + offset-minutes: + type: integer + description: List of Repeating seasonal values. The values repeat after the specified interval. A yearly interval seasonable could have 12 different values, one for each month for example. Mutually exclusive with seasonalTimeSeriesId and siParameterUnitsConstantValue + TimeSeriesLocationLevel: required: + - location-level-id - office-id + - seasonal-time-series-id type: object properties: office-id: type: string description: Owning office of object. - name: + location-level-id: type: string - base-parameter: + description: Name of the location level + specified-level-id: type: string - sub-parameter: + description: Timeseries ID (e.g. from the times series catalog) to use as the location level. Mutually exclusive with seasonalValues and siParameterUnitsConstantValue + expiration-date: type: string - sub-parameter-description: + format: date-time + parameter-id: type: string - db-unit-id: + description: Data Type such as Stage, Elevation, or others. + parameter-type-id: type: string - unit-long-name: + description: To indicate if single or aggregate value + enum: + - Inst + - Ave + - Min + - Max + - Total + interpolate-string: type: string - unit-description: + description: Indicating whether or not to interpolate between seasonal values. + enum: + - T + - F + level-units-id: type: string - Parameter: - required: - - office-id - type: object - properties: - office-id: + description: Units the provided levels are in + level-date: type: string - description: Owning office of object. - name: + description: The date/time at which this location level configuration takes effect. + format: date-time + level-comment: type: string - base-parameter: + duration-id: type: string - sub-parameter: + description: 0 if parameterTypeId is Inst. Otherwise duration indicating the time window of the aggregate value. + attribute-value: + type: number + attribute-units-id: type: string - sub-parameter-description: + attribute-parameter-type-id: type: string - db-unit-id: + attribute-parameter-id: type: string - unit-long-name: + attribute-duration-id: type: string - unit-description: + attribute-comment: type: string - time-zone: - required: - - time-zone - type: object - properties: - time-zone: + seasonal-time-series-id: type: string - time-zones: - type: object - properties: - time-zones: - type: array - items: - $ref: '#/components/schemas/time-zone' - TimeZoneIds: - type: object - properties: - time-zones: - type: array - items: - $ref: '#/components/schemas/time-zone' - LocationLevel: + description: Timeseries ID (e.g. from the times series catalog) to use as the location level. Mutually exclusive with seasonalValues and siParameterUnitsConstantValue + VirtualLocationLevel: required: - location-level-id - office-id @@ -14902,12 +16191,15 @@ components: location-level-id: type: string description: Name of the location level - seasonal-time-series-id: + specified-level-id: type: string description: Timeseries ID (e.g. from the times series catalog) to use as the location level. Mutually exclusive with seasonalValues and siParameterUnitsConstantValue - specified-level-id: + expiration-date: + type: string + format: date-time + parameter-id: type: string - description: Generic name of this location level. Common names are 'Top of Dam', 'Streambed', 'Bottom of Dam'. + description: Data Type such as Stage, Elevation, or others. parameter-type-id: type: string description: To indicate if single or aggregate value @@ -14917,13 +16209,12 @@ components: - Min - Max - Total - parameter-id: + interpolate-string: type: string - description: Data Type such as Stage, Elevation, or others. - constant-value: - type: number - description: Single value for this location level. Mutually exclusive with seasonableTimeSeriesId and seasonValues. - format: double + description: Indicating whether or not to interpolate between seasonal values. + enum: + - T + - F level-units-id: type: string description: Units the provided levels are in @@ -14933,22 +16224,6 @@ components: format: date-time level-comment: type: string - interval-origin: - type: string - description: The start point of provided seasonal values - format: date-time - interval-months: - type: integer - format: int32 - interval-minutes: - type: integer - format: int32 - interpolate-string: - type: string - description: Indicating whether or not to interpolate between seasonal values. - enum: - - T - - F duration-id: type: string description: 0 if parameterTypeId is Inst. Otherwise duration indicating the time window of the aggregate value. @@ -14964,23 +16239,12 @@ components: type: string attribute-comment: type: string - seasonal-values: + constituents: type: array - description: List of Repeating seasonal values. The values repeater after the specified interval. A yearly interval seasonable could have 12 different values, one for each month for example. Mutually exclusive with seasonalTimeSeriesId and siParameterUnitsConstantValue items: - $ref: '#/components/schemas/SeasonalValueBean' - SeasonalValueBean: - type: object - properties: - value: - type: number - format: double - offset-months: - type: integer - format: int32 - offset-minutes: - type: integer - description: List of Repeating seasonal values. The values repeater after the specified interval. A yearly interval seasonable could have 12 different values, one for each month for example. Mutually exclusive with seasonalTimeSeriesId and siParameterUnitsConstantValue + $ref: '#/components/schemas/RATING' + constituent-connections: + type: string location-levels: type: object properties: @@ -15068,7 +16332,7 @@ components: quality-code: type: integer format: int32 - description: List of retrieved time-series values + description: List of rated time-series values timeseries: required: - units @@ -15109,6 +16373,8 @@ components: items: type: object properties: + timeBased: + type: boolean duration: type: object properties: @@ -15126,8 +16392,6 @@ components: type: boolean dateBased: type: boolean - timeBased: - type: boolean description: The interval of the time-series, in ISO-8601 duration format format: Java Duration readOnly: true @@ -15169,6 +16433,7 @@ components: description: The units of the time series data value-columns: type: array + description: The columns of the time-series data array returned, this property is used to describe the data structure of the records array. Contains [name, ordinal, datatype]. Name corresponds to the variable described by the data, ordinal is the order of the column in the data value array returned (starts at index 1), and datatype is the class name of the data type for the variable. Since the records array can be of variable length, the column index value is used to identify the position of the data in the array. readOnly: true items: $ref: '#/components/schemas/TimeSeries.Column' @@ -15195,7 +16460,7 @@ components: quality-code: type: integer format: int32 - description: List of retrieved time-series values + description: List of retrieved time-series values. The values-columns property describes the structure of the data value array. Refer to the value-columns property for more information. version-date: type: string description: The version date of the time series trace @@ -15260,6 +16525,8 @@ components: items: type: object properties: + timeBased: + type: boolean duration: type: object properties: @@ -15277,8 +16544,6 @@ components: type: boolean dateBased: type: boolean - timeBased: - type: boolean description: The interval of the time-series, in ISO-8601 duration format format: Java Duration readOnly: true @@ -15320,6 +16585,7 @@ components: description: The units of the time series data value-columns: type: array + description: The columns of the time-series data array returned, this property is used to describe the data structure of the records array. Contains [name, ordinal, datatype]. Name corresponds to the variable described by the data, ordinal is the order of the column in the data value array returned (starts at index 1), and datatype is the class name of the data type for the variable. Since the records array can be of variable length, the column index value is used to identify the position of the data in the array. readOnly: true items: $ref: '#/components/schemas/TimeSeries.Column' @@ -15346,7 +16612,7 @@ components: quality-code: type: integer format: int32 - description: List of retrieved time-series values + description: List of retrieved time-series values. The values-columns property describes the structure of the data value array. Refer to the value-columns property for more information. version-date: type: string description: The version date of the time series trace @@ -15888,6 +17154,150 @@ components: items: $ref: '#/components/schemas/AssignedTimeSeries' description: A representation of a timeseries group + RateInputValues: + required: + - input-units + - output-unit + - values + type: object + properties: + output-unit: + type: string + description: The units of the output values + rating-time: + type: integer + description: A specific date/time to use as the "current time" of the rating. No ratings with a create date later than this will be used. Useful for performing historical ratings. If not specified or NULL, the current time is use. + format: int64 + round: + type: boolean + description: A flag specifying whether to round the rated values according to the rounding spec contained in the rating specification. Defaults to false. + values: + type: array + items: + type: array + description: The input values. Each value array must be the same length. Must be length 1 for reverse rate. + items: + type: number + description: The input values. Each value array must be the same length. Must be length 1 for reverse rate. + format: double + value-times: + type: array + items: + type: integer + format: int64 + input-units: + type: array + items: + type: string + description: The unit of input values and the desired unit of the output. Length of the array must be equal to the number of input value arrays. + RatedOutputValues: + required: + - rating-id + - unit + - values + type: object + properties: + rating-id: + $ref: '#/components/schemas/CwmsId' + unit: + type: string + description: The unit of the rated output data + values: + type: array + items: + type: number + description: List of rated values + format: double + RateInputTimeSeries: + required: + - end-time + - output-unit + - start-time + - time-series-ids + type: object + properties: + output-unit: + type: string + description: The units of the output values + rating-time: + type: integer + description: A specific date/time to use as the "current time" of the rating. No ratings with a create date later than this will be used. Useful for performing historical ratings. If not specified or NULL, the current time is use. + format: int64 + round: + type: boolean + description: A flag specifying whether to round the rated values according to the rounding spec contained in the rating specification. Defaults to false. + time-series-ids: + type: array + items: + type: string + description: A collection of time series identifiers of the time series to rate, in position order of the parameters of the rating.Must be size 1 for reverse rate. + start-time: + type: integer + description: The start of the time window to rate.Represents milliseconds since 1970-01-01 (Unix Epoch), always UTC. + format: int64 + end-time: + type: integer + description: The end of the time window to rate.Represents milliseconds since 1970-01-01 (Unix Epoch), always UTC. + format: int64 + version-date: + type: integer + description: Specifies the version date of the retrieve time series. Represents milliseconds since 1970-01-01 (Unix Epoch), always UTC. + format: int64 + trim: + type: boolean + description: Specifies whether to trim missing values from the ends of the retrieved time series. Defaults to false. + start-inclusive: + type: boolean + description: Specifies whether the time window starts on or after the specified time. Defaults to true. + end-inclusive: + type: boolean + description: Specifies whether the time window ends on or before the specified time. Defaults to true; + previous: + type: boolean + description: Specifies whether to retrieve the latest value before the start of the time window. Defaults to false. + next: + type: boolean + description: Specifies whether to retrieve the earliest value after the end of the time window. Defaults to false. + RatedOutputTimeSeries: + required: + - rating-id + - unit + type: object + properties: + rating-id: + $ref: '#/components/schemas/CwmsId' + unit: + type: string + description: The unit of the rated output data + values: + type: array + items: + type: array + description: Time is Milliseconds since the UNIX Epoch. Value is Double (for missing data you can use null, or -Float.MAX_VALUE (-340282346638528859811704183484516925440), quality is an integer.) If you are using missing data set the quality to 5.Failure to do this may result in silently ignoring that value on not storing a placeholder which can be important in irregular and psuedo regular timeseries. + example: + - 1509654000000 + - 54.3 + - 0 + items: + type: object + properties: + date-time: + type: integer + description: Milliseconds since 1970-01-01 (Unix Epoch), always UTC + format: int64 + value: + type: number + description: Requested time-series data value + format: double + quality-code: + type: integer + format: int32 + description: List of rated time-series values + value-columns: + type: array + readOnly: true + items: + $ref: '#/components/schemas/TimeSeries.Column' ParameterSpec: type: object properties: @@ -16157,6 +17567,28 @@ components: $ref: '#/components/schemas/SourceRating' connections: type: string + RatingEffectiveDatesMap: + type: object + properties: + office-to-spec-dates: + type: object + additionalProperties: + type: array + items: + $ref: '#/components/schemas/RatingSpecEffectiveDates' + RatingSpecEffectiveDates: + required: + - rating-spec-id + type: object + properties: + rating-spec-id: + type: string + effective-dates: + uniqueItems: true + type: array + items: + type: string + format: date-time DatabaseLoadMethod: type: string enum: @@ -16277,6 +17709,10 @@ components: type: array items: $ref: '#/components/schemas/TimeSeriesExtents' + aliases: + type: array + items: + $ref: '#/components/schemas/alias' alias: type: object properties: @@ -16769,10 +18205,10 @@ components: PoolNameType: type: object properties: - officeId: - type: string poolName: type: string + officeId: + type: string pools: type: object properties: @@ -17586,92 +19022,94 @@ components: type: string user-id: type: string + User: + required: + - email + - principal + - user-name + type: object + properties: + user-name: + type: string + principal: + type: string + description: Unique identifier in the upstream identity management system. + cac-auth: + type: boolean + description: Is the current session based on CAC Authentication + readOnly: true + email: + type: string + format: email + roles: + type: object + additionalProperties: + type: array + description: Assigned user roles per office. + items: + type: string + description: Assigned user roles per office. + description: Assigned user roles per office. + users: + type: object + properties: + next-page: + type: string + description: The cursor to the next page of data; null if there is no more data + readOnly: true + page: + type: string + description: The cursor to the current page of data + readOnly: true + page-size: + type: integer + description: The number of records fetched per-page; this may be larger than the number of records actually retrieved + format: int32 + readOnly: true + total: + type: integer + description: The total number of records retrieved; null or not present if not supported or unknown + format: int32 + readOnly: true + users: + type: array + description: List of retrieved users + items: + $ref: '#/components/schemas/User' + Users: + type: object + properties: + next-page: + type: string + description: The cursor to the next page of data; null if there is no more data + readOnly: true + page: + type: string + description: The cursor to the current page of data + readOnly: true + page-size: + type: integer + description: The number of records fetched per-page; this may be larger than the number of records actually retrieved + format: int32 + readOnly: true + total: + type: integer + description: The total number of records retrieved; null or not present if not supported or unknown + format: int32 + readOnly: true + users: + type: array + description: List of retrieved users + items: + $ref: '#/components/schemas/User' securitySchemes: ApiKey: type: apiKey description: 'Key value as generated from the /auth/keys endpoint. NOTE: you MUST manually prefix your key with ''apikey '' (without the single quotes).' name: Authorization in: header - scheme: apikey - OpenIDConnect: - type: openIdConnect - name: Authorization - in: header - flows: - implicit: - authorizationUrl: https://identityc.sec.usace.army.mil/auth/realms/cwbi/protocol/openid-connect/auth - tokenUrl: https://identityc.sec.usace.army.mil/auth/realms/cwbi/protocol/openid-connect/token - scopes: - openid: '' - preferred_username: '' - x509_presented: '' - roles: '' - acr: '' - cacUID: '' - groups: '' - microprofile-jwt: '' - phone: '' - offline_access: '' - email: '' - profile: '' - web-origins: '' - subjectDN: '' - address: '' - password: - authorizationUrl: https://identityc.sec.usace.army.mil/auth/realms/cwbi/protocol/openid-connect/auth - tokenUrl: https://identityc.sec.usace.army.mil/auth/realms/cwbi/protocol/openid-connect/token - scopes: - openid: '' - preferred_username: '' - x509_presented: '' - roles: '' - acr: '' - cacUID: '' - groups: '' - microprofile-jwt: '' - phone: '' - offline_access: '' - email: '' - profile: '' - web-origins: '' - subjectDN: '' - address: '' - clientCredentials: - authorizationUrl: https://identityc.sec.usace.army.mil/auth/realms/cwbi/protocol/openid-connect/auth - tokenUrl: https://identityc.sec.usace.army.mil/auth/realms/cwbi/protocol/openid-connect/token - scopes: - openid: '' - preferred_username: '' - x509_presented: '' - roles: '' - acr: '' - cacUID: '' - groups: '' - microprofile-jwt: '' - phone: '' - offline_access: '' - email: '' - profile: '' - web-origins: '' - subjectDN: '' - address: '' - authorizationCode: - authorizationUrl: https://identityc.sec.usace.army.mil/auth/realms/cwbi/protocol/openid-connect/auth - tokenUrl: https://identityc.sec.usace.army.mil/auth/realms/cwbi/protocol/openid-connect/token - scopes: - openid: '' - preferred_username: '' - x509_presented: '' - roles: '' - acr: '' - cacUID: '' - groups: '' - microprofile-jwt: '' - phone: '' - offline_access: '' - email: '' - profile: '' - web-origins: '' - subjectDN: '' - address: '' - openIdConnectUrl: https://identityc.sec.usace.army.mil/auth/realms/cwbi/.well-known/openid-configuration + CwmsAAACacAuth: + type: apiKey + description: Auth handler running on same tomcat instance as the data api. + name: JSESSIONIDSSO + in: cookie diff --git a/cwms-data-api-model/src/main/java/mil/army/usace/hec/cwms/data/api/client/model/RatingEffectiveDatesMap.java b/cwms-data-api-model/src/main/java/mil/army/usace/hec/cwms/data/api/client/model/RatingEffectiveDatesMap.java new file mode 100644 index 00000000..b4bc3692 --- /dev/null +++ b/cwms-data-api-model/src/main/java/mil/army/usace/hec/cwms/data/api/client/model/RatingEffectiveDatesMap.java @@ -0,0 +1,81 @@ +package mil.army.usace.hec.cwms.data.api.client.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import jakarta.validation.Valid; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + +/** + * RatingEffectiveDatesMap + */ +@JsonIgnoreProperties(ignoreUnknown = true) +@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2025-08-11T17:27:45.767435500-07:00[America/Los_Angeles]") +public class RatingEffectiveDatesMap { + + @JsonProperty("office-to-spec-dates") + @Valid + private Map> officeToSpecDates = null; + + public RatingEffectiveDatesMap officeToSpecDates(Map> officeToSpecDates) { + this.officeToSpecDates = officeToSpecDates; + return this; + } + + public RatingEffectiveDatesMap putOfficeToSpecDatesItem(String key, List officeToSpecDatesItem) { + if (this.officeToSpecDates == null) { + this.officeToSpecDates = new HashMap<>(); + } + this.officeToSpecDates.put(key, officeToSpecDatesItem); + return this; + } + + public Map> getOfficeToSpecDates() { + return officeToSpecDates; + } + + public void setOfficeToSpecDates(Map> officeToSpecDates) { + this.officeToSpecDates = officeToSpecDates; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RatingEffectiveDatesMap ratingEffectiveDatesMap = (RatingEffectiveDatesMap) o; + return Objects.equals(this.officeToSpecDates, ratingEffectiveDatesMap.officeToSpecDates); + } + + @Override + public int hashCode() { + return Objects.hash(officeToSpecDates); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RatingEffectiveDatesMap {\n"); + + sb.append(" officeToSpecDates: ").append(toIndentedString(officeToSpecDates)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/cwms-data-api-model/src/main/java/mil/army/usace/hec/cwms/data/api/client/model/RatingSpecEffectiveDates.java b/cwms-data-api-model/src/main/java/mil/army/usace/hec/cwms/data/api/client/model/RatingSpecEffectiveDates.java new file mode 100644 index 00000000..4a16ee8a --- /dev/null +++ b/cwms-data-api-model/src/main/java/mil/army/usace/hec/cwms/data/api/client/model/RatingSpecEffectiveDates.java @@ -0,0 +1,100 @@ +package mil.army.usace.hec.cwms.data.api.client.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.Instant; +import java.util.ArrayList; +import java.util.List; +import jakarta.validation.Valid; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + +/** + * RatingSpecEffectiveDates + */ +@JsonIgnoreProperties(ignoreUnknown = true) +@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2025-08-11T17:27:45.767435500-07:00[America/Los_Angeles]") +public class RatingSpecEffectiveDates { + + @JsonProperty("rating-spec-id") + private String ratingSpecId = null; + + @JsonProperty("effective-dates") + @Valid + private List effectiveDates = new ArrayList<>(); + + public RatingSpecEffectiveDates ratingSpecId(String ratingSpecId) { + this.ratingSpecId = ratingSpecId; + return this; + } + + public String getRatingSpecId() { + return ratingSpecId; + } + + public void setRatingSpecId(String ratingSpecId) { + this.ratingSpecId = ratingSpecId; + } + + public RatingSpecEffectiveDates effectiveDates(List effectiveDates) { + this.effectiveDates = effectiveDates; + return this; + } + + public RatingSpecEffectiveDates addEffectiveDatesItem(Instant effectiveDatesItem) { + if (this.effectiveDates == null) { + this.effectiveDates = new ArrayList<>(); + } + this.effectiveDates.add(effectiveDatesItem); + return this; + } + + public List getEffectiveDates() { + return effectiveDates; + } + + public void setEffectiveDates(List effectiveDates) { + this.effectiveDates = effectiveDates; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RatingSpecEffectiveDates ratingSpecEffectiveDates = (RatingSpecEffectiveDates) o; + return this.ratingSpecId == null || ratingSpecEffectiveDates.ratingSpecId == null?Objects.equals(this.ratingSpecId, ratingSpecEffectiveDates.ratingSpecId):this.ratingSpecId.equalsIgnoreCase(ratingSpecEffectiveDates.ratingSpecId) + && Objects.equals(this.effectiveDates, ratingSpecEffectiveDates.effectiveDates) + ; + } + + @Override + public int hashCode() { + return Objects.hash(ratingSpecId==null?0:ratingSpecId.toLowerCase(), effectiveDates); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RatingSpecEffectiveDates {\n"); + + sb.append(" ratingSpecId: ").append(toIndentedString(ratingSpecId)).append("\n"); + sb.append(" effectiveDates: ").append(toIndentedString(effectiveDates)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +}