Skip to content

Latest commit

 

History

History
239 lines (157 loc) · 9.56 KB

PolicyGroupMembersMembershipApi.md

File metadata and controls

239 lines (157 loc) · 9.56 KB

\PolicyGroupMembersMembershipApi

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

Method HTTP request Description
GraphPolicyGroupMembersList Get /policygroups/{group_id}/members List the members of a Policy Group
GraphPolicyGroupMembersPost Post /policygroups/{group_id}/members Manage the members of a Policy Group
GraphPolicyGroupMembership Get /policygroups/{group_id}/membership List the Policy Group's membership

GraphPolicyGroupMembersList

[]GraphConnection GraphPolicyGroupMembersList(ctx, groupId).Limit(limit).Skip(skip).XOrgId(xOrgId).Execute()

List the members of a Policy Group

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/conductorone/baton-jumpcloud/pkg/jcapi2"
)

func main() {
    groupId := "groupId_example" // string | ObjectID of the Policy Group.
    limit := int32(56) // int32 | The number of records to return at once. Limited to 100. (optional) (default to 10)
    skip := int32(56) // int32 | The offset into the records to return. (optional) (default to 0)
    xOrgId := "xOrgId_example" // string | Organization identifier that can be obtained from console settings. (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.PolicyGroupMembersMembershipApi.GraphPolicyGroupMembersList(context.Background(), groupId).Limit(limit).Skip(skip).XOrgId(xOrgId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `PolicyGroupMembersMembershipApi.GraphPolicyGroupMembersList``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GraphPolicyGroupMembersList`: []GraphConnection
    fmt.Fprintf(os.Stdout, "Response from `PolicyGroupMembersMembershipApi.GraphPolicyGroupMembersList`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
groupId string ObjectID of the Policy Group.

Other Parameters

Other parameters are passed through a pointer to a apiGraphPolicyGroupMembersListRequest struct via the builder pattern

Name Type Description Notes

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 | Organization identifier that can be obtained from console settings. |

Return type

[]GraphConnection

Authorization

x-api-key

HTTP request headers

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

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

GraphPolicyGroupMembersPost

GraphPolicyGroupMembersPost(ctx, groupId).XOrgId(xOrgId).Body(body).Execute()

Manage the members of a Policy Group

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/conductorone/baton-jumpcloud/pkg/jcapi2"
)

func main() {
    groupId := "groupId_example" // string | ObjectID of the Policy Group.
    xOrgId := "xOrgId_example" // string | Organization identifier that can be obtained from console settings. (optional)
    body := *openapiclient.NewGraphOperationPolicyGroupMember("Id_example", "Op_example", "Type_example") // GraphOperationPolicyGroupMember |  (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    r, err := apiClient.PolicyGroupMembersMembershipApi.GraphPolicyGroupMembersPost(context.Background(), groupId).XOrgId(xOrgId).Body(body).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `PolicyGroupMembersMembershipApi.GraphPolicyGroupMembersPost``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
groupId string ObjectID of the Policy Group.

Other Parameters

Other parameters are passed through a pointer to a apiGraphPolicyGroupMembersPostRequest struct via the builder pattern

Name Type Description Notes

xOrgId | string | Organization identifier that can be obtained from console settings. | body | GraphOperationPolicyGroupMember | |

Return type

(empty response body)

Authorization

x-api-key

HTTP request headers

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

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

GraphPolicyGroupMembership

[]GraphObjectWithPaths GraphPolicyGroupMembership(ctx, groupId).Filter(filter).Limit(limit).Skip(skip).Sort(sort).XOrgId(xOrgId).Execute()

List the Policy Group's membership

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/conductorone/baton-jumpcloud/pkg/jcapi2"
)

func main() {
    groupId := "groupId_example" // string | ObjectID of the Policy Group.
    filter := []string{"Inner_example"} // []string | A filter to apply to the query.  **Filter structure**: `<field>:<operator>:<value>`.  **field** = Populate with a valid field from an endpoint response.  **operator** =  Supported operators are: eq, ne, gt, ge, lt, le, between, search, in. _Note: v1 operators differ from v2 operators._  **value** = Populate with the value you want to search for. Is case sensitive. Supports wild cards.  **EX:** `GET /api/v2/groups?filter=name:eq:Test+Group` (optional) (default to [])
    limit := int32(56) // int32 | The number of records to return at once. Limited to 100. (optional) (default to 10)
    skip := int32(56) // int32 | The offset into the records to return. (optional) (default to 0)
    sort := []string{"Inner_example"} // []string | The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending.  (optional) (default to [])
    xOrgId := "xOrgId_example" // string | Organization identifier that can be obtained from console settings. (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.PolicyGroupMembersMembershipApi.GraphPolicyGroupMembership(context.Background(), groupId).Filter(filter).Limit(limit).Skip(skip).Sort(sort).XOrgId(xOrgId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `PolicyGroupMembersMembershipApi.GraphPolicyGroupMembership``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GraphPolicyGroupMembership`: []GraphObjectWithPaths
    fmt.Fprintf(os.Stdout, "Response from `PolicyGroupMembersMembershipApi.GraphPolicyGroupMembership`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
groupId string ObjectID of the Policy Group.

Other Parameters

Other parameters are passed through a pointer to a apiGraphPolicyGroupMembershipRequest struct via the builder pattern

Name Type Description Notes

filter | []string | A filter to apply to the query. Filter structure: `<field>:<operator>:<value>`. field = Populate with a valid field from an endpoint response. operator = Supported operators are: eq, ne, gt, ge, lt, le, between, search, in. Note: v1 operators differ from v2 operators. value = Populate with the value you want to search for. Is case sensitive. Supports wild cards. EX: `GET /api/v2/groups?filter=name:eq:Test+Group` | [default to []] 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. | [default to []] xOrgId | string | Organization identifier that can be obtained from console settings. |

Return type

[]GraphObjectWithPaths

Authorization

x-api-key

HTTP request headers

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

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