Skip to content

Latest commit

 

History

History
711 lines (499 loc) · 34.1 KB

PoliciesApi.md

File metadata and controls

711 lines (499 loc) · 34.1 KB

\PoliciesApi

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

Method HTTP request Description
GraphPolicyAssociationsList Get /policies/{policy_id}/associations List the associations of a Policy
GraphPolicyAssociationsPost Post /policies/{policy_id}/associations Manage the associations of a Policy
GraphPolicyTraverseSystem Get /policies/{policy_id}/systems List the Systems bound to a Policy
GraphPolicyTraverseSystemGroup Get /policies/{policy_id}/systemgroups List the System Groups bound to a Policy
PoliciesDelete Delete /policies/{id} Deletes a Policy
PoliciesGet Get /policies/{id} Gets a specific Policy.
PoliciesList Get /policies Lists all the Policies
PoliciesPost Post /policies Create a new Policy
PoliciesPut Put /policies/{id} Update an existing Policy
PolicyresultsGet Get /policyresults/{id} Get a specific Policy Result.
PolicyresultsList Get /policies/{policy_id}/policyresults Lists all the policy results of a policy.
PolicyresultsList_0 Get /policyresults Lists all the policy results for an organization.
PolicystatusesList Get /systems/{system_id}/policystatuses List the policy statuses for a system
PolicystatusesList_0 Get /policies/{policy_id}/policystatuses Lists the latest policy results of a policy.
PolicytemplatesGet Get /policytemplates/{id} Get a specific Policy Template
PolicytemplatesList Get /policytemplates Lists all of the Policy Templates

GraphPolicyAssociationsList

[]GraphConnection GraphPolicyAssociationsList(ctx, policyId, targets, contentType, accept, optional) 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}'

Required Parameters

Name Type Description Notes
ctx context.Context context for logging, tracing, authentication, etc.
policyId string ObjectID of the Policy.
targets []string
contentType string [default to application/json]
accept string [default to application/json]
optional map[string]interface{} optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a map[string]interface{}.

Name Type Description Notes
policyId string ObjectID of the Policy.
targets []string
contentType string [default to application/json]
accept string [default to application/json]
limit int32 The number of records to return at once. Limited to 100. [default to 10]
skip int32 The offset into the records to return. [default to 0]
xOrgId string [default to ]

Return type

[]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]

GraphPolicyAssociationsPost

GraphPolicyAssociationsPost(ctx, policyId, contentType, accept, optional) 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}\" }'

Required Parameters

Name Type Description Notes
ctx context.Context context for logging, tracing, authentication, etc.
policyId string ObjectID of the Policy.
contentType string [default to application/json]
accept string [default to application/json]
optional map[string]interface{} optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a map[string]interface{}.

Name Type Description Notes
policyId string ObjectID of the Policy.
contentType string [default to application/json]
accept string [default to application/json]
body GraphManagementReq
xOrgId string [default to ]

Return type

(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]

GraphPolicyTraverseSystem

[]GraphObjectWithPaths GraphPolicyTraverseSystem(ctx, policyId, contentType, accept, optional) 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}'

Required Parameters

Name Type Description Notes
ctx context.Context context for logging, tracing, authentication, etc.
policyId string ObjectID of the Command.
contentType string [default to application/json]
accept string [default to application/json]
optional map[string]interface{} optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a map[string]interface{}.

Name Type Description Notes
policyId string ObjectID of the Command.
contentType string [default to application/json]
accept string [default to application/json]
limit int32 The number of records to return at once. Limited to 100. [default to 10]
skip int32 The offset into the records to return. [default to 0]
xOrgId string [default to ]

Return type

[]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]

GraphPolicyTraverseSystemGroup

[]GraphObjectWithPaths GraphPolicyTraverseSystemGroup(ctx, policyId, contentType, accept, optional) 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}'

Required Parameters

Name Type Description Notes
ctx context.Context context for logging, tracing, authentication, etc.
policyId string ObjectID of the Command.
contentType string [default to application/json]
accept string [default to application/json]
optional map[string]interface{} optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a map[string]interface{}.

Name Type Description Notes
policyId string ObjectID of the Command.
contentType string [default to application/json]
accept string [default to application/json]
limit int32 The number of records to return at once. Limited to 100. [default to 10]
skip int32 The offset into the records to return. [default to 0]
xOrgId string [default to ]

Return type

[]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]

PoliciesDelete

PoliciesDelete(ctx, id, contentType, accept, optional) 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}'

Required Parameters

Name Type Description Notes
ctx context.Context context for logging, tracing, authentication, etc.
id string ObjectID of the Policy object.
contentType string [default to application/json]
accept string [default to application/json]
optional map[string]interface{} optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a map[string]interface{}.

Name Type Description Notes
id string ObjectID of the Policy object.
contentType string [default to application/json]
accept string [default to application/json]
xOrgId string [default to ]

Return type

(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]

PoliciesGet

PolicyWithDetails PoliciesGet(ctx, id, contentType, accept, optional) 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}'

Required Parameters

Name Type Description Notes
ctx context.Context context for logging, tracing, authentication, etc.
id string ObjectID of the Policy object.
contentType string [default to application/json]
accept string [default to application/json]
optional map[string]interface{} optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a map[string]interface{}.

Name Type Description Notes
id string ObjectID of the Policy object.
contentType string [default to application/json]
accept string [default to application/json]
xOrgId string [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]

PoliciesList

[]Policy PoliciesList(ctx, contentType, accept, optional) 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}'

Required Parameters

Name Type Description Notes
ctx context.Context context for logging, tracing, authentication, etc.
contentType string [default to application/json]
accept string [default to application/json]
optional map[string]interface{} optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a map[string]interface{}.

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

