Create API Service
POST {{apiPath}}/environments/{{envID}}/apiServers
The following sample shows the POST /environments/{{envID}}/apiServers operation to create a new API service endpoint resource associated with the environment specified in the request URL. The request body specifies the name, baseUrls, and authorizationServer.resource.id value that specifies the UUID for a custom resource defined in PingOne.
Prerequisites
See PingOne Authorize and PingOne Authorize API Access Management for important overview information.
Use Create Resource to create an authorization server resource entity for the
customP1ResourceIDvariable. Use Read All Resources to find an existing resource entity ID.Use Create Group to create a user group for the optional
groupIDvariable. Use Read All Groups to find an existing user group ID.
For property descriptions, see API service data model
| Property | Type? | Required? |
|---|---|---|
authorizationServer | Object | Required |
authorizationServer.resource | Relationship | Required |
authorizationServer.resource.id | UUID | Required |
baseUrls | Array | Required |
name | String | Required |
Request Body
{"name"=>"Banking API-Advanced", "baseUrls"=>["https://api.example.com/advbanking/v1", "https://example-api.cdn/advbanking/v1"], "authorizationServer"=>{"resource"=>{"id"=>"{{customP1ResourceID}}"}}}
RESPONSES
status: Created
{"_links":{"self":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/apiServers/6cdedf90-f9e4-4c2e-b238-091adbb156fe"},"resource":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/resources/d8a56a22-caf3-4053-8221-298a12e013ab"},"operations":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/apiServers/6cdedf90-f9e4-4c2e-b238-091adbb156fe/operations"},"environment":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"}},"environment":{"id":"abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"},"id":"6cdedf90-f9e4-4c2e-b238-091adbb156fe","name":"Banking API-Advanced","baseUrls":["https://api.example.com/advbanking/v1","https://example-api.cdn/advbanking/v1"],"authorizationServer":{"resource":{"id":"d8a56a22-caf3-4053-8221-298a12e013ab"},"type":"PINGONE_SSO"},"directory":{"type":"PINGONE_SSO"}}