Policy

Policies allow administrators to impose restrictions and set default values for researcher workloads. Restrictions and default values can be placed on CPUs, GPUs, and other resources or entities. For more information, see Policies.

List policies

Retrieve a list of all the applied policies.

SecuritybearerAuth
Request
query Parameters
workloadType
string non-empty

Policy for a specific workload type.

Enum: "Workspace" "Training" "Distributed" "Inference"
scope
string

filter by this scope.

Enum: "tenant" "cluster" "department" "project"
departmentId
string

Filter using the department id.

Example: departmentId=1
projectId
string

project id to filter by

Example: projectId=1
clusterId
string <uuid>

Filter using the Universally Unique Identifier (UUID) of the cluster.

Example: clusterId=d73a738f-fab3-430a-8fa3-5241493d7128
Responses
200

Request completed successfully.

401

Unauthorized

403

Forbidden

503

unexpected error

get/api/v2/policy
Response samples
application/json
{
  • "policies": [
    ]
}

Update a training policy.

Use to apply changes to training policy for a given organizational unit.

SecuritybearerAuth
Request
query Parameters
validateOnly
boolean

Validate the given policy payload without applying it

Request Body schema: application/json
object (PolicyCreationFields)
object or null (TrainingPolicyDefaultsAndRulesV2)
reset
Array of strings (FieldsToReset)

set of fields in jsonpath format that is requested to clear their policy (default and rules)

Responses
200

Policy applied.

400

Bad request.

401

Unauthorized

403

Forbidden

503

unexpected error

patch/api/v2/policy/trainings
Request samples
application/json
{
  • "meta": {
    },
  • "policy": {
    },
  • "reset": [
    ]
}
Response samples
application/json
{
  • "meta": {
    },
  • "policy": {
    },
  • "effective": {
    },
  • "effectiveUpdatedAt": "2019-08-24T14:15:22Z"
}

Overwrite a training policy.

Use to apply a training policy for a given organizational unit.

SecuritybearerAuth
Request
query Parameters
validateOnly
boolean

Validate the given policy payload without applying it

Request Body schema: application/json
object (PolicyCreationFields)
object or null (TrainingPolicyDefaultsAndRulesV2)
Responses
200

Policy applied.

400

Bad request.

401

Unauthorized

403

Forbidden

503

unexpected error

put/api/v2/policy/trainings
Request samples
application/json
{
  • "meta": {
    },
  • "policy": {
    }
}
Response samples
application/json
{
  • "meta": {
    },
  • "policy": {
    },
  • "effective": {
    },
  • "effectiveUpdatedAt": "2019-08-24T14:15:22Z"
}

Get a training policy.

Retrieve the details of an training policy for a given organizational unit.

SecuritybearerAuth
Request
query Parameters
scope
required
string

The scope that the policy relates to.

Enum: "tenant" "cluster" "department" "project"
departmentId
string

Filter using the department id.

Example: departmentId=1
projectId
string

project id to filter by

Example: projectId=1
clusterId
string <uuid>

Filter using the Universally Unique Identifier (UUID) of the cluster.

Example: clusterId=d73a738f-fab3-430a-8fa3-5241493d7128
Responses
200

Request completed successfully.

400

Bad request.

401

Unauthorized

403

Forbidden

404

The specified resource was not found

503

unexpected error

get/api/v2/policy/trainings
Response samples
application/json
{
  • "meta": {
    },
  • "policy": {
    },
  • "effective": {
    },
  • "effectiveUpdatedAt": "2019-08-24T14:15:22Z"
}

Delete a training policy.

Use to delete a training policy for a given organizational unit.

SecuritybearerAuth
Request
query Parameters
scope
required
string

The scope that the policy relates to.

Enum: "tenant" "cluster" "department" "project"
departmentId
string

Filter using the department id.

Example: departmentId=1
projectId
string

project id to filter by

Example: projectId=1
clusterId
string <uuid>

Filter using the Universally Unique Identifier (UUID) of the cluster.

Example: clusterId=d73a738f-fab3-430a-8fa3-5241493d7128
Responses
204

The policy was deleted successfully.

400

Bad request.

401

Unauthorized

403

Forbidden

404

The specified resource was not found

503

unexpected error

delete/api/v2/policy/trainings
Response samples
application/json
{
  • "code": 400,
  • "message": "Required parameter is missing"
}

Update a workspace policy.

Use to apply changes to workspace policy for a given organizational unit.

SecuritybearerAuth
Request
query Parameters
validateOnly
boolean

Validate the given policy payload without applying it

Request Body schema: application/json
object (PolicyCreationFields)
object or null (WorkspacePolicyDefaultsAndRulesV2)
reset
Array of strings (FieldsToReset)

set of fields in jsonpath format that is requested to clear their policy (default and rules)

Responses
200

Policy applied.

400

Bad request.

401

