# Get permission model metadata GET https://content-gateway-example.com/v1/files/permissions/metadata Returns the current permission evaluation model. NOTE: `resource_permissions` is the only supported model at this time. Reference: https://docs.moveworks.com/api-reference/content-gateway/get-permission-model-metadata ## OpenAPI Specification ```yaml openapi: 3.1.1 info: title: Get permission model metadata version: endpoint_.getPermissionModelMetadata paths: /files/permissions/metadata: get: operationId: get-permission-model-metadata summary: Get permission model metadata description: >- Returns the current permission evaluation model. NOTE: `resource_permissions` is the only supported model at this time. tags: - [] parameters: [] responses: '200': description: Permissions metadata response content: application/json: schema: $ref: '#/components/schemas/PermissionsMetadata' '400': description: Bad Request - The request was invalid or cannot be served. content: {} '401': description: Unauthorized - The request requires user authentication. content: {} '403': description: >- Forbidden - The server understood the request but refuses to authorize it. content: {} '404': description: Not Found - The requested resource could not be found. content: {} '429': description: Too Many Requests - Rate limit exceeded. content: {} '500': description: >- Internal Server Error - The server encountered an unexpected condition. content: {} '503': description: >- Service Unavailable - The server is currently unable to handle the request. content: {} components: schemas: PermissionsMetadataModel: type: string enum: - value: resource_permission - value: hierarchy_permission PermissionsMetadata: type: object properties: '@odata.context': type: string description: OData metadata context URL. model: $ref: '#/components/schemas/PermissionsMetadataModel' description: >- Permission model in use. NOTE: `resource_permissions` is the only supported model at this time. ``` ## SDK Code Examples ```python import requests url = "https://content-gateway-example.com/v1/files/permissions/metadata" response = requests.get(url) print(response.json()) ``` ```javascript const url = 'https://content-gateway-example.com/v1/files/permissions/metadata'; const options = {method: 'GET'}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://content-gateway-example.com/v1/files/permissions/metadata" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://content-gateway-example.com/v1/files/permissions/metadata") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://content-gateway-example.com/v1/files/permissions/metadata") .asString(); ``` ```php request('GET', 'https://content-gateway-example.com/v1/files/permissions/metadata'); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://content-gateway-example.com/v1/files/permissions/metadata"); var request = new RestRequest(Method.GET); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let request = NSMutableURLRequest(url: NSURL(string: "https://content-gateway-example.com/v1/files/permissions/metadata")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```