pactflow / roadmap

Public Pactflow issue tracker and roadmap
MIT License
15 stars 0 forks source link

Developer API #94

Closed mefellows closed 4 months ago

mefellows commented 1 year ago

PactFlow has a feature complete API that our customers can build custom solutions upon - this feature documents and exposes that API to the world 🌏.

The APIs will span the following areas of the system:

YOU54F commented 5 months ago

You can now view our PactFlow Developer API via the SmartBear Portal

https://smartbear.portal.swaggerhub.com/pactflow/default/getting-started

The API documentation is updated with our SaaS release.

If you would like to see anything additional exposed via the API, please feel free to let us know via the issue, or you are welcome to raise a new one

JamesFraser-FD commented 5 months ago

Adding an endpoint to view the OpenAPI Spec for a provider service would be really valuable for us - ideally it would be able to take a commit, branch/tag or environment and return the associated specification. Currently Pactflow is the only place where all of our OpenAPI Specs are stored and versioned, so it would be immensely useful to have an endpoint where we can query them. Thanks!

mefellows commented 4 months ago

Every time I think I close an issue, I find out that moving it to "shipped" is not the same as closing!

Screenshot 2024-02-22 at 9 08 31 pm

I'll close this issue, and open up a separate tracking one for you @JamesFraser-FD .

mefellows commented 4 months ago

@JamesFraser-FD to answer your question for now. You can get the version of the contract you need by following these steps:

  1. Hit the root resource /
  2. Follow the link to list the integrations (pb:integration which should give you /integrations)
  3. Find the integration you need (e.g. /dashboard/provider/:provider/consumer/:consumer)
  4. Find the provider version in that resource, and get the cross-contract verification results: /contracts/bi-directional/provider/:provider/version/:provider-version/consumer/:consumer/version/:consumer-version/cross-contract-verification-results

^^ This URL won't work, it needs to be prepended with /internal put in front of it.

Any endpoint prefixed with /internal has no long term stability guarantees, but might get you going for now.

JamesFraser-FD commented 4 months ago

Thanks Matt, appreciate the help! Yousaf also pointed me to the internal API so we've managed to string a few calls together to get working, just registering my interest in a maintained endpoint 🙌