Projets

Comment créer et récupérer des projets.

Projets

Créez un nouveau projet en spécifiant son name.

POST

/api/v1/projects

NomTypeDescription
namestringLe nom du projet que vous créez (par ex. MyApp, Production, Staging) (obligatoire)

Authorization: {YOUR_ORGANIZATION_API_KEY} : La clé se trouve dans ‘Preferences’ > ‘Account’ > ‘Organization API Key’.

200 : Réponse envoyée au format JSON dans le corps

curl -X POST \
  https://openreplay.example.com/api/v1/projects/MyFirstProject \
  -H 'content-type: application/json' \
  -H 'Authorization: {YOUR_ORGANIZATION_API_KEY}'
  --data-raw '{
    "name": "MyFirstProject"
}'
{
  "data": {
    "projectKey": "QsLA07Oa5sqTfwnNaFwS",
    "name": "MyFirstProject",
    "gdpr": {
      "maskEmails": true,
      "sampleRate": 50,
      "maskNumbers": true,
      "defaultInputMode": "plain"
    }
  }
}

Renvoie les détails du projet spécifié.

GET

/api/v1/projects/:projectKey

NomTypeDescription
projectKeystringL’identifiant du projet que vous suivez (obligatoire)

Authorization: {YOUR_ORGANIZATION_API_KEY} : La clé se trouve dans ‘Preferences’ > ‘Account’ > ‘Organization API Key’.

200 : Réponse envoyée au format JSON dans le corps

curl -X GET \
  https://openreplay.example.com/api/v1/projects/7ePSXFuQVidq9pqS6Xyn \
  -H 'content-type: application/json' \
  -H 'Authorization: {YOUR_ORGANIZATION_API_KEY}'
{
  "data": {
    "projectKey": "7ePSXFuQVidq9pqS6Xyn",
    "name": "MyFirstProject"
  }
}

Renvoie la liste des projets existants.

GET

/api/v1/projects

Authorization: {YOUR_ORGANIZATION_API_KEY} : La clé se trouve dans ‘Preferences’ > ‘Account’ > ‘Organization API Key’.

200 : Réponse envoyée au format JSON dans le corps

curl -X GET \
  https://openreplay.example.com/api/v1/projects \
  -H 'content-type: application/json' \
  -H 'Authorization: {YOUR_ORGANIZATION_API_KEY}'
{
  "data": {
    "projectKey": "7ePSXFuQVidq9pqS6Xyn",
    "name": "MyFirstProject"
  },
  {
    "projectKey": "9cACFRuQVidq0sqS7Bny",
    "name": "MySecondProject"
  }
}