PoliciesPost

PolicyWithDetails PoliciesPost(ctx, contentType, accept, optional) 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} }'

Required Parameters

Name Type Description Notes
ctx context.Context context for logging, tracing, authentication, etc.
contentType string [default to application/json]
accept string [default to application/json]
optional map[string]interface{} optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a map[string]interface{}.

Name Type Description Notes
contentType string [default to application/json]
accept string [default to application/json]
body PolicyRequest
xOrgId string [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]

PoliciesPut

Policy PoliciesPut(ctx, id, optional) 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} }'

Required Parameters

Name Type Description Notes
ctx context.Context context for logging, tracing, authentication, etc.
id string ObjectID of the Policy object.
optional map[string]interface{} optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a map[string]interface{}.

Name Type Description Notes
id string ObjectID of the Policy object.
body PolicyRequest
xOrgId string [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]

PolicyresultsGet

PolicyResult PolicyresultsGet(ctx, id, contentType, accept, optional) 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}'

Required Parameters

Name Type Description Notes
ctx context.Context context for logging, tracing, authentication, etc.
id string ObjectID of the Policy Result.
contentType string [default to application/json]
accept string [default to application/json]
optional map[string]interface{} optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a map[string]interface{}.

Name Type Description Notes
id string ObjectID of the Policy Result.
contentType string [default to application/json]
accept string [default to application/json]
xOrgId string [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]

PolicyresultsList

[]PolicyResult PolicyresultsList(ctx, policyId, contentType, accept, optional) 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}'

Required Parameters

Name Type Description Notes
ctx context.Context context for logging, tracing, authentication, etc.
policyId string
contentType string [default to application/json]
accept string [default to application/json]
optional map[string]interface{} optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a map[string]interface{}.

Name Type Description Notes
policyId string
contentType string [default to application/json]
accept string [default to application/json]
fields []string The comma separated fields included in the returned records. If omitted the default list of fields will be returned.
filter []string Supported operators are: eq, ne, gt, ge, lt, le, between, search, in
limit int32 The number of records to return at once. Limited to 100. [default to 10]
skip int32 The offset into the records to return. [default to 0]
sort []string The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending.
aggregate []string
xOrgId string [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]

PolicyresultsList_0

[]PolicyResult PolicyresultsList_0(ctx, contentType, accept, optional) 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}'

Required Parameters

Name Type Description Notes
ctx context.Context context for logging, tracing, authentication, etc.
contentType string [default to application/json]
accept string [default to application/json]
optional map[string]interface{} optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a map[string]interface{}.

Name Type Description Notes
contentType string [default to application/json]
accept string [default to application/json]
aggregate []string
fields []string The comma separated fields included in the returned records. If omitted the default list of fields will be returned.
filter []string Supported operators are: eq, ne, gt, ge, lt, le, between, search, in
limit int32 The number of records to return at once. Limited to 100. [default to 10]
skip int32 The offset into the records to return. [default to 0]
sort []string The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending.
xOrgId string [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]

PolicystatusesList

[]PolicyResult PolicystatusesList(ctx, systemId, contentType, accept, optional) 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}'

Required Parameters

Name Type Description Notes
ctx context.Context context for logging, tracing, authentication, etc.
systemId string ObjectID of the System.
contentType string [default to application/json]
accept string [default to application/json]
optional map[string]interface{} optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a map[string]interface{}.

Name Type Description Notes
systemId string ObjectID of the System.
contentType string [default to application/json]
accept string [default to application/json]
fields []string The comma separated fields included in the returned records. If omitted the default list of fields will be returned.
filter []string Supported operators are: eq, ne, gt, ge, lt, le, between, search, in
limit int32 The number of records to return at once. Limited to 100. [default to 10]
skip int32 The offset into the records to return. [default to 0]
sort []string The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending.
xOrgId string [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]

PolicystatusesList_0

[]PolicyResult PolicystatusesList_0(ctx, policyId, contentType, accept, optional) 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}'

Required Parameters

Name Type Description Notes
ctx context.Context context for logging, tracing, authentication, etc.
policyId string
contentType string [default to application/json]
accept string [default to application/json]
optional map[string]interface{} optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a map[string]interface{}.

Name Type Description Notes
policyId string
contentType string [default to application/json]
accept string [default to application/json]
fields []string The comma separated fields included in the returned records. If omitted the default list of fields will be returned.
filter []string Supported operators are: eq, ne, gt, ge, lt, le, between, search, in
limit int32 The number of records to return at once. Limited to 100. [default to 10]
skip int32 The offset into the records to return. [default to 0]
sort []string The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending.
xOrgId string [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]

PolicytemplatesGet

PolicyTemplateWithDetails PolicytemplatesGet(ctx, id, contentType, accept, optional) 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}'

Required Parameters

Name Type Description Notes
ctx context.Context context for logging, tracing, authentication, etc.
id string ObjectID of the Policy Template.
contentType string [default to application/json]
accept string [default to application/json]
optional map[string]interface{} optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a map[string]interface{}.

Name Type Description Notes
id string ObjectID of the Policy Template.
contentType string [default to application/json]
accept string [default to application/json]
xOrgId string [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]

PolicytemplatesList

[]PolicyTemplate PolicytemplatesList(ctx, contentType, accept, optional) 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}'

Required Parameters

Name Type Description Notes
ctx context.Context context for logging, tracing, authentication, etc.
contentType string [default to application/json]
accept string [default to application/json]
optional map[string]interface{} optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a map[string]interface{}.

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

Return type

[]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]