Skip to content

Latest commit

 

History

History
1054 lines (794 loc) · 48.9 KB

PoliciesApi.md

File metadata and controls

1054 lines (794 loc) · 48.9 KB

jcapiv2.PoliciesApi

All URIs are relative to https://console.jumpcloud.com/api/v2

Method HTTP request Description
graph_policy_associations_list GET /policies/{policy_id}/associations List the associations of a Policy
graph_policy_associations_post POST /policies/{policy_id}/associations Manage the associations of a Policy
graph_policy_traverse_system GET /policies/{policy_id}/systems List the Systems bound to a Policy
graph_policy_traverse_system_group GET /policies/{policy_id}/systemgroups List the System Groups bound to a Policy
policies_delete DELETE /policies/{id} Deletes a Policy
policies_get GET /policies/{id} Gets a specific Policy.
policies_list GET /policies Lists all the Policies
policies_post POST /policies Create a new Policy
policies_put PUT /policies/{id} Update an existing Policy
policyresults_get GET /policyresults/{id} Get a specific Policy Result.
policyresults_list GET /policies/{policy_id}/policyresults Lists all the policy results of a policy.
policyresults_org_list GET /policyresults Lists all the policy results for an organization.
policystatuses_list GET /policies/{policy_id}/policystatuses Lists the latest policy results of a policy.
policystatuses_list_0 GET /systems/{system_id}/policystatuses List the policy statuses for a system
policytemplates_get GET /policytemplates/{id} Get a specific Policy Template
policytemplates_list GET /policytemplates Lists all of the Policy Templates

graph_policy_associations_list

list[GraphConnection] graph_policy_associations_list(policy_id, targets, content_type, accept, limit=limit, skip=skip, x_org_id=x_org_id)

List the associations of a Policy

This endpoint returns the direct associations of a Policy. A direct association can be a non-homogeneous relationship between 2 different objects, for example Policies and Systems. #### Sample Request curl -X GET 'https://console.jumpcloud.com/api/v2/policies/{Policy_ID}/associations?targets=system_group \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}'

Example

from __future__ import print_function
import time
import jcapiv2
from jcapiv2.rest import ApiException
from pprint import pprint

