Skip to content

Commit

Permalink
feat: move API documentation to our portal
Browse files Browse the repository at this point in the history
PACT-1157
  • Loading branch information
mefellows committed Oct 31, 2023
1 parent e27e1d6 commit b07aef4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 66 deletions.
8 changes: 0 additions & 8 deletions website/docs/docs/api.md

This file was deleted.

60 changes: 3 additions & 57 deletions website/docs/docs/scim/main.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: API
title: Overview
---

_Eligible plans: Enterprise_
Expand All @@ -22,63 +22,9 @@ Users already created via SAML will not be automatically linked to users created

* [Okta](/docs/scim/okta)

## Supported endpoints
## API

* `/scim/ServiceProviderConfig` - Specification compliance, authentication schemes, data models
* `/scim/ResourceTypes` - An endpoint used to discover the types of resources available
* `/scim/Schemas` - Introspect resources and attribute extensions
* `/scim/User` - Manage PactFlow users
* `/scim/Groups` - Manage PactFlow teams

## Authentication

The SCIM API endpoints require a PactFlow bearer token. It is recommended to use a
[PactFlow System Account token](/docs/user-interface/settings/users#system-accounts) for this. The system account must
be assigned the [SCIM role](/docs/permissions/predefined-roles#scim) to be able to create or update those resources.

## Resources

SCIM can manage the following resources.:

### Users

The `/scim/Users` endpoint manages PactFlow users. The following SCIM attributes are supported:

| SCIM Attribute | PactFlow User Attribute | Notes |
|-------------------------------------------------|-------------------------|-----------------------------------------------------------------------------------------------------------------------------|
| id | uuid | Read only |
| **userName** | **externalIdpUsername** | This is the unique user ID that the IDP must send via SAML request |
| externalId | externalIdpId | External IDP user ID (optional) |
| name.givenName | firstName | |
| name.familyName | lastName | |
| name.formatted | name | `name.formatted` takes priority over `displayName` |
| displayName | name | `name.formatted` takes priority over `displayName` |
| userType | typeDescription or type | userType is mapped to the type on the way in, and typeDescription on the way out |
| active | active | |
| email\*.value (email*.primary == true or first) | email | Required. The primary email is mapped to the PactFlow email. If no primary email is provided, the first email entry is used |
| meta.created | createdAt | read only |
| meta.lastModified | updatedAt | read only |
| role*.value | _embedded.roles*.uuid | |
| role*.display | _embedded.roles*.name | read only |
| role*.type | _embedded.roles*.name | read only |
| groups*.value | _embedded.teams*.uuid | |
| groups*.display | _embedded.teams*.name | read only |

**Note** that for SAML authentication to work, the `userName` **must be set to the IDP username** for the user, otherwise
Pactflow will not be able to match the authenticated user with the provisioned user record in Pactflow.

### Teams (as groups)

The `/scim/Groups` endpoint manages PactFlow teams. The following SCIM attributes are supported:

| SCIM Attribute | PactFlow Team Attribute | Notes |
|-------------------|-------------------------|-----------|
| id | uuid | read only |
| displayName | name | |
| meta.created | createdAt | read only |
| meta.lastModified | updatedAt | read only |
| members*.value | _embedded.members*.uuid | |
| members*.display | _embedded.members*.name | read only |
View the SCIM API Documentation in our [API Portal](https://smartbear-internal.portal.swaggerhub.com/pactflow/default/scim-api).

## Troubleshooting

Expand Down
6 changes: 5 additions & 1 deletion website/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,11 @@ module.exports = {
label: 'Troubleshooting',
items: ['docs/login-help', `docs/authorization-help`, 'docs/webhooks-help', 'docs/powershell-guide']
},
'docs/api'
{
type: 'link',
label: 'API',
href: 'https://smartbear-internal.portal.swaggerhub.com/pactflow/default/getting-started'
}
],
university: [
{
Expand Down

0 comments on commit b07aef4

Please sign in to comment.