Jump to content

Search the Community

Showing results for tags 'rest api'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Plastic SCM
    • General
    • Installation and configuration
    • Unity 3D
    • Unreal Engine
    • Plastic SCM on Mac
    • Plastic SCM on Linux
    • Gluon
    • Git interop
    • Integrations
    • Community Edition
    • Branching and merging
    • Announcements
  • Plastic SCM 4.0 Beta (Closed)
  • Plastic Cloud
    • General
    • Configuration
  • SemanticMerge
    • General
    • License
    • SCM's configuration
    • Share your experience!
    • External Parsers
  • GitJungle
  • Method History for Subversion
  • PlasticX Early Adopter Program's General Feedback
  • PlasticX Early Adopter Program's Issue Reporting
  • PlasticX Early Adopter Program's Feature Requests
  • PlasticX Early Adopter Program's Announcements

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 2 results

  1. Hi, I am working on building a Blender add-on that can interacts with multiple versions control systems. In this specific situation, I am writing the add-on in python. I was wondering what is the best way to interact with Plastic from my plugin. So far I chose to use the "cm" CLI to do that, starting sub-processes in python and reading the outputs. I am wondering if using the Rest api would be a better solution? If it is, how would you do it? As far as I know, I would need to manually start the Plastic server using "cm api", but I already some possible issues here : -It looks like only one rest API can be started at a time. If multiple software/add-ons/plugins start to use the rest API, this can leads to problem: if the server runs as a subprocess of one of the plugin it could be terminated while another plugin is accessing it. One plugin could start the server with a specific port and the other plugins would not be able to connect to it nor to start a new server... (Would it not be nice if the rest server was started automatically as a service, and plugins could query the used port via the cli?) Then, the practicality: Would you recommend to start the rest server when the plugin starts, and kill the process when the plugin stops? To keep the process running indefinitely? Or to start it just when the plugin needs to interact with plastic and kill it right after? (last one sounds too slow) Thank you!
  2. Hi, When using Plastic SCM GUI, a item removed locally (a deleted file) appears in the "Pending Changes" section and this change can be checkin. I cannot figure out how to to replicate this using the REST API, i.e I would like to checkin a file deletion. I tried setting the `paths` parameter to the path of the deleted file or of the directory where the deleted file was located. url = __api_url + f"/wkspaces/myworkspace/checkin" params = { "paths": [ "wkpath/to/file" # also tried "wkpath/to/file_dir" ], "comment": "Deleting a file", "recurse": True, } res = requests.post( url, headers={ "Content-type": "application/json", "Accept": "application/json", }, data=json.dumps(params), ) print(res.json()) # will print: {'totalSize': 0, 'transferredSize': 0, 'status': 'Checkin operation starting...'} And the response returned by a GET at "api/v1/wkspaces/myworkspace/checkin" is: {"status":"Failed", "message":"There are no changes in the workspace c:\\Users\\Baptiste\\wkspaces\\myworkspace"} What am I missing? How do you submit a file deletion when using the REST API? Thank you!
×
×
  • Create New...