# AdminApi

## Used to retrieve an authentication token for NexPort API Requests.

> Used to retrieve an authentication token for NexPort API Requests.> \
> Will not work for system operators or users with the customer service role.> \
> The client makes a request to the token endpoint by adding the> \
> following parameters using the "application/x-www-form-urlencoded"> \
> format per Appendix B with a character encoding of UTF-8 in the HTTP> \
> request entity-body.

```json
{"openapi":"3.1.1","info":{"title":"NexPort Web API","version":"v1"},"servers":[{"url":"https://www.nexportcampus.com"}],"paths":{"/api/v1/AdminApi/Authenticate":{"post":{"tags":["AdminApi"],"summary":"Used to retrieve an authentication token for NexPort API Requests.","description":"Used to retrieve an authentication token for NexPort API Requests.\r\nWill not work for system operators or users with the customer service role.\r\nThe client makes a request to the token endpoint by adding the\r\nfollowing parameters using the \"application/x-www-form-urlencoded\"\r\nformat per Appendix B with a character encoding of UTF-8 in the HTTP\r\nrequest entity-body.","operationId":"AdminApi_Authenticate","responses":{"200":{"description":"Authentication Token Information","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthenticationTokenResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/AuthenticationTokenResponse"}}}},"403":{"description":"Unable to authenticate","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"422":{"description":"Validation exception. See response body for more info.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthenticationTokenRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/AuthenticationTokenRequest"}}},"description":"Contains user's NexPort login credentials","required":true}}}},"components":{"schemas":{"AuthenticationTokenResponse":{"title":"AuthenticationTokenResponse","description":" Should conform to RFC 6750 Section 4 https://tools.ietf.org/html/rfc6750#section-4\r\n and https://tools.ietf.org/html/rfc6749#section-4.2.2\r\n If the resource owner grants the access request, the authorization\r\n server issues an access token and delivers it to the client by adding\r\nthe following parameters to the fragment component of the redirection\r\nURI using the \"application/x-www-form-urlencoded\" format, per\r\nAppendix B:","default":{"access_token":"12345678-1234-5678-9abc-123456789abc","token_type":"bearer","expires_in":3600,"api_error_entity":{"error_code":0,"warning_messages":[]}},"required":["access_token","token_type","api_error_entity"],"type":"object","properties":{"access_token":{"format":"uuid","description":"REQUIRED.  The access token issued by the authorization server.","type":"string"},"token_type":{"description":"  REQUIRED.  The type of the token issued as described in\r\nSection 7.1.  Value is case insensitive.","type":"string"},"expires_in":{"format":"int32","description":" RECOMMENDED.  The lifetime in seconds of the access token.  For\r\nexample, the value \"3600\" denotes that the access token will\r\nexpire in one hour from the time the response was generated.\r\nIf omitted, the authorization server SHOULD provide the\r\nexpiration time via other means or document the default value.\r\nThis field will be excluded from the response if the client provides\r\na specific expiration date in the request.","type":"integer"},"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"ApiErrorEntity":{"description":"Model used to determine what, if anything, went wrong with an api request","required":["error_code"],"type":"object","properties":{"error_code":{"format":"int32","description":"Used to denote the kind of error that occurred, if any.\r\nNoError=0;\r\nUnknownError=1;\r\nValidationError=2;\r\nItemNotFound=3;\r\nAuthenticationError=4;\r\nAuthorizationError=5;0 = No Error, 1 = Unknown Error, 2 = Validation Error, 3 = Item Not Found, 4 = Authentication Error, 5 = Authorization Error, 6 = Subscription Not Found, 7 = Enrollment Already Exists, 8 = Subscription Already Exists","enum":[0,1,2,3,4,5,6,7,8],"type":"integer"},"error_message":{"description":"Message describing what caused the error to occur","type":"string"},"warning_messages":{"description":"Warning messages describing any  potential problems with the request that do not cause the request to fail","type":"array","items":{"type":"string"},"readOnly":true}}},"ApiResponseBase":{"title":"NexPort API Response","description":"Base class for api responses","default":{"api_error_entity":{"error_code":3,"error_message":"No entity found matching id in request","warning_messages":[]}},"required":["api_error_entity"],"type":"object","properties":{"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"AuthenticationTokenRequest":{"description":"Contains information for obtaining an authentication token","default":{"username":"username","password":"password","grant_type":"password","scope":"unused","utc_expiration_date":"2026-05-26T01:56:25.28112Z"},"required":["username","password","grant_type"],"type":"object","properties":{"username":{"description":"Username for user requesting token","type":"string"},"password":{"description":"Password for user requesting token","type":"string"},"grant_type":{"description":"Only \"password\" is supported currently","type":"string"},"scope":{"description":"Scope of the access request","type":"string"},"utc_expiration_date":{"format":"date-time","description":"Optional expiration date for the token (set to null for no expiration)","type":"string"}}}}}}
```

## GET /api/v1/AdminApi/ValidateAccessToken

> Used to determine whether an access token is valid or not. Returns either the expiration date or> \
> a message describing why the token is invalid. If there is no expiration on the token, then> \
> it will just return the generic api\_error\_entity with the no error error code.

```json
{"openapi":"3.1.1","info":{"title":"NexPort Web API","version":"v1"},"servers":[{"url":"https://www.nexportcampus.com"}],"paths":{"/api/v1/AdminApi/ValidateAccessToken":{"get":{"tags":["AdminApi"],"summary":"Used to determine whether an access token is valid or not. Returns either the expiration date or\r\na message describing why the token is invalid. If there is no expiration on the token, then\r\nit will just return the generic api_error_entity with the no error error code.","operationId":"AdminApi_ValidateAccessToken","parameters":[{"schema":{"type":"string","format":"uuid"},"name":"access_token","in":"query","required":true}],"responses":{"200":{"description":"Validation results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateAccessTokenResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/ValidateAccessTokenResponse"}}}},"422":{"description":"Validation exception. See response body for more info.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}}}}}},"components":{"schemas":{"ValidateAccessTokenResponse":{"title":"ValidateAccessTokenResponse","description":"Contains token expiration date or error message if the token is expired or invalid","default":{"utc_expiration_date":"2015-12-25T19:25:24.731+00:00","error_message":"Token expired","api_error_entity":{"error_code":0,"warning_messages":[]}},"required":["api_error_entity"],"type":"object","properties":{"utc_expiration_date":{"format":"date-time","description":"When the token expires or null if it is already expired or invalid\r\n(or if the token never expires, in which case ErrorMessage will also be empty)","type":"string"},"error_message":{"description":"Message describing why the token cannot be used, if applicable","type":"string"},"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"ApiErrorEntity":{"description":"Model used to determine what, if anything, went wrong with an api request","required":["error_code"],"type":"object","properties":{"error_code":{"format":"int32","description":"Used to denote the kind of error that occurred, if any.\r\nNoError=0;\r\nUnknownError=1;\r\nValidationError=2;\r\nItemNotFound=3;\r\nAuthenticationError=4;\r\nAuthorizationError=5;0 = No Error, 1 = Unknown Error, 2 = Validation Error, 3 = Item Not Found, 4 = Authentication Error, 5 = Authorization Error, 6 = Subscription Not Found, 7 = Enrollment Already Exists, 8 = Subscription Already Exists","enum":[0,1,2,3,4,5,6,7,8],"type":"integer"},"error_message":{"description":"Message describing what caused the error to occur","type":"string"},"warning_messages":{"description":"Warning messages describing any  potential problems with the request that do not cause the request to fail","type":"array","items":{"type":"string"},"readOnly":true}}},"ApiResponseBase":{"title":"NexPort API Response","description":"Base class for api responses","default":{"api_error_entity":{"error_code":3,"error_message":"No entity found matching id in request","warning_messages":[]}},"required":["api_error_entity"],"type":"object","properties":{"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}}}}}
```

## POST /api/v1/AdminApi/CreateUser

> Creates a user with the information specified by request. Requires the Create Users permission> \
> in the specified owner org or any ancestors.

```json
{"openapi":"3.1.1","info":{"title":"NexPort Web API","version":"v1"},"servers":[{"url":"https://www.nexportcampus.com"}],"paths":{"/api/v1/AdminApi/CreateUser":{"post":{"tags":["AdminApi"],"summary":"Creates a user with the information specified by request. Requires the Create Users permission\r\nin the specified owner org or any ancestors.","operationId":"AdminApi_CreateUser","parameters":[{"schema":{"type":"string"},"name":"access_token","in":"query","description":"Use the AdminApi Authenticate method to get the access_token","required":true}],"responses":{"200":{"description":"Id of created user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/CreateUserResponse"}}}},"403":{"description":"Not authorized to create a user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"409":{"description":"Entity not found or duplicate login","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"422":{"description":"Validation exception","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/CreateUserRequest"}}},"description":"This holds all the user information (name, email, etc.) for the new user","required":true}}}},"components":{"schemas":{"CreateUserResponse":{"title":"CreateUserResponse","description":"Contains the id of the user created by the CreateUser web api method","default":{"user_id":"12345678-1234-5678-9abc-123456789abc","api_error_entity":{"error_code":0,"warning_messages":[]}},"required":["user_id","api_error_entity"],"type":"object","properties":{"user_id":{"format":"uuid","description":"Id of the created user","type":"string"},"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"ApiErrorEntity":{"description":"Model used to determine what, if anything, went wrong with an api request","required":["error_code"],"type":"object","properties":{"error_code":{"format":"int32","description":"Used to denote the kind of error that occurred, if any.\r\nNoError=0;\r\nUnknownError=1;\r\nValidationError=2;\r\nItemNotFound=3;\r\nAuthenticationError=4;\r\nAuthorizationError=5;0 = No Error, 1 = Unknown Error, 2 = Validation Error, 3 = Item Not Found, 4 = Authentication Error, 5 = Authorization Error, 6 = Subscription Not Found, 7 = Enrollment Already Exists, 8 = Subscription Already Exists","enum":[0,1,2,3,4,5,6,7,8],"type":"integer"},"error_message":{"description":"Message describing what caused the error to occur","type":"string"},"warning_messages":{"description":"Warning messages describing any  potential problems with the request that do not cause the request to fail","type":"array","items":{"type":"string"},"readOnly":true}}},"ApiResponseBase":{"title":"NexPort API Response","description":"Base class for api responses","default":{"api_error_entity":{"error_code":3,"error_message":"No entity found matching id in request","warning_messages":[]}},"required":["api_error_entity"],"type":"object","properties":{"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"CreateUserRequest":{"description":"Contains fields for creating a new user","required":["owner_org_id","login","password","first_name","last_name"],"type":"object","properties":{"owner_org_id":{"format":"uuid","description":"Id of the user's owner organization","type":"string"},"login":{"description":"The login for this account","type":"string"},"password":{"description":"The password for this account","type":"string"},"first_name":{"description":"First name of the user","type":"string"},"middle_name":{"description":"Middle name of the user","type":"string"},"last_name":{"description":"Last name of the user","type":"string"},"email":{"description":"Email address of the user","type":"string"},"title":{"description":"User's title prefix","type":"string"},"nickname":{"description":"User's nickname","type":"string"},"contact_info":{"$ref":"#/components/schemas/UserContactInfoRequest","description":"User's contact info"}}},"UserContactInfoRequest":{"description":"Inherits all fields from UserContactInfoBase, used in EditUser api method.","required":["api_error_entity"],"type":"object","properties":{"address_line_1":{"description":"First line of user's address","type":"string"},"address_line_2":{"description":"Second line of user's address","type":"string"},"city":{"description":"User's city","type":"string"},"state":{"description":"User's state","type":"string"},"country":{"description":"User's country","type":"string"},"postal_code":{"description":"User's postal code","type":"string"},"phone":{"description":"User's phone number","type":"string"},"mobile":{"description":"User's mobile phone number","type":"string"},"fax":{"description":"User's fax number","type":"string"},"caption":{"description":"Caption","type":"string"},"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}}}}}
```

## GET /api/v1/AdminApi/GetUser

> Gets a user based on login string OR user id. Requires the View Users permission in either the user's> \
> owner org, its ancestors, or any of the user's subscription organizations, or their ancestors.

