Advanced request authentication REST API

You have the ability to set your own custom headers for IssueSYNC requests, which takes care of synchronizing process.

When would you like to use it?

  • Especially when you are using any additional authentication for your server access
  • If your server requires special header

REST API:

You will set headers per each IssueSYNC connection separately.
To determine the connection and authenticate you will need to send connection name and hashed value of local connection authorization key.

You need to include two headers for each REST call:

  1. JIRA authentication header:
    1. OAuth - please check https://developer.atlassian.com/cloud/jira/platform/jira-rest-api-oauth-authentication/)
    2. Basic auth - please check https://developer.atlassian.com/cloud/jira/platform/jira-rest-api-basic-authentication/

    3. Cookie-based - please check https://developer.atlassian.com/cloud/jira/platform/jira-rest-api-cookie-based-authentication/
  2. IssueSYNC's connection authorization header:
    Example:

    1. Let's assume your Local Authorization Key for connection is "myAuthorizationKey "

    2. md5 encoded key will look like "e91b7bb370f609b41d7d7d03ff997998"
    3. now you just need to include this header to request
      {"LocalAuthKey":"23c28e1b85bdfd5f786ee67a51d640b4"}

Basic Responses:

STATUS: 200 - everything is ok with your request

STATUS: 201 - everything is ok with your request, your headers has been created, updated or deleted properly.

STATUS: 400 - Please check your JSON

STATUS: 401 - You are not authorized, please verify both of JIRA and IssueSYNC's headers

<status>
	<status-code>401</status-code>
	<message>Client must be authenticated to access this resource.</message>
</status>

STATUS: 500 - Internal server error, please try again or contact your JIRA administrator

  1. Check your current additional headers GET 

    URI: /rest/synchronizer/1.0/headers/get/{connectionName}
    Headers: you need to include JIRA authorization header and IssueSYNC's connection local key header
    Responses:

    STATUS: 200

    {status:"OK",
     headers:{
    	X-Header-Jira:"token-A",
        X-Header-Authorize:"token-B",
        My-Server-Secret-Token:"token-C"
    	}
    }

    STATUS: 401

    {"Description for given status does not exist"}
  2. Set headers PUT /rest/synchronizer/1.0/headers/create

    URI: /rest/synchronizer/1.0/headers/create
    Headers: you need to include JIRA authorization header and IssueSYNC's connection local key header
    Request body example:

    {connectionName:"{connectionName}",
     customHeaders:{
    	X-Header-Jira:"token1",
    	X-Header-Authorize:"token2",
    	My-Server-Secret-Token:"token3"
    }
    }
    
    

    Responses:
    STATUS: 201

    {"Headers created or replaced properly."}

    *Please bear in mind putting new headers will remove old ones.

  3. Delete headers DELETE /rest/synchronizer/1.0/headers/delete/{connectionName}

    URI: rest/synchronizer/1.0/headers/delete/{connectionName}
    Headers: you need to include JIRA authorization header and IssueSYNC's connection local key header
    Responses:
    STATUS: 200

    {"Operation processed properly."}