Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device.
Atlassian cookies and tracking notice, (opens new window)
Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
Confluence

Aspire 5
Results will update as you type.
  • What is Aspire?
  • Getting Started
  • Generative AI
  • Crawling Features
  • Rest API Usage
  • Configuration
  • How-to articles
  • Connectors
  • Publishers
  • Workflows
    • Admin UI - Workflows
    • Rest API - Workflows
    • Applications
    • Summarization
    • Canonical Workflows
  • Aspire Tools
    Calendars

You‘re viewing this with anonymous access, so some content might be blocked.
/
Rest API - Workflows
Updated Apr 06

    Rest API - Workflows

      Go to Workflow API for a detailed view of the different requests.

      • 1 Adding a Publisher 
        • 1.1 Step 1. Add a new Workflow.
        • 1.2 Step 2. Create an Elasticsearch Publisher Rule.
        • 1.3 Step 3. Add Elasticsearch Rule to the onPublish event.

      Adding a Publisher 


      The following steps will create a new workflow and then add a single Elasticsearch Publisher to the onPublish event.

      Step 1. Add a new Workflow.

      Request

      POST /aspire/_api/workflows?type=connector

      { "description": "ES Workflow" }

       

      Response

      { "workflow": [ { "id": "9bdf3efb-c266-46ac-ab59-eb8eda87d9e9", "type": "connector", "description": "Test Workflow", "checksum": "e143d076aab367368474087d6ebf1d90377405b7c8ab227f5cb835380e6ccc4f", "templates": { "template": [ { "id": "add-static-acl", "type": "script", "description": "Add static ACLs", "ruleDescription": "Static ACL: Domain:\"${domain}\" Name:\"${name}\" Type:\"${entity}\" Access:\"${access}\"", ... }, ... ] }, "events": { "event": [ { "id": "onScan" }, { "id": "onAddUpdate" }, { "id": "onDelete" }, { "id": "onPublish" }, { "id": "onError" }, { "id": "onIdentity" }, { "id": "onIdentityError" } ] } } ] }

      Notice that by default, when a new Workflow is created, all templates and events are added to it, so they can be used to create a different set of rules.

       

      Step 2. Create an Elasticsearch Publisher Rule.

       

      Request

      POST /aspire/_api/workflows/9bdf3efb-c266-46ac-ab59-eb8eda87d9e9/rules

      { "type": "application", "description": "Elastic", "config": "com.accenture.aspire:aspire-elasticsearch-publisher-source", "appType": "elasticsearch-publisher", "appName": "Elasticsearch Publisher", "properties": { "elasticNoUrl": false, "elasticUrl": "http://localhost:9200/_bulk", "elasticIndex": "index2", "authType": "none", "transformType": "JSON", "transformFile": "${component.home}/config/groovy/transform.groovy", "processClear": true, "deleteOnClear" : true, "connectionTimeout": 15000, "readTimeout": 15000, "maxRetries": 1, "retryDelay": 15000, "maxRetryDelay": 200000, "retryDelayMultiplier": 1, "maxResults": 1000000, "pageSize": 10000, "idField": "hits._id", "urlField": "hits.fields.url", "timestampField": "hits.fields.submitTime", "debug": false } }

       

      Response

      { "workflow": { "id": "9bdf3efb-c266-46ac-ab59-eb8eda87d9e9", "type": "connector", "description": "Test Workflow", "checksum": "91a18e936fd07149bb29280a217df2be21f08f25f279884fa2aad88b92b53796", "rule": { "type": "application", "_type": "publisher", "description": "ES Publisher", "config": "com.accenture.aspire:aspire-elasticsearch-publisher-source", "appType": "elasticsearch-publisher", "appName": "Elasticsearch_Publisher", "properties": { "elasticNoUrl": true, "elasticHost": "localhost", "elasticPort": 9200, "elasticIndex": "index1", "authType": "none", "transformType": "JSON", "transformFile": "${component.home}/config/groovy/transform.groovy", "processClear": false, "idleConnectionTimeout": 3600000, "maxConnections": 100, "maxConnectionsPerRoute": 10, "connectionTimeout": 15000, "socketTimeout": 15000, "useThrottling": false, "maxRetries": 3, "retryWaitTime": 5000, "batchSize": 50, "simultaneousBatches": 5, "batchTimeout": 5000, "maxResults": 1000000, "pageSize": 10000, "idField": "hits._id", "urlField": "hits.fields.url", "timestampField": "hits.fields.submitTime", "debug": false }, "id": "f91f8807-5081-450f-a210-d1f5db349f5d" } } }

       

      Step 3. Add Elasticsearch Rule to the onPublish event.

      Request

      /aspire/_api/workflows/9bdf3efb-c266-46ac-ab59-eb8eda87d9e9/onPublish/reference

      { "parentId": "", "orderId": 0, "ruleId": "f91f8807-5081-450f-a210-d1f5db349f5d", "enabled": true }

       

      Response

      { "workflow": { "id": "9bdf3efb-c266-46ac-ab59-eb8eda87d9e9", "type": "connector", "description": "Test Workflow", "checksum": "f8bd68229db9ac05fb6bd98a2ef37bef696b4e6ece676a7b2dcbd093014fae14", "event": { "id": "onPublish", "itemId": "c80071e0-5b87-4578-b17c-63c7d7cea336", "rule": { "type": "application", "_type": "publisher", "description": "ES Publisher", "config": "com.accenture.aspire:aspire-elasticsearch-publisher-source", "appType": "elasticsearch-publisher", "appName": "Elasticsearch_Publisher", "properties": { "elasticNoUrl": true, "elasticHost": "localhost", "elasticPort": 9200, "elasticIndex": "index1", "authType": "none", "transformType": "JSON", "transformFile": "${component.home}/config/groovy/transform.groovy", "processClear": false, "idleConnectionTimeout": 3600000, "maxConnections": 100, "maxConnectionsPerRoute": 10, "connectionTimeout": 15000, "socketTimeout": 15000, "useThrottling": false, "maxRetries": 3, "retryWaitTime": 5000, "batchSize": 50, "simultaneousBatches": 5, "batchTimeout": 5000, "maxResults": 1000000, "pageSize": 10000, "idField": "hits._id", "urlField": "hits.fields.url", "timestampField": "hits.fields.submitTime", "debug": false }, "id": "f91f8807-5081-450f-a210-d1f5db349f5d" } } } }

      Copyright © 2024 Accenture

      Contact Us: SCAAssetsSupport@accenture.com

      {"serverDuration": 28, "requestCorrelationId": "b5f93f75935b4224a9d48f08a57a3944"}