```json
{"openapi":"3.1.1","info":{"title":"NexPort Web API","version":"v1"},"servers":[{"url":"https://www.nexportcampus.com"}],"paths":{"/api/v1/AdminApi/GetUser":{"get":{"tags":["AdminApi"],"summary":"Gets a user based on login string OR user id. Requires the View Users permission in either the user's\r\nowner org, its ancestors, or any of the user's subscription organizations, or their ancestors.","operationId":"AdminApi_GetUser","parameters":[{"schema":{"type":"string"},"name":"login","in":"query","description":"Login of the user to get","required":false},{"schema":{"type":"string","format":"uuid"},"name":"user_id","in":"query","required":false},{"schema":{"type":"string"},"name":"access_token","in":"query","description":"Use the AdminApi Authenticate method to get the access_token","required":true}],"responses":{"200":{"description":"User information","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetUserResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/GetUserResponse"}}}},"403":{"description":"Not authorized to view users","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"409":{"description":"Entity not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"422":{"description":"Validation exception","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}}}}}},"components":{"schemas":{"GetUserResponse":{"title":"GetUserResponse","description":"Contains user information","default":{"id":"12345678-1234-5678-9abc-123456789abc","user_id":"12345678-1234-5678-9abc-123456789abc","owner_org_id":"12345678-1234-5678-9abc-123456789abc","owner_org_short_name":"testorg","last_name":"lname","middle_name":"mname","first_name":"fname","email":"email@test.com","internal-email":"email@test.com","title":"Mr.","nickname":"Bobby","api_error_entity":{"error_code":0,"warning_messages":[]}},"required":["user_id","last_name","first_name","api_error_entity"],"type":"object","properties":{"user_id":{"format":"uuid","description":"Id of the user","type":"string"},"owner_org_id":{"format":"uuid","description":"Id of the user's owner organization","type":"string"},"owner_org_short_name":{"description":"Short name of the user's owner organization","type":"string"},"last_name":{"description":"Last name of the user","type":"string"},"middle_name":{"description":"Middle name of the user","type":"string"},"first_name":{"description":"First name of the user","type":"string"},"email":{"description":"Email address of the user","type":"string"},"internal-email":{"description":"Email address used for internal communications within NexPort Campus","type":"string"},"title":{"description":"User's title prefix","type":"string"},"nickname":{"description":"User's nickname","type":"string"},"owner_org_name":{"description":"Full name of the owner org","type":"string"},"owner_org":{"$ref":"#/components/schemas/OrganizationResponseItem","description":"User's Owner Organization"},"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"OrganizationResponseItem":{"title":"OrganizationResponseItem","description":"Contains organization name, short name, and custom fields","default":{"id":"12345678-1234-5678-9abc-123456789abc","org_id":"12345678-1234-5678-9abc-123456789abc","name":"Test Organization","short_name":"testorg","api_error_entity":{"error_code":0,"warning_messages":[]}},"required":["org_id","name","short_name","api_error_entity"],"type":"object","properties":{"org_id":{"format":"uuid","description":"Id of the organization","type":"string"},"name":{"description":"Name of the organization","type":"string"},"short_name":{"description":"Short name of the organization","type":"string"},"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"ApiErrorEntity":{"description":"Model used to determine what, if anything, went wrong with an api request","required":["error_code"],"type":"object","properties":{"error_code":{"format":"int32","description":"Used to denote the kind of error that occurred, if any.\r\nNoError=0;\r\nUnknownError=1;\r\nValidationError=2;\r\nItemNotFound=3;\r\nAuthenticationError=4;\r\nAuthorizationError=5;0 = No Error, 1 = Unknown Error, 2 = Validation Error, 3 = Item Not Found, 4 = Authentication Error, 5 = Authorization Error, 6 = Subscription Not Found, 7 = Enrollment Already Exists, 8 = Subscription Already Exists","enum":[0,1,2,3,4,5,6,7,8],"type":"integer"},"error_message":{"description":"Message describing what caused the error to occur","type":"string"},"warning_messages":{"description":"Warning messages describing any  potential problems with the request that do not cause the request to fail","type":"array","items":{"type":"string"},"readOnly":true}}},"ApiResponseBase":{"title":"NexPort API Response","description":"Base class for api responses","default":{"api_error_entity":{"error_code":3,"error_message":"No entity found matching id in request","warning_messages":[]}},"required":["api_error_entity"],"type":"object","properties":{"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}}}}}
```

## GET /api/v1/AdminApi/AuthenticateUser

> Validates a user's login/password combination and returns a user response. The calling account must have the view users permision in the user's owner org or one of their subscription orgs.

```json
{"openapi":"3.1.1","info":{"title":"NexPort Web API","version":"v1"},"servers":[{"url":"https://www.nexportcampus.com"}],"paths":{"/api/v1/AdminApi/AuthenticateUser":{"get":{"tags":["AdminApi"],"summary":"Validates a user's login/password combination and returns a user response. The calling account must have the view users permision in the user's owner org or one of their subscription orgs.","operationId":"AdminApi_AuthenticateUser","parameters":[{"schema":{"type":"string"},"name":"login","in":"query","description":"User's nexport username","required":true},{"schema":{"type":"string"},"name":"password","in":"query","description":"User's password","required":true},{"schema":{"type":"string"},"name":"access_token","in":"query","description":"Use the AdminApi Authenticate method to get the access_token","required":true}],"responses":{"200":{"description":"User information","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetUserResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/GetUserResponse"}}}},"403":{"description":"Not authorized to view users","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"409":{"description":"Entity not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"422":{"description":"Validation exception","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}}}}}},"components":{"schemas":{"GetUserResponse":{"title":"GetUserResponse","description":"Contains user information","default":{"id":"12345678-1234-5678-9abc-123456789abc","user_id":"12345678-1234-5678-9abc-123456789abc","owner_org_id":"12345678-1234-5678-9abc-123456789abc","owner_org_short_name":"testorg","last_name":"lname","middle_name":"mname","first_name":"fname","email":"email@test.com","internal-email":"email@test.com","title":"Mr.","nickname":"Bobby","api_error_entity":{"error_code":0,"warning_messages":[]}},"required":["user_id","last_name","first_name","api_error_entity"],"type":"object","properties":{"user_id":{"format":"uuid","description":"Id of the user","type":"string"},"owner_org_id":{"format":"uuid","description":"Id of the user's owner organization","type":"string"},"owner_org_short_name":{"description":"Short name of the user's owner organization","type":"string"},"last_name":{"description":"Last name of the user","type":"string"},"middle_name":{"description":"Middle name of the user","type":"string"},"first_name":{"description":"First name of the user","type":"string"},"email":{"description":"Email address of the user","type":"string"},"internal-email":{"description":"Email address used for internal communications within NexPort Campus","type":"string"},"title":{"description":"User's title prefix","type":"string"},"nickname":{"description":"User's nickname","type":"string"},"owner_org_name":{"description":"Full name of the owner org","type":"string"},"owner_org":{"$ref":"#/components/schemas/OrganizationResponseItem","description":"User's Owner Organization"},"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"OrganizationResponseItem":{"title":"OrganizationResponseItem","description":"Contains organization name, short name, and custom fields","default":{"id":"12345678-1234-5678-9abc-123456789abc","org_id":"12345678-1234-5678-9abc-123456789abc","name":"Test Organization","short_name":"testorg","api_error_entity":{"error_code":0,"warning_messages":[]}},"required":["org_id","name","short_name","api_error_entity"],"type":"object","properties":{"org_id":{"format":"uuid","description":"Id of the organization","type":"string"},"name":{"description":"Name of the organization","type":"string"},"short_name":{"description":"Short name of the organization","type":"string"},"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"ApiErrorEntity":{"description":"Model used to determine what, if anything, went wrong with an api request","required":["error_code"],"type":"object","properties":{"error_code":{"format":"int32","description":"Used to denote the kind of error that occurred, if any.\r\nNoError=0;\r\nUnknownError=1;\r\nValidationError=2;\r\nItemNotFound=3;\r\nAuthenticationError=4;\r\nAuthorizationError=5;0 = No Error, 1 = Unknown Error, 2 = Validation Error, 3 = Item Not Found, 4 = Authentication Error, 5 = Authorization Error, 6 = Subscription Not Found, 7 = Enrollment Already Exists, 8 = Subscription Already Exists","enum":[0,1,2,3,4,5,6,7,8],"type":"integer"},"error_message":{"description":"Message describing what caused the error to occur","type":"string"},"warning_messages":{"description":"Warning messages describing any  potential problems with the request that do not cause the request to fail","type":"array","items":{"type":"string"},"readOnly":true}}},"ApiResponseBase":{"title":"NexPort API Response","description":"Base class for api responses","default":{"api_error_entity":{"error_code":3,"error_message":"No entity found matching id in request","warning_messages":[]}},"required":["api_error_entity"],"type":"object","properties":{"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}}}}}
```

## GET /api/v1/AdminApi/GetUsers

> Returns all the users with at least a partial match to the search term as part of their login,> \
> first name, last name, or email. Sorted by last name, first name, then login, in alphabetical order.> \
> This will only search in organizations in which the method caller has the appropriate permissions.> \
> Requires the View Users permission.

```json
{"openapi":"3.1.1","info":{"title":"NexPort Web API","version":"v1"},"servers":[{"url":"https://www.nexportcampus.com"}],"paths":{"/api/v1/AdminApi/GetUsers":{"get":{"tags":["AdminApi"],"summary":"Returns all the users with at least a partial match to the search term as part of their login,\r\nfirst name, last name, or email. Sorted by last name, first name, then login, in alphabetical order.\r\nThis will only search in organizations in which the method caller has the appropriate permissions.\r\nRequires the View Users permission.","operationId":"AdminApi_GetUsers","parameters":[{"schema":{"type":"string"},"name":"search_term","in":"query","required":false},{"schema":{"type":"integer","format":"int32"},"name":"page","in":"query","description":"Which page of results to start on","required":false},{"schema":{"type":"integer","format":"int32"},"name":"per_page","in":"query","required":false},{"schema":{"type":"string"},"name":"access_token","in":"query","description":"Use the AdminApi Authenticate method to get the access_token","required":true}],"responses":{"200":{"description":"List of users","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GetUserResponse"}}},"text/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GetUserResponse"}}}}},"403":{"description":"Not authorized to view users","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"422":{"description":"Validation exception. See response body for more info.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}}}}}},"components":{"schemas":{"GetUserResponse":{"title":"GetUserResponse","description":"Contains user information","default":{"id":"12345678-1234-5678-9abc-123456789abc","user_id":"12345678-1234-5678-9abc-123456789abc","owner_org_id":"12345678-1234-5678-9abc-123456789abc","owner_org_short_name":"testorg","last_name":"lname","middle_name":"mname","first_name":"fname","email":"email@test.com","internal-email":"email@test.com","title":"Mr.","nickname":"Bobby","api_error_entity":{"error_code":0,"warning_messages":[]}},"required":["user_id","last_name","first_name","api_error_entity"],"type":"object","properties":{"user_id":{"format":"uuid","description":"Id of the user","type":"string"},"owner_org_id":{"format":"uuid","description":"Id of the user's owner organization","type":"string"},"owner_org_short_name":{"description":"Short name of the user's owner organization","type":"string"},"last_name":{"description":"Last name of the user","type":"string"},"middle_name":{"description":"Middle name of the user","type":"string"},"first_name":{"description":"First name of the user","type":"string"},"email":{"description":"Email address of the user","type":"string"},"internal-email":{"description":"Email address used for internal communications within NexPort Campus","type":"string"},"title":{"description":"User's title prefix","type":"string"},"nickname":{"description":"User's nickname","type":"string"},"owner_org_name":{"description":"Full name of the owner org","type":"string"},"owner_org":{"$ref":"#/components/schemas/OrganizationResponseItem","description":"User's Owner Organization"},"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"OrganizationResponseItem":{"title":"OrganizationResponseItem","description":"Contains organization name, short name, and custom fields","default":{"id":"12345678-1234-5678-9abc-123456789abc","org_id":"12345678-1234-5678-9abc-123456789abc","name":"Test Organization","short_name":"testorg","api_error_entity":{"error_code":0,"warning_messages":[]}},"required":["org_id","name","short_name","api_error_entity"],"type":"object","properties":{"org_id":{"format":"uuid","description":"Id of the organization","type":"string"},"name":{"description":"Name of the organization","type":"string"},"short_name":{"description":"Short name of the organization","type":"string"},"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"ApiErrorEntity":{"description":"Model used to determine what, if anything, went wrong with an api request","required":["error_code"],"type":"object","properties":{"error_code":{"format":"int32","description":"Used to denote the kind of error that occurred, if any.\r\nNoError=0;\r\nUnknownError=1;\r\nValidationError=2;\r\nItemNotFound=3;\r\nAuthenticationError=4;\r\nAuthorizationError=5;0 = No Error, 1 = Unknown Error, 2 = Validation Error, 3 = Item Not Found, 4 = Authentication Error, 5 = Authorization Error, 6 = Subscription Not Found, 7 = Enrollment Already Exists, 8 = Subscription Already Exists","enum":[0,1,2,3,4,5,6,7,8],"type":"integer"},"error_message":{"description":"Message describing what caused the error to occur","type":"string"},"warning_messages":{"description":"Warning messages describing any  potential problems with the request that do not cause the request to fail","type":"array","items":{"type":"string"},"readOnly":true}}},"ApiResponseBase":{"title":"NexPort API Response","description":"Base class for api responses","default":{"api_error_entity":{"error_code":3,"error_message":"No entity found matching id in request","warning_messages":[]}},"required":["api_error_entity"],"type":"object","properties":{"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}}}}}
```

## GET /api/v1/AdminApi/GetUserContactInformation

> Get contact information for a user based on their user id or their login. Throws a ValidationException> \
> if both user\_id and login fields are present.> \
> Requires the View User Profiles permission in either the user's owner org, its ancestors, or any of the> \
> user's subscription organizations, or their ancestors.

