Mutation
The mutation type defines how GraphQL operations change data. It is analogous to performing HTTP
verbs such as POST
, PATCH
, and DELETE
. The various mutation types supported in the GraphQL API are all sent using
POST
. The other HTTP verbs are not used.
All R-Service mutations accept a single input
argument, an input type, which
contains the values that are used by the mutation.
Using a single input
argument makes it easy to post whole JSON objects to the mutation using one
GraphQL variable instead of making a separate variable for
each argument.
Using variables is recommended over including dynamic values directly in queries. Besides preventing
security issues arising from including user supplied values in queries, using these variables also
facilitates logging without including personal/sensitive data in log files.
A sample usage of a mutation to create a Request:
mutation {
requestCreate(input: { subject: "My request", category: "other" }) {
errors {
path
message
}
request {
id
requestId
subject
category
}
}
}
Note that for this example to work your OAuth token must have added a scope to allow action Request - Create
.
Mutations
R-Service exposes the following mutations to allow data to be changed.
-
agileBoardCreate Creates a new agile board.
-
agileBoardUpdate Updates an existing agile board.
-
appInstanceCreate Creates a new app instance.
-
appInstanceUpdate Updates an existing app instance.
-
appOfferingAutomationRuleCreate Creates a new app offering automation rule.
-
appOfferingAutomationRuleUpdate Updates an existing app offering automation rule.
-
appOfferingCreate Creates a new app offering.
-
appOfferingUpdate Updates an existing app offering.
-
automationRuleCreate Creates a new automation rule.
-
automationRuleUpdate Updates an existing automation rule.
-
broadcastCreate Creates a new broadcast.
-
broadcastUpdate Updates an existing broadcast.
-
calendarCreate Creates a new calendar.
-
calendarUpdate Updates an existing calendar.
-
configurationItemCreate Creates a new configuration item. Important: To facilitate integrations with discovery tools, the create is treated as an update in case the provided
name
orlabel
is already used by an inactive CI in the same account. -
configurationItemUpdate Updates an existing configuration item.
-
contractCreate Creates a new contract.
-
contractUpdate Updates an existing contract.
-
customCollectionCreate Creates a new custom collection.
-
customCollectionElementCreate Creates a new custom collection element.
-
customCollectionElementUpdate Updates an existing custom collection element.
-
customCollectionUpdate Updates an existing custom collection.
-
discoveredConfigurationItems This mutation can be used to push at most 100 discovered configuration items to R-Service at once. A more extensive description of this functionality can be found on the Discovery Tools page of the developer documentation.
The query will be executed in the background. Typically the following fields should be queried:
asyncQuery { resultUrl errorCount }
configurationItems { id sourceID }
On initial submission the configurationItems
field will be null
.
The resultUrl
contains an expiring link to the location where the resulting JSON is available
once the query has been executed.
It is possible to poll the link every couple of seconds to check whether the query is completed.
Initially the link will point to an empty JSON document ({}
), once the query is completed it will contain
the JSON result of this mutation.
In the result both the asyncQuery
and configurationItems
fields as requested on submission are present.
The errorCount
can for example be used to see whether processing was successful (then it is 0
).
-
effortClassCreate Creates a new effort class.
-
effortClassUpdate Updates an existing effort class.
-
firstLineSupportAgreementCreate Creates a new first line support agreement.
-
firstLineSupportAgreementUpdate Updates an existing first line support agreement.
-
holidayCreate Creates a new holiday.
-
holidayUpdate Updates an existing holiday.
-
invoiceCreate Creates a new invoice.
-
invoiceUpdate Updates an existing invoice.
-
knowledgeArticleCreate Creates a new knowledge article.
-
knowledgeArticleUpdate Updates an existing knowledge article.
-
noteCreate Adds a new note to a record.
-
noteReactionCreate Adds a new note reaction to a note.
-
noteReactionDelete Deletes a note reaction from a note.
-
organizationCreate Creates a new organization.
-
organizationUpdate Updates an existing organization.
-
outOfOfficePeriodCreate Creates a new out of office period.
-
outOfOfficePeriodUpdate Updates an existing out of office period.
-
pdfDesignCreate Creates a new PDF design.
-
pdfDesignUpdate Updates an existing PDF design.
-
personCreate Creates a new person.
-
personUpdate Updates an existing person.
-
problemCreate Creates a new problem.
-
problemUpdate Updates an existing problem.
-
productBacklogCreate Creates a new product backlog.
-
productBacklogUpdate Updates an existing product backlog.
-
productCategoryCreate Creates a new product category.
-
productCategoryUpdate Updates an existing product category.
-
productCreate Creates a new product.
-
productUpdate Updates an existing product.
-
projectCategoryCreate Creates a new project category.
-
projectCategoryUpdate Updates an existing project category.
-
projectCreate Creates a new project.
-
projectRiskLevelCreate Creates a new project risk level.
-
projectRiskLevelUpdate Updates an existing project risk level.
-
projectTaskCreate Creates a new project task.
-
projectTaskTemplateCreate Creates a new project task template.
-
projectTaskTemplateUpdate Updates an existing project task template.
-
projectTaskUpdate Updates an existing project task.
-
projectTemplateCreate Creates a new project template.
-
projectTemplateUpdate Updates an existing project template.
-
projectUpdate Updates an existing project.
-
releaseCreate Creates a new release.
-
releaseUpdate Updates an existing release.
-
requestCreate Creates a new request.
-
requestTemplateCreate Creates a new request template.
-
requestTemplateUpdate Updates an existing request template.
-
requestUpdate Updates an existing request.
-
reservationCreate Creates a new reservation.
-
reservationOfferingCreate Creates a new reservation offering.
-
reservationOfferingUpdate Updates an existing reservation offering.
-
reservationUpdate Updates an existing reservation.
-
riskCreate Creates a new risk.
-
riskSeverityCreate Creates a new risk severity.
-
riskSeverityUpdate Updates an existing risk severity.
-
riskUpdate Updates an existing risk.
-
scrumWorkspaceCreate Creates a new scrum workspace.
-
scrumWorkspaceUpdate Updates an existing scrum workspace.
-
serviceCategoryCreate Creates a new service category.
-
serviceCategoryUpdate Updates an existing service category.
-
serviceCreate Creates a new service.
-
serviceInstanceCreate Creates a new service instance.
-
serviceInstanceUpdate Updates an existing service instance.
-
serviceLevelAgreementCreate Creates a new service level agreement.
-
serviceLevelAgreementUpdate Updates an existing service level agreement.
-
serviceOfferingCreate Creates a new service offering.
-
serviceOfferingUpdate Updates an existing service offering.
-
serviceUpdate Updates an existing service.
-
shopArticleCategoryCreate Creates a new shop article category.
-
shopArticleCategoryUpdate Updates an existing shop article category.
-
shopArticleCreate Creates a new shop article.
-
shopArticleUpdate Updates an existing shop article.
-
shopOrderLineCreate Creates a new shop order line.
-
shopOrderLineUpdate Updates an existing shop order line.
-
shortUrlCreate Creates a new short URL.
-
shortUrlUpdate Updates an existing short URL.
-
siteCreate Creates a new site.
-
siteUpdate Updates an existing site.
-
skillPoolCreate Creates a new skill pool.
-
skillPoolUpdate Updates an existing skill pool.
-
slaCoverageGroupCreate Creates a new SLA coverage group.
-
slaCoverageGroupUpdate Updates an existing SLA coverage group.
-
slaNotificationSchemeCreate Creates a new SLA notification scheme.
-
slaNotificationSchemeUpdate Updates an existing SLA notification scheme.
-
sprintCreate Creates a new sprint.
-
sprintUpdate Updates an existing sprint.
-
surveyCreate Creates a new survey.
-
surveyResponseCreate Creates a new survey response.
-
surveyResponseUpdate Updates an existing survey response.
-
surveyUpdate Updates an existing survey.
-
taskCreate Creates a new task.
-
taskTemplateCreate Creates a new task template.
-
taskTemplateUpdate Updates an existing task template.
-
taskUpdate Updates an existing task.
-
teamCreate Creates a new team.
-
teamUpdate Updates an existing team.
-
timeAllocationCreate Creates a new time allocation.
-
timeAllocationUpdate Updates an existing time allocation.
-
timeEntryCreate Creates a new time entry.
-
timeEntryUpdate Updates an existing time entry.
-
timesheetSettingCreate Creates a new timesheet setting.
-
timesheetSettingUpdate Updates an existing timesheet setting.
-
translationCreate Creates a new translation.
-
translationUpdate Updates an existing translation.
-
uiExtensionCreate Creates a new UI extension.
-
uiExtensionUpdate Updates an existing UI extension.
-
waitingForCustomerFollowUpCreate Creates a new waiting for customer follow-up.
-
waitingForCustomerFollowUpUpdate Updates an existing waiting for customer follow-up.
-
webhookCreate Creates a new webhook.
-
webhookDelete Deletes a webhook.
-
webhookPolicyCreate Creates a new webhook policy.
-
webhookPolicyDelete Deletes a webhook policy.
-
webhookPolicyUpdate Updates an existing webhook policy.
-
webhookUpdate Updates an existing webhook.
-
workflowCreate Creates a new workflow.
-
workflowTemplateCreate Creates a new workflow template.
-
workflowTemplateUpdate Updates an existing workflow template.
-
workflowTypeCreate Creates a new workflow type.
-
workflowTypeUpdate Updates an existing workflow type.
-
workflowUpdate Updates an existing workflow.