Organizations service


Organizations

PingOne uses an organization-based model to define tenant accounts and their related entities. The organization is the top-level identifier. It defines your entire enterprise within the PingOne for Customers platform. The organizations service implements functions to create, read, update, and delete organizations resources.

Organizations API operations

The organizations service supports the following endpoint operations:

For hands-on experience with the organizations API endpoints, click the Run in Postman button below to download a Postman collection that you can import and open in your local Postman application.

Organzations data model

Property Description
createdAt The time the resource was created.
description A string that specifies the description of the organization.
id A string that specifies the resource’s unique identifier.
name A string that specifies the organization name, which must be provided and must be unique among all organizations in PingOne.
billingConnections.id A string that specifies the list of the BillingConnection resource IDs for the organization.
updatedAt The time the resource was last updated.

Response codes

Code Message
200 Successful operation.
201 Successfully created.
204 Successfully removed. No content.
400 The request was invalid.
401 You weren’t authenticated to perform this operation.
403 You lack either the necessary permissions or the licensing to perform this operation.
404 The specified object doesn’t exist.

Endpoint examples

Get organizations

The following sample shows the GET /organizations operation to return all organizations defined for the current account:

curl -X GET "https://api.pingone.com/v1/organizations" \
-H "Content-type: application/json" \
-H "Authorization: Bearer jwtToken"

Get one organization

The following sample shows the GET /organizations/{organizationId} operation to return data only for the organization resource identified by its ID in the request URL.

curl -X GET "https://api.pingone.com/v1/organizations/{organizationId}" \
-H "Content-type: application/json" \
-H "Authorization: Bearer jwtToken"

The response data shows the organization resource data.

{
    "_links": {
        "self": {
            "href": "https://api.pingone.com/v1/organizations/000cf493-ee38-4373-9a28-370f234f0c06"
        },
        "environments": {
            "href": "https://api.pingone.com/v1/organizations/000cf493-ee38-4373-9a28-370f234f0c06/environments"
        }
    },
    "id": "000cf493-ee38-4373-9a28-370f234f0c06",
    "name": "SYNTHETICS-Org",
    "createdAt": "2018-07-20T14:23:43.324Z",
    "updatedAt": "2018-07-20T14:23:43.324Z"
}

Create organizations

The following sample shows the POST /organizations operation to create a new organization associated with the organization encoded in the access token.

curl -X PUT "https://api.pingone.com/v1/environments/f29547a1-841c-45f8-977e-00d0fdb73ede" \
-H "Content-type: application/json" \
-H "Authorization: Bearer jwtToken" \
-d "{
  "name": "StringFactoryOrganization",
  "description": "North America String Factory"
}"

In the request body, the name attributes is required. The value of the name attribute must be unique within PingOne.

Update organizations

To update organization data, you can use PUT /organizations/{organizationsId} to modify the attributes of the specified organization.

curl -X PUT "https://api.pingone.com/v1/organizations/f29547a1-841c-45f8-977e-00d0fdb73ede" \
-H "Content-type: application/json" \
-H "Authorization: Bearer jwtToken" \
-d "{
  "name": "StringFactory_NA",
  "description": "North America Organization"
}"

Get organization environments

The following sample shows the GET /organizations/{organizationsId}/environments operation to return all environments defined for the organization specified by its ID in the request URL:

curl -X GET "https://api.pingone.com/v1/organizations/{organizationsId}/environments" \
-H "Content-type: application/json" \
-H "Authorization: Bearer jwtToken"

Create organization environments

The following sample shows the POST /organizations/{organizationsId}/environments operation to create a new environment associated with the organization specified by its ID in the request URL.

curl -X PUT "https://api.pingone.com/v1/environments/f29547a1-841c-45f8-977e-00d0fdb73ede" \
-H "Content-type: application/json" \
-H "Authorization: Bearer jwtToken" \
-d "{
  "name": "String Factory Production Environment",
  "description": "North America Test Environment",
  "region": "EU",
  "type": "SANDBOX"
}"

In the request body, the name, region, and type attributes are required. The value of the name attribute must be unique within the organization.

Delete organizations

The following sample shows the DELETE /organizations/{organizationsId} operation to delete the organization from PingOne.

curl -X DELETE "https://api.pingone.com/v1/organizations/f29547a1-841c-45f8-977e-00d0fdb73ede" \
-H "Content-type: application/json" \
-H "Authorization: Bearer jwtToken" \

When successful, the DELETE request returns a code 204 No Content message.