on 2022 Jun 29 3:41 PM
Hi guys,
we are trying to update the OrganizationalStructure as per documentation - https://help.sap.com/docs/SAP_FIELD_SERVICE_MANAGEMENT/fsm_admin/org-structure.html?locale=en-US.
However, when we tried to test the following API call:
curl --location --request POST '[Base URL]/api/v1/levels/{level-id}/allocations' \
--header 'X-Client-ID: [client_id]' \
--header 'X-Client-Version: 1.0' \
--header 'Content-Type: application/json' \
--header 'X-Account-ID: [account_id]' \
--header 'X-Company-ID: [company_id]' \
--header 'Authorization: Bearer [bearer token]'--data-raw '{
"role": "MANAGER",
"unifiedPersonId": "ec990550-52f3-4aa3-b0b2-b952a886c302"
}'
We get the following response:
{
"timestamp": "2022-06-29T14:09:53.650930Z",
"status": "401 UNAUTHORIZED",
"error": "ERROR_010: Access Denied",
"message": "The authentication credentials are missing or invalid"
}
Could somebody show us how we should retrieve the authorization token for this API call? (currently we are using ClientId and ClientSecret)
Request clarification before answering.
Hi Tomas,
Thank you for your question.
The authorization token must be retrieved using the password grant type and providing a user which has the SUPERUSER role assigned.
You can find this in the Access section in the docs: https://help.sap.com/docs/SAP_FIELD_SERVICE_MANAGEMENT/fsm_admin/org-structure.html?locale=en-US
If something should not be clear feel free to get back to me.
Best
Nicolas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nicolas,
I'm trying to update Organization structure in FSM using API call.
url : https://us.coresuite.com/cloud-org-level-service/api/v1/levels
Headers included: X-Client-ID, X-Client-Version, X-Account-ID and X-Company-ID.
However, I'm stuck with below error message.
{ "timestamp": "2023-05-22T11:10:02.181197878Z", "status": "405 METHOD_NOT_ALLOWED", "error": "ERROR_018: Request method not supported (method=POST)", "message": "The request method is not supported for the given uri (method=POST)"}
Is there any way to update the FSM organization structure using API call?
Thanks,
Nischitha
User | Count |
---|---|
5 | |
4 | |
4 | |
3 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.