Logo

Developers Portal

Integrate and Extend TargetProcess

Screen

Authentication

To access REST Services you must be authenticated, there is no anonymous access.

If you use REST services from within TargetProcess (e.g. from Mashups), REST Api will use the logged TP user for authentication.

There are two common authentication modes for TargetProcess REST API: Basic HTTP authentication and custom Token authentication.

HTTP 401 status code is returned if authentication failed.

Basic Authentication

To use Basic Authentication, you need to send Authorization: Basic header with every request. For example, if you want to be authenticated as admin:admin (login:password), you should send the following request:

GET targetprocess/api/v1/UserStories/ HTTP/1.1
Host: localhost
Authorization: Basic YWRtaW46YWRtaW4=

YWRtaW46YWRtaW4= key is a Base64 encoded login and password values for admin:admin.

Token Authentication

Token authentication mode uses a custom security token provided with URL. To get a security token, you need to request an Authentication REST service via api/v1/Authentication uri. You need to be logged in TargetProcess. The token is valid as long as a user does not change their login or password.

GET targetprocess/api/v1/Authentication HTTP/1.1
Host: localhost
<Authentication Token="YWRtaW46OTRDRDg2Qzg1NjgzQUZDMzg3Qjg2QTVERTAxRTZEQzY="/>

Authentication service supports different formats as well.

The received token could be used with any REST service by adding token={token} request parameter to Uri.

GET targetprocess/api/v1/UserStories/?token=YWRtaW46QUFBMEEwQTAwMEFBQTBBMDBBMEEwQTBBMEEwMEFBMDA= HTTP/1.1
Host: localhost

REST API Chapters

  1. Getting Started
  2. Concepts
    1. Resources and collections
    2. Context
    3. Authentication
    4. Response: Formats, Paging, Filters, Partial Get
    5. Create, update and delete operations
    6. Restful Storage
  3. FAQ
  4. Reference

Authentication

  1. Basic Authentication
  2. Token Authentication
Loading
GoogleJoin the community!
#DEV TargetProcess Group

OctocatTargetProcess at GitHub https://github.com/TargetProcess