Add member to project
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({role: 'member'})
};
fetch('http://localhost:4005/v1/arc/projects/:id/members/:userId', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:4005/v1/arc/projects/:id/members/:userId"
payload := strings.NewReader("{\n \"role\": \"member\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}curl --request POST \
--url http://localhost:4005/v1/arc/projects/:id/members/:userId \
--header 'Content-Type: application/json' \
--data '
{
"role": "member"
}
'import requests
url = "http://localhost:4005/v1/arc/projects/:id/members/:userId"
payload = { "role": "member" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"id": "<string>",
"projectId": "<string>",
"userId": "<string>",
"role": "admin",
"createdAt": "2023-11-07T05:31:56Z"
},
"meta": {
"requestId": "<string>",
"timestamp": "<string>"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"requestId": "<string>",
"timestamp": "<string>"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"requestId": "<string>",
"timestamp": "<string>"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"requestId": "<string>",
"timestamp": "<string>"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"requestId": "<string>",
"timestamp": "<string>"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"requestId": "<string>",
"timestamp": "<string>"
}
}Projects
Add member to project
Add a user as a member of the project. Requires project admin role.
POST
/
v1
/
arc
/
projects
/
:id
/
members
/
:userId
Add member to project
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({role: 'member'})
};
fetch('http://localhost:4005/v1/arc/projects/:id/members/:userId', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:4005/v1/arc/projects/:id/members/:userId"
payload := strings.NewReader("{\n \"role\": \"member\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}curl --request POST \
--url http://localhost:4005/v1/arc/projects/:id/members/:userId \
--header 'Content-Type: application/json' \
--data '
{
"role": "member"
}
'import requests
url = "http://localhost:4005/v1/arc/projects/:id/members/:userId"
payload = { "role": "member" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"id": "<string>",
"projectId": "<string>",
"userId": "<string>",
"role": "admin",
"createdAt": "2023-11-07T05:31:56Z"
},
"meta": {
"requestId": "<string>",
"timestamp": "<string>"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"requestId": "<string>",
"timestamp": "<string>"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"requestId": "<string>",
"timestamp": "<string>"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"requestId": "<string>",
"timestamp": "<string>"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"requestId": "<string>",
"timestamp": "<string>"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"requestId": "<string>",
"timestamp": "<string>"
}
}Body
application/json
Available options:
admin, member, viewer Was this page helpful?