Repository Context

Update repository context

Update an existing context by contextId. Omitted fields and scope are preserved. Missing IDs return 404 and never create a context. Requires permission over both existing and requested assignments.

post/api/v2/contexts/update

Request

  • Base URL
    https://zeropath.com
  • Auth
    API key in header X-ZeroPath-API-Token-Id and API key in header X-ZeroPath-API-Token-Secret

Request body

organizationIdstring

Organization ID. Resolved from authentication when omitted.

titlestring

Optional label. Empty or whitespace-only titles clear the label.

contextstring

Nonblank natural-language context used in subsequent scans.

globPatternstring

File glob. Defaults to ** on creation; omission preserves the value on update.

applicableSourceTypesstring[]

Source types to target. An empty array applies to all source types.

scanPhasesstring[]

Scan phases to target. Omission preserves phases on update; creation uses the documented default phase set.

scope'allRepositories' | 'repositories' | 'tags'

Explicit scope. repositories requires repositoryIds; tags requires tagIds. Conflicting selectors are rejected.

allRepositoriestrue

Apply to every current and future repository. Cannot be combined with repositoryIds or scope: tags.

repositoryIdsstring[]

Direct repository assignments. Omission on update preserves scope; use allRepositories: true to change it.

tagIdsstring[]

Additional tag assignments. On create, tagIds alone creates tag-only scope. On update, tagIds alone replaces direct tags and preserves scanner-setting assignments; use scope: tags to switch to tag-only scope.

contextIdstring required

Response

Successful response

idstring required

Changes

No recorded changes to this operation across all 1 revision of this API.