```json
{"openapi":"3.1.1","info":{"title":"NexPort Web API","version":"v1"},"servers":[{"url":"https://www.nexportcampus.com"}],"paths":{"/api/v1/AdminApi/GetUserContactInformation":{"get":{"tags":["AdminApi"],"summary":"Get contact information for a user based on their user id or their login. Throws a ValidationException\r\nif both user_id and login fields are present.\r\nRequires the View User Profiles permission in either the user's owner org, its ancestors, or any of the\r\nuser's subscription organizations, or their ancestors.","operationId":"AdminApi_GetUserContactInformation","parameters":[{"schema":{"type":"string","format":"uuid"},"name":"user_id","in":"query","required":false},{"schema":{"type":"string"},"name":"login","in":"query","description":"Login of the user to get the contact information for","required":false},{"schema":{"type":"string"},"name":"access_token","in":"query","description":"Use the AdminApi Authenticate method to get the access_token","required":true}],"responses":{"200":{"description":"Address and contact information","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserContactInfoResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/UserContactInfoResponse"}}}},"403":{"description":"Not authorized to view user contact information","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"409":{"description":"Entity not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"422":{"description":"Validation exception","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}}}}}},"components":{"schemas":{"UserContactInfoResponse":{"title":"UserContactInfoResponse","description":"Inherits all fields from UserContactInfoBase, used in GetUserContactInfo api method.","default":{"user_id":"12345678-1234-5678-9abc-123456789abc","address_line_1":"1234 Wherever St","address_line_2":"Apt 1234","city":"Anytown","state":"Alabama","country":"USA","postal_code":"12345","phone":"(123) 456-7890","mobile":"(098) 765-4321","fax":"(111) 222-3333","caption":"Sample caption","api_error_entity":{"error_code":0,"warning_messages":[]}},"required":["user_id","api_error_entity"],"type":"object","properties":{"user_id":{"format":"uuid","description":"Id of the user this contact information belongs to","type":"string"},"address_line_1":{"description":"First line of user's address","type":"string"},"address_line_2":{"description":"Second line of user's address","type":"string"},"city":{"description":"User's city","type":"string"},"state":{"description":"User's state","type":"string"},"country":{"description":"User's country","type":"string"},"postal_code":{"description":"User's postal code","type":"string"},"phone":{"description":"User's phone number","type":"string"},"mobile":{"description":"User's mobile phone number","type":"string"},"fax":{"description":"User's fax number","type":"string"},"caption":{"description":"Caption","type":"string"},"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"ApiErrorEntity":{"description":"Model used to determine what, if anything, went wrong with an api request","required":["error_code"],"type":"object","properties":{"error_code":{"format":"int32","description":"Used to denote the kind of error that occurred, if any.\r\nNoError=0;\r\nUnknownError=1;\r\nValidationError=2;\r\nItemNotFound=3;\r\nAuthenticationError=4;\r\nAuthorizationError=5;0 = No Error, 1 = Unknown Error, 2 = Validation Error, 3 = Item Not Found, 4 = Authentication Error, 5 = Authorization Error, 6 = Subscription Not Found, 7 = Enrollment Already Exists, 8 = Subscription Already Exists","enum":[0,1,2,3,4,5,6,7,8],"type":"integer"},"error_message":{"description":"Message describing what caused the error to occur","type":"string"},"warning_messages":{"description":"Warning messages describing any  potential problems with the request that do not cause the request to fail","type":"array","items":{"type":"string"},"readOnly":true}}},"ApiResponseBase":{"title":"NexPort API Response","description":"Base class for api responses","default":{"api_error_entity":{"error_code":3,"error_message":"No entity found matching id in request","warning_messages":[]}},"required":["api_error_entity"],"type":"object","properties":{"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}}}}}
```

## POST /api/v1/AdminApi/CreateGroup

> Creates a group under the given parent group or organization. Requires the AddGroup permission> \
> in the specified parent or one of it's ancestors.

```json
{"openapi":"3.1.1","info":{"title":"NexPort Web API","version":"v1"},"servers":[{"url":"https://www.nexportcampus.com"}],"paths":{"/api/v1/AdminApi/CreateGroup":{"post":{"tags":["AdminApi"],"summary":"Creates a group under the given parent group or organization. Requires the AddGroup permission\r\nin the specified parent or one of it's ancestors.","operationId":"AdminApi_CreateGroup","parameters":[{"schema":{"type":"string"},"name":"access_token","in":"query","description":"Use the AdminApi Authenticate method to get the access_token","required":true}],"responses":{"200":{"description":"Id of created group","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGroupResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/CreateGroupResponse"}}}},"403":{"description":"Not authorized to create a group in the given parent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"409":{"description":"Entity not found or duplicate login","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"422":{"description":"Validation exception. See response body for more info.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGroupRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/CreateGroupRequest"}}},"description":"Contains the new group information (Group name, short name, billing, description, and the parent group/org ID)","required":true}}}},"components":{"schemas":{"CreateGroupResponse":{"description":"","default":{"group_id":"9ca01a15-2b07-4801-91f2-783949b389d7","api_error_entity":{"error_code":0,"warning_messages":[]}},"required":["group_id","api_error_entity"],"type":"object","properties":{"group_id":{"format":"uuid","type":"string"},"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"ApiErrorEntity":{"description":"Model used to determine what, if anything, went wrong with an api request","required":["error_code"],"type":"object","properties":{"error_code":{"format":"int32","description":"Used to denote the kind of error that occurred, if any.\r\nNoError=0;\r\nUnknownError=1;\r\nValidationError=2;\r\nItemNotFound=3;\r\nAuthenticationError=4;\r\nAuthorizationError=5;0 = No Error, 1 = Unknown Error, 2 = Validation Error, 3 = Item Not Found, 4 = Authentication Error, 5 = Authorization Error, 6 = Subscription Not Found, 7 = Enrollment Already Exists, 8 = Subscription Already Exists","enum":[0,1,2,3,4,5,6,7,8],"type":"integer"},"error_message":{"description":"Message describing what caused the error to occur","type":"string"},"warning_messages":{"description":"Warning messages describing any  potential problems with the request that do not cause the request to fail","type":"array","items":{"type":"string"},"readOnly":true}}},"ApiResponseBase":{"title":"NexPort API Response","description":"Base class for api responses","default":{"api_error_entity":{"error_code":3,"error_message":"No entity found matching id in request","warning_messages":[]}},"required":["api_error_entity"],"type":"object","properties":{"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"CreateGroupRequest":{"title":"CreateGroupRequest","description":"","default":{"name":"English Students","short_name":"eng-students","billing_code":"NMX-120345-5","description":"Description of the group","parent_id":"3af8f0c6-c44b-4831-8d0a-3d771bc7f2a1"},"required":["name","short_name","billing_code","description","parent_id"],"type":"object","properties":{"name":{"description":"The name of the new group","type":"string"},"short_name":{"description":"Short name must be unique within the system...if any other groups have the same group name then an error will be thrown","type":"string"},"billing_code":{"description":"Any string value that can be used for tracking groups later","type":"string"},"description":{"description":"Description of the group","type":"string"},"parent_id":{"format":"uuid","description":"ID of the group or organization that this new group will be created under.","type":"string"}}}}}}
```

## POST /api/v1/AdminApi/CreateMembership

> Creates memberships in each of the given groups. This call is atomic. If one membership creation fails then they will all fail. Requires the AddMembership permission> \
> in the specified group or one of it's ancestors.

```json
{"openapi":"3.1.1","info":{"title":"NexPort Web API","version":"v1"},"servers":[{"url":"https://www.nexportcampus.com"}],"paths":{"/api/v1/AdminApi/CreateMembership":{"post":{"tags":["AdminApi"],"summary":"Creates memberships in each of the given groups. This call is atomic. If one membership creation fails then they will all fail. Requires the AddMembership permission\r\nin the specified group or one of it's ancestors.","operationId":"AdminApi_CreateMembership","parameters":[{"schema":{"type":"string"},"name":"access_token","in":"query","description":"Use the AdminApi Authenticate method to get the access_token","required":true}],"responses":{"200":{"description":"Memberships were successfully created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMembershipResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/CreateMembershipResponse"}}}},"403":{"description":"Not authorized to add memberships to the given group","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"409":{"description":"Entity not found or duplicate login","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"422":{"description":"Validation exception. See response body for more info.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMembershipRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/CreateMembershipRequest"}}},"description":"Contains the user ID and the list of group IDs that will be used to give that particular user the membership in","required":true}}}},"components":{"schemas":{"CreateMembershipResponse":{"description":"Create membership response object","default":{"memberships":[{"membership_id":"107be6cf-de1d-4767-97ca-dcf40b4d2bdd","group_id":"9c8761b2-375c-4638-9b21-28a0946f15e0"},{"membership_id":"107be6cf-de1d-4767-97ca-dcf40b4d2bdd","group_id":"9c8761b2-375c-4638-9b21-28a0946f15e0"},{"membership_id":"107be6cf-de1d-4767-97ca-dcf40b4d2bdd","group_id":"9c8761b2-375c-4638-9b21-28a0946f15e0"}],"api_error_entity":{"error_code":0,"warning_messages":[]}},"required":["memberships","api_error_entity"],"type":"object","properties":{"memberships":{"description":"List of membership Ids created","type":"array","items":{"$ref":"#/components/schemas/MemberShipInfo"}},"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"MemberShipInfo":{"description":"New membership info object","required":["membership_id","group_id"],"type":"object","properties":{"membership_id":{"format":"uuid","description":"The Id of the membership","type":"string"},"group_id":{"format":"uuid","description":"The group Id that the membership belong to","type":"string"}}},"ApiErrorEntity":{"description":"Model used to determine what, if anything, went wrong with an api request","required":["error_code"],"type":"object","properties":{"error_code":{"format":"int32","description":"Used to denote the kind of error that occurred, if any.\r\nNoError=0;\r\nUnknownError=1;\r\nValidationError=2;\r\nItemNotFound=3;\r\nAuthenticationError=4;\r\nAuthorizationError=5;0 = No Error, 1 = Unknown Error, 2 = Validation Error, 3 = Item Not Found, 4 = Authentication Error, 5 = Authorization Error, 6 = Subscription Not Found, 7 = Enrollment Already Exists, 8 = Subscription Already Exists","enum":[0,1,2,3,4,5,6,7,8],"type":"integer"},"error_message":{"description":"Message describing what caused the error to occur","type":"string"},"warning_messages":{"description":"Warning messages describing any  potential problems with the request that do not cause the request to fail","type":"array","items":{"type":"string"},"readOnly":true}}},"ApiResponseBase":{"title":"NexPort API Response","description":"Base class for api responses","default":{"api_error_entity":{"error_code":3,"error_message":"No entity found matching id in request","warning_messages":[]}},"required":["api_error_entity"],"type":"object","properties":{"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"CreateMembershipRequest":{"title":"CreateMembershipRequest","description":"Create membership request object","default":{"groups":["074581a3-b18e-493d-80d5-23e7adb61b6c","17862fbe-31a6-4b2d-a07e-1c9944afed1b","c20ea428-7284-4e80-84fb-102c50279912"],"user_id":"879817cc-8e88-446c-b896-176d5d283e9e"},"required":["groups","user_id"],"type":"object","properties":{"groups":{"description":"The the groups to give the user a membership in","type":"array","items":{"format":"uuid","type":"string"}},"user_id":{"format":"uuid","description":"ID of the user to give memberships in each of the listed groups. The user must have subscriptions in the orgs that the groups belong to.","type":"string"}}}}}}
```

## Remove memberships in each of the given groups. This call is atomic. If one membership removal fails then they will all fail.

> Requires either a user Id and the list of group Ids OR the list of membership Ids.> \\
>
> \
> \###Permission requirements> \
> Requires the RemoveMemberships permission in the specified group or one of it's ancestors.

