github.com/grokify/go-ringcentral-client@v0.3.31/codegen/specs-engagedigital_v3.0.0/openapi-spec_interventions.json (about)

     1  {
     2      "openapi":"3.0.0",
     3      "info":{
     4        "description":"",
     5        "version":"1.0",
     6        "title":"Engage Digital API",
     7        "termsOfService":"https://developer.ringcentral.com"
     8      },
     9      "tags":[
    10        {
    11          "name":"Interventions"
    12        }
    13      ],
    14      "paths":{
    15        "/interventions":{
    16          "get":{
    17            "tags":[
    18              "Interventions"
    19            ],
    20            "summary":"Getting all interventions",
    21            "operationId":"getAllInterventions",
    22            "description":"This method renders interventions ordered by creation date (descending). Only interventions in sources where token’s user has “read” permission are returned.\n\nAuthorization​: no.",
    23            "parameters":[
    24              {
    25                "name":"thread_id",
    26                "in":"query",
    27                "description":"To filter interventions on given thread id.",
    28                "required":false,
    29                "schema":{
    30                  "type":"string"
    31                }
    32              },
    33              {
    34                "name":"user_id",
    35                "in":"query",
    36                "description":"To filter interventions on given user id.",
    37                "required":false,
    38                "schema":{
    39                  "type":"string"
    40                }
    41              },
    42              {
    43                "name":"identity_group_id",
    44                "in":"query",
    45                "description":"To filter interventions on given identity_group_id. This will return interventions associated to any identity in the indentity_group.",
    46                "required":false,
    47                "schema":{
    48                  "type":"string"
    49                }
    50              },
    51              {
    52                "name":"identity_id",
    53                "in":"query",
    54                "description":"To filter interventions on given identity_id(s). Can be a single value or an array.",
    55                "required":false,
    56                "explode":true,
    57                "schema":{
    58                  "type":"array",
    59                  "items":{
    60                    "type":"string"
    61                  }
    62                }
    63              },
    64              {
    65                "name":"sort",
    66                "in":"query",
    67                "description":"To change the criteria chosen to sort the interventions. The value can be “created_at” or “updated_at”.",
    68                "required":false,
    69                "schema":{
    70                  "type":"string",
    71                  "enum":[
    72                    "created_at",
    73                    "updated_at"
    74                  ]
    75                }
    76              },
    77              {
    78                "name":"offset",
    79                "in":"query",
    80                "description":"The record index to start. Default value is 0.",
    81                "required":false,
    82                "schema":{
    83                  "type":"integer",
    84                  "format":"int32"
    85                }
    86              },
    87              {
    88                "name":"limit",
    89                "in":"query",
    90                "description":"The max number of records to return. Default value is 30, max value is 150.",
    91                "required":false,
    92                "schema":{
    93                  "type":"integer",
    94                  "format":"int32"
    95                }
    96              }
    97            ],
    98            "responses":{
    99              "200":{
   100                "description":"Success",
   101                "content":{
   102                  "application/json":{
   103                    "schema":{
   104                      "$ref":"#/components/schemas/GetAllInterventionsResponse"
   105                    }
   106                  }
   107                }
   108              }
   109            }
   110          },
   111          "post":{
   112            "tags":[
   113              "Interventions"
   114            ],
   115            "summary":"Creating an intervention",
   116            "operationId":"createIntervention",
   117            "description":"This method creates a new intervention or reopen it. In case of success it renders the intervention, otherwise, it renders an error (422 HTTP code). This method opens intervention as access token’s user.\n\nAuthorization​: no, but it renders an error if intervention can’t be created or reopened (already opened, etc.).",
   118            "parameters":[
   119              {
   120                "name":"content_id",
   121                "in":"query",
   122                "description":"The content to create intervention on (mandatory).",
   123                "required":true,
   124                "schema":{
   125                  "type":"string"
   126                }
   127              }
   128            ],
   129            "responses":{
   130              "200":{
   131                "description":"Success",
   132                "content":{
   133                  "application/json":{
   134                    "schema":{
   135                      "$ref":"#/components/schemas/GetAllInterventionsResponse"
   136                    }
   137                  }
   138                }
   139              },
   140              "422":{
   141                "description":"Unprocessable Entity"
   142              }
   143            }
   144          }
   145        },
   146        "/interventions/{interventionId}":{
   147          "get":{
   148            "tags":[
   149              "Interventions"
   150            ],
   151            "summary":"Getting an intervention from its id",
   152            "operationId":"getIntervention",
   153            "description":"This method renders an intervention from given id. If token’s user does not have “read” on intervention’s source a 404 HTTP response will be returned.\n\nAuthorization​: no.",
   154            "parameters":[
   155              {
   156                "name":"interventionId",
   157                "in":"path",
   158                "required":true,
   159                "schema":{
   160                  "type":"string"
   161                }
   162              }
   163            ],
   164            "responses":{
   165              "200":{
   166                "description":"Success",
   167                "content":{
   168                  "application/json":{
   169                    "schema":{
   170                      "$ref":"#/components/schemas/Intervention"
   171                    }
   172                  }
   173                }
   174              }
   175            }
   176          }
   177        },
   178        "/interventions/{interventionId}/cancel":{
   179          "delete":{
   180            "tags":[
   181              "Interventions"
   182            ],
   183            "summary":"Cancelling an intervention",
   184            "operationId":"cancelIntervention",
   185            "description":"This method cancels (destroys) an intervention. It renders intervention itself. If token’s user does not have “read” on intervention’s source a 404 HTTP response will be returned.\n\nCaveats:\n\n* If the intervention is already being canceled, it will return a 409 error.\n* To be able to close an intervention, it must meet the following criteria otherwise a 403 will be raised:\n  * Intervention MUST NOT already be closed\n * Intervention MUST NOT have agent replies\n  * Access-Token agent MUST have read access on the source\n\nAuthorization​: no, but it renders an error if intervention can’t be destroyed (see caveats).",
   186            "parameters":[
   187              {
   188                "name":"interventionId",
   189                "in":"path",
   190                "required":true,
   191                "schema":{
   192                  "type":"string"
   193                }
   194              }
   195            ],
   196            "responses":{
   197              "200":{
   198                "description":"Success",
   199                "content":{
   200                  "application/json":{
   201                    "schema":{
   202                      "$ref":"#/components/schemas/Intervention"
   203                    }
   204                  }
   205                }
   206              }
   207            }
   208          }
   209        },
   210        "/interventions/{interventionId}/reassign":{
   211          "put":{
   212            "tags":[
   213              "Interventions"
   214            ],
   215            "summary":"Reassigning an intervention",
   216            "operationId":"reassignIntervention",
   217            "description":"This method updates the user in charge of the intervention\n\nAuthorization​: Only users who can update interventions.",
   218            "parameters":[
   219              {
   220                "name":"interventionId",
   221                "in":"path",
   222                "required":true,
   223                "schema":{
   224                  "type":"string"
   225                }
   226              },
   227              {
   228                "name":"user_id",
   229                "in":"query",
   230                "required":true,
   231                "schema":{
   232                  "type":"string"
   233                }
   234              }
   235            ],
   236            "responses":{
   237              "200":{
   238                "description":"Success",
   239                "content":{
   240                  "application/json":{
   241                    "schema":{
   242                      "$ref":"#/components/schemas/Intervention"
   243                    }
   244                  }
   245                }
   246              }
   247            }
   248          }
   249        },
   250        "/interventions/{interventionId}/close":{
   251          "put":{
   252            "tags":[
   253              "Interventions"
   254            ],
   255            "summary":"Closing an intervention",
   256            "operationId":"closeIntervention",
   257            "description":"This method closes an intervention. Caveats:\n\n* If the intervention is already being closed, it will return a 409 error.\n* To be able to close an intervention, it must meet the following criteria otherwise a 403 will be raised:\n\n  * Intervention MUST NOT already be closed\n\n  * Intervention MUST have agent replies\n  * Access-Token agent MUST be the owner of the intervention or have the permission to edit permissions\n\n  * Access-Token agent MUST have read access on the source\n\nAuthorization​: no, but it renders an error if intervention can’t be closed (see caveats)",
   258            "parameters":[
   259              {
   260                "name":"interventionId",
   261                "in":"path",
   262                "required":true,
   263                "schema":{
   264                  "type":"string"
   265                }
   266              }
   267            ],
   268            "responses":{
   269              "200":{
   270                "description":"Success",
   271                "content":{
   272                  "application/json":{
   273                    "schema":{
   274                      "$ref":"#/components/schemas/Intervention"
   275                    }
   276                  }
   277                }
   278              },
   279              "409":{
   280                "description":"If the intervention is already being closed, it will return a 409 error."
   281              }
   282            }
   283          }
   284        },
   285        "/interventions/{interventionId}/update_categories":{
   286          "put":{
   287            "tags":[
   288              "Interventions"
   289            ],
   290            "summary":"Categorizing an intervention",
   291            "operationId":"categorizeIntervention",
   292            "description":"This method updates the categories of an intervention. If token’s user does not have “read” on the intervention’s source a 404 HTTP response will be returned.\n\nAuthorization​: no.",
   293            "parameters":[
   294              {
   295                "name":"interventionId",
   296                "in":"path",
   297                "required":true,
   298                "schema":{
   299                  "type":"string"
   300                }
   301              },
   302              {
   303                "name":"category_ids[]",
   304                "in":"query",
   305                "required":true,
   306                "schema":{
   307                  "type":"array",
   308                  "items":{
   309                    "type":"string"
   310                  }
   311                }
   312              }
   313            ],
   314            "responses":{
   315              "200":{
   316                "description":"Success",
   317                "content":{
   318                  "application/json":{
   319                    "schema":{
   320                      "$ref":"#/components/schemas/Intervention"
   321                    }
   322                  }
   323                }
   324              }
   325            }
   326          }
   327        }
   328      },
   329      "servers":[
   330        {
   331          "url":"https://DOMAIN.api.engagement.dimelo.com/1.0"
   332        }
   333      ],
   334      "components":{
   335        "schemas":{
   336          "GetAllInterventionsResponse":{
   337            "properties":{
   338              "count":{
   339                "type":"integer",
   340                "format":"int32"
   341              },
   342              "limit":{
   343                "type":"integer",
   344                "format":"int32"
   345              },
   346              "offset":{
   347                "type":"integer",
   348                "format":"int32"
   349              },
   350              "records":{
   351                "type":"array",
   352                "items":{
   353                  "$ref":"#/components/schemas/Intervention"
   354                }
   355              }
   356            }
   357          },
   358          "Intervention":{
   359            "required":[
   360              "id"
   361            ],
   362            "properties":{
   363              "id":{
   364                "type":"string"
   365              },
   366              "created_at":{
   367                "type":"string",
   368                "format":"date-time"
   369              },
   370              "updated_at":{
   371                "type":"string",
   372                "format":"date-time"
   373              },
   374              "source_id":{
   375                "type":"string"
   376              },
   377              "thread_id":{
   378                "type":"string"
   379              },
   380              "content_id":{
   381                "type":"string"
   382              },
   383              "deferred_at":{
   384                "type":"string",
   385                "format":"date-time"
   386              },
   387              "identity_id":{
   388                "type":"string"
   389              },
   390              "comments_count":{
   391                "type":"integer"
   392              },
   393              "closed":{
   394                "type":"boolean"
   395              },
   396              "closed_at":{
   397                "type":"string",
   398                "format":"date-time"
   399              },
   400              "custom_fields":{
   401                "type":"object"
   402              },
   403              "category_ids":{
   404                "type":"array",
   405                "items":{
   406                  "type":"string"
   407                }
   408              },
   409              "user_id":{
   410                "type":"string"
   411              },
   412              "user_replies_count":{
   413                "type":"integer"
   414              },
   415              "user_reply_in_average":{
   416                "type":"integer"
   417              },
   418              "user_reply_in_average_bh":{
   419                "type":"integer"
   420              },
   421              "user_reply_in_average_count":{
   422                "type":"integer"
   423              },
   424              "first_user_reply_id":{
   425                "type":"string"
   426              },
   427              "first_user_reply_in":{
   428                "type":"integer"
   429              },
   430              "first_user_reply_in_bh":{
   431                "type":"integer"
   432              },
   433              "last_user_reply_in":{
   434                "type":"integer"
   435              },
   436              "last_user_reply_in_bh":{
   437                "type":"integer"
   438              },
   439              "status":{
   440                "type":"string"
   441              }
   442            }
   443          }
   444        }
   445      }
   446    }