Share via


Pages - Add

Adds a page to the work item form.

POST https://dev.azure.com/{organization}/_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout/pages?api-version=7.0

URI Parameters

Name In Required Type Description
organization
path True

string

The name of the Azure DevOps organization.

processId
path True

string (uuid)

The ID of the process.

witRefName
path True

string

The reference name of the work item type.

api-version
query True

string

Version of the API to use. This should be set to '7.0' to use this version of the api.

Request Body

Name Type Description
contribution

WitContribution

Contribution for the page.

id

string

The id for the layout node.

inherited

boolean

A value indicating whether this layout node has been inherited from a parent layout. This is expected to only be only set by the combiner.

isContribution

boolean

A value indicating if the layout node is contribution are not.

label

string

The label for the page.

locked

boolean

A value indicating whether any user operations are permitted on this page and the contents of this page

order

integer (int32)

Order in which the page should appear in the layout.

overridden

boolean

A value indicating whether this layout node has been overridden by a child layout.

pageType

PageType

The icon for the page.

sections

Section[]

The sections of the page.

visible

boolean

A value indicating if the page should be hidden or not.

Responses

Name Type Description
200 OK

Page

successful operation

Security

oauth2

Type: oauth2
Flow: accessCode
Authorization URL: https://app.vssps.visualstudio.com/oauth2/authorize&response_type=Assertion
Token URL: https://app.vssps.visualstudio.com/oauth2/token?client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer&grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer

Scopes

Name Description
vso.work_write Grants the ability to read, create, and update work items and queries, update board metadata, read area and iterations paths other work item tracking related metadata, execute queries, and to receive notifications about work item events via service hooks.

Examples

Add a page

Sample request

POST https://dev.azure.com/{organization}/_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout/pages?api-version=7.0

{
  "sections": [
    {
      "id": "Section1",
      "groups": [],
      "overridden": false
    },
    {
      "id": "Section2",
      "groups": [],
      "overridden": false
    },
    {
      "id": "Section3",
      "groups": [],
      "overridden": false
    }
  ],
  "id": "",
  "label": "Page1",
  "order": null,
  "overridden": null,
  "inherited": null,
  "visible": true,
  "locked": false,
  "pageType": 1,
  "contribution": null
}

Sample response

{
  "id": "230f8598-71ed-4192-917e-aa1aacc5174a",
  "label": "Page1",
  "pageType": "custom",
  "visible": true,
  "isContribution": false,
  "sections": [
    {
      "id": "Section1",
      "groups": []
    },
    {
      "id": "Section2",
      "groups": []
    },
    {
      "id": "Section3",
      "groups": []
    },
    {
      "id": "Section4",
      "groups": []
    }
  ]
}

Definitions

Name Description
Control

Represent a control in the form.

Group

Represent a group in the form that holds controls in it.

Page

Describes a page in the work item form layout

PageType

The icon for the page.

Section

Defines a section of the work item form layout

WitContribution

Properties of a work item form contribution

Control

Represent a control in the form.

Name Type Description
contribution

WitContribution

Contribution for the control.

controlType

string

Type of the control.

height

integer (int32)

Height of the control, for html controls.

id

string

The id for the layout node.

inherited

boolean

A value indicating whether this layout node has been inherited. from a parent layout. This is expected to only be only set by the combiner.

isContribution

boolean

A value indicating if the layout node is contribution or not.

label

string

Label for the field.

metadata

string

Inner text of the control.

order

integer (int32)

Order in which the control should appear in its group.

overridden

boolean

A value indicating whether this layout node has been overridden . by a child layout.

readOnly

boolean

A value indicating if the control is readonly.

visible

boolean

A value indicating if the control should be hidden or not.

watermark

string

Watermark text for the textbox.

Group

Represent a group in the form that holds controls in it.

Name Type Description
contribution

WitContribution

Contribution for the group.

controls

Control[]

Controls to be put in the group.

height

integer (int32)

The height for the contribution.

id

string

The id for the layout node.

inherited

boolean

A value indicating whether this layout node has been inherited from a parent layout. This is expected to only be only set by the combiner.

isContribution

boolean

A value indicating if the layout node is contribution are not.

label

string

Label for the group.

order

integer (int32)

Order in which the group should appear in the section.

overridden

boolean

A value indicating whether this layout node has been overridden by a child layout.

visible

boolean

A value indicating if the group should be hidden or not.

Page

Describes a page in the work item form layout

Name Type Description
contribution

WitContribution

Contribution for the page.

id

string

The id for the layout node.

inherited

boolean

A value indicating whether this layout node has been inherited from a parent layout. This is expected to only be only set by the combiner.

isContribution

boolean

A value indicating if the layout node is contribution are not.

label

string

The label for the page.

locked

boolean

A value indicating whether any user operations are permitted on this page and the contents of this page

order

integer (int32)

Order in which the page should appear in the layout.

overridden

boolean

A value indicating whether this layout node has been overridden by a child layout.

pageType

PageType

The icon for the page.

sections

Section[]

The sections of the page.

visible

boolean

A value indicating if the page should be hidden or not.

PageType

The icon for the page.

Value Description
attachments

Attachment page type.

custom

Custom page type.

history

History page type.

links

Link page type.

Section

Defines a section of the work item form layout

Name Type Description
groups

Group[]

List of child groups in this section

id

string

The id for the layout node.

overridden

boolean

A value indicating whether this layout node has been overridden by a child layout.

WitContribution

Properties of a work item form contribution

Name Type Description
contributionId

string

The id for the contribution.

height

integer (int32)

The height for the contribution.

inputs

object

A dictionary holding key value pairs for contribution inputs.

showOnDeletedWorkItem

boolean

A value indicating if the contribution should be show on deleted workItem.