Unauthorized

403

Forbidden

503

unexpected error

patch/api/v2/policy/workspaces
Request samples
application/json
{
  • "meta": {
    },
  • "policy": {
    },
  • "reset": [
    ]
}
Response samples
application/json
{
  • "meta": {
    },
  • "policy": {
    },
  • "effective": {
    },
  • "effectiveUpdatedAt": "2019-08-24T14:15:22Z"
}

Overwrite a workspace policy.

Ue to apply a workspace policy for a given organizational unit.

SecuritybearerAuth
Request
query Parameters
validateOnly
boolean

Validate the given policy payload without applying it

Request Body schema: application/json
object (PolicyCreationFields)
object or null (WorkspacePolicyDefaultsAndRulesV2)
Responses
200

Policy applied.

400

Bad request.

401

Unauthorized

403

Forbidden

503

unexpected error

put/api/v2/policy/workspaces
Request samples
application/json
{
  • "meta": {
    },
  • "policy": {
    }
}
Response samples
application/json
{
  • "meta": {
    },
  • "policy": {
    },
  • "effective": {
    },
  • "effectiveUpdatedAt": "2019-08-24T14:15:22Z"
}

Get a workspace policy.

Retrieve the details of a workspace policy for a given organizational unit.

SecuritybearerAuth
Request
query Parameters
scope
required
string

The scope that the policy relates to.

Enum: "tenant" "cluster" "department" "project"
departmentId
string

Filter using the department id.

Example: departmentId=1
projectId
string

project id to filter by

Example: projectId=1
clusterId
string <uuid>

Filter using the Universally Unique Identifier (UUID) of the cluster.

Example: clusterId=d73a738f-fab3-430a-8fa3-5241493d7128
Responses
200

Request completed successfully.

400

Bad request.

401

Unauthorized

403

Forbidden

404

The specified resource was not found

503

unexpected error

get/api/v2/policy/workspaces
Response samples
application/json
{
  • "meta": {
    },
  • "policy": {
    },
  • "effective": {
    },
  • "effectiveUpdatedAt": "2019-08-24T14:15:22Z"
}

Delete a workspace policy.

Use to delete a workspace policy for a given organizational unit.

SecuritybearerAuth
Request
query Parameters
scope
required
string

The scope that the policy relates to.

Enum: "tenant" "cluster" "department" "project"
departmentId
string

Filter using the department id.

Example: departmentId=1
projectId
string

project id to filter by

Example: projectId=1
clusterId
string <uuid>

Filter using the Universally Unique Identifier (UUID) of the cluster.

Example: clusterId=d73a738f-fab3-430a-8fa3-5241493d7128
Responses
204

The policy was deleted successfully.

400

Bad request.

401

Unauthorized

403

Forbidden

404

The specified resource was not found

503

unexpected error

delete/api/v2/policy/workspaces
Response samples
application/json
{
  • "code": 400,
  • "message": "Required parameter is missing"
}

Update a distributed policy.

Use to apply changes to distributed policy for a given organizational unit.

SecuritybearerAuth
Request
query Parameters
validateOnly
boolean

Validate the given policy payload without applying it

Request Body schema: application/json
object (PolicyCreationFields)
object or null (DistributedPolicyDefaultsAndRulesV2)
reset
Array of strings (FieldsToReset)

set of fields in jsonpath format that is requested to clear their policy (default and rules)

Responses
200

Policy applied.

400

Bad request.

401

Unauthorized

403

Forbidden

503

unexpected error

patch/api/v2/policy/distributed
Request samples
application/json
{
  • "meta": {
    },
  • "policy": {
    },
  • "reset": [
    ]
}
Response samples
application/json
{
  • "meta": {
    },
  • "policy": {
    },
  • "effective": {
    },
  • "effectiveUpdatedAt": "2019-08-24T14:15:22Z"
}

Overwrite a distributed policy.

Use to apply a distributed policy for a given organizational unit.

SecuritybearerAuth
Request
query Parameters
validateOnly
boolean

Validate the given policy payload without applying it

Request Body schema: application/json
object (PolicyCreationFields)
object or null (DistributedPolicyDefaultsAndRulesV2)
Responses
200

Policy applied.

400

Bad request.

401

Unauthorized

403

Forbidden

503

unexpected error

put/api/v2/policy/distributed
Request samples
application/json
{
  • "meta": {
    },
  • "policy": {
    }
}
Response samples
application/json
{
  • "meta": {
    },
  • "policy": {
    },
  • "effective": {
    },
  • "effectiveUpdatedAt": "2019-08-24T14:15:22Z"
}

Get a distributed policy.

Retrieve the details of a distributed policy for a given organizational unit.

SecuritybearerAuth
Request
query Parameters
scope
required
string

The scope that the policy relates to.

Enum: "tenant" "cluster" "department" "project"
departmentId
string

Filter using the department id.

