Publish-ITGlueDocument

SYNOPSIS

Publish a document / Publish a document in the specified organization

SYNTAX

ById (Default)

Publish-ITGlueDocument [-Id] <long> [-Raw] [-WhatIf] [-Confirm]

ByOrganizationById

Publish-ITGlueDocument [-OrganizationId] <long> [-Id] <long> [-Raw] [-WhatIf] [-Confirm]

ALIASES

This cmdlet has the following aliases,

  • None

DESCRIPTION

Parameter set [ ById ] - The Publish-ITGlueDocument cmdlet invokes the PATCH method of the /documents/{id}/publish endpoint (Publish a document)

Publishes a document by setting the published_at timestamp, the publisher information, and serializing the document’s content.

When published by a user, sets:

  • published_at: current timestamp
  • published_by: user ID
  • updated_by: user ID

When published via API key, sets:

  • published_at: current timestamp
  • api_key_published_by: API key ID
  • api_key_updated_by: API key ID

Returns the published document if successful.

This endpoint does not require a request body.

Example return value:

{ “data”: { “id”: “8”, “type”: “documents”, “attributes”: { “organization-id”: 8, “organization-name”: “Example Organization”, “resource-url”: “http://tenant1.itglue.com/8/docs/8”, “restricted”: false, “my-glue”: false, “name”: “Example Document”, “created-at”: “2021-01-28T23:50:22.000Z”, “updated-at”: “2021-01-28T23:50:22.000Z”, “published-by”: 1, “published-at”: “2026-01-23T12:00:00.000Z”, “public”: false, “document-folder-id”: null, “is-uploaded”: false, “user-id”: 1, “content”: “—\n- id: 109\n document_id: 8\n ancestry: \n resource_id: 39\n resource_type: Document::Heading\n sort: 0”, “support-office-online”: false, “office-online-resource-url”: “http://tenant1.itglue.com/8/docs/8” } } }

Parameter set [ ByOrganizationById ] - The Publish-ITGlueDocument cmdlet invokes the PATCH method of the /organizations/{organization_id}/relationships/documents/{id}/publish endpoint (Publish a document in the specified organization)

Publishes a document by setting the published_at timestamp, the publisher information, and serializing the document’s content.

When published by a user, sets:

  • published_at: current timestamp
  • published_by: user ID
  • updated_by: user ID

When published via API key, sets:

  • published_at: current timestamp
  • api_key_published_by: API key ID
  • api_key_updated_by: API key ID

Returns the published document if successful.

This endpoint does not require a request body.

Example return value:

{ “data”: { “id”: “8”, “type”: “documents”, “attributes”: { “organization-id”: 8, “organization-name”: “Example Organization”, “resource-url”: “http://tenant1.itglue.com/8/docs/8”, “restricted”: false, “my-glue”: false, “name”: “Example Document”, “created-at”: “2021-01-28T23:50:22.000Z”, “updated-at”: “2021-01-28T23:50:22.000Z”, “published-by”: 1, “published-at”: “2026-01-23T12:00:00.000Z”, “public”: false, “document-folder-id”: null, “is-uploaded”: false, “user-id”: 1, “content”: “—\n- id: 109\n document_id: 8\n ancestry: \n resource_id: 39\n resource_type: Document::Heading\n sort: 0”, “support-office-online”: false, “office-online-resource-url”: “http://tenant1.itglue.com/8/docs/8” } } }

This is a write function. It changes data in ITGlue. Use -WhatIf to see the request without sending it

EXAMPLES

EXAMPLE 1

Publish-ITGlueDocument -Id 12345 -WhatIf

Shows the PATCH request to the /documents/{id}/publish endpoint without sending it

EXAMPLE 2

Publish-ITGlueDocument -OrganizationId 12345 -Id 12345 -WhatIf

Shows the PATCH request to the /organizations/{organization_id}/relationships/documents/{id}/publish endpoint without sending it

PARAMETERS

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
DefaultValue: ''
SupportsWildcards: false
Aliases:
- cf
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Id

Defines the ID of the item

Type: System.Int64
DefaultValue: 0
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: ByOrganizationById
  Position: 1
  IsRequired: true
  ValueFromPipeline: true
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
- Name: ById
  Position: 0
  IsRequired: true
  ValueFromPipeline: true
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-OrganizationId

Only required for nested relationships route

Notes: Must be a valid Organization Id in your Account

Type: System.Int64
DefaultValue: 0
SupportsWildcards: false
Aliases:
- organization_id
ParameterSets:
- Name: ByOrganizationById
  Position: 0
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: true
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Raw

Returns the full API response (data, meta, links, & included) instead of only the data

Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-WhatIf

Runs the command in a mode that only reports what would happen without performing the actions.

Type: System.Management.Automation.SwitchParameter
DefaultValue: ''
SupportsWildcards: false
Aliases:
- wi
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

System.Int64

OUTPUTS

NOTES

Endpoint : PATCH /documents/{id}/publish Endpoint : PATCH /organizations/{organization_id}/relationships/documents/{id}/publish