Update a Campaign
PATCH/campaigns/:id
Use this API to update individual fields on a certification campaign, using the JSON Patch standard.
Request
Path Parameters
ID of the campaign template being modified.
- application/json-patch+json
Body
array
required
A list of campaign update operations according to the JSON Patch standard. The fields that can be patched differ based on the status of the campaign.
When the campaign is in the STAGED status, you can patch these fields:
- name
- description
- recommendationsEnabled
- deadline
- emailNotificationEnabled
- autoRevokeAllowed
When the campaign is in the ACTIVE status, you can patch these fields:
-
deadline
Array [
- string
- boolean
- integer
- object
- array
Array [
- MOD1
- MOD2
- MOD3
]
]
Possible values: [add
, remove
, replace
, move
, copy
, test
]
The operation to be performed
A string JSON Pointer representing the target path to an element to be affected by the operation
value
object
The value to be used for the operation, required for "add" and "replace" operations
oneOf
string
boolean
integer
object
anyOf
string
integer
object
Responses
- 200
- 400
- 401
- 403
- 404
- 429
- 500
This response indicates that the PATCH operation succeeded, and the API returns the campaign's new representation.
- application/json
- Schema
- Example (from schema)
- Manager
- Search
- Source Owner
- RoleComposition
Schema
Array [
Array [
]
]
Id of the campaign
The campaign name. If this object is part of a template, special formatting applies; see the /campaign-templates/{id}/generate
endpoint documentation for details.
The campaign description. If this object is part of a template, special formatting applies; see the /campaign-templates/{id}/generate
endpoint documentation for details.
The campaign's completion deadline. This date must be in the future in order to activate the campaign. If you try to activate a campaign with a deadline of today or in the past, you will receive a 400 error response.
Possible values: [MANAGER
, SOURCE_OWNER
, SEARCH
, ROLE_COMPOSITION
, MACHINE_ACCOUNT
]
The type of campaign. Could be extended in the future.
Enables email notification for this campaign
Allows auto revoke for this campaign
Enables IAI for this campaign. Accepts true even if the IAI product feature is off. If IAI is turned off then campaigns generated from this template will indicate false. The real value will then be returned if IAI is ever enabled for the org in the future.
Possible values: [PENDING
, STAGED
, CANCELING
, ACTIVATING
, ACTIVE
, COMPLETING
, COMPLETED
, ERROR
, ARCHIVED
]
The campaign's current status.
Possible values: [CORRELATED
, UNCORRELATED
]
The correlatedStatus of the campaign. Only SOURCE_OWNER campaigns can be Uncorrelated. An Uncorrelated certification campaign only includes Uncorrelated identities (An identity is uncorrelated if it has no accounts on an authoritative source).
Created time of the campaign
The total number of certifications in this campaign.
The number of completed certifications in this campaign.
alerts
object[]
A list of errors and warnings that have accumulated.
Possible values: [ERROR
, WARN
, INFO
]
Denotes the level of the message
localizations
object[]
The locale for the message text, a BCP 47 language tag.
Possible values: [DEFAULT
, REQUEST
, null
]
An indicator of how the locale was selected. DEFAULT means the locale is the system default. REQUEST means the locale was selected from the request context (i.e., best match based on the Accept-Language header). Additional values may be added in the future without notice.
Actual text of the error message in the indicated locale.
{
"id": "2c9079b270a266a60170a2779fcb0007",
"name": "Manager Campaign",
"description": "Everyone needs to be reviewed by their manager",
"deadline": "2020-03-15T10:00:01.456Z",
"type": "MANAGER",
"emailNotificationEnabled": false,
"autoRevokeAllowed": false,
"recommendationsEnabled": true,
"status": "ACTIVE",
"correlatedStatus": "CORRELATED",
"created": "2020-03-03T22:15:13.611Z",
"totalCertifications": 100,
"completedCertifications": 10,
"alerts": [
{
"level": "ERROR",
"localizations": [
{
"locale": "en-US",
"localeOrigin": "DEFAULT",
"text": "The request was syntactically correct but its content is semantically invalid."
}
]
}
]
}
{
"id": "2c918086719eec070171a7e3355a360a",
"name": "Manager Review",
"description": "A review of everyone's access by their manager.",
"deadline": "2020-12-25T06:00:00.123Z",
"type": "MANAGER",
"status": "ACTIVE",
"emailNotificationEnabled": false,
"autoRevokeAllowed": false,
"recommendationsEnabled": false
}
{
"id": "7e1a731e3fb845cfbe58112ba4673ee4",
"name": "Search Campaign",
"description": "Search Campaign Info",
"deadline": "2022-07-26T15:42:44Z",
"type": "SEARCH",
"status": "ACTIVE",
"emailNotificationEnabled": false,
"autoRevokeAllowed": false,
"recommendationsEnabled": false
}
{
"id": "2c918086719eec070171a7e3355a412b",
"name": "AD Source Review",
"description": "A review of our AD source.",
"deadline": "2020-12-25T06:00:00.123Z",
"type": "SOURCE_OWNER",
"status": "STAGED",
"emailNotificationEnabled": true,
"autoRevokeAllowed": false,
"recommendationsEnabled": false,
"correlatedStatus": "CORRELATED"
}
{
"id": "3b2e2e5821e84127b6d693d41c40623b",
"name": "Role Composition Campaign",
"description": "A review done by a role owner.",
"deadline": "2020-12-25T06:00:00.468Z",
"type": "ROLE_COMPOSITION",
"status": "ACTIVE",
"emailNotificationEnabled": false,
"autoRevokeAllowed": false,
"recommendationsEnabled": false
}
Client Error - Returned if the request body is invalid.
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
Array [
]
Fine-grained error code providing more detail of the error.
Unique tracking id for the error.
messages
object[]
Generic localized reason for error
The locale for the message text, a BCP 47 language tag.
Possible values: [DEFAULT
, REQUEST
, null
]
An indicator of how the locale was selected. DEFAULT means the locale is the system default. REQUEST means the locale was selected from the request context (i.e., best match based on the Accept-Language header). Additional values may be added in the future without notice.
Actual text of the error message in the indicated locale.
causes
object[]
Plain-text descriptive reasons to provide additional detail to the text provided in the messages field
The locale for the message text, a BCP 47 language tag.
Possible values: [DEFAULT
, REQUEST
, null
]
An indicator of how the locale was selected. DEFAULT means the locale is the system default. REQUEST means the locale was selected from the request context (i.e., best match based on the Accept-Language header). Additional values may be added in the future without notice.
Actual text of the error message in the indicated locale.
{
"detailCode": "400.1 Bad Request Content",
"trackingId": "e7eab60924f64aa284175b9fa3309599",
"messages": [
{
"locale": "en-US",
"localeOrigin": "DEFAULT",
"text": "The request was syntactically correct but its content is semantically invalid."
}
],
"causes": [
{
"locale": "en-US",
"localeOrigin": "DEFAULT",
"text": "The request was syntactically correct but its content is semantically invalid."
}
]
}
Unauthorized - Returned if there is no authorization header, or if the JWT token is expired.
- application/json
- Schema
- Example (from schema)
Schema
A message describing the error
{
"error": "JWT validation failed: JWT is expired"
}
Forbidden - Returned if the user you are running as, doesn't have access to this end-point.
- application/json
- Schema
- Example (from schema)
- 403
Schema
Array [
]
Array [
]
Fine-grained error code providing more detail of the error.
Unique tracking id for the error.
messages
object[]
Generic localized reason for error
The locale for the message text, a BCP 47 language tag.
Possible values: [DEFAULT
, REQUEST
, null
]
An indicator of how the locale was selected. DEFAULT means the locale is the system default. REQUEST means the locale was selected from the request context (i.e., best match based on the Accept-Language header). Additional values may be added in the future without notice.
Actual text of the error message in the indicated locale.
causes
object[]
Plain-text descriptive reasons to provide additional detail to the text provided in the messages field
The locale for the message text, a BCP 47 language tag.
Possible values: [DEFAULT
, REQUEST
, null
]
An indicator of how the locale was selected. DEFAULT means the locale is the system default. REQUEST means the locale was selected from the request context (i.e., best match based on the Accept-Language header). Additional values may be added in the future without notice.
Actual text of the error message in the indicated locale.
{
"detailCode": "400.1 Bad Request Content",
"trackingId": "e7eab60924f64aa284175b9fa3309599",
"messages": [
{
"locale": "en-US",
"localeOrigin": "DEFAULT",
"text": "The request was syntactically correct but its content is semantically invalid."
}
],
"causes": [
{
"locale": "en-US",
"localeOrigin": "DEFAULT",
"text": "The request was syntactically correct but its content is semantically invalid."
}
]
}
An example of a 403 response object
{
"detailCode": "403 Forbidden",
"trackingId": "b21b1f7ce4da4d639f2c62a57171b427",
"messages": [
{
"locale": "en-US",
"localeOrigin": "DEFAULT",
"text": "The server understood the request but refuses to authorize it."
}
]
}
Not Found - returned if the request URL refers to a resource or object that does not exist
- application/json
- Schema
- Example (from schema)
- 404
Schema
Array [
]
Array [
]
Fine-grained error code providing more detail of the error.
Unique tracking id for the error.
messages
object[]
Generic localized reason for error
The locale for the message text, a BCP 47 language tag.
Possible values: [DEFAULT
, REQUEST
, null
]
An indicator of how the locale was selected. DEFAULT means the locale is the system default. REQUEST means the locale was selected from the request context (i.e., best match based on the Accept-Language header). Additional values may be added in the future without notice.
Actual text of the error message in the indicated locale.
causes
object[]
Plain-text descriptive reasons to provide additional detail to the text provided in the messages field
The locale for the message text, a BCP 47 language tag.
Possible values: [DEFAULT
, REQUEST
, null
]
An indicator of how the locale was selected. DEFAULT means the locale is the system default. REQUEST means the locale was selected from the request context (i.e., best match based on the Accept-Language header). Additional values may be added in the future without notice.
Actual text of the error message in the indicated locale.
{
"detailCode": "400.1 Bad Request Content",
"trackingId": "e7eab60924f64aa284175b9fa3309599",
"messages": [
{
"locale": "en-US",
"localeOrigin": "DEFAULT",
"text": "The request was syntactically correct but its content is semantically invalid."
}
],
"causes": [
{
"locale": "en-US",
"localeOrigin": "DEFAULT",
"text": "The request was syntactically correct but its content is semantically invalid."
}
]
}
An example of a 404 response object
{
"detailCode": "404 Not found",
"trackingId": "b21b1f7ce4da4d639f2c62a57171b427",
"messages": [
{
"locale": "en-US",
"localeOrigin": "DEFAULT",
"text": "The server did not find a current representation for the target resource."
}
]
}
Too Many Requests - Returned in response to too many requests in a given period of time - rate limited. The Retry-After header in the response includes how long to wait before trying again.
- application/json
- Schema
- Example (from schema)
Schema
A message describing the error
{
"message": " Rate Limit Exceeded "
}
Internal Server Error - Returned if there is an unexpected error.
- application/json
- Schema
- Example (from schema)
- 500
Schema
Array [
]
Array [
]
Fine-grained error code providing more detail of the error.
Unique tracking id for the error.
messages
object[]
Generic localized reason for error
The locale for the message text, a BCP 47 language tag.
Possible values: [DEFAULT
, REQUEST
, null
]
An indicator of how the locale was selected. DEFAULT means the locale is the system default. REQUEST means the locale was selected from the request context (i.e., best match based on the Accept-Language header). Additional values may be added in the future without notice.
Actual text of the error message in the indicated locale.
causes
object[]
Plain-text descriptive reasons to provide additional detail to the text provided in the messages field
The locale for the message text, a BCP 47 language tag.
Possible values: [DEFAULT
, REQUEST
, null
]
An indicator of how the locale was selected. DEFAULT means the locale is the system default. REQUEST means the locale was selected from the request context (i.e., best match based on the Accept-Language header). Additional values may be added in the future without notice.
Actual text of the error message in the indicated locale.
{
"detailCode": "400.1 Bad Request Content",
"trackingId": "e7eab60924f64aa284175b9fa3309599",
"messages": [
{
"locale": "en-US",
"localeOrigin": "DEFAULT",
"text": "The request was syntactically correct but its content is semantically invalid."
}
],
"causes": [
{
"locale": "en-US",
"localeOrigin": "DEFAULT",
"text": "The request was syntactically correct but its content is semantically invalid."
}
]
}
An example of a 500 response object
{
"detailCode": "500.0 Internal Fault",
"trackingId": "b21b1f7ce4da4d639f2c62a57171b427",
"messages": [
{
"locale": "en-US",
"localeOrigin": "DEFAULT",
"text": "An internal fault occurred."
}
]
}