Skip to content

Latest commit

 

History

History
235 lines (154 loc) · 12.9 KB

OrganizationsApi.md

File metadata and controls

235 lines (154 loc) · 12.9 KB

\OrganizationsApi

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

Method HTTP request Description
OrganizationList Get /organizations Get Organization Details
OrganizationPut Put /organizations/{id} Update an Organization
OrganizationsGet Get /organizations/{id} Get an Organization

OrganizationList

Organizationslist OrganizationList(ctx).Fields(fields).Filter(filter).Limit(limit).Search(search).Skip(skip).Sort(sort).SortIgnoreCase(sortIgnoreCase).Execute()

Get Organization Details

Example

package main

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

func main() {
    fields := "fields_example" // string | Use a space seperated string of field parameters to include the data in the response. If omitted, the default list of fields will be returned.  (optional)
    filter := "filter_example" // string | A filter to apply to the query. See the supported operators below. For more complex searches, see the related `/search/<domain>` endpoints, e.g. `/search/systems`.  **Filter structure**: `<field>:<operator>:<value>`.  **field** = Populate with a valid field from an endpoint response.  **operator** = Supported operators are: - `$eq` (equals) - `$ne` (does not equal) - `$gt` (is greater than) - `$gte` (is greater than or equal to) - `$lt` (is less than) - `$lte` (is less than or equal to)  _Note: v1 operators differ from v2 operators._  _Note: For v1 operators, excluding the `$` will result in undefined behavior._  **value** = Populate with the value you want to search for. Is case sensitive.  **Examples** - `GET /users?filter=username:$eq:testuser` - `GET /systemusers?filter=password_expiration_date:$lte:2021-10-24` - `GET /systemusers?filter=department:$ne:Accounting` - `GET /systems?filter[0]=firstname:$eq:foo&filter[1]=lastname:$eq:bar` - this will    AND the filters together. - `GET /systems?filter[or][0]=lastname:$eq:foo&filter[or][1]=lastname:$eq:bar` - this will    OR the filters together. (optional)
    limit := int32(56) // int32 | The number of records to return at once. Limited to 100. (optional) (default to 10)
    search := "search_example" // string | A nested object containing a `searchTerm` string or array of strings and a list of `fields` to search on. (optional)
    skip := int32(56) // int32 | The offset into the records to return. (optional) (default to 0)
    sort := "sort_example" // string | Use space separated sort parameters to sort the collection. Default sort is ascending. Prefix with `-` to sort descending.  (optional)
    sortIgnoreCase := "sortIgnoreCase_example" // string | Use space separated sort parameters to sort the collection, ignoring case. Default sort is ascending. Prefix with `-` to sort descending.  (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.OrganizationsApi.OrganizationList(context.Background()).Fields(fields).Filter(filter).Limit(limit).Search(search).Skip(skip).Sort(sort).SortIgnoreCase(sortIgnoreCase).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `OrganizationsApi.OrganizationList``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `OrganizationList`: Organizationslist
    fmt.Fprintf(os.Stdout, "Response from `OrganizationsApi.OrganizationList`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
fields string Use a space seperated string of field parameters to include the data in the response. If omitted, the default list of fields will be returned.
filter string A filter to apply to the query. See the supported operators below. For more complex searches, see the related `/search/<domain>` endpoints, e.g. `/search/systems`. Filter structure: `<field>:<operator>:<value>`. field = Populate with a valid field from an endpoint response. operator = Supported operators are: - `$eq` (equals) - `$ne` (does not equal) - `$gt` (is greater than) - `$gte` (is greater than or equal to) - `$lt` (is less than) - `$lte` (is less than or equal to) Note: v1 operators differ from v2 operators. Note: For v1 operators, excluding the `$` will result in undefined behavior. value = Populate with the value you want to search for. Is case sensitive. Examples - `GET /users?filter=username:$eq:testuser` - `GET /systemusers?filter=password_expiration_date:$lte:2021-10-24` - `GET /systemusers?filter=department:$ne:Accounting` - `GET /systems?filter[0]=firstname:$eq:foo&filter[1]=lastname:$eq:bar` - this will AND the filters together. - `GET /systems?filter[or][0]=lastname:$eq:foo&filter[or][1]=lastname:$eq:bar` - this will OR the filters together.
limit int32 The number of records to return at once. Limited to 100. [default to 10]
search string A nested object containing a `searchTerm` string or array of strings and a list of `fields` to search on.
skip int32 The offset into the records to return. [default to 0]
sort string Use space separated sort parameters to sort the collection. Default sort is ascending. Prefix with `-` to sort descending.
sortIgnoreCase string Use space separated sort parameters to sort the collection, ignoring case. Default sort is ascending. Prefix with `-` to sort descending.

Return type

Organizationslist

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]

OrganizationPut

Organization OrganizationPut(ctx, id).Body(body).Execute()

Update an Organization

Example

package main

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

func main() {
    id := "id_example" // string | 
    body := *openapiclient.NewOrganizationPutRequest() // OrganizationPutRequest |  (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.OrganizationsApi.OrganizationPut(context.Background(), id).Body(body).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `OrganizationsApi.OrganizationPut``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `OrganizationPut`: Organization
    fmt.Fprintf(os.Stdout, "Response from `OrganizationsApi.OrganizationPut`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string

Other Parameters

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

Name Type Description Notes

body | OrganizationPutRequest | |

Return type

Organization

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]

OrganizationsGet

Organization OrganizationsGet(ctx, id).Fields(fields).Filter(filter).Execute()

Get an Organization

Example

package main

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

func main() {
    id := "id_example" // string | 
    fields := "fields_example" // string | Use a space seperated string of field parameters to include the data in the response. If omitted, the default list of fields will be returned.  (optional)
    filter := "filter_example" // string | A filter to apply to the query. See the supported operators below. For more complex searches, see the related `/search/<domain>` endpoints, e.g. `/search/systems`.  **Filter structure**: `<field>:<operator>:<value>`.  **field** = Populate with a valid field from an endpoint response.  **operator** = Supported operators are: - `$eq` (equals) - `$ne` (does not equal) - `$gt` (is greater than) - `$gte` (is greater than or equal to) - `$lt` (is less than) - `$lte` (is less than or equal to)  _Note: v1 operators differ from v2 operators._  _Note: For v1 operators, excluding the `$` will result in undefined behavior._  **value** = Populate with the value you want to search for. Is case sensitive.  **Examples** - `GET /users?filter=username:$eq:testuser` - `GET /systemusers?filter=password_expiration_date:$lte:2021-10-24` - `GET /systemusers?filter=department:$ne:Accounting` - `GET /systems?filter[0]=firstname:$eq:foo&filter[1]=lastname:$eq:bar` - this will    AND the filters together. - `GET /systems?filter[or][0]=lastname:$eq:foo&filter[or][1]=lastname:$eq:bar` - this will    OR the filters together. (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.OrganizationsApi.OrganizationsGet(context.Background(), id).Fields(fields).Filter(filter).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `OrganizationsApi.OrganizationsGet``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `OrganizationsGet`: Organization
    fmt.Fprintf(os.Stdout, "Response from `OrganizationsApi.OrganizationsGet`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string

Other Parameters

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

Name Type Description Notes

fields | string | Use a space seperated string of field parameters to include the data in the response. If omitted, the default list of fields will be returned. | filter | string | A filter to apply to the query. See the supported operators below. For more complex searches, see the related `/search/<domain>` endpoints, e.g. `/search/systems`. Filter structure: `<field>:<operator>:<value>`. field = Populate with a valid field from an endpoint response. operator = Supported operators are: - `$eq` (equals) - `$ne` (does not equal) - `$gt` (is greater than) - `$gte` (is greater than or equal to) - `$lt` (is less than) - `$lte` (is less than or equal to) Note: v1 operators differ from v2 operators. Note: For v1 operators, excluding the `$` will result in undefined behavior. value = Populate with the value you want to search for. Is case sensitive. Examples - `GET /users?filter=username:$eq:testuser` - `GET /systemusers?filter=password_expiration_date:$lte:2021-10-24` - `GET /systemusers?filter=department:$ne:Accounting` - `GET /systems?filter[0]=firstname:$eq:foo&filter[1]=lastname:$eq:bar` - this will AND the filters together. - `GET /systems?filter[or][0]=lastname:$eq:foo&filter[or][1]=lastname:$eq:bar` - this will OR the filters together. |

Return type

Organization

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]