API Services
The PingOne /v1/environments/{{envID}}/apiServers endpoint provides operations to create, read, update, and delete API services in PingOne. An API service models a customer’s APIs, which are then protected by the PingOne API access management service.
When you create an API service, PingOne Authorize automatically creates an authorization module associated with that service. The module has its own policy space, which means policies you define within the API service’s module are scoped to that service and evaluated independently. The new module shares the trust framework of the Default module, including attributes, services, processors, and conditions, but maintains a separate space for policies. For more information, refer to Authorization Modules.
|
PingOne enforces a limit of 25 API services per environment. |
Assigning admin roles and permissions to this service
Admin role assignments determine access to PingOne APIs. When assigning admin roles to this service, refer to PingOne Permissions by Service for the service-specific permissions.
You can also choose to assign admin roles based on particular service resources. Refer to PingOne Permissions by Resource when assigning admin roles per service resources.
Admin assignments to roles are set by:
Refer to Roles Management for more information.
API service data model
| Property | Type | Required | Mutable | Description |
|---|---|---|---|---|
|
Object |
Optional |
Mutable |
Defines if the operation will use custom policy rather than the "Group" or "Scope" |
|
Boolean |
Optional |
Mutable |
If |
|
Object |
Required |
Mutable |
A container for properties related to the authorization server that will issue access tokens used to access the APIs. |
|
Object |
Optional |
Mutable |
A container object for fields related to the API service’s external OAuth 2 authorization server. Must not be provided if |
|
String |
Required |
Mutable |
The expected audience for incoming access tokens issued by the External OAuth Server. The runtime will reject bearer tokens not issued for this audience by checking for a matching value in the aud claim. The maximum length is 1024. |
|
UUID |
Required |
Mutable |
The ID of the related External OAuth Server. |
|
Relationship |
Required |
Mutable |
The resource defines the characteristics of the OAuth 2.0 access tokens used to get access to the APIs on the API service such as the audience and scopes. Must not be provided if |
|
String |
Required |
Mutable |
The UUID of the custom PingOne resource. This property must identify a PingOne resource with a |
|
String |
Optional |
Mutable |
The type of authorization server that will issue access tokens. Valid options are |
|
Array |
Required |
Mutable |
The possible base URLs that an end-user will use to access the APIs hosted on the customer’s API service. Multiple base URLs may be specified to support cases where the same API may be available from multiple URLs (for example, from a user-friendly domain URL and an internal domain URL). Base URLs must be valid absolute URLs with the |
|
Object |
Optional |
Mutable |
A container object for fields related to the user directory used to issue access tokens for accessing the APIs. If not provided, the |
|
String |
Required |
Mutable |
The type of directory that will be used to issue access tokens. Valid options are |
|
String |
Optional |
Mutable |
The resource’s unique identifier. |
|
String |
Required |
Mutable |
The API service resource name. The |
|
String |
Optional |
Read-only |
The ID of the root policy. |
Path parameter pattern syntax
If a path pattern has a type of PARAMETER, the following syntax rules apply to the parameter expression:
-
The pattern must start with a slash.
-
A single
*(wildcard) matches any character except a/. -
A double
**matches the rest of the path. It cannot be followed by any characters in the pattern. -
A path segment can be captured with syntax like
/{variable}. -
Nested captures are not allowed, meaning
{name1{name2}}is an invalid expression. -
Partial path segment matches are not allowed, meaning
/part1{part2}is an invalid expression. -
A literal left curly bracket, right curly bracket, backslash, or wildcard can be matched by preceding the character with a backslash:
\{, \{, \\, \*. -
The following characters are not allowed in parameter names:
'{', '}', '\', '/'. -
Parameter names must be unique within an expression, meaning
/{name1}/resource/{name1}is an invalid expression. -
ASCII control characters are invalid anywhere in the pattern.
Limiting and filtering data
You can limit the number of results returned on the Read API Services request with the limit parameter. Refer to Paging and ordering collections for more information about use of the limit parameter, as well as other methods of controlling pagination.
You can filter response data by applying a SCIM filtering expression to the Read API Services request. These SCIM operators can be applied to the following attributes:
-
eq(equals)Supported attributes:
authorizationServer.externalOAuthServer.id
Response codes
| Code | Message |
|---|---|
200 |
Successful operation. |
201 |
Successfully created. |
204 |
Successfully removed. No content. |
400 |
The request could not be completed. |
401 |
You do not have access to this resource. |
403 |
You do not have permissions or are not licensed to make this request. |
404 |
The requested resource was not found. |
API services errors
In addition to the general error codes, API service operations can return the following errors:
| HTTP status | Top‑level code | Detail code | When it happens and what the response contains |
|---|---|---|---|
400 |
|
|
Message: When and detailsWhen: A Details: |
400 |
|
|
Message: When and detailsWhen: A Details: Describes the failing property, such as |
400 |
|
|
Message: When and detailsWhen: A Details: |
400 |
|
|
Message: When and detailsWhen: A Details: The target is |
400 |
|
|
Message: When and detailsWhen: A Details: |
400 |
|
|
Message: When and detailsWhen: A Details: The target is The specified resource is already linked to the API service '<apiServerName>'. A resource can only be linked to one API service. (or, if more than one existing API service uses the resource, the message is:) The specified resource is already linked to the following API services: <names>. A resource can only be linked to one API service. |
400 |
|
None |
Message: When and detailsWhen: A Details: None |
400 |
|
|
Message: When and detailsWhen: A Details: The target is |
400 |
|
None |
Message: When and detailsWhen: A Details: None |
403 |
|
None |
Message: When and detailsWhen: The actor lacks the Details: None |
404 |
|
None |
Message: When and detailsWhen: The Details: None |
500 |
|
None |
Message: When and detailsWhen: A custom-policy API service request fails while building the policy tree Details: None |