Skip to content

Commit f225001

Browse files
authored
Merge pull request #155 from USEPA/dev
DEV > STG 12/05/2025
2 parents e4f15af + ad93d52 commit f225001

File tree

13 files changed

+70
-72
lines changed

13 files changed

+70
-72
lines changed

.github/workflows/security-scan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
with:
1919
token: ${{ secrets.GITHUB_TOKEN }}
2020
format: openapi
21-
target: 'https://api-ccte-stg.epa.gov/docs/exposure.json'
21+
target: 'https://ctx-api-stg.ccte.epa.gov/docs/exposure.json'
2222
cmd_options: '-a'
2323
env:
2424
ZAP_AUTH_HEADER_VALUE: "x-api-key=${{ secrets.X_API_KEY }}"

CONTRIBUTING.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
Thank you for considering contributing to this project! Contributions are welcome and appreciated. Please follow the guidelines below to ensure a smooth collaboration.
32

43
## How to Contribute
@@ -52,8 +51,6 @@ This project is licensed under the [MIT License](LICENSE.md). By contributing to
5251
- If you have any questions or need assistance, feel free to reach out to the project maintainers.
5352
- We appreciate your time and effort in contributing to this project!
5453
- Happy coding!
55-
-
56-
5754

5855

5956

README.md

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
1-
# Exposure Microservice (ccte-api-exposure)
1+
# Computational Toxicology and Exposure (CTX) APIs - CTX Exposure API
22

3-
## Overview
4-
The Exposure Microservice is a RESTful API designed to manage and provide Exposure data. It interacts with a PostgreSQL database and offers various endpoints for Exposure-related operations.
3+
<!-- badges: start -->
4+
[![Active](http://img.shields.io/badge/Status-Active-green.svg)](https://comptox.epa.gov/ctx-api/exposure/health)
5+
<!-- badges: end -->
56

6-
## Available Data
7-
Data underlying the Exposure API comes from the Chemicals and Products Database (CPDat) [Learn more: The Chemical and Products Database, a resource for exposure-relevant data on chemicals in consumer products](https://www.nature.com/articles/sdata2018125) and predictions from EPA’s Quantitative Structure Use Relationship (QSUR) models [Learn more: High-throughput screening of chemicals as functional substitutes using structure-based classification models](https://pubs.rsc.org/en/content/articlelanding/2017/gc/c6gc02744j).
7+
## Welcome to the GitHub repository for the CTX Exposure API
88

9-
For exposure-related questions, contact the Chemical Exposure Knowledgebase team (chemexpo.support@epa.gov).
9+
Originating from the US EPA's Center of Computational Toxicology and Exposure (CCTE), the CTX Exposure API is a RESTful API designed to manage and provide Exposure data. It interacts with a PostgreSQL database and offers various endpoints for Exposure-related operations. More information on the CTX API development and utility, as well as guidance on how to technically access and use them, is available here: https://www.epa.gov/comptox-tools/computational-toxicology-and-exposure-apis
1010

11-
## Technologies Used
11+
- If you would like to report a bug or have other questions related to the CTX APIs, please contact the [CTX API Admins](mailto:[email protected]).
12+
- If you are interested in contributing, please submit a issue or start a discussion. See [CONTRIBUTING](https://github.com/USEPA/ccte-api-hazard/blob/dev/CONTRIBUTING.md) for more information.
13+
14+
### Available Data
15+
Data underlying the Exposure API comes from the [Chemicals and Products Database (CPDat)](https://www.nature.com/articles/sdata2018125), the Multimedia Monitoring Database (MMDB)](https://epa.figshare.com/articles/dataset/Multimedia_Monitoring_Database_MMDB_/17065024), [httk](https://github.com/USEPA/CompTox-ExpoCast-httk) simulation data, and predictions from Systematic Empirical Evaluation of Models (SEEM) and [Quantitative Structure Use Relationship (QSUR) models](https://github.com/HumanExposure/qsur).
16+
17+
For exposure-related questions, review the [ChemExpo User guide](https://comptox.epa.gov/chemexpo/static/user_guide/) or contact the [Chemical Exposure Knowledgebase team](mailto:[email protected]).
18+
19+
### Technologies Used
1220
- **Java**: Programming language used for the development of the application.
1321
- **Spring Boot**: Framework used to create stand-alone, production-grade Spring-based applications.
1422
- **Spring Data JPA**: Part of the Spring Data family, used to simplify data access and persistence.
@@ -20,21 +28,21 @@ For exposure-related questions, contact the Chemical Exposure Knowledgebase team
2028
- **Swagger/OpenAPI**: Used for API documentation and testing.
2129
- **Testcontainers**: Java library used for integration testing with Docker containers.
2230

23-
## Configuration
31+
### Configuration
2432
The application configuration is managed through properties files. The main configuration file is `application.properties`, and environment-specific configurations can be added as needed.
2533

26-
## Build and Deployment
34+
### Build and Deployment
2735
The project uses Maven for build and deployment processes. Continuous integration and deployment can be set up using tools like GitHub Actions.
2836

29-
## Getting Started
37+
### Getting Started
3038
To build and run the project locally, use the following Maven commands:
3139

3240
```sh
3341
mvn clean install
3442
mvn spring-boot:run
3543
```
3644

37-
## Project Structure
45+
### Project Structure
3846
```plaintext
3947
src/
4048
├── main/
@@ -51,7 +59,7 @@ src/
5159
└── test/
5260
```
5361

54-
## Dependencies
62+
### Dependencies
5563
- `spring-boot-starter-web`
5664
- `spring-boot-starter-data-rest`
5765
- `spring-boot-starter-data-jpa`
@@ -64,11 +72,5 @@ src/
6472
- `testcontainers`
6573
- `jackson-datatype-hibernate6`
6674

67-
## Contributing
68-
Contributions are welcome! Please read the `CONTRIBUTING.md` file for guidelines.
69-
70-
## Contact
71-
For any inquiries, please contact the project maintainer. **[Rashid, Asif](https://github.com/asif-rashid)** , **[Dirks, Brianna](https://github.com/bridirks)**, **[Feshuk, Madison](https://github.com/madison-feshuk)**
72-
7375
## Disclaimer
7476
The United States Environmental Protection Agency (EPA) GitHub project code is provided on an "as is" basis and the user assumes responsibility for its use. EPA has relinquished control of the information and no longer has responsibility to protect the integrity, confidentiality, or availability of the information. Any reference to specific commercial products, processes, or services by service mark, trademark, manufacturer, or otherwise, does not constitute or imply their endorsement, recommendation or favoring by EPA. The EPA seal and logo shall not be used in any manner to imply endorsement of any commercial product or activity by EPA or the United States Government.

src/main/java/gov/epa/ccte/api/exposure/config/OpenApiConfig.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,21 @@
1414
@Configuration
1515
@OpenAPIDefinition(
1616
info = @Info(
17-
title = "Computational Toxicology and Exposure Data APIs - Exposure",
18-
description = "The Exposure APIs are part of a set of public computational toxicology and exposure APIs and provide exposure data through a set of API endpoints.",
17+
title = "Computational Toxicology and Exposure (CTX) APIs - CTX Exposure API",
18+
description = "The CTX Exposure API is part of US EPA's Computational Toxicology and Exposure APIs. The CTX Exposure API provides programmtic access to exposure data through a set of endpoints.",
1919
contact = @Contact(
2020
name = "",
2121
url = "",
2222
email = ""),
23-
version = "1.0.0"
23+
version = "1.1.1"
2424
),
2525
servers = { @Server(url = "${application.api-url}", description = "${application.api-env}")}
2626
)
2727
@SecurityScheme(
2828
type = SecuritySchemeType.APIKEY,
2929
name = "api_key",
3030
in = SecuritySchemeIn.HEADER,
31-
description = "Each API call should have api_key, Contact author for getting the new api_key. ",
31+
description = "Each API request requires an api_key. Contact the CTX API Admin to request an API Key.",
3232
paramName = "x-api-key"
3333
)
3434
public class OpenApiConfig {

src/main/java/gov/epa/ccte/api/exposure/web/rest/CCDApi.java

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,48 +28,46 @@
2828
* REST controller for getting available CCD Data Resources.
2929
*/
3030
@Tag(name = "CCD Data Resource",
31-
description = "API endpoints for CompTox Chemicals Dashboard exposure tabs.")
31+
description = "Collection of endpoints used to populate CompTox Chemicals Dashboard (CCD) Exposure tabs.")
3232
@SecurityRequirement(name = "api_key")
3333
@RequestMapping( value = "exposure/ccd", produces = MediaType.APPLICATION_JSON_VALUE )
3434
public interface CCDApi {
3535

36-
@Operation(summary = "Find Chemical Weight Fractions data by dtxsid", description = "return Chemical Weight Fractions data for requested dtxsid")
36+
@Operation(summary = "Get Chemical Weight Fractions data by DTXSID", description = "return Chemical Weight Fractions data for requested DTXSID")
3737
@ApiResponses(value= {
3838
@ApiResponse(responseCode = "200", description = "OK", content = @Content( mediaType = "application/json",
3939
schema=@Schema(oneOf = {CCDChemicalWeightFractions.class}))),
4040
})
4141
@RequestMapping(value = "/chem-weight-fractions/search/by-dtxsid/{dtxsid}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
4242
List<CCDChemicalWeightFractions> getChemicalWeightFractionsByDtxsid(@Parameter(required = true, description = "DSSTox Substance Identifier", example = "DTXSID0020232") @PathVariable("dtxsid") String dtxsid);
4343

44-
@Operation(summary = "Find General Use Keywords data by dtxsid", description = "return General Use Keywords data for requested dtxsid")
44+
@Operation(summary = "Get General Use Keywords data by DTXSID", description = "return General Use Keywords data for requested DTXSID")
4545
@ApiResponses(value= {
4646
@ApiResponse(responseCode = "200", description = "OK", content = @Content( mediaType = "application/json",
4747
schema=@Schema(oneOf = {CCDGeneralUseKeywords.class}))),
4848
})
4949
@RequestMapping(value = "/keywords/search/by-dtxsid/{dtxsid}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
5050
List<CCDGeneralUseKeywords> getGeneralUseKeywordsByDtxsid(@Parameter(required = true, description = "DSSTox Substance Identifier", example = "DTXSID0020232") @PathVariable("dtxsid") String dtxsid);
5151

52-
@Operation(summary = "Find Product Use Category data by dtxsid", description = "return Product Use Category data for requested dtxsid")
52+
@Operation(summary = "Get Product Use Category data by DTXSID", description = "return Product Use Category data for requested DTXSID")
5353
@ApiResponses(value= {
5454
@ApiResponse(responseCode = "200", description = "OK", content = @Content( mediaType = "application/json",
5555
schema=@Schema(oneOf = {CCDProductUseCategory.class}))),
5656
})
5757
@RequestMapping(value = "/puc/search/by-dtxsid/{dtxsid}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
5858
List<CCDProductUseCategory> getProductUseCategoryByDtxsid(@Parameter(required = true, description = "DSSTox Substance Identifier", example = "DTXSID0020232") @PathVariable("dtxsid") String dtxsid);
5959

60-
@Operation(summary = "Find Reported Functional Use data by dtxsid", description = "return Reported Functional Use data for requested dtxsid")
60+
@Operation(summary = "Get Reported Functional Use data by DTXSID", description = "return Reported Functional Use data for requested DTXSID")
6161
@ApiResponses(value= {
6262
@ApiResponse(responseCode = "200", description = "OK", content = @Content( mediaType = "application/json",
6363
schema=@Schema(oneOf = {CCDReportedFunctionalUse.class}))),
6464
})
6565
@RequestMapping(value = "/functional-use/search/by-dtxsid/{dtxsid}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
6666
List<CCDReportedFunctionalUse> getReportedFunctionalUseByDtxsid(@Parameter(required = true, description = "DSSTox Substance Identifier", example = "DTXSID0020232") @PathVariable("dtxsid") String dtxsid);
6767

68-
@Operation(summary = "Find Biomonitoring data by dtxsid with ccd projection",
69-
description = "return NHANES Inferences for requested dtxsid" +
70-
"there is an available projection for ccd exposure biomonitoring page:" +
71-
"ccd-biomonitoring" +
72-
"If no projection is specified, the default CCDBiomonitoring data will be returned")
68+
@Operation(summary = "Get Biomonitoring data by DTXSID with CCD projection",
69+
description = "return NHANES inferences data for requested DTXSID. There is an available projection aligned with what's available on the CCD Exposure Biomonitoring tab: ccd-biomonitoring. " +
70+
"If no projection is specified, a default CCDBiomonitoring projection will be returned.")
7371
@ApiResponses(value= {
7472
@ApiResponse(responseCode = "200", description = "OK", content = @Content( mediaType = "application/json",
7573
schema=@Schema(oneOf = {CCDBiomonitoring.class, CCDBiomonitoringAll.class}))),
@@ -81,7 +79,7 @@ List<?> getBiomonitoringDataByDtxsid(@Parameter(required = true, description = "
8179
"If omitted, the default CCDBiomonitoring data is returned.")
8280
@RequestParam(value = "projection", required = false) String projection);
8381

84-
@Operation(summary = "Find Production Volume data by dtxsid", description = "return Production Volume data for requested dtxsid")
82+
@Operation(summary = "Get Production Volume data by DTXSID", description = "return Production Volume data for requested DTXSID")
8583
@ApiResponses(value= {
8684
@ApiResponse(responseCode = "200", description = "OK", content = @Content( mediaType = "application/json",
8785
schema=@Schema(oneOf = {CCDProductionVolume.class}))),

src/main/java/gov/epa/ccte/api/exposure/web/rest/DemoExpoPredictionApi.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020
* REST controller for getting the {@link gov.epa.ccte.api.exposure.domain.DemoExpoPrediction}s.
2121
*/
2222
@Tag(name = "Demographic Exposure Prediction Resource",
23-
description = "API endpoints for demographic prediction in exposure data.")
23+
description = "Collection of endpoints with SEEM demographic exposure prediction data. SEEM (Systematic Empirical Evaluation of Models) is a framework developed by the US EPA to predict exposure to chemicals across the general population and demographic subsets of the US.")
2424
@SecurityRequirement(name = "api_key")
2525
@RequestMapping( value = "exposure/seem/demographic", produces = MediaType.APPLICATION_JSON_VALUE)
2626
public interface DemoExpoPredictionApi {
2727

28-
@Operation(summary = "Find demographic prediction SEEMs data by dtxsid", description = "return demographic prediction SEEMs data for requested dtxsid")
28+
@Operation(summary = "Get SEEM Demographic Exposure Prediction data by DTXSID", description = "return SEEM demographic prediction data for requested DTXSID")
2929
@ApiResponses(value = {
3030
@ApiResponse(responseCode = "200", description = "OK", content = @Content(mediaType = "application/json",
3131
schema = @Schema(oneOf = {DemoExpoPrediction.class}))),
@@ -36,7 +36,7 @@ List<?> getDemoExpoPredictionByDtxsid(@Parameter(required = true, description =
3636
@Parameter(description = "Specifies whether to use projection. Optional: ccd-demographic.")
3737
@RequestParam(value = "projection", required = false) String projection);
3838

39-
@Operation(summary = "Find demographic prediction SEEMs data by batch of dtxsids", description = "return demographic prediction SEEMs data for requested dtxsids")
39+
@Operation(summary = "Get SEEM Demographic Exposure Prediction data for batch of DTXSIDs", description = "return SEEM demographic prediction data for requested DTXSIDs")
4040
@ApiResponses(value= {
4141
@ApiResponse(responseCode = "200", description = "OK", content = @Content(mediaType = "application/json",
4242
schema = @Schema(oneOf = {DemoExpoPrediction.class}))),

src/main/java/gov/epa/ccte/api/exposure/web/rest/ExposureApi.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
/**
88
* REST controller for getting the {@link ExposureResource}s.
99
*/
10-
@Tag(name = "Exposure Data Resource",
11-
description = "API endpoint for checking database connection of exposure application.")
10+
@Tag(name = "Exposure Data Health Resource",
11+
description = "Endpoint for checking health of database connection used by CTX Exposure API")
1212
public interface ExposureApi {
1313
@GetMapping("/exposure/health")
1414
ResponseEntity<?> health();

src/main/java/gov/epa/ccte/api/exposure/web/rest/FunctionalUseApi.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,36 +22,36 @@
2222
* REST controller for getting the {@link gov.epa.ccte.api.exposure.domain.FunctionalUse}s.
2323
*/
2424
@Tag(name = "Functional Use Resource",
25-
description = "API endpoints for functional use in exposure data.")
25+
description = "Collection of endpoints with functional use data. Functional use describes a chemical's role in a product or process, which can help determine exposure pathways used to assess chemical exposure. These curated data are sourced from US EPA's Chemicals and Products Database (CPDat).")
2626
@SecurityRequirement(name = "api_key")
2727
@RequestMapping( value = "exposure/functional-use", produces = MediaType.APPLICATION_JSON_VALUE )
2828
public interface FunctionalUseApi {
2929

30-
@Operation(summary = "Find functional-use data by dtxsid", description = "return functional-use data for requested dtxsid")
30+
@Operation(summary = "Get functional use data by DTXSID", description = "return functional use data for requested DTXSID")
3131
@ApiResponses(value= {
3232
@ApiResponse(responseCode = "200", description = "OK", content = @Content( mediaType = "application/json",
3333
schema=@Schema(oneOf = {FunctionalUse.class}))),
3434
})
3535
@RequestMapping(value = "/search/by-dtxsid/{dtxsid}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
3636
List<FunctionalUse> getFunctionalUseByDtxsid(@Parameter(required = true, description = "DSSTox Substance Identifier", example = "DTXSID0020232") @PathVariable("dtxsid") String dtxsid);
3737

38-
@Operation(summary = "Find functional-use categories", description = "return all functional-use categories")
38+
@Operation(summary = "Get functional use categories", description = "return all functional use categories")
3939
@ApiResponses(value= {
4040
@ApiResponse(responseCode = "200", description = "OK", content = @Content(mediaType = "application/json",
4141
schema = @Schema(oneOf = {FunctionalUseCategory.class}))),
4242
})
4343
@RequestMapping(value = "/category", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
4444
List<FunctionalUseCategory> getFunctionalUseCategory();
4545

46-
@Operation(summary = "Find functional-use probability by dtxsid", description = "return functional-use probability for requested dtxsid")
46+
@Operation(summary = "Get functional use probability by DTXSID", description = "return functional use probability for requested DTXSID")
4747
@ApiResponses(value= {
4848
@ApiResponse(responseCode = "200", description = "OK", content = @Content(mediaType = "application/json",
4949
schema = @Schema(oneOf = {QsurDataAll.class}))),
5050
})
5151
@RequestMapping(value = "/probability/search/by-dtxsid/{dtxsid}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
5252
List<QsurDataAll> getFunctionalUseProbabilityByDtxsid(@Parameter(required = true, description = "DSSTox Substance Identifier", example = "DTXSID0020232") @PathVariable("dtxsid") String dtxsid);
5353

54-
@Operation(summary = "Find functional-use data by batch of dtxsids", description = "return functional-use data for requested dtxsids.")
54+
@Operation(summary = "Get functional-use data for a batch of DTXSIDs", description = "return functional-use data for requested DTXSIDs")
5555
@ApiResponses(value= {
5656
@ApiResponse(responseCode = "200", description = "OK", content = @Content( mediaType = "application/json",
5757
schema=@Schema(oneOf = {FunctionalUse.class}))),

0 commit comments

Comments
 (0)