a simple API would be great ....with that developer we could work with VersionOne from cmd line
.configure/vone
<server>
<user>
<password>
vone --list task
vone --todo
vone --update <task_numer> -f <field> <value>
etc...
:-)
just an idea ...
by: Rodolfo B. | over a year ago | User Interface
Comments
Please see:
https://github.com/versionone/V1PowerShell
Alternatively, the SDK.Python is quite usable in Python's interactive REPL:
https://github.com/versionone/VersionOne.SDK.Python
If you have more specific ideas, please submit GitHub issues against either project. Or if you were looking for support in a different command-line shell, please open a new idea with more details.
Here's a batch file you can name "vone.bat" that can be called like this:
vone Member/20 set Phone 555-555-5555
That will update Member 20's Phone attribute value with that number.
To use it, you'll need the general purpose cURL command line tool: http://curl.haxx.se/
You can probably adapt this to suit your needs regarding the remote URL, username/password, etc.
----------
SET V1API=http://localhost/VersionOne.Web/rest-1.v1/Data
SET V1USER=admin
SET V1PASS=admin
SET V1ASSET=%1
SET V1CMD=%2
SET V1ATTRIBUTE=%3
SET V1VALUE=%4
echo ^<Asset^>^<Attribute name="%V1ATTRIBUTE%" act="%V1CMD%"^>%V1VALUE%^</Attribute^>^</Asset^> >v1operation.xml
curl -X POST --data "@v1operation.xml" --basic -u %V1USER%:%V1PASS% %V1API%/%V1ASSET%
----------
Also, while I know you didn't mention a particular programming language that you'd like a
command-line client implemented in, and I'll assume you want to run it from Windows? Or, is that
not true?
To add to Ian's comment:
We've also been working on some command-line examples that use the .NET API Client. These are
very experimental, but you can see them here:
https://github.com/versionone/VersionOne.SDK.NET.APIClient/blob/master/Example/GettingStarted/src
/Program.cs
Currently, it does not accept or parse command line options as tasks, but could probably easily
be extended to do so, as could the Python client as well.
In general, we are trying to evolve the clients to have similar usage models, regardless of what
language they are written in. We're also looking at making it easier to use standard REST and
HTTP clients (such as cURL) to do both querying and operations.
Josh (jogoshugh on GitHub)
Actually, your comment makes it look like you are thinking of Unix :)
Here's a script for doing it in bash, tested on Windows with GitBash:
#!/bin/sh
V1API=http://localhost/VersionOne.Web/rest-1.v1/Data
V1USER=admin
V1PASS=admin
V1ASSET=$1
V1CMD=$2
V1ATTRIBUTE=$3
V1VALUE=$4
curl -X POST --basic -u $V1USER:$V1PASS $V1API/$V1ASSET --data "<Asset><Attribute name='$V1ATTRIBUTE' act='$V1CMD'>$V1VALUE</Attribute></Asset>"