Choosing VSTS Kanban column when creating an EPIC using the VSTS REST API - rest

I am creating a VSTS Kanban Epic using the REST API. This creates an Epic in the first column of the Kanban.
I want to be able to choose which column it goes into, and also as a second operation be able to move it from column to column using the REST API.
Looking at the list of fields available there is a field 'System.BoardColumn' - is this the correct field to modify to alter the Epic's column?
Thanks

You just need to specify the System.State field value (New, In process and Done) in REST API, then it will go the related column. Since New is the default value for System.State field, it will create in first column if you are not specify the value for System.State.
Create Epic in second column
To create an Epic shows in second column (In process) of Epics board, you can use create a work item REST API. Such as below example (create Epic epic3):
PATCH https://account.visualstudio.com/DefaultCollection/Git2/_apis/wit/workitems/$Epic?api-version=1.0
Content-Type: application/json-patch+json
[
{
"op": "add",
"path": "/fields/System.Title",
"value": "epic3"
},
{
"op": "add",
"path": "/fields/System.State",
"value": "In Progress"
}
]
Then the epic3 will show in second column:
Update an existing Epic from a column to another column
You just need to replace the value for System.State field by update a field REST API.
Such as above example, to move e1 (id=53) from first (New) column to second (IN process) column:
PATCH https://marinaliu.visualstudio.com/DefaultCollection/_apis/wit/workitems/53?api-version=1.0
Content-Type: application/json-patch+json
[
{
"op": "replace",
"path": "/fields/System.State",
"value": "In Progress"
}
]
Then the work item e1 will show in the second column:

Related

MarkLogic Data Hub document metadata added by steps