```json
{"openapi":"3.1.1","info":{"title":"NexPort Web API","version":"v1"},"servers":[{"url":"https://www.nexportcampus.com"}],"paths":{"/api/v1/AdminApi/RemoveMembership":{"post":{"tags":["AdminApi"],"summary":"Remove memberships in each of the given groups. This call is atomic. If one membership removal fails then they will all fail.","description":"Requires either a user Id and the list of group Ids OR the list of membership Ids.\r\n\r\n###Permission requirements\r\nRequires the RemoveMemberships permission in the specified group or one of it's ancestors.","operationId":"AdminApi_RemoveMembership","parameters":[{"schema":{"type":"string"},"name":"access_token","in":"query","description":"Use the AdminApi Authenticate method to get the access_token","required":true}],"responses":{"200":{"description":"Memberships were successfully removed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveMembershipResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/RemoveMembershipResponse"}}}},"403":{"description":"Not authorized to remove memberships from the given group","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"409":{"description":"Entity not found or duplicate login","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"422":{"description":"Validation exception. See response body for more info.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveMembershipRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/RemoveMembershipRequest"}}},"description":"Contains the user Id and the list of group Ids that will be used to remove the memberships for the user","required":true}}}},"components":{"schemas":{"RemoveMembershipResponse":{"title":"RemoveMembershipResponse","description":"Remove membership response object","default":{"memberships":[{"membership_id":"fd612a64-3fdb-41fd-b691-d4b3aadf3ab6","group_id":"c77d6769-5ebb-4ad9-97f9-c5b8363bfa97"}],"api_error_entity":{"error_code":0,"warning_messages":[]}},"required":["memberships","api_error_entity"],"type":"object","properties":{"memberships":{"description":"List of removed membership Ids","type":"array","items":{"$ref":"#/components/schemas/RemovedMembershipInfo"}},"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"RemovedMembershipInfo":{"description":"Removed membership info","required":["membership_id","group_id"],"type":"object","properties":{"membership_id":{"format":"uuid","description":"The Id of the membership that has been removed","type":"string"},"group_id":{"format":"uuid","description":"The Id of the group that the membership has been removed from","type":"string"}}},"ApiErrorEntity":{"description":"Model used to determine what, if anything, went wrong with an api request","required":["error_code"],"type":"object","properties":{"error_code":{"format":"int32","description":"Used to denote the kind of error that occurred, if any.\r\nNoError=0;\r\nUnknownError=1;\r\nValidationError=2;\r\nItemNotFound=3;\r\nAuthenticationError=4;\r\nAuthorizationError=5;0 = No Error, 1 = Unknown Error, 2 = Validation Error, 3 = Item Not Found, 4 = Authentication Error, 5 = Authorization Error, 6 = Subscription Not Found, 7 = Enrollment Already Exists, 8 = Subscription Already Exists","enum":[0,1,2,3,4,5,6,7,8],"type":"integer"},"error_message":{"description":"Message describing what caused the error to occur","type":"string"},"warning_messages":{"description":"Warning messages describing any  potential problems with the request that do not cause the request to fail","type":"array","items":{"type":"string"},"readOnly":true}}},"ApiResponseBase":{"title":"NexPort API Response","description":"Base class for api responses","default":{"api_error_entity":{"error_code":3,"error_message":"No entity found matching id in request","warning_messages":[]}},"required":["api_error_entity"],"type":"object","properties":{"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"RemoveMembershipRequest":{"title":"RemoveMembershipRequest","description":"Remove membership request object","default":{"groups":["67b6e31f-72a0-4cd0-935c-411324119629","4350b0f9-ecc4-475a-8cb9-a07ebb2aa12f","04d03517-dad8-408d-b847-f18c40d6e751"],"user_id":"700b40c9-47b5-4e7f-bd4e-27de2526c437","memberships":["6b9bbc9f-f06d-4f1b-a8c5-14022a097c61","0450ae39-d584-4930-9191-260bb300c61f","24e8cce3-f1ef-498d-b12b-354b9d441035"]},"type":"object","properties":{"groups":{"description":"The list of membership group Ids to be removed","type":"array","items":{"format":"uuid","type":"string"}},"user_id":{"format":"uuid","description":"The user Id that will be used to remove the group membership(s)","type":"string"},"memberships":{"description":"The list of membership Ids to be removed","type":"array","items":{"format":"uuid","type":"string"}}}}}}}
```

## Edits user information

> Edits user information (including contact information) based on given input. Use either user\_id OR login> \
> to specify the user to edit. If a field is not passed in, the value will remain unchanged.> \
> \###Permission requirements> \\
>
> \
> For editing your own profile:> \
> \- Editing contact information requires the Edit User Profile permission.> \\
>
> \
> For editing another profile:> \
> \- Requires the View User Profiles permission.> \
> \- Editing basic information (primary email, prefix title, nickname) requires the Edit User Profile permission.> \
> \- Editing name (first, middle, last) requires the Edit User Profile permission AND the target user's owner organization must have Allow Admin User Edit set to true.> \
> \- Editing contact information requires the Edit User Profile permission.

```json
{"openapi":"3.1.1","info":{"title":"NexPort Web API","version":"v1"},"servers":[{"url":"https://www.nexportcampus.com"}],"paths":{"/api/v1/AdminApi/EditUser":{"post":{"tags":["AdminApi"],"summary":"Edits user information","description":"Edits user information (including contact information) based on given input. Use either user_id OR login\r\nto specify the user to edit. If a field is not passed in, the value will remain unchanged.\r\n###Permission requirements\r\n\r\nFor editing your own profile:\r\n- Editing contact information requires the Edit User Profile permission.\r\n\r\nFor editing another profile:\r\n- Requires the View User Profiles permission.\r\n- Editing basic information (primary email, prefix title, nickname) requires the Edit User Profile permission.\r\n- Editing name (first, middle, last) requires the Edit User Profile permission AND the target user's owner organization must have Allow Admin User Edit set to true.\r\n- Editing contact information requires the Edit User Profile permission.","operationId":"AdminApi_EditUser","parameters":[{"schema":{"type":"string"},"name":"access_token","in":"query","description":"Use the AdminApi Authenticate method to get the access_token","required":true}],"responses":{"200":{"description":"Edited user information","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditUserResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/EditUserResponse"}}}},"403":{"description":"Not authorized to view/edit users","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"409":{"description":"Entity not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"422":{"description":"Validation exception","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditUserRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/EditUserRequest"}}},"description":"Contains fields to specify the user to edit as well as the fields that are being edited","required":true}}}},"components":{"schemas":{"EditUserResponse":{"title":"EditUserResponse","description":"Contains information about the edited user","default":{"user_id":"12345678-1234-5678-9abc-123456789abc","api_error_entity":{"error_code":0,"warning_messages":[]}},"required":["user_id","api_error_entity"],"type":"object","properties":{"user_id":{"format":"uuid","description":"Id of the edited user","type":"string"},"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"ApiErrorEntity":{"description":"Model used to determine what, if anything, went wrong with an api request","required":["error_code"],"type":"object","properties":{"error_code":{"format":"int32","description":"Used to denote the kind of error that occurred, if any.\r\nNoError=0;\r\nUnknownError=1;\r\nValidationError=2;\r\nItemNotFound=3;\r\nAuthenticationError=4;\r\nAuthorizationError=5;0 = No Error, 1 = Unknown Error, 2 = Validation Error, 3 = Item Not Found, 4 = Authentication Error, 5 = Authorization Error, 6 = Subscription Not Found, 7 = Enrollment Already Exists, 8 = Subscription Already Exists","enum":[0,1,2,3,4,5,6,7,8],"type":"integer"},"error_message":{"description":"Message describing what caused the error to occur","type":"string"},"warning_messages":{"description":"Warning messages describing any  potential problems with the request that do not cause the request to fail","type":"array","items":{"type":"string"},"readOnly":true}}},"ApiResponseBase":{"title":"NexPort API Response","description":"Base class for api responses","default":{"api_error_entity":{"error_code":3,"error_message":"No entity found matching id in request","warning_messages":[]}},"required":["api_error_entity"],"type":"object","properties":{"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"EditUserRequest":{"description":"Contains fields for editing a user's profile","type":"object","properties":{"user_id":{"format":"uuid","description":"Id of the user whose information is being edited. Use either this OR login.","type":"string"},"login":{"description":"Login of the user whose information is being edited. User either this OR user_id.","type":"string"},"first_name":{"description":"First name of the user","type":"string"},"middle_name":{"description":"Middle name of the user","type":"string"},"last_name":{"description":"Last name of the user","type":"string"},"email":{"description":"User's email address","type":"string"},"title":{"description":"User's title prefix","type":"string"},"nickname":{"description":"User's nickname","type":"string"},"contact_info":{"$ref":"#/components/schemas/UserContactInfoRequest","description":"Other contact information about the user"}}},"UserContactInfoRequest":{"description":"Inherits all fields from UserContactInfoBase, used in EditUser api method.","required":["api_error_entity"],"type":"object","properties":{"address_line_1":{"description":"First line of user's address","type":"string"},"address_line_2":{"description":"Second line of user's address","type":"string"},"city":{"description":"User's city","type":"string"},"state":{"description":"User's state","type":"string"},"country":{"description":"User's country","type":"string"},"postal_code":{"description":"User's postal code","type":"string"},"phone":{"description":"User's phone number","type":"string"},"mobile":{"description":"User's mobile phone number","type":"string"},"fax":{"description":"User's fax number","type":"string"},"caption":{"description":"Caption","type":"string"},"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}}}}}
```

## POST /api/v1/AdminApi/CreateSubscription

> Creates a subscription with the information specified by request. Requires the Add Subscriptions permission.

```json
{"openapi":"3.1.1","info":{"title":"NexPort Web API","version":"v1"},"servers":[{"url":"https://www.nexportcampus.com"}],"paths":{"/api/v1/AdminApi/CreateSubscription":{"post":{"tags":["AdminApi"],"summary":"Creates a subscription with the information specified by request. Requires the Add Subscriptions permission.","operationId":"AdminApi_CreateSubscription","parameters":[{"schema":{"type":"string"},"name":"access_token","in":"query","description":"Use the AdminApi Authenticate method to get the access_token","required":true}],"responses":{"200":{"description":"Id of created subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSubscriptionResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/CreateSubscriptionResponse"}}}},"403":{"description":"Not authorized to create a subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"409":{"description":"Entity not found or duplicate subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"422":{"description":"Validation exception","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSubscriptionRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/CreateSubscriptionRequest"}}},"description":"This holds all the subscription information (userid, orgid, etc.) for the new subscription","required":true}}}},"components":{"schemas":{"CreateSubscriptionResponse":{"title":"CreateSubscriptionResponse","description":"Contains the id of the enrollment created by the CreateEnrollment web api method","default":{"subscription_id":"12345678-1234-5678-9abc-123456789abc","api_error_entity":{"error_code":0,"warning_messages":[]}},"required":["subscription_id","api_error_entity"],"type":"object","properties":{"subscription_id":{"format":"uuid","description":"Id of the created subscription","type":"string"},"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"ApiErrorEntity":{"description":"Model used to determine what, if anything, went wrong with an api request","required":["error_code"],"type":"object","properties":{"error_code":{"format":"int32","description":"Used to denote the kind of error that occurred, if any.\r\nNoError=0;\r\nUnknownError=1;\r\nValidationError=2;\r\nItemNotFound=3;\r\nAuthenticationError=4;\r\nAuthorizationError=5;0 = No Error, 1 = Unknown Error, 2 = Validation Error, 3 = Item Not Found, 4 = Authentication Error, 5 = Authorization Error, 6 = Subscription Not Found, 7 = Enrollment Already Exists, 8 = Subscription Already Exists","enum":[0,1,2,3,4,5,6,7,8],"type":"integer"},"error_message":{"description":"Message describing what caused the error to occur","type":"string"},"warning_messages":{"description":"Warning messages describing any  potential problems with the request that do not cause the request to fail","type":"array","items":{"type":"string"},"readOnly":true}}},"ApiResponseBase":{"title":"NexPort API Response","description":"Base class for api responses","default":{"api_error_entity":{"error_code":3,"error_message":"No entity found matching id in request","warning_messages":[]}},"required":["api_error_entity"],"type":"object","properties":{"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"CreateSubscriptionRequest":{"description":"Contains fields for creating a new subscription","required":["org_id","user_id"],"type":"object","properties":{"org_id":{"format":"uuid","description":"Id of the subscription's organization","type":"string"},"user_id":{"format":"uuid","description":"The user id to create the subscription for","type":"string"}}}}}}
```

## Gets subscription information for the user in the organization.

> Gets subscription information for the user in the organization.> \
> Valid parameter combinations are:> \
> \- user\_id and org\_short\_name> \
> \- user\_id and org\_id> \
> \- subscription\_id> \\
>
> \
> \###Permissions> \
> Requires the View User Subscriptions permission in the subscription organization or an ancestor.

