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

For property descriptions, see API service data model

PropertyType?Required?
authorizationServerObjectRequired
authorizationServer.resourceRelationshipRequired
authorizationServer.resource.idUUIDRequired
baseUrlsArrayRequired
nameStringRequired

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"}}