{"openapi":"3.0.4","info":{"title":"Update Role","description":"Updates a Role","version":"0.0.1"},"servers":[{"url":"https://fbn-prd.lusid.com/access"}],"paths":{"/api/roles/{code}":{"put":{"tags":["Roles"],"summary":"Update Role","description":"Updates a Role","operationId":"UpdateRole","parameters":[{"name":"code","in":"path","description":"The code of the Role","required":true,"schema":{"pattern":"^(?=.*[a-zA-Z])[\\w][\\w +-]{2,100}$","type":"string"}},{"name":"scope","in":"query","description":">Optional. Will use default scope if not supplied. The scope of the Role","schema":{"pattern":"^(?=.*[a-zA-Z])[\\w][\\w +-]{2,100}$","type":"string"}},{"name":"beforeScope","in":"query","description":"Optional. The scope of the Role. Will use default scope if not supplied.","schema":{"pattern":"^(?=.*[a-zA-Z])[\\w][\\w +-]{2,100}$","type":"string"}},{"name":"beforeCode","in":"query","description":"Optional. The code of the Role","schema":{"pattern":"^(?=.*[a-zA-Z])[\\w][\\w +-]{2,100}$","type":"string"}},{"name":"afterScope","in":"query","description":"Optional. The scope of the Role. Will use default scope if not supplied.","schema":{"pattern":"^(?=.*[a-zA-Z])[\\w][\\w +-]{2,100}$","type":"string"}},{"name":"afterCode","in":"query","description":"Optional. The code of the Role","schema":{"pattern":"^(?=.*[a-zA-Z])[\\w][\\w +-]{2,100}$","type":"string"}}],"requestBody":{"description":"The updated definition of the Role","content":{"application/json-patch+json":{"schema":{"$ref":"/docs/api/access/schemas.json#/components/schemas/RoleUpdateRequest"},"example":{"description":"This is an example role to demonstrate their update","resource":{"policyIdRoleResource":{"policies":[{"scope":"default","code":"official-portfolios-read-only"},{"scope":"default","code":"desk-portfolios"}],"policyCollections":[{"scope":"default","code":"CompanyEmployeeAccess"}]}},"when":{"activate":"2016-08-31T18:00:00.0000000+00:00","deactivate":"2020-08-31T18:00:00.0000000+00:00"}}},"application/json":{"schema":{"$ref":"/docs/api/access/schemas.json#/components/schemas/RoleUpdateRequest"},"example":{"description":"This is an example role to demonstrate their update","resource":{"policyIdRoleResource":{"policies":[{"scope":"default","code":"official-portfolios-read-only"},{"scope":"default","code":"desk-portfolios"}],"policyCollections":[{"scope":"default","code":"CompanyEmployeeAccess"}]}},"when":{"activate":"2016-08-31T18:00:00.0000000+00:00","deactivate":"2020-08-31T18:00:00.0000000+00:00"}}},"text/json":{"schema":{"$ref":"/docs/api/access/schemas.json#/components/schemas/RoleUpdateRequest"},"example":{"description":"This is an example role to demonstrate their update","resource":{"policyIdRoleResource":{"policies":[{"scope":"default","code":"official-portfolios-read-only"},{"scope":"default","code":"desk-portfolios"}],"policyCollections":[{"scope":"default","code":"CompanyEmployeeAccess"}]}},"when":{"activate":"2016-08-31T18:00:00.0000000+00:00","deactivate":"2020-08-31T18:00:00.0000000+00:00"}}},"application/*+json":{"schema":{"$ref":"/docs/api/access/schemas.json#/components/schemas/RoleUpdateRequest"},"example":{"description":"This is an example role to demonstrate their update","resource":{"policyIdRoleResource":{"policies":[{"scope":"default","code":"official-portfolios-read-only"},{"scope":"default","code":"desk-portfolios"}],"policyCollections":[{"scope":"default","code":"CompanyEmployeeAccess"}]}},"when":{"activate":"2016-08-31T18:00:00.0000000+00:00","deactivate":"2020-08-31T18:00:00.0000000+00:00"}}}},"required":true},"responses":{"200":{"description":"Updated Role","content":{"application/json":{"schema":{"$ref":"/docs/api/access/schemas.json#/components/schemas/RoleResponse"},"example":{"id":{"scope":"default","code":"DevelopersRole"},"roleHierarchyIndex":50,"description":"An example Role to identify my Developers","resource":{"policyIdRoleResource":{"policies":[{"scope":"default","code":"official-portfolios-read-only"},{"scope":"default","code":"desk-portfolios"}],"policyCollections":[{"scope":"default","code":"CompanyEmployeeAccess"}]}},"when":{"activate":"2016-08-31T18:00:00.0000000+00:00","deactivate":"2020-08-31T18:00:00.0000000+00:00"},"permission":"Read"}},"text/plain":{"schema":{"$ref":"/docs/api/access/schemas.json#/components/schemas/RoleResponse"},"example":{"id":{"scope":"default","code":"DevelopersRole"},"roleHierarchyIndex":50,"description":"An example Role to identify my Developers","resource":{"policyIdRoleResource":{"policies":[{"scope":"default","code":"official-portfolios-read-only"},{"scope":"default","code":"desk-portfolios"}],"policyCollections":[{"scope":"default","code":"CompanyEmployeeAccess"}]}},"when":{"activate":"2016-08-31T18:00:00.0000000+00:00","deactivate":"2020-08-31T18:00:00.0000000+00:00"},"permission":"Read"}},"text/json":{"schema":{"$ref":"/docs/api/access/schemas.json#/components/schemas/RoleResponse"},"example":{"id":{"scope":"default","code":"DevelopersRole"},"roleHierarchyIndex":50,"description":"An example Role to identify my Developers","resource":{"policyIdRoleResource":{"policies":[{"scope":"default","code":"official-portfolios-read-only"},{"scope":"default","code":"desk-portfolios"}],"policyCollections":[{"scope":"default","code":"CompanyEmployeeAccess"}]}},"when":{"activate":"2016-08-31T18:00:00.0000000+00:00","deactivate":"2020-08-31T18:00:00.0000000+00:00"},"permission":"Read"}}}},"400":{"description":"The details of the input related failure","content":{"application/json":{"schema":{"$ref":"/docs/api/access/schemas.json#/components/schemas/LusidValidationProblemDetails"}},"text/plain":{"schema":{"$ref":"/docs/api/access/schemas.json#/components/schemas/LusidValidationProblemDetails"}},"text/json":{"schema":{"$ref":"/docs/api/access/schemas.json#/components/schemas/LusidValidationProblemDetails"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"/docs/api/access/schemas.json#/components/schemas/LusidProblemDetails"}}}}},"security":[{"BearerAuth":[]}],"x-fbn-apistatus":"Stable"}}},"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}}}}