```json
{"openapi":"3.1.1","info":{"title":"NexPort Web API","version":"v1"},"servers":[{"url":"https://www.nexportcampus.com"}],"paths":{"/api/v1/AdminApi/GetSubscription":{"get":{"tags":["AdminApi"],"summary":"Gets subscription information for the user in the organization.","description":"Gets subscription information for the user in the organization.\r\nValid parameter combinations are:\r\n- user_id and org_short_name\r\n- user_id and org_id\r\n- subscription_id\r\n\r\n###Permissions\r\nRequires the View User Subscriptions permission in the subscription organization or an ancestor.","operationId":"AdminApi_GetSubscription","parameters":[{"schema":{"type":"string","format":"uuid"},"name":"user_id","in":"query","required":false},{"schema":{"type":"string"},"name":"org_short_name","in":"query","required":false},{"schema":{"type":"string","format":"uuid"},"name":"org_id","in":"query","required":false},{"schema":{"type":"string","format":"uuid"},"name":"subscription_id","in":"query","required":false},{"schema":{"type":"string"},"name":"access_token","in":"query","description":"Use the AdminApi Authenticate method to get the access_token","required":true}],"responses":{"200":{"description":"Subscription information","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/SubscriptionResponse"}}}},"403":{"description":"Not authorized to view subscriptions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"409":{"description":"Entity not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"422":{"description":"Validation exception","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}}}}}},"components":{"schemas":{"SubscriptionResponse":{"title":"SubscriptionResponse","description":"Contains relevant details about a user subscription","default":{"id":"12345678-1234-5678-9abc-123456789abc","subscription_id":"12345678-1234-5678-9abc-123456789abc","user_id":"12345678-1234-5678-9abc-123456789abc","org_id":"12345678-1234-5678-9abc-123456789abc","org_name":"Test Organization","org_shortname":"testorg","utc_date_created":"2015-12-25T19:25:24.731+00:00","utc_date_updated":"2015-12-25T19:25:24.731+00:00","billing_code":"Sample billing code","utc_expiration_date":"2015-12-25T19:25:24.731+00:00","is_disabled":false,"subscription_status":{"current_status_name":"Resubscribed","previous_status_name":"Withdrawn","status_date_set":"2015-12-25T19:25:24.731+00:00"},"api_error_entity":{"error_code":0,"warning_messages":[]}},"required":["subscription_id","user_id","org_id","utc_date_created","billing_code","utc_expiration_date","is_disabled","api_error_entity"],"type":"object","properties":{"subscription_id":{"format":"uuid","description":"Id of the subscription","type":"string"},"user_id":{"format":"uuid","description":"Id of the user this subscription belongs to","type":"string"},"org_id":{"format":"uuid","description":"Id of the organization this subscription belongs to","type":"string"},"org_name":{"description":"Name of the organization this subscription belongs to","type":"string"},"org_shortname":{"description":"Short name of the organization this subscription belongs to","type":"string"},"utc_date_created":{"format":"date-time","description":"When this subscription was created","type":"string"},"utc_date_updated":{"format":"date-time","description":"When this subscription was last updated","type":"string"},"billing_code":{"description":"The billing code for this subscription","type":"string"},"utc_expiration_date":{"format":"date-time","description":"When this subscription expires","type":"string"},"is_disabled":{"description":"True if disabled, false if not disabled","type":"boolean"},"subscription_status":{"$ref":"#/components/schemas/SubscriptionResponseStatus","description":"The status of this subscription (if applicable)"},"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"SubscriptionResponseStatus":{"title":"SubscriptionResponseStatus","description":"Contains information about current and previous subscription status","default":{"current_status_name":"Resubscribed","previous_status_name":"Withdrawn","status_date_set":"2015-12-25T19:25:24.731+00:00"},"required":["current_status_name","status_date_set"],"type":"object","properties":{"current_status_name":{"description":"The name of the current status","type":"string"},"previous_status_name":{"description":"The name of the previous status","type":"string"},"status_date_set":{"format":"date-time","description":"When this status was set","type":"string"}}},"ApiErrorEntity":{"description":"Model used to determine what, if anything, went wrong with an api request","required":["error_code"],"type":"object","properties":{"error_code":{"format":"int32","description":"Used to denote the kind of error that occurred, if any.\r\nNoError=0;\r\nUnknownError=1;\r\nValidationError=2;\r\nItemNotFound=3;\r\nAuthenticationError=4;\r\nAuthorizationError=5;0 = No Error, 1 = Unknown Error, 2 = Validation Error, 3 = Item Not Found, 4 = Authentication Error, 5 = Authorization Error, 6 = Subscription Not Found, 7 = Enrollment Already Exists, 8 = Subscription Already Exists","enum":[0,1,2,3,4,5,6,7,8],"type":"integer"},"error_message":{"description":"Message describing what caused the error to occur","type":"string"},"warning_messages":{"description":"Warning messages describing any  potential problems with the request that do not cause the request to fail","type":"array","items":{"type":"string"},"readOnly":true}}},"ApiResponseBase":{"title":"NexPort API Response","description":"Base class for api responses","default":{"api_error_entity":{"error_code":3,"error_message":"No entity found matching id in request","warning_messages":[]}},"required":["api_error_entity"],"type":"object","properties":{"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}}}}}
```

## Get subscription information for a user or an organization.

> Use either user\_id OR login OR org\_id.> \
> If searching by user, results will be ordered by the subscription UtcExpirationDate from earliest to latest.> \
> If searching by org, results will be ordered by the subscription user last name then first name in alphabetical order.> \
> Requires the View User Subscriptions permission in the target user's organization if viewing> \
> user subscriptions and the Add, Remove, or Update Subscriptions permission in the given organization> \
> if viewing organization subscriptions.

```json
{"openapi":"3.1.1","info":{"title":"NexPort Web API","version":"v1"},"servers":[{"url":"https://www.nexportcampus.com"}],"paths":{"/api/v1/AdminApi/GetSubscriptions":{"get":{"tags":["AdminApi"],"summary":"Get subscription information for a user or an organization.","description":"Use either user_id OR login OR org_id.\r\nIf searching by user, results will be ordered by the subscription UtcExpirationDate from earliest to latest.\r\nIf searching by org, results will be ordered by the subscription user last name then first name in alphabetical order.\r\nRequires the View User Subscriptions permission in the target user's organization if viewing\r\nuser subscriptions and the Add, Remove, or Update Subscriptions permission in the given organization\r\nif viewing organization subscriptions.","operationId":"AdminApi_GetSubscriptions","parameters":[{"schema":{"type":"string","format":"uuid"},"name":"user_id","in":"query","required":false},{"schema":{"type":"string"},"name":"login","in":"query","description":"Login of the user to get subscriptions for","required":false},{"schema":{"type":"string","format":"uuid"},"name":"org_id","in":"query","required":false},{"schema":{"type":"integer","format":"int32"},"name":"page","in":"query","description":"Which page of results to start on","required":false},{"schema":{"type":"integer","format":"int32"},"name":"per_page","in":"query","required":false},{"schema":{"type":"string"},"name":"access_token","in":"query","description":"Use the AdminApi Authenticate method to get the access_token","required":true}],"responses":{"200":{"description":"List of subscriptions","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionResponse"}}},"text/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionResponse"}}}}},"403":{"description":"Not authorized to view subscriptions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"409":{"description":"Entity not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"422":{"description":"Validation exception","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}}},"deprecated":true}}},"components":{"schemas":{"SubscriptionResponse":{"title":"SubscriptionResponse","description":"Contains relevant details about a user subscription","default":{"id":"12345678-1234-5678-9abc-123456789abc","subscription_id":"12345678-1234-5678-9abc-123456789abc","user_id":"12345678-1234-5678-9abc-123456789abc","org_id":"12345678-1234-5678-9abc-123456789abc","org_name":"Test Organization","org_shortname":"testorg","utc_date_created":"2015-12-25T19:25:24.731+00:00","utc_date_updated":"2015-12-25T19:25:24.731+00:00","billing_code":"Sample billing code","utc_expiration_date":"2015-12-25T19:25:24.731+00:00","is_disabled":false,"subscription_status":{"current_status_name":"Resubscribed","previous_status_name":"Withdrawn","status_date_set":"2015-12-25T19:25:24.731+00:00"},"api_error_entity":{"error_code":0,"warning_messages":[]}},"required":["subscription_id","user_id","org_id","utc_date_created","billing_code","utc_expiration_date","is_disabled","api_error_entity"],"type":"object","properties":{"subscription_id":{"format":"uuid","description":"Id of the subscription","type":"string"},"user_id":{"format":"uuid","description":"Id of the user this subscription belongs to","type":"string"},"org_id":{"format":"uuid","description":"Id of the organization this subscription belongs to","type":"string"},"org_name":{"description":"Name of the organization this subscription belongs to","type":"string"},"org_shortname":{"description":"Short name of the organization this subscription belongs to","type":"string"},"utc_date_created":{"format":"date-time","description":"When this subscription was created","type":"string"},"utc_date_updated":{"format":"date-time","description":"When this subscription was last updated","type":"string"},"billing_code":{"description":"The billing code for this subscription","type":"string"},"utc_expiration_date":{"format":"date-time","description":"When this subscription expires","type":"string"},"is_disabled":{"description":"True if disabled, false if not disabled","type":"boolean"},"subscription_status":{"$ref":"#/components/schemas/SubscriptionResponseStatus","description":"The status of this subscription (if applicable)"},"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"SubscriptionResponseStatus":{"title":"SubscriptionResponseStatus","description":"Contains information about current and previous subscription status","default":{"current_status_name":"Resubscribed","previous_status_name":"Withdrawn","status_date_set":"2015-12-25T19:25:24.731+00:00"},"required":["current_status_name","status_date_set"],"type":"object","properties":{"current_status_name":{"description":"The name of the current status","type":"string"},"previous_status_name":{"description":"The name of the previous status","type":"string"},"status_date_set":{"format":"date-time","description":"When this status was set","type":"string"}}},"ApiErrorEntity":{"description":"Model used to determine what, if anything, went wrong with an api request","required":["error_code"],"type":"object","properties":{"error_code":{"format":"int32","description":"Used to denote the kind of error that occurred, if any.\r\nNoError=0;\r\nUnknownError=1;\r\nValidationError=2;\r\nItemNotFound=3;\r\nAuthenticationError=4;\r\nAuthorizationError=5;0 = No Error, 1 = Unknown Error, 2 = Validation Error, 3 = Item Not Found, 4 = Authentication Error, 5 = Authorization Error, 6 = Subscription Not Found, 7 = Enrollment Already Exists, 8 = Subscription Already Exists","enum":[0,1,2,3,4,5,6,7,8],"type":"integer"},"error_message":{"description":"Message describing what caused the error to occur","type":"string"},"warning_messages":{"description":"Warning messages describing any  potential problems with the request that do not cause the request to fail","type":"array","items":{"type":"string"},"readOnly":true}}},"ApiResponseBase":{"title":"NexPort API Response","description":"Base class for api responses","default":{"api_error_entity":{"error_code":3,"error_message":"No entity found matching id in request","warning_messages":[]}},"required":["api_error_entity"],"type":"object","properties":{"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}}}}}
```

## Search subscription information for a user or an organization.

> At least one user id OR one org id must be specified.> \\
>
> \
> Results will be ordered by the subscription Creation Date from earliest to latest.> \
> \###Permissions> \
> Requires the View User Subscriptions permission in the target user's organization if viewing> \
> user subscriptions and the Add, Remove, or Update Subscriptions permission in the given organization> \
> if viewing organization subscriptions.

```json
{"openapi":"3.1.1","info":{"title":"NexPort Web API","version":"v1"},"servers":[{"url":"https://www.nexportcampus.com"}],"paths":{"/api/v1/AdminApi/SearchSubscriptions":{"post":{"tags":["AdminApi"],"summary":"Search subscription information for a user or an organization.","description":"At least one user id OR one org id must be specified.\r\n\r\nResults will be ordered by the subscription Creation Date from earliest to latest.\r\n###Permissions\r\nRequires the View User Subscriptions permission in the target user's organization if viewing\r\nuser subscriptions and the Add, Remove, or Update Subscriptions permission in the given organization\r\nif viewing organization subscriptions.","operationId":"AdminApi_SearchSubscriptions","parameters":[{"schema":{"type":"integer","format":"int32"},"name":"page","in":"query","description":"The request page of results","required":false},{"schema":{"type":"integer","format":"int32"},"name":"per_page","in":"query","description":"Number of results to return on each page","required":false},{"schema":{"type":"string"},"name":"access_token","in":"query","description":"Use the AdminApi Authenticate method to get the access_token","required":true}],"responses":{"200":{"description":"Subscription search results successfully returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionSearchResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/SubscriptionSearchResponse"}}}},"403":{"description":"Not authorized to view subscriptions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"409":{"description":"Entity not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"422":{"description":"Validation exception","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionSearchFilter"}},"text/json":{"schema":{"$ref":"#/components/schemas/SubscriptionSearchFilter"}}},"description":"Filter for subscriptions","required":true}}}},"components":{"schemas":{"SubscriptionSearchResponse":{"description":"Results of a subscription search call","required":["page","page_size","total_count","api_error_entity"],"type":"object","properties":{"subscriptions":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionResponse"}},"page":{"format":"int32","description":"The one based index of the current page","type":"integer"},"page_size":{"format":"int32","description":"Requested page size","type":"integer"},"total_count":{"format":"int32","description":"Number of records across ALL pages","type":"integer"},"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"SubscriptionResponse":{"title":"SubscriptionResponse","description":"Contains relevant details about a user subscription","default":{"id":"12345678-1234-5678-9abc-123456789abc","subscription_id":"12345678-1234-5678-9abc-123456789abc","user_id":"12345678-1234-5678-9abc-123456789abc","org_id":"12345678-1234-5678-9abc-123456789abc","org_name":"Test Organization","org_shortname":"testorg","utc_date_created":"2015-12-25T19:25:24.731+00:00","utc_date_updated":"2015-12-25T19:25:24.731+00:00","billing_code":"Sample billing code","utc_expiration_date":"2015-12-25T19:25:24.731+00:00","is_disabled":false,"subscription_status":{"current_status_name":"Resubscribed","previous_status_name":"Withdrawn","status_date_set":"2015-12-25T19:25:24.731+00:00"},"api_error_entity":{"error_code":0,"warning_messages":[]}},"required":["subscription_id","user_id","org_id","utc_date_created","billing_code","utc_expiration_date","is_disabled","api_error_entity"],"type":"object","properties":{"subscription_id":{"format":"uuid","description":"Id of the subscription","type":"string"},"user_id":{"format":"uuid","description":"Id of the user this subscription belongs to","type":"string"},"org_id":{"format":"uuid","description":"Id of the organization this subscription belongs to","type":"string"},"org_name":{"description":"Name of the organization this subscription belongs to","type":"string"},"org_shortname":{"description":"Short name of the organization this subscription belongs to","type":"string"},"utc_date_created":{"format":"date-time","description":"When this subscription was created","type":"string"},"utc_date_updated":{"format":"date-time","description":"When this subscription was last updated","type":"string"},"billing_code":{"description":"The billing code for this subscription","type":"string"},"utc_expiration_date":{"format":"date-time","description":"When this subscription expires","type":"string"},"is_disabled":{"description":"True if disabled, false if not disabled","type":"boolean"},"subscription_status":{"$ref":"#/components/schemas/SubscriptionResponseStatus","description":"The status of this subscription (if applicable)"},"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"SubscriptionResponseStatus":{"title":"SubscriptionResponseStatus","description":"Contains information about current and previous subscription status","default":{"current_status_name":"Resubscribed","previous_status_name":"Withdrawn","status_date_set":"2015-12-25T19:25:24.731+00:00"},"required":["current_status_name","status_date_set"],"type":"object","properties":{"current_status_name":{"description":"The name of the current status","type":"string"},"previous_status_name":{"description":"The name of the previous status","type":"string"},"status_date_set":{"format":"date-time","description":"When this status was set","type":"string"}}},"ApiErrorEntity":{"description":"Model used to determine what, if anything, went wrong with an api request","required":["error_code"],"type":"object","properties":{"error_code":{"format":"int32","description":"Used to denote the kind of error that occurred, if any.\r\nNoError=0;\r\nUnknownError=1;\r\nValidationError=2;\r\nItemNotFound=3;\r\nAuthenticationError=4;\r\nAuthorizationError=5;0 = No Error, 1 = Unknown Error, 2 = Validation Error, 3 = Item Not Found, 4 = Authentication Error, 5 = Authorization Error, 6 = Subscription Not Found, 7 = Enrollment Already Exists, 8 = Subscription Already Exists","enum":[0,1,2,3,4,5,6,7,8],"type":"integer"},"error_message":{"description":"Message describing what caused the error to occur","type":"string"},"warning_messages":{"description":"Warning messages describing any  potential problems with the request that do not cause the request to fail","type":"array","items":{"type":"string"},"readOnly":true}}},"ApiResponseBase":{"title":"NexPort API Response","description":"Base class for api responses","default":{"api_error_entity":{"error_code":3,"error_message":"No entity found matching id in request","warning_messages":[]}},"required":["api_error_entity"],"type":"object","properties":{"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"SubscriptionSearchFilter":{"type":"object","properties":{"user_ids":{"description":"Limit the results to only subscriptions for these users","type":"array","items":{"format":"uuid","type":"string"}},"org_ids":{"description":"Limit the results to only subscriptions to these organizations","type":"array","items":{"format":"uuid","type":"string"}},"utc_expires_before":{"format":"date-time","description":"Only return subscriptions expiring before this date","type":"string"},"utc_expires_after":{"format":"date-time","description":"Only return subscriptions expiring after this date","type":"string"},"utc_create_before":{"format":"date-time","description":"Only return subscriptions createa before this date","type":"string"},"utc_create_after":{"format":"date-time","description":"Only return subscriptions created AFTER this date","type":"string"}}}}}}
```

