All URIs are relative to https://console.jumpcloud.com/api/v2
Method | HTTP request | Description |
---|---|---|
policytemplates_get | GET /policytemplates/{id} | Get a specific Policy Template |
policytemplates_list | GET /policytemplates | Lists all of the Policy Templates |
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}'
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.PolicytemplatesApi(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 PolicytemplatesApi->policytemplates_get: %s\n" % e)
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 ] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
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}'
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.PolicytemplatesApi(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 PolicytemplatesApi->policytemplates_list: %s\n" % e)
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 ] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]