# Configure API key authorization: x-api-key
configuration = jcapiv2.Configuration()
configuration.api_key['x-api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# create an instance of the API class
api_instance = jcapiv2.PoliciesApi(jcapiv2.ApiClient(configuration))
policy_id = 'policy_id_example' # str | ObjectID of the Policy.
targets = ['targets_example'] # list[str] | 
content_type = 'application/json' # str |  (default to application/json)
accept = 'application/json' # str |  (default to application/json)
limit = 10 # int | The number of records to return at once. Limited to 100. (optional) (default to 10)
skip = 0 # int | The offset into the records to return. (optional) (default to 0)
x_org_id = '' # str |  (optional) (default to )

try:
    # List the associations of a Policy
    api_response = api_instance.graph_policy_associations_list(policy_id, targets, content_type, accept, limit=limit, skip=skip, x_org_id=x_org_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PoliciesApi->graph_policy_associations_list: %s\n" % e)

Parameters

Name Type Description Notes
policy_id str ObjectID of the Policy.
targets list[str]
content_type str [default to application/json]
accept str [default to application/json]
limit int The number of records to return at once. Limited to 100. [optional] [default to 10]
skip int The offset into the records to return. [optional] [default to 0]
x_org_id str [optional] [default to ]

Return type

list[GraphConnection]

Authorization

x-api-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

graph_policy_associations_post

graph_policy_associations_post(policy_id, content_type, accept, body=body, x_org_id=x_org_id)

Manage the associations of a Policy

This endpoint allows you to manage the direct associations of a Policy. A direct association can be a non-homogeneous relationship between 2 different objects, for example Policies and Systems. #### Sample Request curl -X POST https://console.jumpcloud.com/api/v2/policies/{Policy_ID}/associations/ \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ \"op\": \"add\", \"type\": \"system_group\", \"id\": \"{Group_ID}\" }'

Example

from __future__ import print_function
import time
import jcapiv2
from jcapiv2.rest import ApiException
from pprint import pprint

# Configure API key authorization: x-api-key
configuration = jcapiv2.Configuration()
configuration.api_key['x-api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# create an instance of the API class
api_instance = jcapiv2.PoliciesApi(jcapiv2.ApiClient(configuration))
policy_id = 'policy_id_example' # str | ObjectID of the Policy.
content_type = 'application/json' # str |  (default to application/json)
accept = 'application/json' # str |  (default to application/json)
body = jcapiv2.GraphManagementReq() # GraphManagementReq |  (optional)
x_org_id = '' # str |  (optional) (default to )

try:
    # Manage the associations of a Policy
    api_instance.graph_policy_associations_post(policy_id, content_type, accept, body=body, x_org_id=x_org_id)
except ApiException as e:
    print("Exception when calling PoliciesApi->graph_policy_associations_post: %s\n" % e)

Parameters

Name Type Description Notes
policy_id str ObjectID of the Policy.
content_type str [default to application/json]
accept str [default to application/json]
body GraphManagementReq [optional]
x_org_id str [optional] [default to ]

Return type

void (empty response body)

Authorization

x-api-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

graph_policy_traverse_system

list[GraphObjectWithPaths] graph_policy_traverse_system(policy_id, content_type, accept, limit=limit, x_org_id=x_org_id, skip=skip, filter=filter)

List the Systems bound to a Policy

This endpoint will return all Systems bound to a Policy, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The attributes object is a key/value hash of compiled graph attributes for all paths followed. The paths array enumerates each path from this Policy to the corresponding System; this array represents all grouping and/or associations that would have to be removed to deprovision the System from this Policy. See /members and /associations endpoints to manage those collections. #### Sample Request curl -X GET https://console.jumpcloud.com/api/v2/policies/{Policy_ID}/systems \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}'

Example

from __future__ import print_function
import time
import jcapiv2
from jcapiv2.rest import ApiException
from pprint import pprint

# Configure API key authorization: x-api-key
configuration = jcapiv2.Configuration()
configuration.api_key['x-api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# create an instance of the API class
api_instance = jcapiv2.PoliciesApi(jcapiv2.ApiClient(configuration))
policy_id = 'policy_id_example' # str | ObjectID of the Command.
content_type = 'application/json' # str |  (default to application/json)
accept = 'application/json' # str |  (default to application/json)
limit = 10 # int | The number of records to return at once. Limited to 100. (optional) (default to 10)
x_org_id = '' # str |  (optional) (default to )
skip = 0 # int | The offset into the records to return. (optional) (default to 0)
filter = ['[]'] # list[str] | Supported operators are: eq, ne, gt, ge, lt, le, between, search, in (optional) (default to [])

try:
    # List the Systems bound to a Policy
    api_response = api_instance.graph_policy_traverse_system(policy_id, content_type, accept, limit=limit, x_org_id=x_org_id, skip=skip, filter=filter)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PoliciesApi->graph_policy_traverse_system: %s\n" % e)

Parameters

Name Type Description Notes
policy_id str ObjectID of the Command.
content_type str [default to application/json]
accept str [default to application/json]
limit int The number of records to return at once. Limited to 100. [optional] [default to 10]
x_org_id str [optional] [default to ]
skip int The offset into the records to return. [optional] [default to 0]
filter list[str] Supported operators are: eq, ne, gt, ge, lt, le, between, search, in [optional] [default to []]

Return type

list[GraphObjectWithPaths]

Authorization

x-api-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

graph_policy_traverse_system_group

list[GraphObjectWithPaths] graph_policy_traverse_system_group(policy_id, content_type, accept, limit=limit, x_org_id=x_org_id, skip=skip, filter=filter)

List the System Groups bound to a Policy

This endpoint will return all Systems Groups bound to a Policy, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the group's type, id, attributes and paths. The attributes object is a key/value hash of compiled graph attributes for all paths followed. The paths array enumerates each path from this Policy to the corresponding System Group; this array represents all grouping and/or associations that would have to be removed to deprovision the System Group from this Policy. See /members and /associations endpoints to manage those collections. #### Sample Request curl -X GET https://console.jumpcloud.com/api/v2/policies/{Policy_ID}/systemgroups \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}'

Example

from __future__ import print_function
import time
import jcapiv2
from jcapiv2.rest import ApiException
from pprint import pprint

# Configure API key authorization: x-api-key
configuration = jcapiv2.Configuration()
configuration.api_key['x-api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# create an instance of the API class
api_instance = jcapiv2.PoliciesApi(jcapiv2.ApiClient(configuration))
policy_id = 'policy_id_example' # str | ObjectID of the Command.
content_type = 'application/json' # str |  (default to application/json)
accept = 'application/json' # str |  (default to application/json)
limit = 10 # int | The number of records to return at once. Limited to 100. (optional) (default to 10)
x_org_id = '' # str |  (optional) (default to )
skip = 0 # int | The offset into the records to return. (optional) (default to 0)
filter = ['[]'] # list[str] | Supported operators are: eq, ne, gt, ge, lt, le, between, search, in (optional) (default to [])

try:
    # List the System Groups bound to a Policy
    api_response = api_instance.graph_policy_traverse_system_group(policy_id, content_type, accept, limit=limit, x_org_id=x_org_id, skip=skip, filter=filter)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PoliciesApi->graph_policy_traverse_system_group: %s\n" % e)

Parameters

Name Type Description Notes
policy_id str ObjectID of the Command.
content_type str [default to application/json]
accept str [default to application/json]
limit int The number of records to return at once. Limited to 100. [optional] [default to 10]
x_org_id str [optional] [default to ]
skip int The offset into the records to return. [optional] [default to 0]
filter list[str] Supported operators are: eq, ne, gt, ge, lt, le, between, search, in [optional] [default to []]

Return type

list[GraphObjectWithPaths]

Authorization

x-api-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

policies_delete

policies_delete(id, content_type, accept, x_org_id=x_org_id)

Deletes a Policy

This endpoint allows you to delete a policy. #### Sample Request curl -X DELETE https://console.jumpcloud.com/api/v2/policies/5a837ecd232e110d4291e6b9 \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}'

Example

from __future__ import print_function
import time
import jcapiv2
from jcapiv2.rest import ApiException
from pprint import pprint

# Configure API key authorization: x-api-key
configuration = jcapiv2.Configuration()
configuration.api_key['x-api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# create an instance of the API class
api_instance = jcapiv2.PoliciesApi(jcapiv2.ApiClient(configuration))
id = 'id_example' # str | ObjectID of the Policy object.
content_type = 'application/json' # str |  (default to application/json)
accept = 'application/json' # str |  (default to application/json)
x_org_id = '' # str |  (optional) (default to )

try:
    # Deletes a Policy
    api_instance.policies_delete(id, content_type, accept, x_org_id=x_org_id)
except ApiException as e:
    print("Exception when calling PoliciesApi->policies_delete: %s\n" % e)

Parameters

Name Type Description Notes
id str ObjectID of the Policy object.
content_type str [default to application/json]
accept str [default to application/json]
x_org_id str [optional] [default to ]

Return type

void (empty response body)

Authorization

x-api-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

policies_get

PolicyWithDetails policies_get(id, content_type, accept, x_org_id=x_org_id)

Gets a specific Policy.

This endpoint returns a specific policy. ###### Sample Request curl -X GET https://console.jumpcloud.com/api/v2/policies/{PolicyID} \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}'

Example

from __future__ import print_function
import time
import jcapiv2
from jcapiv2.rest import ApiException
from pprint import pprint

# Configure API key authorization: x-api-key
configuration = jcapiv2.Configuration()
configuration.api_key['x-api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# create an instance of the API class
api_instance = jcapiv2.PoliciesApi(jcapiv2.ApiClient(configuration))
id = 'id_example' # str | ObjectID of the Policy object.
content_type = 'application/json' # str |  (default to application/json)
accept = 'application/json' # str |  (default to application/json)
x_org_id = '' # str |  (optional) (default to )

try:
    # Gets a specific Policy.
    api_response = api_instance.policies_get(id, content_type, accept, x_org_id=x_org_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PoliciesApi->policies_get: %s\n" % e)

Parameters

Name Type Description Notes
id str ObjectID of the Policy object.
content_type str [default to application/json]
accept str [default to application/json]
x_org_id str [optional] [default to ]

Return type

PolicyWithDetails

Authorization

x-api-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

policies_list

list[Policy] policies_list(content_type, accept, fields=fields, filter=filter, limit=limit, skip=skip, sort=sort, x_org_id=x_org_id)

Lists all the Policies

This endpoint returns all policies. ##### Sample Request curl -X GET https://console.jumpcloud.com/api/v2/policies \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}'

Example

from __future__ import print_function
import time
import jcapiv2
from jcapiv2.rest import ApiException
from pprint import pprint

# Configure API key authorization: x-api-key
configuration = jcapiv2.Configuration()
configuration.api_key['x-api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# create an instance of the API class
api_instance = jcapiv2.PoliciesApi(jcapiv2.ApiClient(configuration))
content_type = 'application/json' # str |  (default to application/json)
accept = 'application/json' # str |  (default to application/json)
fields = ['[]'] # list[str] | The comma separated fields included in the returned records. If omitted, the default list of fields will be returned.  (optional) (default to [])
filter = ['[]'] # list[str] | Supported operators are: eq, ne, gt, ge, lt, le, between, search, in (optional) (default to [])
limit = 10 # int | The number of records to return at once. Limited to 100. (optional) (default to 10)
skip = 0 # int | The offset into the records to return. (optional) (default to 0)
sort = ['[]'] # list[str] | The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending.  (optional) (default to [])
x_org_id = '' # str |  (optional) (default to )

try:
    # Lists all the Policies
    api_response = api_instance.policies_list(content_type, accept, fields=fields, filter=filter, limit=limit, skip=skip, sort=sort, x_org_id=x_org_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PoliciesApi->policies_list: %s\n" % e)

Parameters

Name Type Description Notes
content_type str [default to application/json]
accept str [default to application/json]
fields list[str] The comma separated fields included in the returned records. If omitted, the default list of fields will be returned. [optional] [default to []]
filter list[str] Supported operators are: eq, ne, gt, ge, lt, le, between, search, in [optional] [default to []]
limit int The number of records to return at once. Limited to 100. [optional] [default to 10]
skip int The offset into the records to return. [optional] [default to 0]
sort list[str] The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. [optional] [default to []]
x_org_id str [optional] [default to ]

Return type

list[Policy]

Authorization

x-api-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

policies_post

PolicyWithDetails policies_post(content_type, accept, body=body, x_org_id=x_org_id)

Create a new Policy

This endpoint allows you to create a policy. Given the amount of configurable parameters required to create a Policy, we suggest you use the JumpCloud Admin Console to create new policies. ##### Sample Request curl -X POST https://console.jumpcloud.com/api/v2/policies \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ {Policy_Parameters} }'

Example

from __future__ import print_function
import time
import jcapiv2
from jcapiv2.rest import ApiException
from pprint import pprint

# Configure API key authorization: x-api-key
configuration = jcapiv2.Configuration()
configuration.api_key['x-api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# create an instance of the API class
api_instance = jcapiv2.PoliciesApi(jcapiv2.ApiClient(configuration))
content_type = 'application/json' # str |  (default to application/json)
accept = 'application/json' # str |  (default to application/json)
body = jcapiv2.PolicyRequest() # PolicyRequest |  (optional)
x_org_id = '' # str |  (optional) (default to )

try:
    # Create a new Policy
    api_response = api_instance.policies_post(content_type, accept, body=body, x_org_id=x_org_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PoliciesApi->policies_post: %s\n" % e)

Parameters

Name Type Description Notes
content_type str [default to application/json]
accept str [default to application/json]
body PolicyRequest [optional]
x_org_id str [optional] [default to ]

Return type

PolicyWithDetails

Authorization

x-api-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

policies_put

Policy policies_put(id, body=body, x_org_id=x_org_id)

Update an existing Policy

This endpoint allows you to update a policy. Given the amount of configurable parameters required to update a Policy, we suggest you use the JumpCloud Admin Console to create new policies. ##### Sample Request curl -X PUT https://console.jumpcloud.com/api/v2/policies/59fced45c9118022172547ff \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY' \\ -d '{ {Policy_Parameters} }'

Example

from __future__ import print_function
import time
import jcapiv2
from jcapiv2.rest import ApiException
from pprint import pprint

# Configure API key authorization: x-api-key
configuration = jcapiv2.Configuration()
configuration.api_key['x-api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# create an instance of the API class
api_instance = jcapiv2.PoliciesApi(jcapiv2.ApiClient(configuration))
id = 'id_example' # str | ObjectID of the Policy object.
body = jcapiv2.PolicyRequest() # PolicyRequest |  (optional)
x_org_id = '' # str |  (optional) (default to )

try:
    # Update an existing Policy
    api_response = api_instance.policies_put(id, body=body, x_org_id=x_org_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PoliciesApi->policies_put: %s\n" % e)

Parameters

Name Type Description Notes
id str ObjectID of the Policy object.
body PolicyRequest [optional]
x_org_id str [optional] [default to ]

Return type

Policy

Authorization

x-api-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

policyresults_get

PolicyResult policyresults_get(id, content_type, accept, x_org_id=x_org_id)

Get a specific Policy Result.

This endpoint will return the policy results for a specific policy. ##### Sample Request curl -X GET https://console.jumpcloud.com/api/v2/policyresults/{Policy_ID} \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}'

Example

from __future__ import print_function
import time
import jcapiv2
from jcapiv2.rest import ApiException
from pprint import pprint

# Configure API key authorization: x-api-key
configuration = jcapiv2.Configuration()
configuration.api_key['x-api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# create an instance of the API class
api_instance = jcapiv2.PoliciesApi(jcapiv2.ApiClient(configuration))
id = 'id_example' # str | ObjectID of the Policy Result.
content_type = 'application/json' # str |  (default to application/json)
accept = 'application/json' # str |  (default to application/json)
x_org_id = '' # str |  (optional) (default to )

try:
    # Get a specific Policy Result.
    api_response = api_instance.policyresults_get(id, content_type, accept, x_org_id=x_org_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PoliciesApi->policyresults_get: %s\n" % e)

Parameters

Name Type Description Notes
id str ObjectID of the Policy Result.
content_type str [default to application/json]
accept str [default to application/json]
x_org_id str [optional] [default to ]

Return type

PolicyResult

Authorization

x-api-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

policyresults_list

list[PolicyResult] policyresults_list(policy_id, content_type, accept, fields=fields, filter=filter, limit=limit, x_org_id=x_org_id, skip=skip, sort=sort)

Lists all the policy results of a policy.

This endpoint returns all policies results for a specific policy. ##### Sample Request curl -X GET https://console.jumpcloud.com/api/v2/policies/{Policy_ID}/policyresults \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}'

Example

from __future__ import print_function
import time
import jcapiv2
from jcapiv2.rest import ApiException
from pprint import pprint

# Configure API key authorization: x-api-key
configuration = jcapiv2.Configuration()
configuration.api_key['x-api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# create an instance of the API class
api_instance = jcapiv2.PoliciesApi(jcapiv2.ApiClient(configuration))
policy_id = 'policy_id_example' # str | 
content_type = 'application/json' # str |  (default to application/json)
accept = 'application/json' # str |  (default to application/json)
fields = ['[]'] # list[str] | The comma separated fields included in the returned records. If omitted, the default list of fields will be returned.  (optional) (default to [])
filter = ['[]'] # list[str] | Supported operators are: eq, ne, gt, ge, lt, le, between, search, in (optional) (default to [])
limit = 10 # int | The number of records to return at once. Limited to 100. (optional) (default to 10)
x_org_id = '' # str |  (optional) (default to )
skip = 0 # int | The offset into the records to return. (optional) (default to 0)
sort = ['[]'] # list[str] | The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending.  (optional) (default to [])

try:
    # Lists all the policy results of a policy.
    api_response = api_instance.policyresults_list(policy_id, content_type, accept, fields=fields, filter=filter, limit=limit, x_org_id=x_org_id, skip=skip, sort=sort)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PoliciesApi->policyresults_list: %s\n" % e)

Parameters

Name Type Description Notes
policy_id str
content_type str [default to application/json]
accept str [default to application/json]
fields list[str] The comma separated fields included in the returned records. If omitted, the default list of fields will be returned. [optional] [default to []]
filter list[str] Supported operators are: eq, ne, gt, ge, lt, le, between, search, in [optional] [default to []]
limit int The number of records to return at once. Limited to 100. [optional] [default to 10]
x_org_id str [optional] [default to ]
skip int The offset into the records to return. [optional] [default to 0]
sort list[str] The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. [optional] [default to []]

Return type

list[PolicyResult]

Authorization

x-api-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

policyresults_org_list

list[PolicyResult] policyresults_org_list(content_type, accept, fields=fields, filter=filter, limit=limit, x_org_id=x_org_id, skip=skip, sort=sort)

Lists all the policy results for an organization.

This endpoint returns all policies results for an organization. ##### Sample Request curl -X GET https://console.jumpcloud.com/api/v2/policyresults \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}'

Example

from __future__ import print_function
import time
import jcapiv2
from jcapiv2.rest import ApiException
from pprint import pprint

# Configure API key authorization: x-api-key
configuration = jcapiv2.Configuration()
configuration.api_key['x-api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# create an instance of the API class
api_instance = jcapiv2.PoliciesApi(jcapiv2.ApiClient(configuration))
content_type = 'application/json' # str |  (default to application/json)
accept = 'application/json' # str |  (default to application/json)
fields = ['[]'] # list[str] | The comma separated fields included in the returned records. If omitted, the default list of fields will be returned.  (optional) (default to [])
filter = ['[]'] # list[str] | Supported operators are: eq, ne, gt, ge, lt, le, between, search, in (optional) (default to [])
limit = 10 # int | The number of records to return at once. Limited to 100. (optional) (default to 10)
x_org_id = '' # str |  (optional) (default to )
skip = 0 # int | The offset into the records to return. (optional) (default to 0)
sort = ['[]'] # list[str] | The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending.  (optional) (default to [])

try:
    # Lists all the policy results for an organization.
    api_response = api_instance.policyresults_org_list(content_type, accept, fields=fields, filter=filter, limit=limit, x_org_id=x_org_id, skip=skip, sort=sort)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PoliciesApi->policyresults_org_list: %s\n" % e)

Parameters

Name Type Description Notes
content_type str [default to application/json]
accept str [default to application/json]
fields list[str] The comma separated fields included in the returned records. If omitted, the default list of fields will be returned. [optional] [default to []]
filter list[str] Supported operators are: eq, ne, gt, ge, lt, le, between, search, in [optional] [default to []]
limit int The number of records to return at once. Limited to 100. [optional] [default to 10]
x_org_id str [optional] [default to ]
skip int The offset into the records to return. [optional] [default to 0]
sort list[str] The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. [optional] [default to []]

Return type

list[PolicyResult]

Authorization

x-api-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

policystatuses_list

list[PolicyResult] policystatuses_list(policy_id, content_type, accept, fields=fields, filter=filter, limit=limit, skip=skip, sort=sort, x_org_id=x_org_id)

Lists the latest policy results of a policy.

This endpoint returns the latest policies results for a specific policy. ##### Sample Request curl -X GET https://console.jumpcloud.com/api/v2/policies/{Policy_ID}/policystatuses \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}'

Example

from __future__ import print_function
import time
import jcapiv2
from jcapiv2.rest import ApiException
from pprint import pprint

# Configure API key authorization: x-api-key
configuration = jcapiv2.Configuration()
configuration.api_key['x-api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# create an instance of the API class
api_instance = jcapiv2.PoliciesApi(jcapiv2.ApiClient(configuration))
policy_id = 'policy_id_example' # str | 
content_type = 'application/json' # str |  (default to application/json)
accept = 'application/json' # str |  (default to application/json)
fields = ['[]'] # list[str] | The comma separated fields included in the returned records. If omitted, the default list of fields will be returned.  (optional) (default to [])
filter = ['[]'] # list[str] | Supported operators are: eq, ne, gt, ge, lt, le, between, search, in (optional) (default to [])
limit = 10 # int | The number of records to return at once. Limited to 100. (optional) (default to 10)
skip = 0 # int | The offset into the records to return. (optional) (default to 0)
sort = ['[]'] # list[str] | The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending.  (optional) (default to [])
x_org_id = '' # str |  (optional) (default to )

try:
    # Lists the latest policy results of a policy.
    api_response = api_instance.policystatuses_list(policy_id, content_type, accept, fields=fields, filter=filter, limit=limit, skip=skip, sort=sort, x_org_id=x_org_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PoliciesApi->policystatuses_list: %s\n" % e)

Parameters

Name Type Description Notes
policy_id str
content_type str [default to application/json]
accept str [default to application/json]
fields list[str] The comma separated fields included in the returned records. If omitted, the default list of fields will be returned. [optional] [default to []]
filter list[str] Supported operators are: eq, ne, gt, ge, lt, le, between, search, in [optional] [default to []]
limit int The number of records to return at once. Limited to 100. [optional] [default to 10]
skip int The offset into the records to return. [optional] [default to 0]
sort list[str] The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. [optional] [default to []]
x_org_id str [optional] [default to ]

Return type

list[PolicyResult]

Authorization

x-api-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

policystatuses_list_0

list[PolicyResult] policystatuses_list_0(system_id, content_type, accept, fields=fields, filter=filter, limit=limit, skip=skip, sort=sort, x_org_id=x_org_id)

List the policy statuses for a system

This endpoint returns the policy results for a particular system. ##### Sample Request curl -X GET https://console.jumpcloud.com/api/v2/systems/{System_ID}/policystatuses \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}'

Example

from __future__ import print_function
import time
import jcapiv2
from jcapiv2.rest import ApiException
from pprint import pprint

# Configure API key authorization: x-api-key
configuration = jcapiv2.Configuration()
configuration.api_key['x-api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# create an instance of the API class
api_instance = jcapiv2.PoliciesApi(jcapiv2.ApiClient(configuration))
system_id = 'system_id_example' # str | ObjectID of the System.
content_type = 'application/json' # str |  (default to application/json)
accept = 'application/json' # str |  (default to application/json)
fields = ['[]'] # list[str] | The comma separated fields included in the returned records. If omitted, the default list of fields will be returned.  (optional) (default to [])
filter = ['[]'] # list[str] | Supported operators are: eq, ne, gt, ge, lt, le, between, search, in (optional) (default to [])
limit = 10 # int | The number of records to return at once. Limited to 100. (optional) (default to 10)
skip = 0 # int | The offset into the records to return. (optional) (default to 0)
sort = ['[]'] # list[str] | The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending.  (optional) (default to [])
x_org_id = '' # str |  (optional) (default to )

try:
    # List the policy statuses for a system
    api_response = api_instance.policystatuses_list_0(system_id, content_type, accept, fields=fields, filter=filter, limit=limit, skip=skip, sort=sort, x_org_id=x_org_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PoliciesApi->policystatuses_list_0: %s\n" % e)

Parameters

Name Type Description Notes
system_id str ObjectID of the System.
content_type str [default to application/json]
accept str [default to application/json]
fields list[str] The comma separated fields included in the returned records. If omitted, the default list of fields will be returned. [optional] [default to []]
filter list[str] Supported operators are: eq, ne, gt, ge, lt, le, between, search, in [optional] [default to []]
limit int The number of records to return at once. Limited to 100. [optional] [default to 10]
skip int The offset into the records to return. [optional] [default to 0]
sort list[str] The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. [optional] [default to []]
x_org_id str [optional] [default to ]

Return type

list[PolicyResult]

Authorization

x-api-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

policytemplates_get

PolicyTemplateWithDetails policytemplates_get(id, content_type, accept, x_org_id=x_org_id)

Get a specific Policy Template

This endpoint returns a specific policy template. #### Sample Request curl -X GET https://console.jumpcloud.com/api/v2/policies/{Policy_ID}\\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}'

Example

from __future__ import print_function
import time
import jcapiv2
from jcapiv2.rest import ApiException
from pprint import pprint

# Configure API key authorization: x-api-key
configuration = jcapiv2.Configuration()
configuration.api_key['x-api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# create an instance of the API class
api_instance = jcapiv2.PoliciesApi(jcapiv2.ApiClient(configuration))
id = 'id_example' # str | ObjectID of the Policy Template.
content_type = 'application/json' # str |  (default to application/json)
accept = 'application/json' # str |  (default to application/json)
x_org_id = '' # str |  (optional) (default to )

try:
    # Get a specific Policy Template
    api_response = api_instance.policytemplates_get(id, content_type, accept, x_org_id=x_org_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PoliciesApi->policytemplates_get: %s\n" % e)

Parameters

Name Type Description Notes
id str ObjectID of the Policy Template.
content_type str [default to application/json]
accept str [default to application/json]
x_org_id str [optional] [default to ]

Return type

PolicyTemplateWithDetails

Authorization

x-api-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

policytemplates_list

list[PolicyTemplate] policytemplates_list(content_type, accept, fields=fields, filter=filter, limit=limit, skip=skip, sort=sort, x_org_id=x_org_id)

Lists all of the Policy Templates

This endpoint returns all policy templates. #### Sample Request curl -X GET https://console.jumpcloud.com/api/v2/policytemplates \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}'

Example

from __future__ import print_function
import time
import jcapiv2
from jcapiv2.rest import ApiException
from pprint import pprint

# Configure API key authorization: x-api-key
configuration = jcapiv2.Configuration()
configuration.api_key['x-api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# create an instance of the API class
api_instance = jcapiv2.PoliciesApi(jcapiv2.ApiClient(configuration))
content_type = 'application/json' # str |  (default to application/json)
accept = 'application/json' # str |  (default to application/json)
fields = ['[]'] # list[str] | The comma separated fields included in the returned records. If omitted, the default list of fields will be returned.  (optional) (default to [])
filter = ['[]'] # list[str] | Supported operators are: eq, ne, gt, ge, lt, le, between, search, in (optional) (default to [])
limit = 10 # int | The number of records to return at once. Limited to 100. (optional) (default to 10)
skip = 0 # int | The offset into the records to return. (optional) (default to 0)
sort = ['[]'] # list[str] | The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending.  (optional) (default to [])
x_org_id = '' # str |  (optional) (default to )

try:
    # Lists all of the Policy Templates
    api_response = api_instance.policytemplates_list(content_type, accept, fields=fields, filter=filter, limit=limit, skip=skip, sort=sort, x_org_id=x_org_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PoliciesApi->policytemplates_list: %s\n" % e)

Parameters

Name Type Description Notes
content_type str [default to application/json]
accept str [default to application/json]
fields list[str] The comma separated fields included in the returned records. If omitted, the default list of fields will be returned. [optional] [default to []]
filter list[str] Supported operators are: eq, ne, gt, ge, lt, le, between, search, in [optional] [default to []]
limit int The number of records to return at once. Limited to 100. [optional] [default to 10]
skip int The offset into the records to return. [optional] [default to 0]
sort list[str] The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. [optional] [default to []]
x_org_id str [optional] [default to ]

Return type

list[PolicyTemplate]

Authorization

x-api-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]