Example: departmentId=1
projectId
string

project id to filter by

Example: projectId=1
clusterId
string <uuid>

Filter using the Universally Unique Identifier (UUID) of the cluster.

Example: clusterId=d73a738f-fab3-430a-8fa3-5241493d7128
Responses
200

Request completed successfully.

400

Bad request.

401

Unauthorized

403

Forbidden

404

The specified resource was not found

503

unexpected error

get/api/v2/policy/distributed
Response samples
application/json
{
  • "meta": {
    },
  • "policy": {
    },
  • "effective": {
    },
  • "effectiveUpdatedAt": "2019-08-24T14:15:22Z"
}

Delete a distributed policy.

Use to delete a distributed policy for a given organizational unit.

SecuritybearerAuth
Request
query Parameters
scope
required
string

The scope that the policy relates to.

Enum: "tenant" "cluster" "department" "project"
departmentId
string

Filter using the department id.

Example: departmentId=1
projectId
string

project id to filter by

Example: projectId=1
clusterId
string <uuid>

Filter using the Universally Unique Identifier (UUID) of the cluster.

Example: clusterId=d73a738f-fab3-430a-8fa3-5241493d7128
Responses
204

The policy was deleted successfully.

400

Bad request.

401

Unauthorized

403

Forbidden

404

The specified resource was not found

503

unexpected error

delete/api/v2/policy/distributed
Response samples
application/json
{
  • "code": 400,
  • "message": "Required parameter is missing"
}

Update an inference policy.

Use to apply changes to inference policy for a given organizational unit.

SecuritybearerAuth
Request
query Parameters
validateOnly
boolean

Validate the given policy payload without applying it

Request Body schema: application/json
object (PolicyCreationFields)
object or null (InferencePolicyDefaultsAndRulesV2)
reset
Array of strings (FieldsToReset)

set of fields in jsonpath format that is requested to clear their policy (default and rules)

Responses
200

Policy applied.

400

Bad request.

401

Unauthorized

403

Forbidden

503

unexpected error

patch/api/v2/policy/inferences
Request samples
application/json
{
  • "meta": {
    },
  • "policy": {
    },
  • "reset": [
    ]
}
Response samples
application/json
{
  • "meta": {
    },
  • "policy": {
    },
  • "effective": {
    },
  • "effectiveUpdatedAt": "2019-08-24T14:15:22Z"
}

Overwrite an inference policy.

Use to apply an inference policy for a given organizational unit.

SecuritybearerAuth
Request
query Parameters
validateOnly
boolean

Validate the given policy payload without applying it

Request Body schema: application/json
object (PolicyCreationFields)
object or null (InferencePolicyDefaultsAndRulesV2)
Responses
200

Policy applied.

400

Bad request.

401

Unauthorized

403

Forbidden

503

unexpected error

put/api/v2/policy/inferences
Request samples
application/json
{
  • "meta": {
    },
  • "policy": {
    }
}
Response samples
application/json
{
  • "meta": {
    },
  • "policy": {
    },
  • "effective": {
    },
  • "effectiveUpdatedAt": "2019-08-24T14:15:22Z"
}

Get an inference policy.

Retrieve the details of an inference policy for a given organizational unit.

SecuritybearerAuth
Request
query Parameters
scope
required
string

The scope that the policy relates to.

Enum: "tenant" "cluster" "department" "project"
departmentId
string

Filter using the department id.

Example: departmentId=1
projectId
string

project id to filter by

Example: projectId=1
clusterId
string <uuid>

Filter using the Universally Unique Identifier (UUID) of the cluster.

Example: clusterId=d73a738f-fab3-430a-8fa3-5241493d7128
Responses
200

Request completed successfully.

400

Bad request.

401

Unauthorized

403

Forbidden

404

The specified resource was not found

503

unexpected error

get/api/v2/policy/inferences
Response samples
application/json
{
  • "meta": {
    },
  • "policy": {
    },
  • "effective": {
    },
  • "effectiveUpdatedAt": "2019-08-24T14:15:22Z"
}

Delete an inference policy.

Use to delete an inference policy for a given organizational unit.

SecuritybearerAuth
Request
query Parameters
scope
required
string

The scope that the policy relates to.

Enum: "tenant" "cluster" "department" "project"
departmentId
string

Filter using the department id.

Example: departmentId=1
projectId
string

project id to filter by

Example: projectId=1
clusterId
string <uuid>

Filter using the Universally Unique Identifier (UUID) of the cluster.

Example: clusterId=d73a738f-fab3-430a-8fa3-5241493d7128
Responses
204

The policy was deleted successfully.

400

Bad request.

401

Unauthorized

403

Forbidden

404

The specified resource was not found

503

unexpected error

delete/api/v2/policy/inferences
Response samples
application/json
{
  • "code": 400,
  • "message": "Required parameter is missing"
}