1

I am working with the IBM Connection APIs and I didn't find anything about the question of locking a file programmatically in the documentation. There is no way to do it?

I have seen that when a file is locked the metadata is changed:

  • When it is not locked we have

<td:lock type="HARD">

  • When it is locked (manually) we have something like that:

    <td:lock type="HARD"> <td:owner> <name>Jane Doe</name> <snx:userid>20[...]6E</snx:userid> <email>heloise.chauvel@chanel-corp.com</email> <snx:userState>active</snx:userState> </td:owner> <td:lockTime>2017-05-17T13:05:03.990Z</td:lockTime> </td:lock>

So I could programmatically modify this metadata but is there an easier way to do it?

Héloïse Chauvel
  • 502
  • 3
  • 6
  • 21

2 Answers2

1

It is not possible to lock a file programmatically. There is no option in the API documentation and it is unauthorized to submit new metadata like I was explaining in my question.

So what I decided to do was to add a tag "locked" programmatically. No other solution.

Héloïse Chauvel
  • 502
  • 3
  • 6
  • 21
0

I don't see this specific method in the documentation but I believe it is possible if you post to:

/files/{auth}/api/document/{document-id}/lock?type=hard

with a content-type of 'text/plain' and a 'X-Update-Nonce' header, with an empty message body.

It is also possible to set it as part a file update

Ademund
  • 66
  • 5