• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

API request for smart obejct replacement

New Here ,
Aug 19, 2021 Aug 19, 2021

Copy link to clipboard

Copied

Hi ~! I am new to this community and exploring different APIs provided.

 

I did succeed working with cutout using Sensei API, but I keep getting errors for the smart object one.

 

Does anybody know what I am doing wrong here?

 

{
  "inputs": [
    {
      "storage": "external",
      "href": <myRawGithubUserContent>
    }
  ],
  "options": {
    "layers": [
      {
        "id": 110,
        "name": "Layer 1",
        "locked": true,
        "visible": true,
        "add": {
          "insertAbove": {
            "id": 0,
            "name": "string"
          },
          "insertBelow": {
            "id": 0,
            "name": "string"
          },
          "insertInto": {
            "id": 0,
            "name": "string"
          },
          "insertTop": true,
          "insertBottom": true
        },
        "input": {
          "storage": "external",
          "href": "https://images.unsplash.com/photo-1481349518771-20055b2a7b24?ixid=MnwxMjA3fDB8MHxzZWFyY2h8M3x8cmFuZG9tfGVufDB8fDB8fA%3D%3D&ixlib=rb-1.2.1&w=1000&q=80"
        },
        "bounds": {
          "height": 4,
          "left": 0,
          "top": 0,
          "width": 4
        }
      }
    ]
  },
  "outputs": [
    {
      "href": "https://content.dropboxapi.com/apitul/1/my-path",
      "storage": "dropbox",
      "width": 0,
      "type": "image/jpeg",
      "overwrite": true,
      "compression": "small"
    }
  ]
}

 

I am getting the following errors.

 

{
  "code": 400,
  "invalidParams": [
    {
      "name": "outputs.0",
      "reason": "Must validate 'then' as 'if' was valid"
    },
    {
      "name": "outputs.0.compression",
      "reason": "Must not validate the schema (not)"
    },
    {
      "name": "outputs.0",
      "reason": "Must validate all the schemas (allOf)"
    }
  ],
  "title": "Invalid request parameters",
  "type": "InputValidationError"
}

 

Thanks for your help! 

TOPICS
Actions and scripting

Views

297

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
New Here ,
Aug 19, 2021 Aug 19, 2021

Copy link to clipboard

Copied

Okay. I made it work now, but image is not replaced yet hmm...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 20, 2021 Aug 20, 2021

Copy link to clipboard

Copied

Can you share how to use above code?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 22, 2021 Aug 22, 2021

Copy link to clipboard

Copied

Hi!
Thanks for the reply! I got it working now.

I used the same example code from the API documentation page.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 22, 2021 Aug 22, 2021

Copy link to clipboard

Copied

I think you may have joined Adobe API beta Adobe I/O Program.   You should use the resources provided for that Group.  It is not public Photoshop users here have not knowledge about the API Adobe has in Adobe I/O

 

Photoshop API beta 

 

Photoshop API 

JJMack

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 22, 2021 Aug 22, 2021

Copy link to clipboard

Copied

Hi!
Just one more question. Are Adobe API beta and Photoshop API different? Because on the page that I joined, it shows up as adobe io, but it does say Photoshop API and the one that I am using is Photoshop API manipulating smart object.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 22, 2021 Aug 22, 2021

Copy link to clipboard

Copied

Beta is mostly unstable and most possibly has not fully tested features for another release.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 23, 2021 Aug 23, 2021

Copy link to clipboard

Copied

LATEST

I believe Adobe I/O is an Adobe Beta the  Adobe is having some user test.   Photoshop API seems to be Part of Adobe I/O. And there are some Web Example user can try (Web demos). 

JJMack

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines