# API Validating Standards

**URL:** <https://community.postman.com/t/api-validating-standards/11507>\
**Category:** Help Hub\
**Created:** [March 24, 2020, 8:14pm UTC](https://community.postman.com/t/api-validating-standards/11507 "2020-03-24T20:14:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![TenBigFish](https://avatars.discourse-cdn.com/v4/letter/t/ba8739/32.png) [@TenBigFish](https://community.postman.com/u/TenBigFish)\
**Post date:** [March 24, 2020, 8:14pm UTC](https://community.postman.com/t/api-validating-standards/11507/1 "2020-03-24T20:14:14Z")

</div>

When defining an API, is there a way to enforce validation of my companies API standards across all teams and all APIs they create?

---

<div class="post-metadata">

**Author:** ![kevin.swiber](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/kevin.swiber/32/3820_2.png) [@kevin.swiber](https://community.postman.com/u/kevin.swiber)\
**Post date:** [April 7, 2020, 1:10am UTC](https://community.postman.com/t/api-validating-standards/11507/2 "2020-04-07T01:10:17Z")

</div>

Hi there,

There are a few ways to answer this question depending on the standards that are being enforced.

### Design

There’s a linter called [Spectral](https://github.com/stoplightio/spectral) that can be used to validate your company’s API specifications against a list of rules.

If you’re using the API Builder in Postman, you can write a script to pull down those API schemas and validate them using Spectral. Here’s a shell script example that uses [postmanctl](https://github.com/kevinswiber/postmanctl), named [lint-api-from-postman.sh](https://github.com/kevinswiber/postmanctl/blob/d267bb749f087ba025f2eabbcbbd51b58c7e0c1d/examples/spectral-linting/lint-api-from-postman.sh).

If you’re not using a description format for APIs (such as OpenAPI) but still want to validate design, you can use the postmanctl CLI to pull down collections and run custom validation.

### Development

You can create a boilerplate project with development-time controls in place for the pre-request and test phases. Sharing this among the team and using [postman-cli](https://github.com/matt-ball/postman-cli) to update your collections could be helpful.

### Security

1. You can pull down and scan through the collection data using the Postman API or postmanctl to make sure authorization controls are in place.
2. You can have tests to ensure requests are being sent with authorization in place. These can be run manually using the Collection Runner in Postman or with [newman](https://github.com/postmanlabs/newman).
3. You can pull down and scan through environment data using the Postman API or postmanctl.

Is there another set of standards you’re thinking about, specifically, that’s not in the domain of design, development, or security? I’d love to know!

Best,

Kevin

---

<div class="post-metadata">

**Author:** ![TenBigFish](https://avatars.discourse-cdn.com/v4/letter/t/ba8739/32.png) [@TenBigFish](https://community.postman.com/u/TenBigFish)\
**Post date:** [April 7, 2020, 11:52am UTC](https://community.postman.com/t/api-validating-standards/11507/3 "2020-04-07T11:52:27Z")

</div>

Kevin,

That’s what I was looking for.

Thanks
