Skip to content

Create a project in a resource group

Request

OPA roles:
  • resource_admin
  • delegated_resource_admin

Creates a project in the specified resource group

Security
bearerAuth
Path
team_namestringrequired

The name of your team

resource_group_idstringrequired

The UUID of a resource group

Bodyapplication/json
create_server_usersboolean or null

Whether to create server users for users in this project. Defaults to false. If false, you must ensure that accounts exist on the server for each user.

force_shared_ssh_usersboolean

Whether to force the project to use a shared SSH account

gateway_selectorstring

A comma separated list of labels used to match to enrolled gateways. Labels should use the following format: key=value

Example:"REGION=WEST-EU,TEAM=MARKETING"
namestring, (regex), [ 1 .. 255 ] characters^[\w\-_.]+$required

The name of the project

next_unix_gidinteger or null, (int32), [ 100 .. 65535 ]

The GID used when creating a server user

next_unix_uidinteger or null, (int32), [ 100 .. 65535 ]

The UID used when creating a server user

persistent_server_user_accountsboolean or null

If true, creates persistent user accounts and home folders on servers in this project for every user on your team. By default, on-demand accounts are only created when a user accesses a server.

Default:null
require_preauth_for_credsboolean or null

If true, the project requires preauthorization before a user can access a server. Default is false.

resource_group_idstring

The UUID of the resource group where the project is located

Example:"5f3159e9-e7ab-428e-8a87-c2ebffe407f6"
server_account_managementboolean

Whether to manage existing local accounts on the server

shared_admin_user_namestring

The shared username to use for root accounts

Example:"Server.Admin"
shared_standard_user_namestring

The shared username to use for non-root accounts

Example:"Server.User"
ssh_certificate_typestring or null(SSHCertificateType)

(Optional) The type of signature algorithm used for authentication keys. Default is CERT_TYPE_ED25519_01.

Enum:"CERT_TYPE_ECDSA_256_01""CERT_TYPE_ECDSA_384_01""CERT_TYPE_ECDSA_521_01""CERT_TYPE_ED25519_01""CERT_TYPE_RSA_01""CERT_TYPE_RSA_SHA2_256_01"
curl -i -X POST \
  'https://{org_name}.pam.okta.com/v1/teams/{team_name}/resource_groups/{resource_group_id}/projects' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "create_server_users": true,
    "force_shared_ssh_users": true,
    "gateway_selector": "REGION=WEST-EU,TEAM=MARKETING",
    "name": "/regex/",
    "next_unix_gid": 100,
    "next_unix_uid": 100,
    "persistent_server_user_accounts": null,
    "require_preauth_for_creds": true,
    "resource_group_id": "5f3159e9-e7ab-428e-8a87-c2ebffe407f6",
    "server_account_management": true,
    "shared_admin_user_name": "Server.Admin",
    "shared_standard_user_name": "Server.User",
    "ssh_certificate_type": "CERT_TYPE_ECDSA_256_01"
  }'

Responses

Created

Bodyapplication/json
active_resource_countinteger, (int32)read-only

The number of active resources within this project. Only populated when include_resource_count is set to true, otherwise returned as 0.

Example:50
create_server_usersboolean or null

Whether to create server users for users in this project. Defaults to false. If false, you must ensure that accounts exist on the server for each user.

deleted_atstring or null, (date-time)read-only

A timestamp indicating when the project was deleted

force_shared_ssh_usersboolean

Whether to force the project to use a shared SSH account

gateway_selectorstring

A comma separated list of labels used to match to enrolled gateways. Labels should use the following format: key=value

Example:"REGION=WEST-EU,TEAM=MARKETING"
idstring, (regex)^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-...read-onlyrequired

The UUID of the project

namestring, (regex), [ 1 .. 255 ] characters^[\w\-_.]+$required

The name of the project

next_unix_gidinteger or null, (int32), [ 100 .. 65535 ]

The GID used when creating a server user

next_unix_uidinteger or null, (int32), [ 100 .. 65535 ]

The UID used when creating a server user

persistent_server_user_accountsboolean or null

If true, creates persistent user accounts and home folders on servers in this project for every user on your team. By default, on-demand accounts are only created when a user accesses a server.

Default:null
require_preauth_for_credsboolean or null

If true, the project requires preauthorization before a user can access a server. Default is false.

resource_group_idstring

The UUID of the resource group where the project is located

Example:"5f3159e9-e7ab-428e-8a87-c2ebffe407f6"
server_account_managementboolean

Whether to manage existing local accounts on the server

shared_admin_user_namestring

The shared username to use for root accounts

Example:"Server.Admin"
shared_standard_user_namestring

The shared username to use for non-root accounts

Example:"Server.User"
ssh_certificate_typestring or null(SSHCertificateType)

(Optional) The type of signature algorithm used for authentication keys. Default is CERT_TYPE_ED25519_01.

Enum:"CERT_TYPE_ECDSA_256_01""CERT_TYPE_ECDSA_384_01""CERT_TYPE_ECDSA_521_01""CERT_TYPE_ED25519_01""CERT_TYPE_RSA_01""CERT_TYPE_RSA_SHA2_256_01"
stale_resource_countinteger, (int32)read-only

The number of stale resources within this project. Only populated when include_resource_count is set to true, otherwise returned as 0.

Example:0
teamstring, (regex), [ 1 .. 255 ] characters^[\w\-_.]+$read-onlyrequired

The team associated with the project

Example:"Your_OPA_Team"
user_on_demand_periodinteger or null, (int64), <= 4294967295read-only

The time period in seconds before an on-demand user account expires and is removed from a server. 0 if disabled. This is the default,

Response
{ "active_resource_count": 50, "create_server_users": true, "deleted_at": "2019-08-24T14:15:22Z", "force_shared_ssh_users": true, "gateway_selector": "REGION=WEST-EU,TEAM=MARKETING", "id": "/regex/", "name": "/regex/", "next_unix_gid": 100, "next_unix_uid": 100, "persistent_server_user_accounts": null, "require_preauth_for_creds": true, "resource_group_id": "5f3159e9-e7ab-428e-8a87-c2ebffe407f6", "server_account_management": true, "shared_admin_user_name": "Server.Admin", "shared_standard_user_name": "Server.User", "ssh_certificate_type": "CERT_TYPE_ECDSA_256_01", "stale_resource_count": 0, "team": "Your_OPA_Team", "user_on_demand_period": 4294967295 }