Tag API

1.1 Overview

The Tag API enables crowd owner with external systems to make requests from a third-party application to SAP Field Service Management, where they can share tags to Partner Portal and facilitate the self-management of skills.

For more information on the SAP Field Service Management Crowd platform, please refer to the following documentation:

Crowd


1.1.1 Supported Requests

The following requests are supported by the Tag API:

Method Description
GET Retrieve the allowed tags.
Post Create a tag with partner flag.
PUT Update a tag with partner flag.
DELETE Delete a tag with partner flag.

1.1.2 Tag API in Swagger

The Swagger specification for the Tag API can be accessed here.


1.2 Access

The Tag API uses Oauth 2.0 for authentication. This token is then used in the Authorization header as the bearer.

Attention: In order to receive an access token, you must have ADMINISTRATOR or SUPERUSER privileges.


1.2.1 Get Access Token

The following example shows how to get the access token for a Cloud Account or a Company User:


Cloud Account


The following example is an example of authentication for an SAP Cloud account with access to all companies within the account:


POST https://auth.coresuite.com/api/oauth2/v1/token HTTP/1.1

Host et.dev.coresuite.com
Authorization Basic dGVzdDpzZWNyZXQ=
Content-Type application/x-www-form-urlencoded

grant_type=password&username=cym&password=passwordExample123


Company User


The following example of authentication for a company user, with access to companies controlled by existing subscription and permission settings:


POST https://auth.coresuite.com/api/oauth2/v1/token HTTP/1.1

Host et.dev.coresuite.com
Authorization Basic dGVzdDpzZWNyZXQ=
Content-Type application/x-www-form-urlencoded

grant_type=password&username=cym/manager&password=passwordExample123


1.2.2 Response

The following is an example of a typical response:

{
  "access_token": "77cf4834-a347-4849-839b-4518823a739e",
  "token_type": "bearer",
  "expires_in": 43199,
  "scope": "general",
  "cluster_url": "https://et.dev.coresuite.com",
  "account": "testaccount",
  "account_id" : 284,
  "user": "manager",
  "user_email": "test@coresuite.ch",
  "companies": [
    {
      "id": 957,
      "name": "SBODemoCH",
      "description": "OEC Computers (Schweiz)"
    }
  ],
 }
 

1.2.3 Error Response

{
  "error": "invalid_grant",
  "error_description": "Bad credentials"
}


1.2.4 Supported Clusters

Depending on the location of the account, requests will be made to one of the following server clusters:

  • EU
  • DE
  • US
  • CN
  • AU

Account information, including cluster assignment, are obtained from the Directory API.

This information is passed into requests made to the Tag API as follows:

https://{cluster}.coresuite.com/cloud-crowd-service/api/crowd-partner/v1/tags/


1.3 Use Postman to Call Tag API

Here is an example of using Postman to call Tag API:

  1. Use GET endpoint https://eu.coresuite.com/cloud-crowd-service/api/crowd-partner/v1/tags/ to get all of the tags in the response (cURL download).



  1. Copy the tag id that you want to set as sharable to partner.
  2. Use PUT endpoint https://eu.coresuite.com/cloud-crowd-service/api/crowd-partner/v1/tags/ to update tag and set sharedForPartners as true (cURL download).
  3. Replace the placeholder `` with your copied tag id in step 2.
  4. Specify the following code in the body:
  {
    "sharedForPartners": true
  }