diff --git a/docs/swagger/swagger-json.js b/docs/swagger/swagger-json.js index 9b9b376d..263c7b6d 100644 --- a/docs/swagger/swagger-json.js +++ b/docs/swagger/swagger-json.js @@ -1 +1 @@ -var swaggerJSON = {"swagger":"2.0","host":"localhost:8080","basePath":"/","schemes":["http"],"info":{"title":"Udaru API Documentation","version":"5.0.1-beta.0","description":"This page documents Udaru's API endpoints, along with their various inputs and outputs. For more information about Udaru please see the Documentation Site."},"tags":[{"name":"policies","description":"Manage policy objects"},{"name":"organizations","description":"Manage organizations"},{"name":"teams","description":"Manage teams within an organization"},{"name":"users","description":"Manage users within an organization"},{"name":"authorization","description":"Manage the actions a user can perform against a resource"},{"name":"private","description":"Endpoints that require a service key"},{"name":"monitoring","description":"Endpoints for monitoring and uptime"}],"paths":{"/ping":{"get":{"summary":"Ping endpoint","operationId":"getPing","description":"The GET /ping endpoint will return 200 if the server is up and running.","tags":["monitoring"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/authorization/organizations":{"get":{"summary":"List all the organizations","operationId":"getAuthorizationOrganizations","description":"The GET /authorization/organizations endpoint returns a list of all organizations.\n\nThe results are paginated. Page numbering and page limit start from 1.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"integer","description":"Page number, starts from 1","minimum":1,"name":"page","in":"query"},{"type":"integer","description":"Items per page","minimum":1,"name":"limit","in":"query"}],"tags":["organizations"],"responses":{"200":{"schema":{"$ref":"#/definitions/PagedOrganizations"},"description":"Successful"}}},"post":{"summary":"Create an organization","operationId":"postAuthorizationOrganizations","description":"The POST /authorization/organizations endpoint creates a new organization, the default organization admin policy and (if provided) its admin.","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"in":"body","name":"body","schema":{"$ref":"#/definitions/CreateOrgPayload"}}],"tags":["organizations"],"responses":{"200":{"schema":{"$ref":"#/definitions/OrganizationAndUser"},"description":"Successful"}}}},"/authorization/policies":{"get":{"summary":"Fetch all the defined policies","operationId":"getAuthorizationPolicies","description":"The GET /authorization/policies endpoint returns a list of all the defined policies\nthe policies will contain only the ID, version and name. No statements.\n\nThe results are paginated. Page numbering and page limit start from 1.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"integer","description":"Page number, starts from 1","minimum":1,"name":"page","in":"query"},{"type":"integer","description":"Items per page","minimum":1,"name":"limit","in":"query"}],"tags":["policies"],"responses":{"200":{"schema":{"$ref":"#/definitions/PagedPolicies"},"description":"Successful"}}},"post":{"summary":"Create a policy for the current user organization","operationId":"postAuthorizationPolicies","description":"The POST /authorization/policies endpoint is a private endpoint. It can be accessed only using a service key.\nThis service key needs to be passed as a query string in the form \"sig=\"\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","name":"sig","in":"query","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/CreatePolicyPayload"}}],"tags":["policies","private"],"responses":{"200":{"schema":{"$ref":"#/definitions/Policy"},"description":"Successful"}}}},"/authorization/shared-policies":{"get":{"summary":"Fetch all the defined shared policies","operationId":"getAuthorizationSharedpolicies","description":"The GET /authorization/shared-policies endpoint returns a list of all the defined policies\nthe policies will contain only the ID, version and name. No statements.\n\nThe results are paginated. Page numbering and page limit start from 1.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"integer","description":"Page number, starts from 1","minimum":1,"name":"page","in":"query"},{"type":"integer","description":"Items per page","minimum":1,"name":"limit","in":"query"}],"tags":["policies"],"responses":{"200":{"schema":{"$ref":"#/definitions/PagedPolicies"},"description":"Successful"}}},"post":{"summary":"Create a policy shared across organizations","operationId":"postAuthorizationSharedpolicies","description":"The POST /authorization/shared-policies endpoint is a private endpoint. It can be accessed only using a service key.\nThis service key needs to be passed as a query string in the form \"sig=\"\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","name":"sig","in":"query","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/CreateSharedPoliciesPayload"}}],"tags":["policies","private"],"responses":{"200":{"schema":{"$ref":"#/definitions/Policy"},"description":"Successful"}}}},"/authorization/teams":{"get":{"summary":"Fetch all teams from the current user organization","operationId":"getAuthorizationTeams","description":"The GET /authorization/teams endpoint returns a list of all teams from the current organization.\n\nThe results are paginated. Page numbering and page limit start from 1.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"integer","description":"Page number, starts from 1","minimum":1,"name":"page","in":"query"},{"type":"integer","description":"Items per page","minimum":1,"name":"limit","in":"query"}],"tags":["teams"],"responses":{"200":{"description":"Note: teams users and policies are not populated in paged teams list","schema":{"$ref":"#/definitions/PagedTeams"}}}},"post":{"summary":"Create a team","operationId":"postAuthorizationTeams","description":"The POST /authorization/teams endpoint creates a new team from its payload data.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"in":"body","name":"body","schema":{"$ref":"#/definitions/CreateTeamPayload"}}],"tags":["teams"],"responses":{"200":{"schema":{"$ref":"#/definitions/Team"},"description":"Successful"}}}},"/authorization/users":{"get":{"summary":"Fetch all users from the current user organization","operationId":"getAuthorizationUsers","description":"The GET /authorization/users endpoint returns a list of all users from the current organization.\n\nThe results are paginated. Page numbering and page limit start from 1.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"integer","description":"Page number, starts from 1","minimum":1,"name":"page","in":"query"},{"type":"integer","description":"Items per page","minimum":1,"name":"limit","in":"query"}],"tags":["users"],"responses":{"200":{"schema":{"$ref":"#/definitions/PagedUsers"},"description":"Successful"}}},"post":{"summary":"Create a new user","operationId":"postAuthorizationUsers","description":"The POST /authorization/users endpoint creates a new user given its data.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"in":"body","name":"body","schema":{"$ref":"#/definitions/CreateUserPayload"}}],"tags":["users"],"responses":{"200":{"schema":{"$ref":"#/definitions/User"},"description":"Successful"}}}},"/authorization/list/{userId}":{"get":{"summary":"List all the actions a user can perform on a list of resources","operationId":"getAuthorizationListUserid","description":"The GET /authorization/list/{userId} endpoint returns a list of all the actions a user\ncan perform on a given list of resources.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"User ID","maxLength":128,"name":"userId","in":"path","required":true},{"type":"array","description":"A list of Resources","x-constraint":{"single":true},"items":{"type":"string","description":"A single resource"},"collectionFormat":"multi","name":"resources","in":"query","required":true}],"tags":["authorization"],"responses":{"200":{"schema":{"$ref":"#/definitions/UserActionsOnResources","type":"array"},"description":"Successful"}}}},"/authorization/organizations/{id}":{"get":{"summary":"Get organization","operationId":"getAuthorizationOrganizationsId","description":"The GET /authorization/organizations/{id} endpoint returns a single organization data.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Organization ID","maxLength":128,"name":"id","in":"path","required":true}],"tags":["organizations"],"responses":{"200":{"schema":{"$ref":"#/definitions/Organization"},"description":"Successful"}}},"delete":{"summary":"DELETE an organization","operationId":"deleteAuthorizationOrganizationsId","description":"The DELETE /authorization/organizations/{id} endpoint will delete an organization.","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Organization ID","maxLength":128,"name":"id","in":"path","required":true}],"tags":["organizations"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}},"put":{"summary":"Update an organization","operationId":"putAuthorizationOrganizationsId","description":"The PUT /authorization/organizations/{id} endpoint will update an organization name and description","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Organization ID","maxLength":128,"name":"id","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/UpdateOrgPayload"}}],"tags":["organizations"],"responses":{"200":{"schema":{"$ref":"#/definitions/Organization"},"description":"Successful"}}}},"/authorization/policies/search":{"get":{"summary":"Search for organization policies","operationId":"getAuthorizationPoliciesSearch","description":"The GET /authorization/policies/search endpoint returns a filtered list of policies.\n\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","name":"query","in":"query","required":true}],"tags":["policies"],"responses":{"200":{"schema":{"$ref":"#/definitions/PagedPolicies"},"description":"Successful"}}}},"/authorization/policies/{id}":{"get":{"summary":"Fetch a single policy by ID","operationId":"getAuthorizationPoliciesId","description":"The GET /authorization/policies/{id} endpoint returns a policy based on its ID.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Policy ID","maxLength":128,"name":"id","in":"path","required":true}],"tags":["policies"],"responses":{"200":{"schema":{"$ref":"#/definitions/Policy"},"description":"Successful"}}},"delete":{"summary":"Delete a policy","operationId":"deleteAuthorizationPoliciesId","description":"The DELETE /authorization/policies/{id} endpoint is a private endpoint. It can be accessed only using a service key.\n\nThis service key needs to be passed as a query string in the form \"sig=\"\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Policy ID","maxLength":128,"name":"id","in":"path","required":true},{"type":"string","name":"sig","in":"query","required":true}],"tags":["policies","private"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}},"put":{"summary":"Update a policy of the current user organization","operationId":"putAuthorizationPoliciesId","description":"The PUT /authorization/policies/{id} endpoint is a private endpoint. It can be accessed only using a service key.\nThis service key needs to be passed as a query string in the form \"sig=\"\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Policy ID","maxLength":128,"name":"id","in":"path","required":true},{"type":"string","name":"sig","in":"query","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/UpdatePolicyPayload"}}],"tags":["policies","private"],"responses":{"200":{"schema":{"$ref":"#/definitions/Policy"},"description":"Successful"}}}},"/authorization/shared-policies/search":{"get":{"summary":"Search for shared policies","operationId":"getAuthorizationSharedpoliciesSearch","description":"The GET /authorization/shared-policies/search endpoint returns a filtered list of shared policies.\n\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","name":"query","in":"query","required":true}],"tags":["policies"],"responses":{"200":{"schema":{"$ref":"#/definitions/PagedPolicies"},"description":"Successful"}}}},"/authorization/shared-policies/{id}":{"get":{"summary":"Fetch a single shared policy","operationId":"getAuthorizationSharedpoliciesId","description":"The GET /authorization/shared-policies/{id} endpoint returns a policy based on its ID.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Policy ID","maxLength":128,"name":"id","in":"path","required":true}],"tags":["policies"],"responses":{"200":{"schema":{"$ref":"#/definitions/Policy"},"description":"Successful"}}},"delete":{"summary":"Delete a shared policy","operationId":"deleteAuthorizationSharedpoliciesId","description":"The DELETE /authorization/shared-policies/{id} endpoint is a private endpoint. It can be accessed only using a service key.\n\nThis service key needs to be passed as a query string in the form \"sig=\"\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Policy ID","maxLength":128,"name":"id","in":"path","required":true},{"type":"string","name":"sig","in":"query","required":true}],"tags":["policies","private"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}},"put":{"summary":"Update a shared policy","operationId":"putAuthorizationSharedpoliciesId","description":"The PUT /authorization/shared-policies/{id} endpoint is a private endpoint. It can be accessed only using a service key.\nThis service key needs to be passed as a query string in the form \"sig=\"\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Policy ID","maxLength":128,"name":"id","in":"path","required":true},{"type":"string","name":"sig","in":"query","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/UpdateSharedPolicyPayload"}}],"tags":["policies","private"],"responses":{"200":{"schema":{"$ref":"#/definitions/Policy"},"description":"Successful"}}}},"/authorization/teams/search":{"get":{"summary":"Search for teams from the current user organization","operationId":"getAuthorizationTeamsSearch","description":"The GET /authorization/teams/search endpoint returns a filtered list of teams from the current organization.\n\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","name":"query","in":"query","required":true}],"tags":["teams"],"responses":{"200":{"schema":{"$ref":"#/definitions/FilteredTeams"},"description":"Successful"}}}},"/authorization/teams/{id}":{"get":{"summary":"Fetch a team given its identifier","operationId":"getAuthorizationTeamsId","description":"The GET /authorization/teams/{id} endpoint returns a single team data.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Team ID","maxLength":128,"name":"id","in":"path","required":true}],"tags":["teams"],"responses":{"200":{"schema":{"$ref":"#/definitions/Team"},"description":"Successful"}}},"delete":{"summary":"Delete a team","operationId":"deleteAuthorizationTeamsId","description":"The DELETE /authorization/teams endpoint deletes a team.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Team ID","maxLength":128,"name":"id","in":"path","required":true}],"tags":["teams"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}},"put":{"summary":"Update a team","operationId":"putAuthorizationTeamsId","description":"The PUT /authorization/teams/{id} endpoint updates a team data.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Team ID","maxLength":128,"name":"id","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/UpdateTeamPayload"}}],"tags":["teams"],"responses":{"200":{"schema":{"$ref":"#/definitions/Team"},"description":"Successful"}}}},"/authorization/users/search":{"get":{"summary":"Search for users from the current organization","operationId":"getAuthorizationUsersSearch","description":"The get /authorization/users/search endpoint returns a filtered list of users from the current organization.\n\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","name":"query","in":"query","required":true}],"tags":["users"],"responses":{"200":{"schema":{"$ref":"#/definitions/SearchUserList"},"description":"Successful"}}}},"/authorization/users/{id}":{"get":{"summary":"Fetch a user given its identifier","operationId":"getAuthorizationUsersId","description":"The GET /authorization/users/{id} endpoint returns a single user data.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"User ID","maxLength":128,"name":"id","in":"path","required":true}],"tags":["users"],"responses":{"200":{"schema":{"$ref":"#/definitions/User"},"description":"Successful"}}},"delete":{"summary":"Delete a user","operationId":"deleteAuthorizationUsersId","description":"The DELETE /authorization/users/{id} endpoint deletes a user.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"User ID","maxLength":128,"name":"id","in":"path","required":true}],"tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}},"put":{"summary":"Update a user","operationId":"putAuthorizationUsersId","description":"The PUT /authorization/users/{id} endpoint updates the user data.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"User ID","maxLength":128,"name":"id","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/UpdateUserPayload"}}],"tags":["users"],"responses":{"200":{"schema":{"$ref":"#/definitions/User"},"description":"Successful"}}}},"/authorization/list/{userId}/{resource*}":{"get":{"summary":"List all the actions a user can perform on a resource","operationId":"getAuthorizationListUseridResource","description":"The GET /authorization/list/{userId}/{resource} endpoint returns a list of all the actions a user\ncan perform on a given resource.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"User ID","maxLength":128,"name":"userId","in":"path","required":true},{"type":"string","description":"The resource that the user wants to perform the action on","name":"resource","in":"path","required":true}],"tags":["authorization"],"responses":{"200":{"schema":{"$ref":"#/definitions/UserActions"},"description":"Successful"}}}},"/authorization/organizations/{id}/policies":{"get":{"summary":"Fetch organization policies given its identifier","operationId":"getAuthorizationOrganizationsIdPolicies","description":"The GET /authorization/organization/{id}/policies endpoint returns the organization policies.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Team ID","maxLength":128,"name":"id","in":"path","required":true},{"type":"integer","description":"Page number, starts from 1","minimum":1,"name":"page","in":"query"},{"type":"integer","description":"Items per page","minimum":1,"name":"limit","in":"query"}],"tags":["organizations"],"responses":{"200":{"schema":{"$ref":"#/definitions/PagedPolicyRefs"},"description":"Successful"}}},"post":{"summary":"Clear and replace the policies of an organization","operationId":"postAuthorizationOrganizationsIdPolicies","description":"The POST /authorization/organizations/{id}/policies endpoint replaces all the organization policies. The existing organization policies are removed.","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Organization ID","maxLength":128,"name":"id","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/ReplaceOrgPoliciesPayload"}}],"tags":["organizations"],"responses":{"200":{"schema":{"$ref":"#/definitions/Organization"},"description":"Successful"}}},"delete":{"summary":"Clear all policies of the organization","operationId":"deleteAuthorizationOrganizationsIdPolicies","description":"The DELETE /authorization/organizations/{id}/policies endpoint removes all the organization policies.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Organization ID","maxLength":128,"name":"id","in":"path","required":true}],"tags":["organizations"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}},"put":{"summary":"Add/update organization policy associations (specify instance to update)","operationId":"putAuthorizationOrganizationsIdPolicies","description":"The PUT /authorization/organizations/{id}/policies endpoint adds/updates the to the collection of policies associated with an organization","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Organization ID","maxLength":128,"name":"id","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/AddPoliciesToOrgPayload"}}],"tags":["organizations"],"responses":{"200":{"schema":{"$ref":"#/definitions/Organization"},"description":"Successful"}}}},"/authorization/policies/{id}/variables":{"get":{"summary":"Fetch a template policy's variables","operationId":"getAuthorizationPoliciesIdVariables","description":"The GET /authorization/policies/{id}/variables endpoint returns policy variables based on its ID.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Policy ID","maxLength":128,"name":"id","in":"path","required":true}],"tags":["policies"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/authorization/policies/{id}/instances":{"get":{"summary":"List the instances of a policy assigned to users/teams and orgs","operationId":"getAuthorizationPoliciesIdInstances","description":"The GET /authorization/policies/{id}/instances endpoint lists the instances of the policy specified.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Policy ID","maxLength":128,"name":"id","in":"path","required":true}],"tags":["policies"],"responses":{"200":{"description":"Policy Instances","schema":{"$ref":"#/definitions/Policy Instances","type":"array"}}}}},"/authorization/shared-policies/{id}/variables":{"get":{"summary":"Fetch a template shared policy's variables","operationId":"getAuthorizationSharedpoliciesIdVariables","description":"The GET /authorization/policies/{id}/variables endpoint returns shared policy variables based on its ID.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Policy ID","maxLength":128,"name":"id","in":"path","required":true}],"tags":["policies"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/authorization/shared-policies/{id}/instances":{"get":{"summary":"List the instances of a shared policy assigned to users/teams and orgs","operationId":"getAuthorizationSharedpoliciesIdInstances","description":"The GET /authorization/shared-policies/{id}/instances endpoint lists the instances of the shared policy specified.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Policy ID","maxLength":128,"name":"id","in":"path","required":true}],"tags":["policies"],"responses":{"200":{"description":"Policy Instances","schema":{"$ref":"#/definitions/Policy Instances","type":"array"}}}}},"/authorization/teams/{id}/policies":{"get":{"summary":"Fetch team policies given its identifier","operationId":"getAuthorizationTeamsIdPolicies","description":"The GET /authorization/teams/{id}/policies endpoint returns the team policies.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Team ID","maxLength":128,"name":"id","in":"path","required":true},{"type":"integer","description":"Page number, starts from 1","minimum":1,"name":"page","in":"query"},{"type":"integer","description":"Items per page","minimum":1,"name":"limit","in":"query"}],"tags":["teams"],"responses":{"200":{"schema":{"$ref":"#/definitions/PagedPolicyRefs"},"description":"Successful"}}},"post":{"summary":"Clear and replace policies for a team","operationId":"postAuthorizationTeamsIdPolicies","description":"The POST /authorization/teams/{id}/policies endpoint replaces all the team policies. Existing policies are removed.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Team ID","maxLength":128,"name":"id","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/ReplaceTeamPoliciesPayload"}}],"tags":["teams"],"responses":{"200":{"schema":{"$ref":"#/definitions/Team"},"description":"Successful"}}},"delete":{"summary":"Clear all team policies","operationId":"deleteAuthorizationTeamsIdPolicies","description":"The DELETE /authorization/teams/{id}/policies endpoint removes all the team policies.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Team ID","maxLength":128,"name":"id","in":"path","required":true}],"tags":["teams"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}},"put":{"summary":"Add/update team policy associations (specify instance to update)","operationId":"putAuthorizationTeamsIdPolicies","description":"The PUT /authorization/teams/{id}/policies endpoint adds/updates the to the collection of policies associated with a team.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Team ID","maxLength":128,"name":"id","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/AddPoliciesToTeamPayload"}}],"tags":["teams"],"responses":{"200":{"schema":{"$ref":"#/definitions/Team"},"description":"Successful"}}}},"/authorization/teams/{id}/users":{"get":{"summary":"Fetch team users given its identifier","operationId":"getAuthorizationTeamsIdUsers","description":"The GET /authorization/teams/{id}/users endpoint returns the team users and pagination metadata.\n\nThe results are paginated. Page numbering and page limit start from 1.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Team ID","maxLength":128,"name":"id","in":"path","required":true},{"type":"integer","description":"Page number, starts from 1","minimum":1,"name":"page","in":"query"},{"type":"integer","description":"Items per page","minimum":1,"name":"limit","in":"query"}],"tags":["teams"],"responses":{"200":{"schema":{"$ref":"#/definitions/PagedUsers"},"description":"Successful"}}},"post":{"summary":"Replace team users with the given ones","operationId":"postAuthorizationTeamsIdUsers","description":"The POST /authorization/teams/{id}/users endpoint replaces all team users. Existing team users are removed.","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Team ID","maxLength":128,"name":"id","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/ReplaceTeamUsersPayload"}}],"tags":["teams"],"responses":{"200":{"schema":{"$ref":"#/definitions/Team"},"description":"Successful"}}},"delete":{"summary":"Delete all team users","operationId":"deleteAuthorizationTeamsIdUsers","description":"The DELETE /authorization/teams/{id}/users endpoint removes all team users.","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Team ID","maxLength":128,"name":"id","in":"path","required":true}],"tags":["teams"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}},"put":{"summary":"Add team users","operationId":"putAuthorizationTeamsIdUsers","description":"The PUT /authorization/teams/{id}/users endpoint adds one or more team users.","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Team ID","maxLength":128,"name":"id","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/AddTeamUsersPayload"}}],"tags":["teams"],"responses":{"200":{"schema":{"$ref":"#/definitions/Team"},"description":"Successful"}}}},"/authorization/teams/{id}/nested":{"get":{"summary":"Fetch a nested team given its identifier","operationId":"getAuthorizationTeamsIdNested","description":"The GET /authorization/teams/{id}/nested endpoint returns a list of team data.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Team ID","maxLength":128,"name":"id","in":"path","required":true},{"type":"integer","description":"Page number, starts from 1","minimum":1,"name":"page","in":"query"},{"type":"integer","description":"Items per page","minimum":1,"name":"limit","in":"query"}],"tags":["teams"],"responses":{"200":{"description":"Note: teams users and policies are not populated in nested paged teams list","schema":{"$ref":"#/definitions/NestedPagedTeams"}}}}},"/authorization/users/{id}/teams":{"get":{"summary":"Fetch all teams to which the user belongs to. Does not fetch parent teams.","operationId":"getAuthorizationUsersIdTeams","description":"The GET /authorization/users/{id}/teams endpoint returns a list of teams to which the user belongs to.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"User ID","maxLength":128,"name":"id","in":"path","required":true},{"type":"integer","description":"Page number, starts from 1","minimum":1,"name":"page","in":"query"},{"type":"integer","description":"Items per page","minimum":1,"name":"limit","in":"query"}],"tags":["users"],"responses":{"200":{"schema":{"$ref":"#/definitions/PagedTeamRefs"},"description":"Successful"}}},"post":{"summary":"Clear and replace user teams","operationId":"postAuthorizationUsersIdTeams","description":"The POST /authorization/users/{id}/teams endpoint replaces all the user teams. This can be use to move a user from a team to another (or a set of teams to another).\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"User ID","maxLength":128,"name":"id","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/ReplaceUserTeamsPayload"}}],"tags":["users"],"responses":{"200":{"schema":{"$ref":"#/definitions/User"},"description":"Successful"}}},"delete":{"summary":"Delete teams for a user","operationId":"deleteAuthorizationUsersIdTeams","description":"The DELETE /authorization/users/{id}/teams endpoint deletes user from all her teams.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"User ID","maxLength":128,"name":"id","in":"path","required":true}],"tags":["users"],"responses":{"200":{"schema":{"$ref":"#/definitions/User"},"description":"Successful"}}}},"/authorization/users/{id}/policies":{"get":{"summary":"Fetch user policies given its identifier","operationId":"getAuthorizationUsersIdPolicies","description":"The GET /authorization/users/{id}/policies endpoint returns the users policies.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Team ID","maxLength":128,"name":"id","in":"path","required":true},{"type":"integer","description":"Page number, starts from 1","minimum":1,"name":"page","in":"query"},{"type":"integer","description":"Items per page","minimum":1,"name":"limit","in":"query"}],"tags":["users"],"responses":{"200":{"schema":{"$ref":"#/definitions/PagedPolicyRefs"},"description":"Successful"}}},"post":{"summary":"Clear and replace policies for a user","operationId":"postAuthorizationUsersIdPolicies","description":"The POST /authorization/users/{id}/policies endpoint replaces all the user policies. Existing user policies are removed.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"User ID","maxLength":128,"name":"id","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/ReplaceUserPoliciesPayload"}}],"tags":["users"],"responses":{"200":{"schema":{"$ref":"#/definitions/User"},"description":"Successful"}}},"delete":{"summary":"Clear all user's policies","operationId":"deleteAuthorizationUsersIdPolicies","description":"The DELETE /authorization/users/{id}/policies endpoint removes all the user policies.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"User ID","maxLength":128,"name":"id","in":"path","required":true}],"tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}},"put":{"summary":"Add/update user policy associations (specify instance to update)","operationId":"putAuthorizationUsersIdPolicies","description":"The PUT /authorization/users/{id}/policies endpoint endpoint adds/updates the to the collection of policies associated with a user\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"User ID","maxLength":128,"name":"id","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/AddUserPoliciesPayload"}}],"tags":["users"],"responses":{"200":{"schema":{"$ref":"#/definitions/User"},"description":"Successful"}}}},"/authorization/access/{userId}/{action}/{resource*}":{"get":{"summary":"Authorize user action against a resource","operationId":"getAuthorizationAccessUseridActionResource","description":"The GET /authorization/access/{userId}/{action}/{resource} endpoint answers if a user can perform an action\non a resource.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"User ID","maxLength":128,"name":"userId","in":"path","required":true},{"type":"string","description":"The action to check","name":"action","in":"path","required":true},{"type":"string","description":"The resource that the user wants to perform the action on","name":"resource","in":"path","required":true}],"tags":["authorization"],"responses":{"200":{"schema":{"$ref":"#/definitions/Access"},"description":"Successful"}}}},"/authorization/teams/{id}/users/search":{"get":{"summary":"Search for users in a team from the current user organization","operationId":"getAuthorizationTeamsIdUsersSearch","description":"The GET /authorization/teams/{id}/users/search endpoint returns the team users matching the query.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Team ID","maxLength":128,"name":"id","in":"path","required":true},{"type":"string","name":"query","in":"query","required":true}],"tags":["teams"],"responses":{"200":{"schema":{"$ref":"#/definitions/SearchUserList"},"description":"Successful"}}}},"/authorization/organizations/{id}/policies/{policyId}":{"delete":{"summary":"Remove a policy associated with an organization","operationId":"deleteAuthorizationOrganizationsIdPoliciesPolicyid","description":"The DELETE /authorization/organizations/{id}/policies/{policyId} endpoint disassociates a specific policy from an organization.\nSet optional parameter instance to delete a specific policy instance with variables, or leave blank to remove all instances with this policyId.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Organization ID","maxLength":128,"name":"id","in":"path","required":true},{"type":"string","description":"Policy ID","maxLength":128,"name":"policyId","in":"path","required":true}],"tags":["organizations"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/authorization/teams/{teamId}/policies/{policyId}":{"delete":{"summary":"Remove a policy associated with a team","operationId":"deleteAuthorizationTeamsTeamidPoliciesPolicyid","description":"The DELETE /authorization/teams/{teamId}/policies/{policyId} endpoint disassociates a policy from a team.\nSet optional parameter instance to delete a specific policy instance with variables, or leave blank to remove all instances with this policyId.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Team ID","maxLength":128,"name":"teamId","in":"path","required":true},{"type":"string","description":"Policy ID","maxLength":128,"name":"policyId","in":"path","required":true}],"tags":["teams"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/authorization/teams/{id}/users/{userId}":{"delete":{"summary":"Delete one team member","operationId":"deleteAuthorizationTeamsIdUsersUserid","description":"The DELETE /authorization/teams/{id}/users/{userId} endpoint removes one user from a team.","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Team ID","maxLength":128,"name":"id","in":"path","required":true},{"type":"string","description":"User ID","maxLength":128,"name":"userId","in":"path","required":true}],"tags":["teams"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/authorization/users/{userId}/policies/{policyId}":{"delete":{"summary":"Remove a policy associated with a user","operationId":"deleteAuthorizationUsersUseridPoliciesPolicyid","description":"The DELETE /authorization/users/{userId}/policies/{policyId} disassociates a policy from a user.\nSet optional parameter instance to delete a specific policy instance with variables, or leave blank to remove all instances with this policyId.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"User ID","maxLength":128,"name":"userId","in":"path","required":true},{"type":"string","description":"Policy ID","maxLength":128,"name":"policyId","in":"path","required":true}],"tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/authorization/teams/{id}/unnest":{"put":{"summary":"Unnest a team","operationId":"putAuthorizationTeamsIdUnnest","description":"The PUT /authorization/teams/{id}/unnest endpoint unnests a team.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Team ID","maxLength":128,"name":"id","in":"path","required":true}],"tags":["teams"],"responses":{"200":{"schema":{"$ref":"#/definitions/Team"},"description":"Successful"}}}},"/authorization/teams/{id}/nest":{"put":{"summary":"Nest a team","operationId":"putAuthorizationTeamsIdNest","description":"The PUT /authorization/teams/{id}/nest endpoint nests a team.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Team ID","maxLength":128,"name":"id","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/NestTeamPayload"}}],"tags":["teams"],"responses":{"200":{"schema":{"$ref":"#/definitions/Team"},"description":"Successful"}}}}},"definitions":{"MetaData":{"type":"object"},"Variables":{"type":"object"},"PolicyRef":{"type":"object","properties":{"id":{"type":"string","description":"Policy ID"},"version":{"type":"string","description":"Policy version"},"name":{"type":"string","description":"Policy name"},"variables":{"$ref":"#/definitions/Variables"},"instance":{"type":"integer","description":"Policy unique instance"}}},"PolicyRefs":{"type":"array","description":"Policy Refs","items":{"$ref":"#/definitions/PolicyRef"}},"Organization":{"type":"object","properties":{"id":{"type":"string","description":"Organization ID"},"name":{"type":"string","description":"Organization name"},"description":{"type":"string","description":"Organization description"},"metadata":{"$ref":"#/definitions/MetaData"},"policies":{"$ref":"#/definitions/PolicyRefs","type":"array"}}},"Organizations":{"type":"array","description":"items","items":{"$ref":"#/definitions/Organization"}},"PagedOrganizations":{"type":"object","properties":{"page":{"type":"integer","description":"Page number, starts from 1","minimum":1},"limit":{"type":"integer","description":"Items per page","minimum":1},"total":{"type":"integer","description":"Total number of entries matched by the query"},"data":{"$ref":"#/definitions/Organizations","type":"array"}}},"Actions":{"type":"array","description":"Action to perform on resource","items":{"type":"string"}},"Resources":{"type":"array","description":"Resource that the statement covers","items":{"type":"string"}},"Condition":{"type":"object"},"Statement":{"type":"object","properties":{"Effect":{"type":"string","description":"Statement result","enum":["Allow","Deny"]},"Action":{"$ref":"#/definitions/Actions","type":"array"},"Resource":{"$ref":"#/definitions/Resources","type":"array"},"Sid":{"type":"string","description":"Statement ID"},"Condition":{"$ref":"#/definitions/Condition"}}},"Statements":{"type":"array","items":{"$ref":"#/definitions/Statement"}},"PolicyStatements":{"type":"object","properties":{"Statement":{"$ref":"#/definitions/Statements","type":"array"}}},"Policy":{"type":"object","properties":{"id":{"type":"string","description":"Policy ID"},"version":{"type":"string","description":"Policy version"},"name":{"type":"string","description":"Policy name"},"statements":{"$ref":"#/definitions/PolicyStatements"}}},"Policies":{"type":"array","description":"items","items":{"$ref":"#/definitions/Policy"}},"PagedPolicies":{"type":"object","properties":{"page":{"type":"integer","description":"Page number, starts from 1","minimum":1},"limit":{"type":"integer","description":"Items per page","minimum":1},"total":{"type":"integer","description":"Total number of entries matched by the query"},"data":{"$ref":"#/definitions/Policies","type":"array"}}},"UserRef":{"type":"object","properties":{"id":{"type":"string","description":"User ID"},"name":{"type":"string","description":"User name"}}},"UserRefs":{"type":"array","description":"User refs","items":{"$ref":"#/definitions/UserRef"}},"Team":{"type":"object","properties":{"id":{"type":"string","description":"Team ID"},"name":{"type":"string","description":"Team name"},"description":{"type":"string","description":"Team description"},"path":{"type":"string"},"metadata":{"$ref":"#/definitions/MetaData"},"users":{"$ref":"#/definitions/UserRefs","type":"array"},"policies":{"$ref":"#/definitions/PolicyRefs","type":"array"},"organizationId":{"type":"string","description":"Organization ID to which the team belongs to"},"usersCount":{"type":"number","description":"Number of team users. Sub team users not counted."}}},"Teams":{"type":"array","description":"items","items":{"$ref":"#/definitions/Team"}},"PagedTeams":{"type":"object","description":"Note: teams users and policies are not populated in paged teams list","properties":{"page":{"type":"integer","description":"Page number, starts from 1","minimum":1},"limit":{"type":"integer","description":"Items per page","minimum":1},"total":{"type":"integer","description":"Total number of entries matched by the query"},"data":{"$ref":"#/definitions/Teams","type":"array"}}},"TeamRef":{"type":"object","properties":{"id":{"type":"string","description":"Team ID"},"name":{"type":"string","description":"Team name"}}},"TeamRefs":{"type":"array","description":"Team refs","items":{"$ref":"#/definitions/TeamRef"}},"User":{"type":"object","properties":{"id":{"type":"string","description":"User ID"},"name":{"type":"string","description":"User name"},"organizationId":{"type":"string","description":"Organization ID to which the user belongs to"},"metadata":{"$ref":"#/definitions/MetaData"},"teams":{"$ref":"#/definitions/TeamRefs","type":"array"},"policies":{"$ref":"#/definitions/PolicyRefs","type":"array"}}},"Users":{"type":"array","description":"items","items":{"$ref":"#/definitions/User"}},"PagedUsers":{"type":"object","properties":{"page":{"type":"integer","description":"Page number, starts from 1","minimum":1},"limit":{"type":"integer","description":"Items per page","minimum":1},"total":{"type":"integer","description":"Total number of entries matched by the query"},"data":{"$ref":"#/definitions/Users","type":"array"}}},"UserActionsArray":{"type":"array","items":{"type":"string"}},"UserActionOnResource":{"type":"object","properties":{"resource":{"type":"string"},"actions":{"$ref":"#/definitions/UserActionsArray","type":"array"}}},"UserActionsOnResources":{"type":"array","items":{"$ref":"#/definitions/UserActionOnResource"}},"Short Team":{"type":"object","properties":{"id":{"type":"string","description":"Team ID"},"name":{"type":"string","description":"Team name"},"description":{"type":"string","description":"Team description"},"path":{"type":"string"},"organizationId":{"type":"string","description":"Organization ID to which the team belongs to"}}},"Data":{"type":"array","items":{"$ref":"#/definitions/Short Team"}},"FilteredTeams":{"type":"object","properties":{"total":{"type":"integer","description":"Total number of entries matched by the query"},"data":{"$ref":"#/definitions/Data","type":"array"}}},"SearchUserList":{"type":"object","properties":{"total":{"type":"integer","description":"Total number of entries matched by the query"},"data":{"$ref":"#/definitions/Users","type":"array"}}},"UserActions":{"type":"object","properties":{"actions":{"$ref":"#/definitions/UserActionsArray","type":"array"}}},"PagedPolicyRefs":{"type":"object","properties":{"page":{"type":"integer","description":"Page number, starts from 1","minimum":1},"limit":{"type":"integer","description":"Items per page","minimum":1},"total":{"type":"integer","description":"Total number of entries matched by the query"},"data":{"$ref":"#/definitions/PolicyRefs","type":"array"}}},"PolicyInstance":{"type":"object","properties":{"entityType":{"type":"string","description":"The type of entity this policy is assigned to","enum":["organization","team","user"]},"entityId":{"type":"string"},"variables":{"$ref":"#/definitions/Variables"},"instance":{"type":"integer","description":"Policy unique instance"}}},"Policy Instances":{"type":"array","description":"Policy Instances","items":{"$ref":"#/definitions/PolicyInstance"}},"Nested Team":{"type":"object","properties":{"id":{"type":"string","description":"Team ID"},"name":{"type":"string","description":"Team name"},"description":{"type":"string","description":"Team description"},"parentId":{"type":"string","description":"Parent Team ID"},"path":{"type":"string"},"organizationId":{"type":"string","description":"Organization ID to which the team belongs to"},"usersCount":{"type":"number","description":"Number of team users. Sub team users not counted."}}},"Nested Teams":{"type":"array","description":"items","items":{"$ref":"#/definitions/Nested Team"}},"NestedPagedTeams":{"type":"object","description":"Note: teams users and policies are not populated in nested paged teams list","properties":{"page":{"type":"integer","description":"Page number, starts from 1","minimum":1},"limit":{"type":"integer","description":"Items per page","minimum":1},"total":{"type":"integer","description":"Total number of entries matched by the query"},"data":{"$ref":"#/definitions/Nested Teams","type":"array"}}},"PagedTeamRefs":{"type":"object","properties":{"page":{"type":"integer","description":"Page number, starts from 1","minimum":1},"limit":{"type":"integer","description":"Items per page","minimum":1},"total":{"type":"integer","description":"Total number of entries matched by the query"},"data":{"$ref":"#/definitions/TeamRefs","type":"array"}}},"Access":{"type":"object","properties":{"access":{"type":"boolean"}}},"UserPayload":{"type":"object","properties":{"id":{"type":"string","description":"User ID"},"name":{"type":"string","description":"User name"}},"required":["name"]},"CreateOrgPayload":{"type":"object","properties":{"id":{"type":"string","description":"Organization ID","maxLength":128},"name":{"type":"string","description":"Name","maxLength":64},"description":{"type":"string","description":"Description"},"metadata":{"$ref":"#/definitions/MetaData"},"user":{"$ref":"#/definitions/UserPayload"}},"required":["name","description"]},"OrganizationAndUser":{"type":"object","properties":{"organization":{"$ref":"#/definitions/Organization"},"user":{"$ref":"#/definitions/UserRef"}}},"Action":{"type":"array","minItems":1,"items":{"type":"string"}},"Resource":{"type":"array","minItems":1,"items":{"type":"string"}},"StatementObject":{"type":"object","properties":{"Effect":{"type":"string","enum":["Allow","Deny"]},"Action":{"$ref":"#/definitions/Action","type":"array"},"Resource":{"$ref":"#/definitions/Resource","type":"array"},"Sid":{"type":"string"},"Condition":{"$ref":"#/definitions/Condition"}}},"StatementsArray":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/StatementObject"}},"StatementsObject":{"type":"object","properties":{"Statement":{"$ref":"#/definitions/StatementsArray","type":"array"}}},"CreatePolicyPayload":{"type":"object","properties":{"id":{"type":"string","description":"Policy ID","maxLength":128},"name":{"type":"string","description":"Name","maxLength":64},"version":{"type":"string","description":"Version number"},"statements":{"$ref":"#/definitions/StatementsObject"}},"required":["name","version","statements"]},"CreateSharedPoliciesPayload":{"type":"object","properties":{"id":{"type":"string","description":"Policy ID","maxLength":128},"name":{"type":"string","description":"Name","maxLength":64},"version":{"type":"string","description":"Version number"},"statements":{"$ref":"#/definitions/StatementsObject"}},"required":["name","version"]},"CreateTeamPayload":{"type":"object","properties":{"id":{"type":"string","description":"The ID to be used for the new team. Only alphanumeric characters and underscore are supported","maxLength":128,"pattern":"/^[0-9a-zA-Z_]+$/"},"name":{"type":"string","description":"Name","maxLength":30},"description":{"type":"string","description":"Description"},"metadata":{"$ref":"#/definitions/MetaData"},"user":{"$ref":"#/definitions/UserPayload"}},"required":["name","description"]},"CreateUserPayload":{"type":"object","properties":{"id":{"type":"string","description":"User ID","maxLength":128},"name":{"type":"string","description":"Name","maxLength":255},"metadata":{"$ref":"#/definitions/MetaData"}},"required":["name"]},"variables":{"type":"object"},"PolicyIdObject":{"type":"object","description":"Policy Id Object","properties":{"id":{"type":"string","description":"Policy Id String","maxLength":128},"variables":{"$ref":"#/definitions/variables"},"instance":{"type":"integer","description":"Optional Policy Instance Id"}},"required":["id"]},"PolicyIdsArray":{"type":"array","description":"Array of Policy ID Objects {id, variables} OR Policy ID strings","items":{"$ref":"#/definitions/PolicyIdObject"}},"ReplaceOrgPoliciesPayload":{"type":"object","properties":{"policies":{"$ref":"#/definitions/PolicyIdsArray","type":"array"}},"required":["policies"]},"ReplaceTeamPoliciesPayload":{"type":"object","properties":{"policies":{"$ref":"#/definitions/PolicyIdsArray","type":"array"}},"required":["policies"]},"UsersArray":{"type":"array","description":"User IDs","items":{"type":"string"}},"ReplaceTeamUsersPayload":{"type":"object","properties":{"users":{"$ref":"#/definitions/UsersArray","type":"array"}},"required":["users"]},"ReplaceUserPoliciesPayload":{"type":"object","properties":{"policies":{"$ref":"#/definitions/PolicyIdsArray","type":"array"}},"required":["policies"]},"TeamsArray":{"type":"array","description":"Teams IDs","items":{"type":"string"}},"ReplaceUserTeamsPayload":{"type":"object","properties":{"teams":{"$ref":"#/definitions/TeamsArray","type":"array"}},"required":["teams"]},"UpdateOrgPayload":{"type":"object","properties":{"name":{"type":"string","description":"Name","maxLength":64},"description":{"type":"string","description":"Description"},"metadata":{"$ref":"#/definitions/MetaData"}},"required":["name","description"]},"UpdatePolicyPayload":{"type":"object","properties":{"version":{"type":"string","description":"Version number"},"name":{"type":"string","description":"Name","maxLength":64},"statements":{"$ref":"#/definitions/StatementsObject"}},"required":["version","name"]},"UpdateSharedPolicyPayload":{"type":"object","properties":{"version":{"type":"string","description":"Version number"},"name":{"type":"string","description":"Name","maxLength":64},"statements":{"$ref":"#/definitions/StatementsObject"}},"required":["version","name"]},"UpdateTeamPayload":{"type":"object","properties":{"name":{"type":"string","description":"Name","maxLength":30},"description":{"type":"string","description":"Description"},"metadata":{"$ref":"#/definitions/MetaData"}}},"UpdateUserPayload":{"type":"object","properties":{"name":{"type":"string","description":"Name","maxLength":255},"metadata":{"$ref":"#/definitions/MetaData"}},"required":["name"]},"AddPoliciesToOrgPayload":{"type":"object","properties":{"policies":{"$ref":"#/definitions/PolicyIdsArray","type":"array"}},"required":["policies"]},"AddPoliciesToTeamPayload":{"type":"object","properties":{"policies":{"$ref":"#/definitions/PolicyIdsArray","type":"array"}},"required":["policies"]},"AddTeamUsersPayload":{"type":"object","properties":{"users":{"$ref":"#/definitions/UsersArray","type":"array"}},"required":["users"]},"NestTeamPayload":{"type":"object","properties":{"parentId":{"type":"string","description":"Parent ID"}},"required":["parentId"]},"AddUserPoliciesPayload":{"type":"object","properties":{"policies":{"$ref":"#/definitions/PolicyIdsArray","type":"array"}},"required":["policies"]}}} +var swaggerJSON = {"swagger":"2.0","host":"localhost:8080","basePath":"/","schemes":["http"],"info":{"title":"Udaru API Documentation","version":"5.0.1-beta.0","description":"This page documents Udaru's API endpoints, along with their various inputs and outputs. For more information about Udaru please see the Documentation Site."},"tags":[{"name":"policies","description":"Manage policy objects"},{"name":"organizations","description":"Manage organizations"},{"name":"teams","description":"Manage teams within an organization"},{"name":"users","description":"Manage users within an organization"},{"name":"authorization","description":"Manage the actions a user can perform against a resource"},{"name":"private","description":"Endpoints that require a service key"},{"name":"monitoring","description":"Endpoints for monitoring and uptime"}],"paths":{"/ping":{"get":{"summary":"Ping endpoint","operationId":"getPing","description":"The GET /ping endpoint will return 200 if the server is up and running.","tags":["monitoring"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/authorization/organizations":{"get":{"summary":"List all the organizations","operationId":"getAuthorizationOrganizations","description":"The GET /authorization/organizations endpoint returns a list of all organizations.\n\nThe results are paginated. Page numbering and page limit start from 1.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"integer","description":"Page number, starts from 1","minimum":1,"name":"page","in":"query"},{"type":"integer","description":"Items per page","minimum":1,"name":"limit","in":"query"}],"tags":["organizations"],"responses":{"200":{"schema":{"$ref":"#/definitions/PagedOrganizations"},"description":"Successful"}}},"post":{"summary":"Create an organization","operationId":"postAuthorizationOrganizations","description":"The POST /authorization/organizations endpoint creates a new organization, the default organization admin policy and (if provided) its admin.","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"in":"body","name":"body","schema":{"$ref":"#/definitions/CreateOrgPayload"}}],"tags":["organizations"],"responses":{"200":{"schema":{"$ref":"#/definitions/OrganizationAndUser"},"description":"Successful"}}}},"/authorization/policies":{"get":{"summary":"Fetch all the defined policies","operationId":"getAuthorizationPolicies","description":"The GET /authorization/policies endpoint returns a list of all the defined policies\nthe policies will contain only the ID, version and name. No statements.\n\nThe results are paginated. Page numbering and page limit start from 1.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"integer","description":"Page number, starts from 1","minimum":1,"name":"page","in":"query"},{"type":"integer","description":"Items per page","minimum":1,"name":"limit","in":"query"}],"tags":["policies"],"responses":{"200":{"schema":{"$ref":"#/definitions/PagedPolicies"},"description":"Successful"}}},"post":{"summary":"Create a policy for the current user organization","operationId":"postAuthorizationPolicies","description":"The POST /authorization/policies endpoint is a private endpoint. It can be accessed only using a service key.\nThis service key needs to be passed as a query string in the form \"sig=\"\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","name":"sig","in":"query","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/CreatePolicyPayload"}}],"tags":["policies","private"],"responses":{"200":{"schema":{"$ref":"#/definitions/Policy"},"description":"Successful"}}}},"/authorization/shared-policies":{"get":{"summary":"Fetch all the defined shared policies","operationId":"getAuthorizationSharedpolicies","description":"The GET /authorization/shared-policies endpoint returns a list of all the defined policies\nthe policies will contain only the ID, version and name. No statements.\n\nThe results are paginated. Page numbering and page limit start from 1.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"integer","description":"Page number, starts from 1","minimum":1,"name":"page","in":"query"},{"type":"integer","description":"Items per page","minimum":1,"name":"limit","in":"query"}],"tags":["policies"],"responses":{"200":{"schema":{"$ref":"#/definitions/PagedPolicies"},"description":"Successful"}}},"post":{"summary":"Create a policy shared across organizations","operationId":"postAuthorizationSharedpolicies","description":"The POST /authorization/shared-policies endpoint is a private endpoint. It can be accessed only using a service key.\nThis service key needs to be passed as a query string in the form \"sig=\"\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","name":"sig","in":"query","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/CreateSharedPoliciesPayload"}}],"tags":["policies","private"],"responses":{"200":{"schema":{"$ref":"#/definitions/Policy"},"description":"Successful"}}}},"/authorization/teams":{"get":{"summary":"Fetch all teams from the current user organization","operationId":"getAuthorizationTeams","description":"The GET /authorization/teams endpoint returns a list of all teams from the current organization.\n\nThe results are paginated. Page numbering and page limit start from 1.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"integer","description":"Page number, starts from 1","minimum":1,"name":"page","in":"query"},{"type":"integer","description":"Items per page","minimum":1,"name":"limit","in":"query"}],"tags":["teams"],"responses":{"200":{"description":"Note: teams users and policies are not populated in paged teams list","schema":{"$ref":"#/definitions/PagedTeams"}}}},"post":{"summary":"Create a team","operationId":"postAuthorizationTeams","description":"The POST /authorization/teams endpoint creates a new team from its payload data.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"in":"body","name":"body","schema":{"$ref":"#/definitions/CreateTeamPayload"}}],"tags":["teams"],"responses":{"200":{"schema":{"$ref":"#/definitions/Team"},"description":"Successful"}}}},"/authorization/users":{"get":{"summary":"Fetch all users from the current user organization","operationId":"getAuthorizationUsers","description":"The GET /authorization/users endpoint returns a list of all users from the current organization.\n\nThe results are paginated. Page numbering and page limit start from 1.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"integer","description":"Page number, starts from 1","minimum":1,"name":"page","in":"query"},{"type":"integer","description":"Items per page","minimum":1,"name":"limit","in":"query"}],"tags":["users"],"responses":{"200":{"schema":{"$ref":"#/definitions/PagedUsers"},"description":"Successful"}}},"post":{"summary":"Create a new user","operationId":"postAuthorizationUsers","description":"The POST /authorization/users endpoint creates a new user given its data.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"in":"body","name":"body","schema":{"$ref":"#/definitions/CreateUserPayload"}}],"tags":["users"],"responses":{"200":{"schema":{"$ref":"#/definitions/User"},"description":"Successful"}}}},"/authorization/list/{userId}":{"get":{"summary":"List all the actions a user can perform on a list of resources","operationId":"getAuthorizationListUserid","description":"The GET /authorization/list/{userId} endpoint returns a list of all the actions a user\ncan perform on a given list of resources.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"User ID","maxLength":128,"name":"userId","in":"path","required":true},{"type":"array","description":"A list of Resources","x-constraint":{"single":true},"items":{"type":"string","description":"A single resource"},"collectionFormat":"multi","name":"resources","in":"query","required":true}],"tags":["authorization"],"responses":{"200":{"schema":{"$ref":"#/definitions/UserActionsOnResources","type":"array"},"description":"Successful"}}}},"/authorization/organizations/{id}":{"get":{"summary":"Get organization","operationId":"getAuthorizationOrganizationsId","description":"The GET /authorization/organizations/{id} endpoint returns a single organization data.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Organization ID","maxLength":128,"name":"id","in":"path","required":true}],"tags":["organizations"],"responses":{"200":{"schema":{"$ref":"#/definitions/Organization"},"description":"Successful"}}},"delete":{"summary":"DELETE an organization","operationId":"deleteAuthorizationOrganizationsId","description":"The DELETE /authorization/organizations/{id} endpoint will delete an organization.","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Organization ID","maxLength":128,"name":"id","in":"path","required":true}],"tags":["organizations"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}},"put":{"summary":"Update an organization","operationId":"putAuthorizationOrganizationsId","description":"The PUT /authorization/organizations/{id} endpoint will update an organization name and description","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Organization ID","maxLength":128,"name":"id","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/UpdateOrgPayload"}}],"tags":["organizations"],"responses":{"200":{"schema":{"$ref":"#/definitions/Organization"},"description":"Successful"}}}},"/authorization/policies/search":{"get":{"summary":"Search for organization policies","operationId":"getAuthorizationPoliciesSearch","description":"The GET /authorization/policies/search endpoint returns a filtered list of policies.\n\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","name":"query","in":"query","required":true}],"tags":["policies"],"responses":{"200":{"schema":{"$ref":"#/definitions/PagedPolicies"},"description":"Successful"}}}},"/authorization/policies/{id}":{"get":{"summary":"Fetch a single policy by ID","operationId":"getAuthorizationPoliciesId","description":"The GET /authorization/policies/{id} endpoint returns a policy based on its ID.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Policy ID","maxLength":128,"name":"id","in":"path","required":true}],"tags":["policies"],"responses":{"200":{"schema":{"$ref":"#/definitions/Policy"},"description":"Successful"}}},"delete":{"summary":"Delete a policy","operationId":"deleteAuthorizationPoliciesId","description":"The DELETE /authorization/policies/{id} endpoint is a private endpoint. It can be accessed only using a service key.\n\nThis service key needs to be passed as a query string in the form \"sig=\"\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Policy ID","maxLength":128,"name":"id","in":"path","required":true},{"type":"string","name":"sig","in":"query","required":true}],"tags":["policies","private"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}},"put":{"summary":"Update a policy of the current user organization","operationId":"putAuthorizationPoliciesId","description":"The PUT /authorization/policies/{id} endpoint is a private endpoint. It can be accessed only using a service key.\nThis service key needs to be passed as a query string in the form \"sig=\"\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Policy ID","maxLength":128,"name":"id","in":"path","required":true},{"type":"string","name":"sig","in":"query","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/UpdatePolicyPayload"}}],"tags":["policies","private"],"responses":{"200":{"schema":{"$ref":"#/definitions/Policy"},"description":"Successful"}}}},"/authorization/shared-policies/search":{"get":{"summary":"Search for shared policies","operationId":"getAuthorizationSharedpoliciesSearch","description":"The GET /authorization/shared-policies/search endpoint returns a filtered list of shared policies.\n\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","name":"query","in":"query","required":true}],"tags":["policies"],"responses":{"200":{"schema":{"$ref":"#/definitions/PagedPolicies"},"description":"Successful"}}}},"/authorization/shared-policies/{id}":{"get":{"summary":"Fetch a single shared policy","operationId":"getAuthorizationSharedpoliciesId","description":"The GET /authorization/shared-policies/{id} endpoint returns a policy based on its ID.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Policy ID","maxLength":128,"name":"id","in":"path","required":true}],"tags":["policies"],"responses":{"200":{"schema":{"$ref":"#/definitions/Policy"},"description":"Successful"}}},"delete":{"summary":"Delete a shared policy","operationId":"deleteAuthorizationSharedpoliciesId","description":"The DELETE /authorization/shared-policies/{id} endpoint is a private endpoint. It can be accessed only using a service key.\n\nThis service key needs to be passed as a query string in the form \"sig=\"\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Policy ID","maxLength":128,"name":"id","in":"path","required":true},{"type":"string","name":"sig","in":"query","required":true}],"tags":["policies","private"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}},"put":{"summary":"Update a shared policy","operationId":"putAuthorizationSharedpoliciesId","description":"The PUT /authorization/shared-policies/{id} endpoint is a private endpoint. It can be accessed only using a service key.\nThis service key needs to be passed as a query string in the form \"sig=\"\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Policy ID","maxLength":128,"name":"id","in":"path","required":true},{"type":"string","name":"sig","in":"query","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/UpdateSharedPolicyPayload"}}],"tags":["policies","private"],"responses":{"200":{"schema":{"$ref":"#/definitions/Policy"},"description":"Successful"}}}},"/authorization/teams/search":{"get":{"summary":"Search for teams from the current user organization","operationId":"getAuthorizationTeamsSearch","description":"The GET /authorization/teams/search endpoint returns a filtered list of teams from the current organization.\n\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","name":"query","in":"query","required":true}],"tags":["teams"],"responses":{"200":{"schema":{"$ref":"#/definitions/FilteredTeams"},"description":"Successful"}}}},"/authorization/teams/{id}":{"get":{"summary":"Fetch a team given its identifier","operationId":"getAuthorizationTeamsId","description":"The GET /authorization/teams/{id} endpoint returns a single team data.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Team ID","maxLength":128,"name":"id","in":"path","required":true}],"tags":["teams"],"responses":{"200":{"schema":{"$ref":"#/definitions/Team"},"description":"Successful"}}},"delete":{"summary":"Delete a team","operationId":"deleteAuthorizationTeamsId","description":"The DELETE /authorization/teams endpoint deletes a team.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Team ID","maxLength":128,"name":"id","in":"path","required":true}],"tags":["teams"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}},"put":{"summary":"Update a team","operationId":"putAuthorizationTeamsId","description":"The PUT /authorization/teams/{id} endpoint updates a team data.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Team ID","maxLength":128,"name":"id","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/UpdateTeamPayload"}}],"tags":["teams"],"responses":{"200":{"schema":{"$ref":"#/definitions/Team"},"description":"Successful"}}}},"/authorization/users/search":{"get":{"summary":"Search for users from the current organization","operationId":"getAuthorizationUsersSearch","description":"The get /authorization/users/search endpoint returns a filtered list of users from the current organization.\n\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","name":"query","in":"query","required":true}],"tags":["users"],"responses":{"200":{"schema":{"$ref":"#/definitions/SearchUserList"},"description":"Successful"}}}},"/authorization/users/{id}":{"get":{"summary":"Fetch a user given its identifier","operationId":"getAuthorizationUsersId","description":"The GET /authorization/users/{id} endpoint returns a single user data.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"User ID","maxLength":128,"name":"id","in":"path","required":true}],"tags":["users"],"responses":{"200":{"schema":{"$ref":"#/definitions/User"},"description":"Successful"}}},"delete":{"summary":"Delete a user","operationId":"deleteAuthorizationUsersId","description":"The DELETE /authorization/users/{id} endpoint deletes a user.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"User ID","maxLength":128,"name":"id","in":"path","required":true}],"tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}},"put":{"summary":"Update a user","operationId":"putAuthorizationUsersId","description":"The PUT /authorization/users/{id} endpoint updates the user data.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"User ID","maxLength":128,"name":"id","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/UpdateUserPayload"}}],"tags":["users"],"responses":{"200":{"schema":{"$ref":"#/definitions/User"},"description":"Successful"}}}},"/authorization/list/{userId}/{resource*}":{"get":{"summary":"List all the actions a user can perform on a resource","operationId":"getAuthorizationListUseridResource","description":"The GET /authorization/list/{userId}/{resource} endpoint returns a list of all the actions a user\ncan perform on a given resource.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"User ID","maxLength":128,"name":"userId","in":"path","required":true},{"type":"string","description":"The resource that the user wants to perform the action on","name":"resource","in":"path","required":true}],"tags":["authorization"],"responses":{"200":{"schema":{"$ref":"#/definitions/UserActions"},"description":"Successful"}}}},"/authorization/organizations/{id}/policies":{"get":{"summary":"Fetch organization policies given its identifier","operationId":"getAuthorizationOrganizationsIdPolicies","description":"The GET /authorization/organization/{id}/policies endpoint returns the organization policies.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Team ID","maxLength":128,"name":"id","in":"path","required":true},{"type":"integer","description":"Page number, starts from 1","minimum":1,"name":"page","in":"query"},{"type":"integer","description":"Items per page","minimum":1,"name":"limit","in":"query"}],"tags":["organizations"],"responses":{"200":{"schema":{"$ref":"#/definitions/PagedPolicyRefs"},"description":"Successful"}}},"post":{"summary":"Clear and replace the policies of an organization","operationId":"postAuthorizationOrganizationsIdPolicies","description":"The POST /authorization/organizations/{id}/policies endpoint replaces all the organization policies. The existing organization policies are removed.","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Organization ID","maxLength":128,"name":"id","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/ReplaceOrgPoliciesPayload"}}],"tags":["organizations"],"responses":{"200":{"schema":{"$ref":"#/definitions/Organization"},"description":"Successful"}}},"delete":{"summary":"Clear all policies of the organization","operationId":"deleteAuthorizationOrganizationsIdPolicies","description":"The DELETE /authorization/organizations/{id}/policies endpoint removes all the organization policies.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Organization ID","maxLength":128,"name":"id","in":"path","required":true}],"tags":["organizations"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}},"put":{"summary":"Add/update organization policy associations (specify instance to update)","operationId":"putAuthorizationOrganizationsIdPolicies","description":"The PUT /authorization/organizations/{id}/policies endpoint adds/updates the to the collection of policies associated with an organization","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Organization ID","maxLength":128,"name":"id","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/AddPoliciesToOrgPayload"}}],"tags":["organizations"],"responses":{"200":{"schema":{"$ref":"#/definitions/Organization"},"description":"Successful"}}}},"/authorization/policies/{id}/variables":{"get":{"summary":"Fetch a template policy's variables","operationId":"getAuthorizationPoliciesIdVariables","description":"The GET /authorization/policies/{id}/variables endpoint returns policy variables based on its ID.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Policy ID","maxLength":128,"name":"id","in":"path","required":true}],"tags":["policies"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/authorization/policies/{id}/instances":{"get":{"summary":"List the instances of a policy assigned to users/teams and orgs","operationId":"getAuthorizationPoliciesIdInstances","description":"The GET /authorization/policies/{id}/instances endpoint lists the instances of the policy specified.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Policy ID","maxLength":128,"name":"id","in":"path","required":true}],"tags":["policies"],"responses":{"200":{"description":"Policy Instances","schema":{"$ref":"#/definitions/Policy Instances","type":"array"}}}}},"/authorization/shared-policies/{id}/variables":{"get":{"summary":"Fetch a template shared policy's variables","operationId":"getAuthorizationSharedpoliciesIdVariables","description":"The GET /authorization/policies/{id}/variables endpoint returns shared policy variables based on its ID.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Policy ID","maxLength":128,"name":"id","in":"path","required":true}],"tags":["policies"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/authorization/shared-policies/{id}/instances":{"get":{"summary":"List the instances of a shared policy assigned to users/teams and orgs","operationId":"getAuthorizationSharedpoliciesIdInstances","description":"The GET /authorization/shared-policies/{id}/instances endpoint lists the instances of the shared policy specified.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Policy ID","maxLength":128,"name":"id","in":"path","required":true}],"tags":["policies"],"responses":{"200":{"description":"Policy Instances","schema":{"$ref":"#/definitions/Policy Instances","type":"array"}}}}},"/authorization/teams/{id}/policies":{"get":{"summary":"Fetch team policies given its identifier","operationId":"getAuthorizationTeamsIdPolicies","description":"The GET /authorization/teams/{id}/policies endpoint returns the team policies.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Team ID","maxLength":128,"name":"id","in":"path","required":true},{"type":"integer","description":"Page number, starts from 1","minimum":1,"name":"page","in":"query"},{"type":"integer","description":"Items per page","minimum":1,"name":"limit","in":"query"}],"tags":["teams"],"responses":{"200":{"schema":{"$ref":"#/definitions/PagedPolicyRefs"},"description":"Successful"}}},"post":{"summary":"Clear and replace policies for a team","operationId":"postAuthorizationTeamsIdPolicies","description":"The POST /authorization/teams/{id}/policies endpoint replaces all the team policies. Existing policies are removed.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Team ID","maxLength":128,"name":"id","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/ReplaceTeamPoliciesPayload"}}],"tags":["teams"],"responses":{"200":{"schema":{"$ref":"#/definitions/Team"},"description":"Successful"}}},"delete":{"summary":"Clear all team policies","operationId":"deleteAuthorizationTeamsIdPolicies","description":"The DELETE /authorization/teams/{id}/policies endpoint removes all the team policies.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Team ID","maxLength":128,"name":"id","in":"path","required":true}],"tags":["teams"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}},"put":{"summary":"Add/update team policy associations (specify instance to update)","operationId":"putAuthorizationTeamsIdPolicies","description":"The PUT /authorization/teams/{id}/policies endpoint adds/updates the to the collection of policies associated with a team.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Team ID","maxLength":128,"name":"id","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/AddPoliciesToTeamPayload"}}],"tags":["teams"],"responses":{"200":{"schema":{"$ref":"#/definitions/Team"},"description":"Successful"}}}},"/authorization/teams/{id}/users":{"get":{"summary":"Fetch team users given its identifier","operationId":"getAuthorizationTeamsIdUsers","description":"The GET /authorization/teams/{id}/users endpoint returns the team users and pagination metadata.\n\nThe results are paginated. Page numbering and page limit start from 1.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Team ID","maxLength":128,"name":"id","in":"path","required":true},{"type":"integer","description":"Page number, starts from 1","minimum":1,"name":"page","in":"query"},{"type":"integer","description":"Items per page","minimum":1,"name":"limit","in":"query"}],"tags":["teams"],"responses":{"200":{"schema":{"$ref":"#/definitions/PagedUsers"},"description":"Successful"}}},"post":{"summary":"Replace team users with the given ones","operationId":"postAuthorizationTeamsIdUsers","description":"The POST /authorization/teams/{id}/users endpoint replaces all team users. Existing team users are removed.","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Team ID","maxLength":128,"name":"id","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/ReplaceTeamUsersPayload"}}],"tags":["teams"],"responses":{"200":{"schema":{"$ref":"#/definitions/Team"},"description":"Successful"}}},"delete":{"summary":"Delete all team users","operationId":"deleteAuthorizationTeamsIdUsers","description":"The DELETE /authorization/teams/{id}/users endpoint removes all team users.","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Team ID","maxLength":128,"name":"id","in":"path","required":true}],"tags":["teams"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}},"put":{"summary":"Add team users","operationId":"putAuthorizationTeamsIdUsers","description":"The PUT /authorization/teams/{id}/users endpoint adds one or more team users.","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Team ID","maxLength":128,"name":"id","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/AddTeamUsersPayload"}}],"tags":["teams"],"responses":{"200":{"schema":{"$ref":"#/definitions/Team"},"description":"Successful"}}}},"/authorization/teams/{id}/nested":{"get":{"summary":"Fetch a nested team given its identifier","operationId":"getAuthorizationTeamsIdNested","description":"The GET /authorization/teams/{id}/nested endpoint returns a list of team data.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Team ID","maxLength":128,"name":"id","in":"path","required":true},{"type":"integer","description":"Page number, starts from 1","minimum":1,"name":"page","in":"query"},{"type":"integer","description":"Items per page","minimum":1,"name":"limit","in":"query"}],"tags":["teams"],"responses":{"200":{"description":"Note: teams users and policies are not populated in nested paged teams list","schema":{"$ref":"#/definitions/NestedPagedTeams"}}}}},"/authorization/users/{id}/teams":{"get":{"summary":"Fetch all teams to which the user belongs to. Does not fetch parent teams.","operationId":"getAuthorizationUsersIdTeams","description":"The GET /authorization/users/{id}/teams endpoint returns a list of teams to which the user belongs to.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"User ID","maxLength":128,"name":"id","in":"path","required":true},{"type":"integer","description":"Page number, starts from 1","minimum":1,"name":"page","in":"query"},{"type":"integer","description":"Items per page","minimum":1,"name":"limit","in":"query"}],"tags":["users"],"responses":{"200":{"schema":{"$ref":"#/definitions/PagedTeamRefs"},"description":"Successful"}}},"post":{"summary":"Clear and replace user teams","operationId":"postAuthorizationUsersIdTeams","description":"The POST /authorization/users/{id}/teams endpoint replaces all the user teams. This can be use to move a user from a team to another (or a set of teams to another).\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"User ID","maxLength":128,"name":"id","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/ReplaceUserTeamsPayload"}}],"tags":["users"],"responses":{"200":{"schema":{"$ref":"#/definitions/User"},"description":"Successful"}}},"delete":{"summary":"Delete teams for a user","operationId":"deleteAuthorizationUsersIdTeams","description":"The DELETE /authorization/users/{id}/teams endpoint deletes user from all her teams.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"User ID","maxLength":128,"name":"id","in":"path","required":true}],"tags":["users"],"responses":{"200":{"schema":{"$ref":"#/definitions/User"},"description":"Successful"}}}},"/authorization/users/{id}/policies":{"get":{"summary":"Fetch user policies given its identifier","operationId":"getAuthorizationUsersIdPolicies","description":"The GET /authorization/users/{id}/policies endpoint returns the users policies.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Team ID","maxLength":128,"name":"id","in":"path","required":true},{"type":"integer","description":"Page number, starts from 1","minimum":1,"name":"page","in":"query"},{"type":"integer","description":"Items per page","minimum":1,"name":"limit","in":"query"}],"tags":["users"],"responses":{"200":{"schema":{"$ref":"#/definitions/PagedPolicyRefs"},"description":"Successful"}}},"post":{"summary":"Clear and replace policies for a user","operationId":"postAuthorizationUsersIdPolicies","description":"The POST /authorization/users/{id}/policies endpoint replaces all the user policies. Existing user policies are removed.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"User ID","maxLength":128,"name":"id","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/ReplaceUserPoliciesPayload"}}],"tags":["users"],"responses":{"200":{"schema":{"$ref":"#/definitions/User"},"description":"Successful"}}},"delete":{"summary":"Clear all user's policies","operationId":"deleteAuthorizationUsersIdPolicies","description":"The DELETE /authorization/users/{id}/policies endpoint removes all the user policies.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"User ID","maxLength":128,"name":"id","in":"path","required":true}],"tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}},"put":{"summary":"Add/update user policy associations (specify instance to update)","operationId":"putAuthorizationUsersIdPolicies","description":"The PUT /authorization/users/{id}/policies endpoint endpoint adds/updates the to the collection of policies associated with a user\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"User ID","maxLength":128,"name":"id","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/AddUserPoliciesPayload"}}],"tags":["users"],"responses":{"200":{"schema":{"$ref":"#/definitions/User"},"description":"Successful"}}}},"/authorization/access/{userId}/{action}/{resource*}":{"get":{"summary":"Authorize user action against a resource","operationId":"getAuthorizationAccessUseridActionResource","description":"The GET /authorization/access/{userId}/{action}/{resource} endpoint answers if a user can perform an action\non a resource.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"User ID","maxLength":128,"name":"userId","in":"path","required":true},{"type":"string","description":"The action to check","name":"action","in":"path","required":true},{"type":"string","description":"The resource that the user wants to perform the action on","name":"resource","in":"path","required":true}],"tags":["authorization"],"responses":{"200":{"schema":{"$ref":"#/definitions/Access"},"description":"Successful"}}}},"/authorization/teams/{id}/users/search":{"get":{"summary":"Search for users in a team from the current user organization","operationId":"getAuthorizationTeamsIdUsersSearch","description":"The GET /authorization/teams/{id}/users/search endpoint returns the team users matching the query.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Team ID","maxLength":128,"name":"id","in":"path","required":true},{"type":"string","name":"query","in":"query","required":true}],"tags":["teams"],"responses":{"200":{"schema":{"$ref":"#/definitions/SearchUserList"},"description":"Successful"}}}},"/authorization/organizations/{id}/policies/{policyId}":{"delete":{"summary":"Remove a policy associated with an organization","operationId":"deleteAuthorizationOrganizationsIdPoliciesPolicyid","description":"The DELETE /authorization/organizations/{id}/policies/{policyId} endpoint disassociates a specific policy from an organization.\nSet optional parameter instance to delete a specific policy instance with variables, or leave blank to remove all instances with this policyId.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Organization ID","maxLength":128,"name":"id","in":"path","required":true},{"type":"string","description":"Policy ID","maxLength":128,"name":"policyId","in":"path","required":true}],"tags":["organizations"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/authorization/teams/{teamId}/policies/{policyId}":{"delete":{"summary":"Remove a policy associated with a team","operationId":"deleteAuthorizationTeamsTeamidPoliciesPolicyid","description":"The DELETE /authorization/teams/{teamId}/policies/{policyId} endpoint disassociates a policy from a team.\nSet optional parameter instance to delete a specific policy instance with variables, or leave blank to remove all instances with this policyId.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Team ID","maxLength":128,"name":"teamId","in":"path","required":true},{"type":"string","description":"Policy ID","maxLength":128,"name":"policyId","in":"path","required":true}],"tags":["teams"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/authorization/teams/{id}/users/{userId}":{"delete":{"summary":"Delete one team member","operationId":"deleteAuthorizationTeamsIdUsersUserid","description":"The DELETE /authorization/teams/{id}/users/{userId} endpoint removes one user from a team.","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Team ID","maxLength":128,"name":"id","in":"path","required":true},{"type":"string","description":"User ID","maxLength":128,"name":"userId","in":"path","required":true}],"tags":["teams"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/authorization/users/{userId}/policies/{policyId}":{"delete":{"summary":"Remove a policy associated with a user","operationId":"deleteAuthorizationUsersUseridPoliciesPolicyid","description":"The DELETE /authorization/users/{userId}/policies/{policyId} disassociates a policy from a user.\nSet optional parameter instance to delete a specific policy instance with variables, or leave blank to remove all instances with this policyId.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"User ID","maxLength":128,"name":"userId","in":"path","required":true},{"type":"string","description":"Policy ID","maxLength":128,"name":"policyId","in":"path","required":true}],"tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/authorization/teams/{id}/unnest":{"put":{"summary":"Unnest a team","operationId":"putAuthorizationTeamsIdUnnest","description":"The PUT /authorization/teams/{id}/unnest endpoint unnests a team.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Team ID","maxLength":128,"name":"id","in":"path","required":true}],"tags":["teams"],"responses":{"200":{"schema":{"$ref":"#/definitions/Team"},"description":"Successful"}}}},"/authorization/teams/{id}/nest":{"put":{"summary":"Nest a team","operationId":"putAuthorizationTeamsIdNest","description":"The PUT /authorization/teams/{id}/nest endpoint nests a team.\n","parameters":[{"type":"string","description":"User ID of the enpoint caller","name":"authorization","in":"header","required":true},{"type":"string","description":"Specify a different organization for the user who is calling the endpoint (works only for SuperUser, it's like impersonation).","name":"org","in":"header"},{"type":"string","description":"Team ID","maxLength":128,"name":"id","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/NestTeamPayload"}}],"tags":["teams"],"responses":{"200":{"schema":{"$ref":"#/definitions/Team"},"description":"Successful"}}}}},"definitions":{"MetaData":{"type":"object"},"Variables":{"type":"object"},"PolicyRef":{"type":"object","properties":{"id":{"type":"string","description":"Policy ID"},"version":{"type":"string","description":"Policy version"},"name":{"type":"string","description":"Policy name"},"variables":{"$ref":"#/definitions/Variables"},"instance":{"type":"integer","description":"Policy unique instance"}}},"PolicyRefs":{"type":"array","description":"Policy Refs","items":{"$ref":"#/definitions/PolicyRef"}},"Organization":{"type":"object","properties":{"id":{"type":"string","description":"Organization ID"},"name":{"type":"string","description":"Organization name"},"description":{"type":"string","description":"Organization description"},"metadata":{"$ref":"#/definitions/MetaData"},"policies":{"$ref":"#/definitions/PolicyRefs","type":"array"}}},"Organizations":{"type":"array","description":"items","items":{"$ref":"#/definitions/Organization"}},"PagedOrganizations":{"type":"object","properties":{"page":{"type":"integer","description":"Page number, starts from 1","minimum":1},"limit":{"type":"integer","description":"Items per page","minimum":1},"total":{"type":"integer","description":"Total number of entries matched by the query"},"data":{"$ref":"#/definitions/Organizations","type":"array"}}},"Actions":{"type":"array","description":"Action to perform on resource","items":{"type":"string"}},"Resources":{"type":"array","description":"Resource that the statement covers","items":{"type":"string"}},"Condition":{"type":"object"},"Statement":{"type":"object","properties":{"Effect":{"type":"string","description":"Statement result","enum":["Allow","Deny"]},"Action":{"$ref":"#/definitions/Actions","type":"array"},"Resource":{"$ref":"#/definitions/Resources","type":"array"},"Sid":{"type":"string","description":"Statement ID"},"Condition":{"$ref":"#/definitions/Condition"}}},"Statements":{"type":"array","items":{"$ref":"#/definitions/Statement"}},"PolicyStatements":{"type":"object","properties":{"Statement":{"$ref":"#/definitions/Statements","type":"array"}}},"Policy":{"type":"object","properties":{"id":{"type":"string","description":"Policy ID"},"version":{"type":"string","description":"Policy version"},"name":{"type":"string","description":"Policy name"},"statements":{"$ref":"#/definitions/PolicyStatements"}}},"Policies":{"type":"array","description":"items","items":{"$ref":"#/definitions/Policy"}},"PagedPolicies":{"type":"object","properties":{"page":{"type":"integer","description":"Page number, starts from 1","minimum":1},"limit":{"type":"integer","description":"Items per page","minimum":1},"total":{"type":"integer","description":"Total number of entries matched by the query"},"data":{"$ref":"#/definitions/Policies","type":"array"}}},"UserRef":{"type":"object","properties":{"id":{"type":"string","description":"User ID"},"name":{"type":"string","description":"User name"}}},"UserRefs":{"type":"array","description":"User refs","items":{"$ref":"#/definitions/UserRef"}},"Team":{"type":"object","properties":{"id":{"type":"string","description":"Team ID"},"name":{"type":"string","description":"Team name"},"description":{"type":"string","description":"Team description"},"path":{"type":"string"},"metadata":{"$ref":"#/definitions/MetaData"},"users":{"$ref":"#/definitions/UserRefs","type":"array"},"policies":{"$ref":"#/definitions/PolicyRefs","type":"array"},"organizationId":{"type":"string","description":"Organization ID to which the team belongs to"},"usersCount":{"type":"number","description":"Number of team users. Sub team users not counted."}}},"Teams":{"type":"array","description":"items","items":{"$ref":"#/definitions/Team"}},"PagedTeams":{"type":"object","description":"Note: teams users and policies are not populated in paged teams list","properties":{"page":{"type":"integer","description":"Page number, starts from 1","minimum":1},"limit":{"type":"integer","description":"Items per page","minimum":1},"total":{"type":"integer","description":"Total number of entries matched by the query"},"data":{"$ref":"#/definitions/Teams","type":"array"}}},"TeamRef":{"type":"object","properties":{"id":{"type":"string","description":"Team ID"},"name":{"type":"string","description":"Team name"}}},"TeamRefs":{"type":"array","description":"Team refs","items":{"$ref":"#/definitions/TeamRef"}},"User":{"type":"object","properties":{"id":{"type":"string","description":"User ID"},"name":{"type":"string","description":"User name"},"organizationId":{"type":"string","description":"Organization ID to which the user belongs to"},"metadata":{"$ref":"#/definitions/MetaData"},"teams":{"$ref":"#/definitions/TeamRefs","type":"array"},"policies":{"$ref":"#/definitions/PolicyRefs","type":"array"}}},"Users":{"type":"array","description":"items","items":{"$ref":"#/definitions/User"}},"PagedUsers":{"type":"object","properties":{"page":{"type":"integer","description":"Page number, starts from 1","minimum":1},"limit":{"type":"integer","description":"Items per page","minimum":1},"total":{"type":"integer","description":"Total number of entries matched by the query"},"data":{"$ref":"#/definitions/Users","type":"array"}}},"UserActionsArray":{"type":"array","items":{"type":"string"}},"UserActionOnResource":{"type":"object","properties":{"resource":{"type":"string"},"actions":{"$ref":"#/definitions/UserActionsArray","type":"array"}}},"UserActionsOnResources":{"type":"array","items":{"$ref":"#/definitions/UserActionOnResource"}},"Short Team":{"type":"object","properties":{"id":{"type":"string","description":"Team ID"},"name":{"type":"string","description":"Team name"},"description":{"type":"string","description":"Team description"},"path":{"type":"string"},"organizationId":{"type":"string","description":"Organization ID to which the team belongs to"}}},"Data":{"type":"array","items":{"$ref":"#/definitions/Short Team"}},"FilteredTeams":{"type":"object","properties":{"total":{"type":"integer","description":"Total number of entries matched by the query"},"data":{"$ref":"#/definitions/Data","type":"array"}}},"SearchUserList":{"type":"object","properties":{"total":{"type":"integer","description":"Total number of entries matched by the query"},"data":{"$ref":"#/definitions/Users","type":"array"}}},"UserActions":{"type":"object","properties":{"actions":{"$ref":"#/definitions/UserActionsArray","type":"array"}}},"PagedPolicyRefs":{"type":"object","properties":{"page":{"type":"integer","description":"Page number, starts from 1","minimum":1},"limit":{"type":"integer","description":"Items per page","minimum":1},"total":{"type":"integer","description":"Total number of entries matched by the query"},"data":{"$ref":"#/definitions/PolicyRefs","type":"array"}}},"PolicyInstance":{"type":"object","properties":{"entityType":{"type":"string","description":"The type of entity this policy is assigned to","enum":["organization","team","user"]},"entityId":{"type":"string"},"variables":{"$ref":"#/definitions/Variables"},"instance":{"type":"integer","description":"Policy unique instance"}}},"Policy Instances":{"type":"array","description":"Policy Instances","items":{"$ref":"#/definitions/PolicyInstance"}},"Nested Team":{"type":"object","properties":{"id":{"type":"string","description":"Team ID"},"name":{"type":"string","description":"Team name"},"description":{"type":"string","description":"Team description"},"parentId":{"type":"string","description":"Parent Team ID"},"path":{"type":"string"},"organizationId":{"type":"string","description":"Organization ID to which the team belongs to"},"usersCount":{"type":"number","description":"Number of team users. Sub team users not counted."}}},"Nested Teams":{"type":"array","description":"items","items":{"$ref":"#/definitions/Nested Team"}},"NestedPagedTeams":{"type":"object","description":"Note: teams users and policies are not populated in nested paged teams list","properties":{"page":{"type":"integer","description":"Page number, starts from 1","minimum":1},"limit":{"type":"integer","description":"Items per page","minimum":1},"total":{"type":"integer","description":"Total number of entries matched by the query"},"data":{"$ref":"#/definitions/Nested Teams","type":"array"}}},"PagedTeamRefs":{"type":"object","properties":{"page":{"type":"integer","description":"Page number, starts from 1","minimum":1},"limit":{"type":"integer","description":"Items per page","minimum":1},"total":{"type":"integer","description":"Total number of entries matched by the query"},"data":{"$ref":"#/definitions/TeamRefs","type":"array"}}},"Access":{"type":"object","properties":{"access":{"type":"boolean"}}},"UserPayload":{"type":"object","properties":{"id":{"type":"string","description":"User ID"},"name":{"type":"string","description":"User name"}},"required":["name"]},"CreateOrgPayload":{"type":"object","properties":{"id":{"type":"string","description":"Organization ID","maxLength":128},"name":{"type":"string","description":"Name","maxLength":64},"description":{"type":"string","description":"Description"},"metadata":{"$ref":"#/definitions/MetaData"},"user":{"$ref":"#/definitions/UserPayload"}},"required":["name","description"]},"OrganizationAndUser":{"type":"object","properties":{"organization":{"$ref":"#/definitions/Organization"},"user":{"$ref":"#/definitions/UserRef"}}},"Action":{"type":"array","minItems":1,"items":{"type":"string"}},"Resource":{"type":"array","minItems":1,"items":{"type":"string"}},"StatementObject":{"type":"object","properties":{"Effect":{"type":"string","enum":["Allow","Deny"]},"Action":{"$ref":"#/definitions/Action","type":"array"},"Resource":{"$ref":"#/definitions/Resource","type":"array"},"Sid":{"type":"string"},"Condition":{"$ref":"#/definitions/Condition"}}},"StatementsArray":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/StatementObject"}},"StatementsObject":{"type":"object","properties":{"Statement":{"$ref":"#/definitions/StatementsArray","type":"array"}}},"CreatePolicyPayload":{"type":"object","properties":{"id":{"type":"string","description":"Policy ID","maxLength":128},"name":{"type":"string","description":"Name","maxLength":64},"version":{"type":"string","description":"Version number"},"statements":{"$ref":"#/definitions/StatementsObject"}},"required":["name","version","statements"]},"CreateSharedPoliciesPayload":{"type":"object","properties":{"id":{"type":"string","description":"Policy ID","maxLength":128},"name":{"type":"string","description":"Name","maxLength":64},"version":{"type":"string","description":"Version number"},"statements":{"$ref":"#/definitions/StatementsObject"}},"required":["name","version"]},"CreateTeamPayload":{"type":"object","properties":{"id":{"type":"string","description":"The ID to be used for the new team. Only alphanumeric characters and underscore are supported","maxLength":128,"pattern":"/^[0-9a-zA-Z_]+$/"},"name":{"type":"string","description":"Name","maxLength":30},"description":{"type":"string","description":"Description"},"metadata":{"$ref":"#/definitions/MetaData"},"user":{"$ref":"#/definitions/UserPayload"}},"required":["name","description"]},"CreateUserPayload":{"type":"object","properties":{"id":{"type":"string","description":"User ID","maxLength":128},"name":{"type":"string","description":"Name","maxLength":255},"metadata":{"$ref":"#/definitions/MetaData"}},"required":["name"]},"variables":{"type":"object"},"PolicyIdObject":{"type":"object","description":"Policy Id Object","properties":{"id":{"type":"string","description":"Policy Id String","maxLength":128},"variables":{"$ref":"#/definitions/variables"},"instance":{"type":"integer","description":"Optional Policy Instance Id"}},"required":["id"]},"PolicyIdsArray":{"type":"array","description":"Array of Policies/Policy Templates to associate with this entity (with optional Policy Instance variables)","items":{"$ref":"#/definitions/PolicyIdObject"}},"ReplaceOrgPoliciesPayload":{"type":"object","properties":{"policies":{"$ref":"#/definitions/PolicyIdsArray","type":"array"}},"required":["policies"]},"ReplaceTeamPoliciesPayload":{"type":"object","properties":{"policies":{"$ref":"#/definitions/PolicyIdsArray","type":"array"}},"required":["policies"]},"UsersArray":{"type":"array","description":"User IDs","items":{"type":"string"}},"ReplaceTeamUsersPayload":{"type":"object","properties":{"users":{"$ref":"#/definitions/UsersArray","type":"array"}},"required":["users"]},"ReplaceUserPoliciesPayload":{"type":"object","properties":{"policies":{"$ref":"#/definitions/PolicyIdsArray","type":"array"}},"required":["policies"]},"TeamsArray":{"type":"array","description":"Teams IDs","items":{"type":"string"}},"ReplaceUserTeamsPayload":{"type":"object","properties":{"teams":{"$ref":"#/definitions/TeamsArray","type":"array"}},"required":["teams"]},"UpdateOrgPayload":{"type":"object","properties":{"name":{"type":"string","description":"Name","maxLength":64},"description":{"type":"string","description":"Description"},"metadata":{"$ref":"#/definitions/MetaData"}},"required":["name","description"]},"UpdatePolicyPayload":{"type":"object","properties":{"version":{"type":"string","description":"Version number"},"name":{"type":"string","description":"Name","maxLength":64},"statements":{"$ref":"#/definitions/StatementsObject"}},"required":["version","name"]},"UpdateSharedPolicyPayload":{"type":"object","properties":{"version":{"type":"string","description":"Version number"},"name":{"type":"string","description":"Name","maxLength":64},"statements":{"$ref":"#/definitions/StatementsObject"}},"required":["version","name"]},"UpdateTeamPayload":{"type":"object","properties":{"name":{"type":"string","description":"Name","maxLength":30},"description":{"type":"string","description":"Description"},"metadata":{"$ref":"#/definitions/MetaData"}}},"UpdateUserPayload":{"type":"object","properties":{"name":{"type":"string","description":"Name","maxLength":255},"metadata":{"$ref":"#/definitions/MetaData"}},"required":["name"]},"AddPoliciesToOrgPayload":{"type":"object","properties":{"policies":{"$ref":"#/definitions/PolicyIdsArray","type":"array"}},"required":["policies"]},"AddPoliciesToTeamPayload":{"type":"object","properties":{"policies":{"$ref":"#/definitions/PolicyIdsArray","type":"array"}},"required":["policies"]},"AddTeamUsersPayload":{"type":"object","properties":{"users":{"$ref":"#/definitions/UsersArray","type":"array"}},"required":["users"]},"NestTeamPayload":{"type":"object","properties":{"parentId":{"type":"string","description":"Parent ID"}},"required":["parentId"]},"AddUserPoliciesPayload":{"type":"object","properties":{"policies":{"$ref":"#/definitions/PolicyIdsArray","type":"array"}},"required":["policies"]}}} diff --git a/packages/udaru-core/lib/ops/validation.js b/packages/udaru-core/lib/ops/validation.js index 930bd041..36e461ba 100644 --- a/packages/udaru-core/lib/ops/validation.js +++ b/packages/udaru-core/lib/ops/validation.js @@ -16,7 +16,7 @@ const PolicyIdObject = Joi.object({ instance: PolicyInstanceId }).description('Policy Id Object').label('PolicyIdObject') -const PolicyIdsArray = Joi.array().required().items(PolicyIdObject).description('Array of Policy ID Objects {id, variables} OR Policy ID strings').label('PolicyIdsArray') +const PolicyIdsArray = Joi.array().required().items(PolicyIdObject).description('Array of Policies/Policy Templates to associate with this entity (with optional Policy Instance variables)').label('PolicyIdsArray') const UsersArray = Joi.array().required().items(requiredString).description('User IDs').label('UsersArray') const TeamsArray = Joi.array().required().items(requiredString).description('Teams IDs').label('TeamsArray') const ResourcesArray = Joi.array().items(requiredString.description('A single resource')).single().required().description('A list of Resources').label('ResourcesArray')