{"type":"api","title":"List Policies","meta":{"id":"/apps/pubhub/media/legacy-umbrella-api/bf58de618cbb72dda8f39b0414ce94c0a15cd467/8688476f-9746-3939-b4a0-6ecdd6ae8710","swagger":"2.0","info":{"version":"1.0.0","title":"Network Devices and Policies","description":"Management of Organizations, Network Devices, and Policies.","contact":{"name":"Cloud Security Developer Community"}},"host":"management.api.umbrella.com","basePath":"/v1","schemes":["https"],"securityDefinitions":{"http":{"type":"basic"}},"security":[{"http":[]}],"x-parser-conf":{"httpBasic":{"username":"","password":""},"overview":{"markdownPath":"legacy/management/network-devices-intro.md"},"meta":{"useProxy":true}}},"spec":{"tags":["Policies"],"summary":"List Policies","description":"List DNS and Web policies. If you do not set the type of policy, Umbrella returns\nthe DNS policies. The default policy type is DNS.","operationId":"listPolicies","produces":["application/json"],"parameters":[{"name":"organizationId","in":"path","description":"The ID of the organization owning the resources.","required":true,"type":"integer","minimum":1,"format":"int32","$$ref":"#/parameters/organizationIdParam"},{"name":"page","in":"query","description":"The number of the page to begin reading in the collection.","required":false,"default":1,"type":"integer","format":"int32","minimum":1,"$$ref":"#/parameters/paginationPageParam"},{"name":"limit","in":"query","description":"The maximum number of items to return from the collection.","required":false,"default":100,"type":"integer","format":"int32","minimum":1,"maximum":100,"$$ref":"#/parameters/paginationLimitParam"},{"name":"type","in":"query","description":"The type of policy to return. Specify either 'dns' or 'web'.","required":false,"default":"dns","type":"string","$$ref":"#/parameters/policyTypeParam"}],"responses":{"200":{"description":"Success","schema":{"type":"array","items":{"type":"object","minProperties":7,"required":["policyId","organizationId","name","priority","createdAt","isDefault"],"properties":{"policyId":{"type":"integer","description":"The unique ID for the policy.","minimum":1},"organizationId":{"type":"integer","example":1234,"minimum":1},"name":{"type":"string","description":"The name for the policy as displayed in the Dashboard","example":"ApiDemoPolicy","minLength":1},"priority":{"type":"integer","description":"The priority of the policy","minimum":0},"createdAt":{"type":"string","example":"2017-09-22T04:18:51.000Z","description":"ISO8601 formatted timestamp that the Policy was created.","pattern":"^((?:[12][0-9]{3}))-(1[0-2]|0[1-9])-(3[01]|0[1-9]|[12][0-9])T(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])(\\.[0-9]{3})(Z)$"},"isDefault":{"type":"boolean","example":true,"description":"If the policy is the default policy, specify 'true', otherwise specify 'false'."}},"$$ref":"#/definitions/PolicyStub"},"$$ref":"#/definitions/PolicyList"}},"400":{"description":"Validation Error","schema":{"type":"object","minProperties":3,"required":["statusCode","error","txId"],"properties":{"statusCode":{"type":"integer","example":400,"description":"the http error code returned."},"error":{"type":"string","example":"Validation Error","description":"a brief description of the error"},"txId":{"type":"string","example":"86e189a6-0124-47d3-a32c-25ff3f07deaf","description":"a unique hex number that can be used for debugging"},"validationErrors":{"type":"object","properties":{"someProperty":{"type":"string","example":"must not be empty","description":"the name of the property failing validation."}}}}},"$$ref":"#/responses/BadRequest"},"401":{"description":"Unauthorized- The authorization header is missing or the token is unauthorized","schema":{"type":"object","minProperties":3,"required":["statusCode","error","txId"],"properties":{"statusCode":{"type":"integer","example":401,"description":"the http error code returned."},"error":{"type":"string","example":"Unauthorized","description":"a brief description of the error"},"txId":{"type":"string","example":"86e189a6-0124-47d3-a32c-25ff3f07deaf","description":"a unique hex number that can be used for debugging"}}},"$$ref":"#/responses/Unauthorized"},"403":{"description":"Forbidden- The token is invalid","schema":{"type":"object","minProperties":1,"required":["message"],"properties":{"message":{"type":"string","example":"Invalid authentication credentials","description":"a brief description of the error"}}},"$$ref":"#/responses/Forbidden"},"404":{"description":"Not Found- A resource specified in the URL was not found","schema":{"type":"object","minProperties":3,"required":["statusCode","error","txId"],"properties":{"statusCode":{"type":"integer","example":404,"description":"the http error code returned."},"error":{"type":"string","example":"Not Found","description":"a brief description of the error"},"txId":{"type":"string","example":"86e189a6-0124-47d3-a32c-25ff3f07deaf","description":"a unique hex number that can be used for debugging"}}},"$$ref":"#/responses/NotFound"},"500":{"description":"Error- This request could not be processed by the server","schema":{"type":"object","minProperties":3,"required":["statusCode","error","txId"],"properties":{"statusCode":{"type":"integer","example":500,"description":"the http error code returned."},"error":{"type":"string","example":"Internal Server Error","description":"a brief description of the error"},"txId":{"type":"string","example":"86e189a6-0124-47d3-a32c-25ff3f07deaf","description":"a unique hex number that can be used for debugging"}}},"$$ref":"#/responses/ServerError"}},"__originalOperationId":"listPolicies","consumes":["application/json"],"security":[{"http":[]}],"method":"get","path":"/organizations/{organizationId}/policies"}}