## POST /api/v1/AdminApi/DisableSubscription

> Enables or disables a subscription. Requires the Update Subscriptions permission in the subscription> \
> organization or an ancestor.

```json
{"openapi":"3.1.1","info":{"title":"NexPort Web API","version":"v1"},"servers":[{"url":"https://www.nexportcampus.com"}],"paths":{"/api/v1/AdminApi/DisableSubscription":{"post":{"tags":["AdminApi"],"summary":"Enables or disables a subscription. Requires the Update Subscriptions permission in the subscription\r\norganization or an ancestor.","operationId":"AdminApi_DisableSubscription","parameters":[{"schema":{"type":"string"},"name":"access_token","in":"query","description":"Use the AdminApi Authenticate method to get the access_token","required":true}],"responses":{"200":{"description":"Whether the subscription is disabled after the method call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisableSubscriptionResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/DisableSubscriptionResponse"}}}},"403":{"description":"Not authorized to update subscriptions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"409":{"description":"Entity not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"422":{"description":"Validation exception. See response body for more info.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisableSubscriptionRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/DisableSubscriptionRequest"}}},"description":"Contains subscription id and enable/disable flag","required":true}}}},"components":{"schemas":{"DisableSubscriptionResponse":{"title":"DisableSubscriptionResponse","description":"Contains information about the subscription that was enabled/disabled. You can use this to verify\r\nthat the call to DisableSubscription had the intended effect on the subscription if no errors are thrown.","default":{"subscription_id":"12345678-1234-5678-9abc-123456789abc","disabled":true,"api_error_entity":{"error_code":0,"warning_messages":[]}},"required":["subscription_id","disabled","api_error_entity"],"type":"object","properties":{"subscription_id":{"format":"uuid","description":"Id of the subscription that was enabled/disabled","type":"string"},"disabled":{"description":"True if subscription is disabled, false otherwise","type":"boolean"},"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"ApiErrorEntity":{"description":"Model used to determine what, if anything, went wrong with an api request","required":["error_code"],"type":"object","properties":{"error_code":{"format":"int32","description":"Used to denote the kind of error that occurred, if any.\r\nNoError=0;\r\nUnknownError=1;\r\nValidationError=2;\r\nItemNotFound=3;\r\nAuthenticationError=4;\r\nAuthorizationError=5;0 = No Error, 1 = Unknown Error, 2 = Validation Error, 3 = Item Not Found, 4 = Authentication Error, 5 = Authorization Error, 6 = Subscription Not Found, 7 = Enrollment Already Exists, 8 = Subscription Already Exists","enum":[0,1,2,3,4,5,6,7,8],"type":"integer"},"error_message":{"description":"Message describing what caused the error to occur","type":"string"},"warning_messages":{"description":"Warning messages describing any  potential problems with the request that do not cause the request to fail","type":"array","items":{"type":"string"},"readOnly":true}}},"ApiResponseBase":{"title":"NexPort API Response","description":"Base class for api responses","default":{"api_error_entity":{"error_code":3,"error_message":"No entity found matching id in request","warning_messages":[]}},"required":["api_error_entity"],"type":"object","properties":{"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"DisableSubscriptionRequest":{"description":"Contains information for enabling or disabling a subscription","required":["subscription_id"],"type":"object","properties":{"subscription_id":{"format":"uuid","description":"Id of the subscription to enable or disable","type":"string"},"disable":{"description":"Enable or disable this subscription. Setting this to false enables the subscription.\r\nSetting it to true will disable it.","type":"boolean"}}}}}}
```

## Sets the Subscription Status on the Subscription.

> Sets the subscription status for the supplied subscriber. Subscription status name is case sensitive and must be a pre existing status. This action will not create a status that does not exist.> \
> You can send an empty string for the subscription status if you want to set it back to the default subscription status.> \
> \###Permissions Requirements> \
> Requires the Update Subscriptions permission in the specified org or an ancestor.

```json
{"openapi":"3.1.1","info":{"title":"NexPort Web API","version":"v1"},"servers":[{"url":"https://www.nexportcampus.com"}],"paths":{"/api/v1/AdminApi/SetSubscriptionStatus":{"post":{"tags":["AdminApi"],"summary":"Sets the Subscription Status on the Subscription.","description":"Sets the subscription status for the supplied subscriber. Subscription status name is case sensitive and must be a pre existing status. This action will not create a status that does not exist.\r\nYou can send an empty string for the subscription status if you want to set it back to the default subscription status.\r\n###Permissions Requirements\r\nRequires the Update Subscriptions permission in the specified org or an ancestor.","operationId":"AdminApi_SetSubscriptionStatus","parameters":[{"schema":{"type":"string"},"name":"access_token","in":"query","description":"Use the AdminApi Authenticate method to get the access_token","required":true}],"responses":{"200":{"description":"Subscription Id, Current Subscription Status, Previous Subscription Status, and the date the new Subscription Status was set","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetSubscriptionStatusResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/SetSubscriptionStatusResponse"}}}},"403":{"description":"Not authorized to update subscriptions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"409":{"description":"Subscription or Subscription Status not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"422":{"description":"Validation exception. See response body for more info.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetSubscriptionStatusRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/SetSubscriptionStatusRequest"}}},"description":"Contains subscription id and subscription status name","required":true}}}},"components":{"schemas":{"SetSubscriptionStatusResponse":{"title":"SetSubscriptionStatusResponse","default":{"subscription_id":"12345678-1234-5678-9abc-123456789abc","current_subscription_status":"Resubscribed","previous_scubscription_status":"Withdrawn","status_date_set":"2015-12-25T19:25:24.731+00:00","api_error_entity":{"error_code":0,"warning_messages":[]}},"required":["subscription_id","current_subscription_status","previous_scubscription_status","status_date_set","api_error_entity"],"type":"object","properties":{"subscription_id":{"format":"uuid","description":"Id of the Subscription","type":"string"},"current_subscription_status":{"description":"The current subscription status","type":"string"},"previous_scubscription_status":{"description":"The previous subscription status","type":"string"},"status_date_set":{"format":"date-time","description":"The datetime the status was last changed","type":"string"},"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"ApiErrorEntity":{"description":"Model used to determine what, if anything, went wrong with an api request","required":["error_code"],"type":"object","properties":{"error_code":{"format":"int32","description":"Used to denote the kind of error that occurred, if any.\r\nNoError=0;\r\nUnknownError=1;\r\nValidationError=2;\r\nItemNotFound=3;\r\nAuthenticationError=4;\r\nAuthorizationError=5;0 = No Error, 1 = Unknown Error, 2 = Validation Error, 3 = Item Not Found, 4 = Authentication Error, 5 = Authorization Error, 6 = Subscription Not Found, 7 = Enrollment Already Exists, 8 = Subscription Already Exists","enum":[0,1,2,3,4,5,6,7,8],"type":"integer"},"error_message":{"description":"Message describing what caused the error to occur","type":"string"},"warning_messages":{"description":"Warning messages describing any  potential problems with the request that do not cause the request to fail","type":"array","items":{"type":"string"},"readOnly":true}}},"ApiResponseBase":{"title":"NexPort API Response","description":"Base class for api responses","default":{"api_error_entity":{"error_code":3,"error_message":"No entity found matching id in request","warning_messages":[]}},"required":["api_error_entity"],"type":"object","properties":{"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"SetSubscriptionStatusRequest":{"title":"SetSubscriptionStatusRequest","default":{"subscription_id":"12345678-1234-5678-9abc-123456789abc","subscription_status":"New Status or empty string for default"},"required":["subscription_id","subscription_status"],"type":"object","properties":{"subscription_id":{"format":"uuid","description":"The Subscription Id","type":"string"},"subscription_status":{"description":"The status that should be set on this subscription. Use empty string to set the subscription status to the default subscription status.","type":"string"}}}}}}
```

## Gets all the custom profile fields available to an organization, or a field matching an id in a given org.

> Will throw a CustomFieldNotFound exception if no custom profile field exists with the given field id.

```json
{"openapi":"3.1.1","info":{"title":"NexPort Web API","version":"v1"},"servers":[{"url":"https://www.nexportcampus.com"}],"paths":{"/api/v1/AdminApi/GetCustomProfileFields":{"get":{"tags":["AdminApi"],"summary":"Gets all the custom profile fields available to an organization, or a field matching an id in a given org.","description":"Will throw a CustomFieldNotFound exception if no custom profile field exists with the given field id.","operationId":"AdminApi_GetCustomProfileFields","parameters":[{"schema":{"type":"string","format":"uuid"},"name":"org_id","in":"query","required":true},{"schema":{"type":"string","format":"uuid"},"name":"field_id","in":"query","required":false},{"schema":{"type":"string"},"name":"access_token","in":"query","description":"Use the AdminApi Authenticate method to get the access_token","required":true}],"responses":{"200":{"description":"List of custom profile fields","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GetCustomProfileFieldsResponse"}}},"text/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GetCustomProfileFieldsResponse"}}}}},"409":{"description":"Entity not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"422":{"description":"Validation exception. See response body for more info.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}}}}}},"components":{"schemas":{"GetCustomProfileFieldsResponse":{"title":"GetCustomProfileFieldsResponse","description":"Contains information for a single custom profile field","default":{"field_id":"12345678-1234-5678-9abc-123456789abc","name":"Sample name","key":"Sample key","description":"Sample description","type":1,"org_id":"12345678-1234-5678-9abc-123456789abc","org_short_name":"testorg","api_error_entity":{"error_code":0,"warning_messages":[]}},"required":["field_id","name","key","description","type","org_id","org_short_name","api_error_entity"],"type":"object","properties":{"field_id":{"format":"uuid","description":"Id of the custom profile field","type":"string"},"name":{"description":"Represents the name of the custom profile field","type":"string"},"key":{"description":"Key of the custom profile field","type":"string"},"description":{"description":"Description of the custom profile field","type":"string"},"type":{"format":"int32","description":"Type of custom profile field.\r\nNone=0;\r\nText=1;\r\nDateTime=2;\r\nBoolean=3;\r\nNumeric=4;\r\nEmail=5;\r\nSelectDropDown=6;\r\nDateOnly=7;\r\nSelectCheckbox=8;0 = None, 1 = Text Field, 2 = Date/Time Field, 3 = YES/NO Field, 4 = Number Field, 5 = Email Field, 6 = Select Dropdown Field, 7 = Date Field, 8 = Select Checkbox Field","enum":[0,1,2,3,4,5,6,7,8],"type":"integer"},"org_id":{"format":"uuid","description":"Id of the organization this custom profile field belongs to","type":"string"},"org_short_name":{"description":"Short name of the organization this custom profile field belongs to","type":"string"},"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"ApiErrorEntity":{"description":"Model used to determine what, if anything, went wrong with an api request","required":["error_code"],"type":"object","properties":{"error_code":{"format":"int32","description":"Used to denote the kind of error that occurred, if any.\r\nNoError=0;\r\nUnknownError=1;\r\nValidationError=2;\r\nItemNotFound=3;\r\nAuthenticationError=4;\r\nAuthorizationError=5;0 = No Error, 1 = Unknown Error, 2 = Validation Error, 3 = Item Not Found, 4 = Authentication Error, 5 = Authorization Error, 6 = Subscription Not Found, 7 = Enrollment Already Exists, 8 = Subscription Already Exists","enum":[0,1,2,3,4,5,6,7,8],"type":"integer"},"error_message":{"description":"Message describing what caused the error to occur","type":"string"},"warning_messages":{"description":"Warning messages describing any  potential problems with the request that do not cause the request to fail","type":"array","items":{"type":"string"},"readOnly":true}}},"ApiResponseBase":{"title":"NexPort API Response","description":"Base class for api responses","default":{"api_error_entity":{"error_code":3,"error_message":"No entity found matching id in request","warning_messages":[]}},"required":["api_error_entity"],"type":"object","properties":{"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}}}}}
```

