This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

I'm trying to create an Assignment Via the REST API, Does anyone have an example of how to do this?

I've gotten the API working to create objects like documents but cannot get assignments working?

Has anyone got an example JSON file that I can look at that will work with just the built in assignment stuff?

I'm very new to this.

  • So, I've figured out what I was doing wrong, when I was originally testing this out I just got an auth token through the API, and slapped that into postman, and copied and pasted JSON POST example from to create a document and then when I altered the property definitions to suit an assignment i wanted to create, i was getting all sorts of random errors I couldn't figure out.

    I later figured out, (through blind brute force) that the object id of the object you are trying to create needs to be put into the URL http://localhost/REST/objects/10.aspx for your request (10.aspx being for assignments). I thought this wasn't in the documentation but upon re-reading it is there.

    So I guess the moral of the story is, read the documentation and understand it before wasting your time lol.

  • Sorry, I was not in last week so missed your message.

    Most "things" in an M-Files vault are objects of some kind, and work similarly to documents.  Assignments, for example, have a different object type id (as you found out: 10), but they still have properties and things that you need to correctly populate.  Once populated, M-Files should behave as you expect.