Skip to main content
PUT
/
api
/
customer
/
{customerId}
/
crp
/
{CRPId}
/
role
/
{roleId}
updateCrpRole
curl --request PUT \
  --url https://api.artemis.cynopsis.co/api/customer/{customerId}/crp/{CRPId}/role/{roleId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "role": "<string>",
  "appointedDate": "2023-12-25",
  "id": 123,
  "resignedDate": "2023-12-25"
}
'
import requests

url = "https://api.artemis.cynopsis.co/api/customer/{customerId}/crp/{CRPId}/role/{roleId}"

payload = {
"role": "<string>",
"appointedDate": "2023-12-25",
"id": 123,
"resignedDate": "2023-12-25"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
role: '<string>',
appointedDate: '2023-12-25',
id: 123,
resignedDate: '2023-12-25'
})
};

fetch('https://api.artemis.cynopsis.co/api/customer/{customerId}/crp/{CRPId}/role/{roleId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.artemis.cynopsis.co/api/customer/{customerId}/crp/{CRPId}/role/{roleId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'role' => '<string>',
'appointedDate' => '2023-12-25',
'id' => 123,
'resignedDate' => '2023-12-25'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.artemis.cynopsis.co/api/customer/{customerId}/crp/{CRPId}/role/{roleId}"

payload := strings.NewReader("{\n \"role\": \"<string>\",\n \"appointedDate\": \"2023-12-25\",\n \"id\": 123,\n \"resignedDate\": \"2023-12-25\"\n}")

req, _ := http.NewRequest("PUT", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.put("https://api.artemis.cynopsis.co/api/customer/{customerId}/crp/{CRPId}/role/{roleId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"role\": \"<string>\",\n \"appointedDate\": \"2023-12-25\",\n \"id\": 123,\n \"resignedDate\": \"2023-12-25\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.artemis.cynopsis.co/api/customer/{customerId}/crp/{CRPId}/role/{roleId}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"role\": \"<string>\",\n \"appointedDate\": \"2023-12-25\",\n \"id\": 123,\n \"resignedDate\": \"2023-12-25\"\n}"

response = http.request(request)
puts response.read_body
{
  "appointedDate": "2023-12-25",
  "createdAt": {
    "date": 123,
    "day": 123,
    "hours": 123,
    "minutes": 123,
    "month": 123,
    "nanos": 123,
    "seconds": 123,
    "time": 123,
    "timezoneOffset": 123,
    "year": 123
  },
  "createdBy": {
    "email": "<string>",
    "firstName": "<string>",
    "fullName": "<string>",
    "id": 123,
    "lastName": "<string>"
  },
  "id": 123,
  "resignedDate": "2023-12-25",
  "role": "<string>",
  "updatedAt": {
    "date": 123,
    "day": 123,
    "hours": 123,
    "minutes": 123,
    "month": 123,
    "nanos": 123,
    "seconds": 123,
    "time": 123,
    "timezoneOffset": 123,
    "year": 123
  },
  "updatedBy": {
    "email": "<string>",
    "firstName": "<string>",
    "fullName": "<string>",
    "id": 123,
    "lastName": "<string>"
  }
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

CRPId
integer<int64>
required

CRPId

customerId
integer<int64>
required

customerId

roleId
integer<int64>
required

roleId

Body

application/json

crpRoleRequestDto

role
string
required
appointedDate
string<date>
id
integer<int64>
resignedDate
string<date>

Response

OK

appointedDate
string<date>
createdAt
Timestamp · object
createdBy
UserInfo · object
id
integer<int64>
resignedDate
string<date>
role
string
updatedAt
Timestamp · object
updatedBy
UserInfo · object