Skip to content

Latest commit

 

History

History
36 lines (30 loc) · 811 Bytes

File metadata and controls

36 lines (30 loc) · 811 Bytes

Set access for user

Examples

{% tabs %} {% tab title="HTTP" %}

# HTTP request:
https://api.paperspace.io
GET /machines/:machineId/setMachineAccessPublic?userId=u123abc
x-api-key: 1ba4f98e7c0...
# Returns 200 on success

{% endtab %}

{% tab title="Node.js" %}

paperspace.machines.setAccessForUser({
  machineId: 'ps123abc',
  userId: 'u123abc,
  enableAccess: true,
}, function(err, res) {
  // handle error or result
});

{% endtab %} {% endtabs %}

Parameters

Name Type Description
machineId string Id of the machine to enable access
userId string Id of the user to enable machine access for
enableAccess boolean When "true", the person is added as an accessor to the machine; when "false" the person is removed