Set who may see a restricted model
PUT
/api/models/{id}/members
const url = 'https://forge.example.com/api/models/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/members';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"userIds":["2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"],"version":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://forge.example.com/api/models/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/members \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "userIds": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "version": 1 }'Replaces the allowed list with the people given. Send the model’s membersVersion as you read it as version. A stale one answers 409 with currentVersion, the version it has now.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string format: uuid
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
userIds
required
Array<string>
version
required
null | integer | string format: int32
Example generated
{ "userIds": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "version": 1}Responses
Section titled “Responses”OK
Media typeapplication/json
Array<object>
object
id
required
string format: uuid
email
required
string
displayName
required
string
Example generated
[ { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "email": "example", "displayName": "example" }]default
Section titled “default”A refusal or an error, as a problem document. A model or draft you may not see answers 404, as one that does not exist.
Media typeapplication/problem+json
object
type
string
title
string
status
integer
detail
string
instance
string
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}