## Gets the custom profile field values based on the given criteria, with DateTime fields being in UTC.

> Valid argument combinations are:> \
> subscriber\_id;> \
> user\_id and org\_id;> \
> subscriber\_id and key;> \
> user\_id, org\_id, and key.> \
> Requires the View User Profiles permission for the subscription organization or an ancestor.

```json
{"openapi":"3.1.1","info":{"title":"NexPort Web API","version":"v1"},"servers":[{"url":"https://www.nexportcampus.com"}],"paths":{"/api/v1/AdminApi/GetCustomProfileFieldValues":{"get":{"tags":["AdminApi"],"summary":"Gets the custom profile field values based on the given criteria, with DateTime fields being in UTC.","description":"Valid argument combinations are:\r\nsubscriber_id;\r\nuser_id and org_id;\r\nsubscriber_id and key;\r\nuser_id, org_id, and key.\r\nRequires the View User Profiles permission for the subscription organization or an ancestor.","operationId":"AdminApi_GetCustomProfileFieldValues","parameters":[{"schema":{"type":"string","format":"uuid"},"name":"subscriber_id","in":"query","required":false},{"schema":{"type":"string","format":"uuid"},"name":"user_id","in":"query","required":false},{"schema":{"type":"string","format":"uuid"},"name":"org_id","in":"query","required":false},{"schema":{"type":"string"},"name":"key","in":"query","description":"Key of the custom profile field to get the value for","required":false},{"schema":{"type":"string"},"name":"access_token","in":"query","description":"Use the AdminApi Authenticate method to get the access_token","required":true}],"responses":{"200":{"description":"List of custom profile field values","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GetCustomProfileFieldValuesResponse"}}},"text/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GetCustomProfileFieldValuesResponse"}}}}},"403":{"description":"Not authorized to view user profiles","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"409":{"description":"Entity not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"422":{"description":"Validation exception","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}}}}}},"components":{"schemas":{"GetCustomProfileFieldValuesResponse":{"title":"GetCustomProfileFieldValuesResponse","description":"Contains information for a single custom profile field value","default":{"name":"Sample name","key":"Sample key","value":"Sample string value","org_id":"12345678-1234-5678-9abc-123456789abc","org_short_name":"testorg","field_id":"12345678-1234-5678-9abc-123456789abc","type":1,"utc_date_modified":"2026-05-25T01:56:25.6411232Z","api_error_entity":{"error_code":0,"warning_messages":[]}},"required":["name","key","value","org_id","org_short_name","field_id","type","utc_date_modified","api_error_entity"],"type":"object","properties":{"name":{"description":"Represents the name of the custom field","type":"string"},"key":{"description":"Key of the custom field","type":"string"},"value":{"description":"Custom field value","type":"string"},"org_id":{"format":"uuid","description":"Id of the subscription organization this custom profile field value belongs to","type":"string"},"org_short_name":{"description":"Short name of the subscription organization this custom profile field value belongs to","type":"string"},"field_id":{"format":"uuid","description":"Id of the field this custom profile field value corresponds to","type":"string"},"type":{"format":"int32","description":"Type of custom profile field this value belongs to.\r\nNone=0;\r\nText=1;\r\nDateTime=2;\r\nBoolean=3;\r\nNumeric=4;\r\nEmail=5;\r\nSelectDropDown=6;\r\nDateOnly=7;\r\nSelectCheckbox=8;0 = None, 1 = Text Field, 2 = Date/Time Field, 3 = YES/NO Field, 4 = Number Field, 5 = Email Field, 6 = Select Dropdown Field, 7 = Date Field, 8 = Select Checkbox Field","enum":[0,1,2,3,4,5,6,7,8],"type":"integer"},"utc_date_modified":{"format":"date-time","description":"Date/Time that the value was last modified","type":"string"},"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"ApiErrorEntity":{"description":"Model used to determine what, if anything, went wrong with an api request","required":["error_code"],"type":"object","properties":{"error_code":{"format":"int32","description":"Used to denote the kind of error that occurred, if any.\r\nNoError=0;\r\nUnknownError=1;\r\nValidationError=2;\r\nItemNotFound=3;\r\nAuthenticationError=4;\r\nAuthorizationError=5;0 = No Error, 1 = Unknown Error, 2 = Validation Error, 3 = Item Not Found, 4 = Authentication Error, 5 = Authorization Error, 6 = Subscription Not Found, 7 = Enrollment Already Exists, 8 = Subscription Already Exists","enum":[0,1,2,3,4,5,6,7,8],"type":"integer"},"error_message":{"description":"Message describing what caused the error to occur","type":"string"},"warning_messages":{"description":"Warning messages describing any  potential problems with the request that do not cause the request to fail","type":"array","items":{"type":"string"},"readOnly":true}}},"ApiResponseBase":{"title":"NexPort API Response","description":"Base class for api responses","default":{"api_error_entity":{"error_code":3,"error_message":"No entity found matching id in request","warning_messages":[]}},"required":["api_error_entity"],"type":"object","properties":{"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}}}}}
```

Sets the custom profile field values for a subscription based on\
the subscriber id and key/value pairs in the request.
-----------------------------------------------------

> All fields that can be set will be set and any fields that are not found will be ignored. Warnings will be added to the {Nexport.WebApi.Model.v1.ApiErrorEntity}> \
> property's warnings collection and the ItemNotFound error code set.> \
> \###Permissions> \
> This method requires the Edit User Profile permission in the subscription organization or an ancestor.

```json
{"openapi":"3.1.1","info":{"title":"NexPort Web API","version":"v1"},"servers":[{"url":"https://www.nexportcampus.com"}],"paths":{"/api/v1/AdminApi/SetCustomProfileFieldValues":{"post":{"tags":["AdminApi"],"summary":"Sets the custom profile field values for a subscription based on\r\nthe subscriber id and key/value pairs in the request.","description":"All fields that can be set will be set and any fields that are not found will be ignored. Warnings will be added to the {Nexport.WebApi.Model.v1.ApiErrorEntity}\r\nproperty's warnings collection and the ItemNotFound error code set.\r\n###Permissions\r\nThis method requires the Edit User Profile permission in the subscription organization or an ancestor.","operationId":"AdminApi_SetCustomProfileFieldValues","parameters":[{"schema":{"type":"string"},"name":"access_token","in":"query","description":"Use the AdminApi Authenticate method to get the access_token","required":true}],"responses":{"200":{"description":"Error information","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetCustomProfileFieldValuesResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/SetCustomProfileFieldValuesResponse"}}}},"403":{"description":"Not authorized to edit profiles","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"409":{"description":"Entity not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"422":{"description":"Validation exception. See response body for more info.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetCustomProfileFieldValuesRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/SetCustomProfileFieldValuesRequest"}}},"description":"Contains subscriber id and dictionary of key/value pairs","required":true}}}},"components":{"schemas":{"SetCustomProfileFieldValuesResponse":{"title":"SetCustomProfileFieldValuesResponse","description":"Used to inform the method caller if any of the passed in fields are invalid.\r\nMessage may contain additional error information.","default":{"error":true,"message":"Sample error","api_error_entity":{"error_code":0,"warning_messages":[]}},"required":["error","api_error_entity"],"type":"object","properties":{"message":{"description":"Contains additional information about the type of error that occurred","type":"string"},"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"ApiErrorEntity":{"description":"Model used to determine what, if anything, went wrong with an api request","required":["error_code"],"type":"object","properties":{"error_code":{"format":"int32","description":"Used to denote the kind of error that occurred, if any.\r\nNoError=0;\r\nUnknownError=1;\r\nValidationError=2;\r\nItemNotFound=3;\r\nAuthenticationError=4;\r\nAuthorizationError=5;0 = No Error, 1 = Unknown Error, 2 = Validation Error, 3 = Item Not Found, 4 = Authentication Error, 5 = Authorization Error, 6 = Subscription Not Found, 7 = Enrollment Already Exists, 8 = Subscription Already Exists","enum":[0,1,2,3,4,5,6,7,8],"type":"integer"},"error_message":{"description":"Message describing what caused the error to occur","type":"string"},"warning_messages":{"description":"Warning messages describing any  potential problems with the request that do not cause the request to fail","type":"array","items":{"type":"string"},"readOnly":true}}},"ApiResponseBase":{"title":"NexPort API Response","description":"Base class for api responses","default":{"api_error_entity":{"error_code":3,"error_message":"No entity found matching id in request","warning_messages":[]}},"required":["api_error_entity"],"type":"object","properties":{"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"SetCustomProfileFieldValuesRequest":{"description":"Contains id of the subscription and the custom fields/values to set","required":["subscriber_id","custom_profile_field_values"],"type":"object","properties":{"subscriber_id":{"format":"uuid","description":"Id of the subscription to set the custom values for","type":"string"},"subscriber_pair":{"$ref":"#/components/schemas/UserOrgPair","description":"User id and Org id of the subscription being searched for"},"custom_profile_field_values":{"description":"Custom profile field key/value pairs. The key should be the key given to the field NOT THE NAME.","type":"object","additionalProperties":{"type":"string"}}}},"UserOrgPair":{"type":"object","properties":{"user_id":{"format":"uuid","description":"A user id","type":"string"},"org_id":{"format":"uuid","description":"Organization ID","type":"string"}}}}}}
```

## GET /api/v1/AdminApi/SearchDirectory

> Returns a list of organizations and groups that matches the search term with their name or short name. Each item in the list will contain> \
> the id of the organization/group, name, short name and the type.> \
> Results are in alphabetical order by name followed by the short name.

```json
{"openapi":"3.1.1","info":{"title":"NexPort Web API","version":"v1"},"servers":[{"url":"https://www.nexportcampus.com"}],"paths":{"/api/v1/AdminApi/SearchDirectory":{"get":{"tags":["AdminApi"],"summary":"Returns a list of organizations and groups that matches the search term with their name or short name. Each item in the list will contain\r\nthe id of the organization/group, name, short name and the type.\r\nResults are in alphabetical order by name followed by the short name.","operationId":"AdminApi_SearchDirectory","parameters":[{"schema":{"type":"integer","format":"int32","enum":[0,1]},"name":"search_operator","in":"query","description":"0 = Disjunction, 1 = Conjunction","required":true},{"schema":{"type":"string","format":"uuid"},"name":"base_org_id","in":"query","required":true},{"schema":{"type":"string"},"name":"name","in":"query","description":"The organization/group name","required":false},{"schema":{"type":"string"},"name":"short_name","in":"query","required":false},{"schema":{"type":"integer","format":"int32"},"name":"page","in":"query","description":"Which page of results to start on","required":false},{"schema":{"type":"integer","format":"int32"},"name":"per_page","in":"query","required":false},{"schema":{"type":"string"},"name":"access_token","in":"query","description":"Use the AdminApi Authenticate method to get the access_token","required":true}],"responses":{"200":{"description":"List of organizations and groups","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DirectoryResponseItem"}}},"text/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DirectoryResponseItem"}}}}},"409":{"description":"Entity not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"422":{"description":"Validation exception","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}}}}}},"components":{"schemas":{"DirectoryResponseItem":{"title":"DirectoryResponseItem","description":"Contains organization/group name, short name","default":{"id":"12345678-1234-5678-9abc-123456789abc","parent_org_id":"12345678-1234-5678-9abc-123456789abc","name":"Test Organization","short_name":"testorg","type":0,"api_error_entity":{"error_code":0,"warning_messages":[]}},"required":["id","parent_org_id","name","short_name","api_error_entity"],"type":"object","properties":{"id":{"format":"uuid","description":"Id of an organization or a group","type":"string"},"parent_org_id":{"format":"uuid","description":"Id of the parent organization (if existed)","type":"string"},"name":{"description":"Name of the organization or the group","type":"string"},"short_name":{"description":"Short name of the organization or the group","type":"string"},"type":{"format":"int32","description":"Type of the directory, either an organization or a group","type":"integer"},"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"ApiErrorEntity":{"description":"Model used to determine what, if anything, went wrong with an api request","required":["error_code"],"type":"object","properties":{"error_code":{"format":"int32","description":"Used to denote the kind of error that occurred, if any.\r\nNoError=0;\r\nUnknownError=1;\r\nValidationError=2;\r\nItemNotFound=3;\r\nAuthenticationError=4;\r\nAuthorizationError=5;0 = No Error, 1 = Unknown Error, 2 = Validation Error, 3 = Item Not Found, 4 = Authentication Error, 5 = Authorization Error, 6 = Subscription Not Found, 7 = Enrollment Already Exists, 8 = Subscription Already Exists","enum":[0,1,2,3,4,5,6,7,8],"type":"integer"},"error_message":{"description":"Message describing what caused the error to occur","type":"string"},"warning_messages":{"description":"Warning messages describing any  potential problems with the request that do not cause the request to fail","type":"array","items":{"type":"string"},"readOnly":true}}},"ApiResponseBase":{"title":"NexPort API Response","description":"Base class for api responses","default":{"api_error_entity":{"error_code":3,"error_message":"No entity found matching id in request","warning_messages":[]}},"required":["api_error_entity"],"type":"object","properties":{"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}}}}}
```