According to the documentation:
Document metadata added by steps
For every content object outputted by a Data Hub step, regardless of the step type, Data Hub will add the following document metadata keys and values to the document wrapped by the content object:
datahubCreatedOn = the date and time at which the document is written
datahubCreatedBy = the MarkLogic user used to run the step
datahubCreatedInFlow = the name of the flow containing the step being run
datahubCreatedByStep = the name of the step being run
datahubCreatedByJob = the ID of the job being run; this will contain the job ID of every flow run on the step, with multiple values being space-delimited
Is there any possibility to add some extra metadata keys and values to the document?
It is possible to add additional static values in your headers options or use one of these keywords to dynamically add values.
{
"headers": {
"sources": [{
"name": "loadCustomersJSON"
}],
"createdOn": "datahubCreatedOn",
"createdBy": "datahubCreatedBy"
}
}
You can also dynamically add values by using an interceptor
(See: https://docs.marklogic.com/datahub/5.6/flows/about-interceptors-custom-hooks.html) or updating the header value in a custom step if you are already using one (See:https://docs.marklogic.com/datahub/5.6/modules/editing-custom-step-module.html

How to Get / Update Customer GL Account info via Rest API

I'm trying to figure out how to Get and Update a Customer's GL Accounts info via Rest API.
As seen in this screenshot, a Customer's GL Accounts section has fields such as:
AR Account
AR Sub
Sales Account
Sales Sub
etc.
Via Rest API, where can I retrieve this Customer's above info, and how can I update them accordingly?
I'm able to perform CRUD for all the other Customer entity fields, but I'm quite lost regarding how per Customer GL Accounts can be retrieved and updated. Looking for any help to point me to the right direction.
Those fields are not the part of the Default endpoint, so you need some tricks to retrieve or update them.
You can either use custom endpoint or retrieve/update these fields using 'Custom' fields collection.
As for custom endpoint, here is the link that can help.
As for the custom fields, you can retrieve the values like that:
GET: {{sitename}}/entity/Default/20.200.001/Customer?$custom=DefLocation.CSalesAcctID, DefLocation.CARAccountID
Response:
{
"id": "90f25585-fbc0-eb11-9d4f-3ce1a14ed5bf",
"CustomerID": {
"value": "AAA"
},
"custom": {
"DefLocation": {
"CSalesAcctID": {
"type": "CustomStringField",
"value": "40000"
},
"CARAccountID": {
"type": "CustomStringField",
"value": "11000"
}
}
}
}
See here how to get the field names.
To update the fields you send them in the body the same way you get them in the response

Is there any easy method to getting the Column Title when using GET Row with the Smartsheet API?

Is there any easy method to getting the Column Title when using GET Row with the API? New to API. I'm utilizing Microsoft Power Automate for these calls to push updates to Teams and such (more custom than what comes natively from Smartsheet).
I'm utilizing this address from the documentation:
https://api.smartsheet.com/2.0/sheets/{SheetID}/rows/{rowID}, and then I add this string to the end of that URL to get discussions and columns: "?include=discussions,columns"
which will include a separate array named "Columns".
What I'm wanting to do is get the "Column title" within the initial GET Row action. It would show up within the "cells" array when doing a GET Row API call.
Here's an example of what is obtained in the "cells" array when GET Row is used:
"cells": [
{
"columnId": 4151830841190276,
"value": "New task.",
"displayValue": "New task."
}
]
And here's an example of what's obtained in that Columns array, which comes separate:
"columns": [
{
"id": 4151830841190276,
"version": 0,
"index": 3,
"title": "Item Name",
"type": "TEXT_NUMBER",
"primary": true,
"validation": false,
"width": 300
}
Which is fine, I can do lookups to bridge the gap between the ColumnID I obtain from "get row" and the Columns array that's also returned...but ideally I'd like to just get the ColumnID Title in the native "GET Row" action, preventing this workaround. Any ideas, or am I doing it the best way?
You can't get column information (title, type, options...) while specifically reading rows.
You have 2 options:
Make another call to get the column information
https://smartsheet-platform.github.io/api-docs/#get-column)
Read all
the sheet (both columns and rows at once)
https://smartsheet-platform.github.io/api-docs/#get-sheet
Both solution should be working, I would suggest the second solution since only one API call is needed, but need more work processing the data.

Azure DevOps Picklist howto know which ID is for what picklist?

When I GET the picklist by id using the REST api, it returns a json like this.
{
"items": [
"Orange",
"Blue"
],
"id": "65a8a40d-6c22-45ce-af0a-bdfdfdfd335",
"name": "picklist_aef2c045-0d2d-4f92-kjdf-56eea553e1ef",
"type": "String",
"isSuggested": false,
"url": "https://dev.azure.com/organization/_apis/work/processes/lists/65a8a40d-6c22-45ce-af0a-bdfdfdfd335"
}
My current aim is to make a script that updates the items within a picklist, but in order to update, I need to know the id of that picklist. All I know from azure devops is the label of the picklist. Is there a way to get the corresponding id with the label? Or is there an alternative? Even if I get the entire list of all picklists within the collection, it still doesn't tell me which is associated to which label so it's not usable for me.
Is there a way to get the corresponding id with the label? Or is there an alternative?
The essence of Picklist is the work item field.
You could get the target PickList id with the Rest API: Fields - Get or Fields - List.
The custom picklist field name: custom.fieldname.
For example:

Neo4J REST Unique Nodes

My question is two parts:
First, when trying to create a unique node using the REST Interface like below...
http://localhost:7474/db/data/index/node/people?uniqueness=create_or_fail
What is the meaning of the "person" portion of the URL. I'm under the impression that it is a label but I'm not sure.
Second, if it is indeed a label, when I execute the following REST call...
http://localhost:7474/db/data/index/node/Test?uniqueness=create_or_fail
with this payload...
{
key: "name",
value: "test",
properties:
{
"lastName": "test",
"name": "test",
"type": "test",
"firstName": "test"
}
}
A node is created but does not have an associated label. It creates a label-less node that does still enforce uniqueness. How do I create a unique node using the REST API with a label?
I'm using neo4j 2.0.
You are correct. When you send in JSON, it will create the node, or fail if it already exists using the index label 'people'
When sending, you need to have in your object a "key" and "value" which denotes how to do the index matching.
How are you determining that the node has no label? In the REST documentation, I can see that the labels is a different URL call for a node, have you checked there?