## GET /api/v1/AdminApi/GetOrganizations

> Returns a list of sub organizations (as well as the parent organization)> \
> corresponding to the given id or short name. Each item in the list will contain> \
> the org id, org name, and org short name.> \
> Results are in alphabetical order by org name.

```json
{"openapi":"3.1.1","info":{"title":"NexPort Web API","version":"v1"},"servers":[{"url":"https://www.nexportcampus.com"}],"paths":{"/api/v1/AdminApi/GetOrganizations":{"get":{"tags":["AdminApi"],"summary":"Returns a list of sub organizations (as well as the parent organization)\r\ncorresponding to the given id or short name. Each item in the list will contain\r\nthe org id, org name, and org short name.\r\nResults are in alphabetical order by org name.","operationId":"AdminApi_GetOrganizations","parameters":[{"schema":{"type":"string","format":"uuid"},"name":"org_id","in":"query","required":false},{"schema":{"type":"string"},"name":"org_short_name","in":"query","required":false},{"schema":{"type":"integer","format":"int32"},"name":"page","in":"query","description":"Which page of results to start on","required":false},{"schema":{"type":"integer","format":"int32"},"name":"per_page","in":"query","required":false},{"schema":{"type":"string"},"name":"access_token","in":"query","description":"Use the AdminApi Authenticate method to get the access_token","required":true}],"responses":{"200":{"description":"List of organizations","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationResponseItem"}}},"text/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationResponseItem"}}}}},"409":{"description":"Entity not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"422":{"description":"Validation exception","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}}}}}},"components":{"schemas":{"OrganizationResponseItem":{"title":"OrganizationResponseItem","description":"Contains organization name, short name, and custom fields","default":{"id":"12345678-1234-5678-9abc-123456789abc","org_id":"12345678-1234-5678-9abc-123456789abc","name":"Test Organization","short_name":"testorg","api_error_entity":{"error_code":0,"warning_messages":[]}},"required":["org_id","name","short_name","api_error_entity"],"type":"object","properties":{"org_id":{"format":"uuid","description":"Id of the organization","type":"string"},"name":{"description":"Name of the organization","type":"string"},"short_name":{"description":"Short name of the organization","type":"string"},"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"ApiErrorEntity":{"description":"Model used to determine what, if anything, went wrong with an api request","required":["error_code"],"type":"object","properties":{"error_code":{"format":"int32","description":"Used to denote the kind of error that occurred, if any.\r\nNoError=0;\r\nUnknownError=1;\r\nValidationError=2;\r\nItemNotFound=3;\r\nAuthenticationError=4;\r\nAuthorizationError=5;0 = No Error, 1 = Unknown Error, 2 = Validation Error, 3 = Item Not Found, 4 = Authentication Error, 5 = Authorization Error, 6 = Subscription Not Found, 7 = Enrollment Already Exists, 8 = Subscription Already Exists","enum":[0,1,2,3,4,5,6,7,8],"type":"integer"},"error_message":{"description":"Message describing what caused the error to occur","type":"string"},"warning_messages":{"description":"Warning messages describing any  potential problems with the request that do not cause the request to fail","type":"array","items":{"type":"string"},"readOnly":true}}},"ApiResponseBase":{"title":"NexPort API Response","description":"Base class for api responses","default":{"api_error_entity":{"error_code":3,"error_message":"No entity found matching id in request","warning_messages":[]}},"required":["api_error_entity"],"type":"object","properties":{"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}}}}}
```

## POST /api/v1/AdminApi/HasGroupPermission

> Checks if the given user has permission on a group.

```json
{"openapi":"3.1.1","info":{"title":"NexPort Web API","version":"v1"},"servers":[{"url":"https://www.nexportcampus.com"}],"paths":{"/api/v1/AdminApi/HasGroupPermission":{"post":{"tags":["AdminApi"],"summary":"Checks if the given user has permission on a group.","operationId":"AdminApi_HasGroupPermission","parameters":[{"schema":{"type":"string"},"name":"access_token","in":"query","description":"Use the AdminApi Authenticate method to get the access_token","required":true}],"responses":{"200":{"description":"Is Permitted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HasGroupPermissionResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/HasGroupPermissionResponse"}}}},"403":{"description":"Not authorized to view groups","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"409":{"description":"Entity not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"422":{"description":"Validation exception. See response body for more info.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HasGroupPermissionRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/HasGroupPermissionRequest"}}},"description":"The Request model","required":true}}}},"components":{"schemas":{"HasGroupPermissionResponse":{"default":{"is_permitted":true,"api_error_entity":{"error_code":0,"warning_messages":[]}},"required":["is_permitted","api_error_entity"],"type":"object","properties":{"is_permitted":{"type":"boolean"},"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"ApiErrorEntity":{"description":"Model used to determine what, if anything, went wrong with an api request","required":["error_code"],"type":"object","properties":{"error_code":{"format":"int32","description":"Used to denote the kind of error that occurred, if any.\r\nNoError=0;\r\nUnknownError=1;\r\nValidationError=2;\r\nItemNotFound=3;\r\nAuthenticationError=4;\r\nAuthorizationError=5;0 = No Error, 1 = Unknown Error, 2 = Validation Error, 3 = Item Not Found, 4 = Authentication Error, 5 = Authorization Error, 6 = Subscription Not Found, 7 = Enrollment Already Exists, 8 = Subscription Already Exists","enum":[0,1,2,3,4,5,6,7,8],"type":"integer"},"error_message":{"description":"Message describing what caused the error to occur","type":"string"},"warning_messages":{"description":"Warning messages describing any  potential problems with the request that do not cause the request to fail","type":"array","items":{"type":"string"},"readOnly":true}}},"ApiResponseBase":{"title":"NexPort API Response","description":"Base class for api responses","default":{"api_error_entity":{"error_code":3,"error_message":"No entity found matching id in request","warning_messages":[]}},"required":["api_error_entity"],"type":"object","properties":{"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"HasGroupPermissionRequest":{"description":"Model used for Request","default":{"user_id":"dfff0969-a799-45da-903a-afba8b65bab5","group_id":"d58cd934-8722-4aeb-a043-eef2c5578b8b","permission":"AddGroup"},"required":["user_id","group_id","permission"],"type":"object","properties":{"user_id":{"format":"uuid","description":"The User Id","type":"string"},"group_id":{"format":"uuid","description":"The Group Id","type":"string"},"permission":{"description":"The Permission.  From PermissionAttribute on Role Properties.","type":"string"}}}}}}
```

## POST /api/v1/AdminApi/SearchGroupsForPermission

> Searches for groups on which the given user has permission.

```json
{"openapi":"3.1.1","info":{"title":"NexPort Web API","version":"v1"},"servers":[{"url":"https://www.nexportcampus.com"}],"paths":{"/api/v1/AdminApi/SearchGroupsForPermission":{"post":{"tags":["AdminApi"],"summary":"Searches for groups on which the given user has permission.","operationId":"AdminApi_SearchGroupsForPermission","parameters":[{"schema":{"type":"string"},"name":"access_token","in":"query","description":"Use the AdminApi Authenticate method to get the access_token","required":true}],"responses":{"200":{"description":"List of organizations and groups","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchGroupsForPermissionResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/SearchGroupsForPermissionResponse"}}}},"403":{"description":"Not authorized to search for groups","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"422":{"description":"Validation exception. See response body for more info.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchGroupsForPermissionRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/SearchGroupsForPermissionRequest"}}},"required":true}}}},"components":{"schemas":{"SearchGroupsForPermissionResponse":{"description":"The Request object used for AdminApiController.SearchGroupsForPermission","default":{"groups":[{"id":"ab28ee13-b1a3-427e-aba8-d712ac7de5d2","parent_org_id":"2b43ea82-cd68-47c8-a75c-fa037f687156","name":"TheName_1","short_name":"TheShortName_1","type":0,"api_error_entity":{"error_code":0,"warning_messages":[]}},{"id":"3c9c2692-be72-44ae-9e03-93bde36d2974","parent_org_id":"fc963132-ac56-45cc-948b-f98606ad7e6a","name":"TheName_A","short_name":"TheShortName_A","type":1,"api_error_entity":{"error_code":0,"warning_messages":[]}}],"page":1,"page_size":15,"total_count":0,"api_error_entity":{"error_code":0,"warning_messages":[]}},"required":["groups","page","page_size","total_count","api_error_entity"],"type":"object","properties":{"groups":{"description":"Groups where the user has permission","type":"array","items":{"$ref":"#/components/schemas/DirectoryResponseItem"}},"page":{"format":"int32","description":"The one based index of the current page","type":"integer"},"page_size":{"format":"int32","description":"Requested page size","type":"integer"},"total_count":{"format":"int32","description":"Number of records across ALL pages","type":"integer"},"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"DirectoryResponseItem":{"title":"DirectoryResponseItem","description":"Contains organization/group name, short name","default":{"id":"12345678-1234-5678-9abc-123456789abc","parent_org_id":"12345678-1234-5678-9abc-123456789abc","name":"Test Organization","short_name":"testorg","type":0,"api_error_entity":{"error_code":0,"warning_messages":[]}},"required":["id","parent_org_id","name","short_name","api_error_entity"],"type":"object","properties":{"id":{"format":"uuid","description":"Id of an organization or a group","type":"string"},"parent_org_id":{"format":"uuid","description":"Id of the parent organization (if existed)","type":"string"},"name":{"description":"Name of the organization or the group","type":"string"},"short_name":{"description":"Short name of the organization or the group","type":"string"},"type":{"format":"int32","description":"Type of the directory, either an organization or a group","type":"integer"},"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"ApiErrorEntity":{"description":"Model used to determine what, if anything, went wrong with an api request","required":["error_code"],"type":"object","properties":{"error_code":{"format":"int32","description":"Used to denote the kind of error that occurred, if any.\r\nNoError=0;\r\nUnknownError=1;\r\nValidationError=2;\r\nItemNotFound=3;\r\nAuthenticationError=4;\r\nAuthorizationError=5;0 = No Error, 1 = Unknown Error, 2 = Validation Error, 3 = Item Not Found, 4 = Authentication Error, 5 = Authorization Error, 6 = Subscription Not Found, 7 = Enrollment Already Exists, 8 = Subscription Already Exists","enum":[0,1,2,3,4,5,6,7,8],"type":"integer"},"error_message":{"description":"Message describing what caused the error to occur","type":"string"},"warning_messages":{"description":"Warning messages describing any  potential problems with the request that do not cause the request to fail","type":"array","items":{"type":"string"},"readOnly":true}}},"ApiResponseBase":{"title":"NexPort API Response","description":"Base class for api responses","default":{"api_error_entity":{"error_code":3,"error_message":"No entity found matching id in request","warning_messages":[]}},"required":["api_error_entity"],"type":"object","properties":{"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"SearchGroupsForPermissionRequest":{"description":"The Request object used for AdminApiController.SearchGroupsForPermission","default":{"user_id":"21fcda2c-db1f-45cb-bc62-91c8477b6048","org_id":"f24676a3-b1de-4bcb-97b6-1293e055aa96","permission":"AddGroup","page":1,"per_page":15},"required":["user_id","org_id","permission"],"type":"object","properties":{"user_id":{"format":"uuid","description":"The User Id","type":"string"},"org_id":{"format":"uuid","description":"The Organization Id to look for permissions under.","type":"string"},"permission":{"description":"The Permission Attribute Name Value from the Role class","type":"string"},"page":{"format":"int32","description":"The page to return","type":"integer"},"per_page":{"format":"int32","description":"The number of items per page","type":"integer"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.nexportsolutions.com/nexport-user-documentation/developer-documentation/campus-webapi/adminapi.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
